← Back to issue list

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

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1654764
Type
issue
State
closed
Author
~elopio
Labels
plugin
Created
Updated
Closed

Current evaluation

Closed without resolution. The rust plugin incorrectly generated Cargo.lock in the repository root rather than the part directory, causing outdated lockfiles when Cargo.toml changed.

Suggested action:

No scores available.

Issue body

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

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without resolution. The rust plugin incorrectly generated Cargo.lock in the repository root rather than the part directory, causing outdated lockfiles when Cargo.toml changed.
qwen/qwen3.6-35b-a3b Closed without comments or explicit resolution, likely abandoned or auto-closed due to inactivity. The report identified a bug where the rust plugin incorrectly generated Cargo.lock outside the part directory, causing outdated lock files when Cargo.toml changed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1685562 The rust plugin fails when using source_subdir snapcraft (launchpad) closed Abandoned due to inactivity. The Rust plugin failed to locate Cargo.toml when source_subdir was specified, causing fetch errors. No fix was implemented.
77%
#1654768 rust plugin doesn't check if the Cargo.toml file exists snapcraft (launchpad) open Rust plugin downloads the Rust toolchain before validating that Cargo.toml exists, causing a confusing late failure. Open ~10 years with zero comments; plugin now lives in craft-parts and still lacks an early existence check.
75%