You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggest another toolchain when removing a component unavailable to the current toolchain #5098
rustup +target remove wasm32-wasi succeeds, 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.
Activity
14elias commentedon Sep 23, 2026
i think it can be solved by intercepting the error in the removal execution path and catch the RustupError::UnknownComponents variant.
devtechedge commentedon Oct 6, 2026
I'd like to take the
component rmcase, following the same approach #5094 used for targets.While testing, I noticed that removing rust-src on a toolchain that doesn't have it panics with "component target should be known".
I can fix that as a separate commit in the same PR, or open it as its own PR if you'd prefer.
rami3l commentedon Oct 6, 2026
@devtechedge Please do! For separate concerns, it is recommended to do this in separate PRs.
14elias commentedon Oct 10, 2026
@rami3l Following #5130 could we also suggest other toolchains for rustup component add by checking locally cached manifests?
rami3l commentedon Oct 10, 2026
@14elias Sure, if you wanna take it please do!
14elias commentedon Oct 10, 2026
@rustbot claim