Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing nightly with missing components suggests doing 'rustup component remove' #2705

Closed
jethrogb opened this issue Mar 30, 2021 · 2 comments · Fixed by #2709
Closed

Comments

@jethrogb
Copy link
Contributor

When trying to install a toolchain that's missing components you may get an error message, e.g.:

$ rustup toolchain add nightly-2019-07-23
info: syncing channel updates for 'nightly-2019-07-23-x86_64-unknown-linux-gnu'
info: latest update on 2019-07-23, rust version 1.38.0-nightly (e649e9034 2019-07-22)
error: component 'clippy' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly-2019-07-23
Sometimes not all components are available in any given nightly. If you don't need the component, you can remove it with:

    rustup component remove --toolchain nightly-2019-07-23 --target x86_64-unknown-linux-gnu clippy

The suggested action is useless, however:

$ rustup component remove --toolchain nightly-2019-07-23 --target x86_64-unknown-linux-gnu clippy
error: toolchain 'nightly-2019-07-23-x86_64-unknown-linux-gnu' is not installed

The correct suggestion would be to run the original command again with --profile minimal

@jethrogb jethrogb added the bug label Mar 30, 2021
@rbtcollins
Copy link
Contributor

This occurs because we use the same codepath for add toolchain and add component, and the error isn't contingent on the context.

@rbtcollins rbtcollins changed the title Useless suggestion when installing toolchain with missing components installing toolchain with missing components suggests doing 'rustup component remove' Mar 30, 2021
@rbtcollins rbtcollins changed the title installing toolchain with missing components suggests doing 'rustup component remove' installing nightly with missing components suggests doing 'rustup component remove' Mar 30, 2021
@Rustin170506
Copy link
Member

I am working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants