The rust plugin fails when using source_subdir
Metadata
Current evaluation
Abandoned due to inactivity. The Rust plugin failed to locate Cargo.toml when source_subdir was specified, causing fetch errors. No fix was implemented.
Suggested action: —
No scores available.
Issue body
When trying to make a rust snap that has uses source-subdir, it fails during fetch:
/home/ubuntu/workspace/canonical/snapcraft/integration_tests/snaps/rust-subdir/parts/rust-subdir/rust/bin/cargo fetch --manifest-path /home/ubuntu/workspace/canonical/snapcraft/integration_tests/snaps/rust-subdir/parts/rust-subdir/src/Cargo.toml
error: manifest path `/home/ubuntu/workspace/canonical/snapcraft/integration_tests/snaps/rust-subdir/parts/rust-subdir/src/Cargo.toml` does not exist
It's looking for the Cargo.toml file in source, not in source-subdir.
Steps to reproduce:
Go to integration_tests/snaps/rust-subdir
Edit the snapcraft.yaml to have:
source: .
source-subdir: subdir
Run snapcraft
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Abandoned due to inactivity. The Rust plugin failed to locate Cargo.toml when source_subdir was specified, causing fetch errors. No fix was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Rust plugin failure with source-subdir was closed without comments or resolution, indicating abandonment. No fix or merge details were provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Rust plugin source_subdir path resolution failure was closed without resolution. No comments or fixes were provided, indicating the report was abandoned. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Abandoned. The Rust plugin incorrectly resolved Cargo.toml paths when source-subdir was specified, causing cargo fetch failures. No comments or resolution were provided. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1654764 The rust plugin is not using the Cargo.toml from the part dir | snapcraft (launchpad) | closed | 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. | |
| #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. |