← Back to issue list

fix(plugins/rust): don't require rustup when rust-deps is defined

View original Github issue

Metadata

Project
craft-parts
Number
#1774
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Fixed a regression in the Rust plugin where rust-deps provisioning failed without rust-channel: none by removing the unnecessary rustup requirement. Merged in #1774.

Resolution: closed resolved

Reason: The PR was merged, fixing a regression introduced in #903 where the Rust plugin incorrectly required rustup when using the rust-deps part. The fix removes the strict rustup dependency check, allowing rust-channel: none to work as documented.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Fixes a bug introduced in #903, where using the `rust-deps` part to provision the Rust toolchain would fail with an unhelpful error when `rust-channel: "none"` was not defined. Even the [example in the docs](https://documentation.ubuntu.com/craft-parts/latest/common/craft-parts/reference/plugins/rust_plugin/#dependencies) doesn't work. The first commit makes the one-line fix. The subsequent 3 commits have no behavioral changes - they improve the readibility of the code, error messages, and tests. Fixes https://github.com/canonical/snapcraft/issues/6330 Fixes https://bugs.launchpad.net/snapcraft/+bug/2161202 Also reported at https://forum.snapcraft.io/t/correct-snapcraft-syntax-for-rust-based-snap-on-core22/30947/7 (SNAPCRAFT-1399) --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/craft-parts/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [x] I've added or updated any relevant documentation. - [x] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [x] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b — closed resolved Fixed a regression in the Rust plugin where rust-deps provisioning failed without rust-channel: none by removing the unnecessary rustup requirement. Merged in #1774.

Update history

Date Change
merged
updated
updated
updated
updated
created

Related work

Related issues

Issue Project State Summary Similarity
#2538 rust plugin: fix usage of rust-channel snapcraft merged Merged PR #2538 fixed Rust plugin toolchain setup by using rustup instead of the obsolete rustup.sh --channel argument; resolving commit: 4eb089546.
75%
#894 fix(plugins/rust): fix snap dependency handling craft-parts closed PR #894 was superseded by #903, merged as dc79714c, correcting Rust plugin dependency validation and rustup installation behavior.
73%
#1467 rust plugin: new rustup snapcraft closed Updated the Rust plugin’s outdated rustup download link via merged PR #2438 (commit ea6caa72b), resolving LP bug #1662960.
72%
#560 rust_plugin: multiple fixes craft-parts merged Merged rust_plugin fixes: removed typing checks around the rust_channel override and added detection/removal of installed compiler plugins via the .data.rel.ro symbol. Squash-merged as fbefe6b8; fixes #559.
71%