-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Include toolchain specification in error message on missing component #9631
Comments
I'm not certain but I think that error is not coming from Rustup but from Cargo. Certainly we'd never have a reason to mention |
@ehuss is this Cargo? |
I think it is indeed Cargo. Could this issue be moved to the Cargo repository? |
We need to wait for a Cargo dev to agree, and then we can look to do so. |
Yea, that is from cargo. It is probably pretty easy to include the toolchain in the suggestion. |
If |
Frankly I'd also soften it to "You can try running rustup ...." because if it's a custom toolchain it might fail. |
Unfortunately I don't have write access here to transfer. |
Aah I think it needs someone from infra. @pietroalbini perhaps? |
A PR is created to add this information. |
Include toolchain specification in error message close https://github.com/rust-lang/rustup/issues/2795
Transferred the issue to cargo. |
@ehuss I think we can close it now. 😄 |
Yea, this was fixed by #9625, thanks! |
Describe the problem you are trying to solve
I try to run an example from https://github.com/Rahix/avr-hal.
$ cargo +nightly-2021-01-07 run --example leonardo-blink
Output:
So I try the suggested fix:
$ rustup component add rust-src
Output:
info: component 'rust-src' is up to date
After a while I realised that the last command tries to install the component for the default toolchain instead of the nightly toolchain. This is the first time I use a toolchain other than the default, and therefore the first time I use
rustup
.Entering the following command solved the issue:
$ rustup component add --toolchain nightly-2021-01-07 rust-src
Describe the solution you'd like
It would be much clearer to include the toolchain specification in the suggested command.
$ cargo +nightly-2021-01-07 run --example leonardo-blink
Desired output:
The text was updated successfully, but these errors were encountered: