← Back to issue list

rust plugin doesn't check if the Cargo.toml file exists

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1654768
Type
issue
State
open
Author
~elopio
Labels
bitesize plugin
Created
Updated
Closed

Current evaluation

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.

Suggested action: needs triage

Reason: The issue is a genuine, well-scoped bug (fail early before downloading rust when Cargo.toml is missing) but has zero comments, no labels beyond 'bitesize'/'plugin', and no maintainer response in ~10 years, so it has never been triaged. I could not confirm whether craft-parts' rust plugin now validates Cargo.toml before the rustup download (grep only shows a read-manifest check at build time), so a maintainer should verify current behavior before closing or fixing.

Impact: 30 Quick Win: 22.5 Staleness: 90 Complexity: 25 Confidence: 70 Support Request: 10

Issue body

Our rust plugin uses cargo to build the snap. Before checking if the Cargo.toml file, it downloads rust, and then it fails with: error: could not find `Cargo.toml` in `/home/ubuntu/workspace/canonical/snapcraft/integration_tests/snaps/rust-subdir/parts/rust-subdir/build` or any parent directory Before downloading anything, the plugin should make sure that the cargo file exists, to fail early if it doesn't.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22.5
Staleness: 90
Complexity: 25
Confidence: 70
Support Request: 10
needs triage 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.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 5
close stale Rust plugin downloads dependencies before validating Cargo.toml existence, causing confusing errors. Issue is nearly 10 years old with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 80
Support Request: 10
close stale Rust plugin downloads dependencies before verifying Cargo.toml existence, causing confusing errors. Open for ~9.5 years with no maintainer interaction or follow-up.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 85
Support Request: 5
close stale Rust plugin downloads dependencies before validating Cargo.toml existence, causing late failures. Issue is over 9 years old with no maintainer interaction or updates.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 85
Support Request: 5
close stale Rust plugin downloads dependencies before verifying Cargo.toml existence, causing delayed failures. Should validate early. Open, unassigned, awaiting triage or fix.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1654764 (confidence 60%)

    Sister bug about the rust plugin mishandling Cargo.toml/Cargo.lock in the part dir; closed without resolution, shows the plugin's Cargo.toml handling has had repeated issues.

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.
75%
#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.
71%