← 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
open
Author
tigarmo
Labels
Created
2023-11-28 22:48:01+00:00
Updated
2025-03-11 14:28:40+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

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

No evaluation history available.