← 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 its toolchain before Cargo reports a missing manifest when the build directory is empty; historical source-subdir handling was fixed, but explicit preflight validation remains absent.

Suggested action: needs triage

Reason: The report gives an exact Cargo failure and requests a small preflight check, but no activity has occurred since 2017. Commit 2c957a311 fixed the related source-subdir behavior, while the current Rust plugin still invokes toolchain setup before its build-time manifest lookup; maintainers should confirm whether early validation is still desired.

Evaluated by: mr-cal-bot

Impact: 28 Quick Win: 20 Complexity: 16 Confidence: 94 Actionability: 84

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
stealth/space-bunny-alpha
Impact: 28
Quick Win: 20
Complexity: 16
Confidence: 94
Actionability: 84
needs triage Rust plugin downloads its toolchain before Cargo reports a missing manifest when the build directory is empty; historical source-subdir handling was fixed, but explicit preflight validation remains absent.
stealth/space-bunny-alpha
Impact: 28
Quick Win: 8
Complexity: 38
Confidence: 78
Actionability: 48
close resolved An empty build directory caused Rust source-subdir builds to download the toolchain before Cargo failed; PR #1296 later fixed source-subdir handling so Cargo.toml is found.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 22
Complexity: 10
Confidence: 85
Actionability: 80
keep open Rust plugin in craft-parts should validate Cargo.toml exists before downloading rust toolchain to fail early with clear error
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22
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.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1685562 (confidence 98%)

    That issue was closed by commit 2c957a311, which fixed source-subdir handling but did not add the requested early Cargo.toml validation.

Related issues

No related issues found above the similarity threshold.