The rust plugin is not using the Cargo.toml from the part dir

Bug #1654764 reported by Leo Arias
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Leo Arias

Bug Description

When running the rust plugin, the repository will get a Cargo.lock file next to the Cargo.toml file.

This Cargo.lock should be created instead in the parts/project/src directory, to keep the repository clean.

This is a considerable problem, because if the Cargo.toml file changes, it is ignored because the Cargo.lock file stays outdated.

To reproduce:

cd integration_tests/snaps/simple-rust
snapcraft
ls Cargo.lock

Tags: plugin
Revision history for this message
Leo Arias (elopio) wrote :

This will also make it fail if the Cargo.toml file is not in the cwd where snapcraft is being called.

Leo Arias (elopio)
Changed in snapcraft:
assignee: nobody → Leo Arias (elopio)
status: New → In Progress
Revision history for this message
Leo Arias (elopio) wrote :
summary: - The rust plugin leaves a Cargo.lock file in the repository
+ The rust plugin is not using the Cargo.toml from the part dir
Changed in snapcraft:
milestone: none → 2.25
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.