← Back to issue list

Wrong default in docs for the Rust plugin

View original Github issue

Metadata

Project
craft-parts
Number
#593
Type
issue
State
closed
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

Documentation incorrectly stated the Rust plugin rust-channel defaults to stable instead of None, causing build failures. The docs were corrected to reflect the actual None default. Resolved and closed via PR 1681.

Suggested action:

No scores available.

Issue body

### Bug Description The [docs](https://github.com/canonical/craft-parts/blob/main/craft_parts/plugins/rust_plugin.py#L122) say that `rust-channel` defaults to `stable`, but from the [code itself](https://github.com/canonical/craft-parts/blob/main/craft_parts/plugins/rust_plugin.py#L53) it looks like it defaults to `None`. This is a problem because the semantics are different in a big way: if a part uses the `rust` plugin but doesn't specify `rust-channel`, the docs says that `stable` rust will be automatically provisioned but in fact the build will fail because the code assumes that something else (a buid-snap/package, a different part, etc) is provisioning the toolchain. As for the fix: the easiest, backwards-compatible fix is to just fix the documentation to say that it defaults to `None` and as such rust must be provisioned some other way. ### To Reproduce n/a ### part yaml _No response_ ### Relevant log output ```shell n/a ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Documentation incorrectly stated the Rust plugin rust-channel defaults to stable instead of None, causing build failures. The docs were corrected to reflect the actual None default. Resolved and closed via PR 1681.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 31.5
Staleness: 75
Complexity: 10
Confidence: 90
Support Request: 0
needs triage Rust plugin docs incorrectly state rust-channel defaults to 'stable' while the code defaults to None, so builds fail without an explicitly provisioned toolchain. Docs still wrong at HEAD; issue open, unlabelled, no maintainer response since May 2024.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 10
Confidence: 85
Support Request: 0
close stale Documentation incorrectly states rust-channel defaults to stable instead of None, causing build failures when not explicitly provisioned. Issue remains open with no maintainer response since May 2024.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 10
Confidence: 85
Support Request: 10
needs triage Documentation incorrectly states rust-channel defaults to stable, while code defaults to None. Unaddressed for over two years, awaiting maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 10
Confidence: 75
Support Request: 10
needs triage Docs incorrectly state the Rust plugin rust-channel defaults to stable, but code defaults to None. Unspecified channel causes build failures. Suggests aligning docs with code. Issue remains open, awaiting triage, with an internal Jira ticket created.

Update history

Date Change
closed

Related issues

Issue Project State Summary Similarity
#1681 docs: update reference for the rust plugin craft-parts merged Updates the Rust plugin reference doc to match current behavior (rust-channel default is None, rust-deps usage). Fixes craft-parts#912 and #593. Approved by 2 reviewers; CI mostly green with unrelated java/flaky failures.
71%