Suggest another toolchain when removing a component unavailable to the current toolchain
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Look at src/errors.rs around line 141 for the RustupError::UnknownComponents variant. The issue is about improving the error suggestion when a component add/remove fails because it's unavailable for the current toolchain. Examine how toolchain suggestions are made elsewhere (like in #4164). Start by understanding the component management logic in rustup, then modify the error handling to suggest an alternative toolchain where the component is available. Run existing tests related to component commands to ensure the new suggestion works.
Written by the indexing model from the issue text.
Description
Similar to the case in #4164:
rustup updatefails (unrelated to issue)
rustup target remove wasm32-wasifails
rustup +target remove wasm32-wasisucceeds, as the default toolchain was nightly as specified in.rustup/settings.toml
... however the related error kind is RustupError::UnknownComponents which would be emitted during both rustup component add and rustup component rm (instead of the rustup target rm command shown above):
... so we should be smarter in terms of suggestions. Or, as a simplification, if suggesting rustup component add turns out to be non trivial, we can do the rustup component rm case first.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 48
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/rustup
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
E-easy enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
enhancement O-shell
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
enhancement
-
enhancement
rust-lang/rustup#5069 · 2 comments · 1 reaction · 1 assignee ·
All issues in rust-lang/rustup
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
raphamorim/rio#1956 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 comment ·