Skip to content

Confusing component add error message #3418

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

Closed
smoelius opened this issue Jul 27, 2023 · 4 comments · Fixed by #3453
Closed

Confusing component add error message #3418

smoelius opened this issue Jul 27, 2023 · 4 comments · Fixed by #3453
Assignees

Comments

@smoelius
Copy link
Contributor

Problem

I tried to add component miri and received the following message:

$ rustup component add miri
error: component 'miri' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel '1.69.0'
If you don't need the component, you can remove it with:

    rustup component remove --toolchain 1.69.0 --target x86_64-unknown-linux-gnu miri

I.e., I tried to add the component (unsuccessfully), and the instructions tell me how to remove it.

Steps

Run rustup component add miri in a directory where x86_64-unknown-linux-gnu is the default toolchain.

Possible Solution(s)

Adjust or eliminate the irrelevant error message.

Notes

No response

Rustup version

rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.69.0 (84c898d65 2023-04-16)`


### Installed toolchains

```console
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/smoelius/.rustup

installed toolchains
--------------------

stable-2020-06-18-x86_64-unknown-linux-gnu
stable-x86_64-unknown-linux-gnu (default)
nightly-2023-06-29-x86_64-unknown-linux-gnu
nightly-2023-07-14-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
bisector-nightly-2023-05-28-x86_64-unknown-linux-gnu
bpf
solana
1.59.0-x86_64-unknown-linux-gnu
1.60.0-x86_64-unknown-linux-gnu
1.66.1-x86_64-unknown-linux-gnu
1.67.1-x86_64-unknown-linux-gnu
1.68.2-x86_64-unknown-linux-gnu
1.69.0-x86_64-unknown-linux-gnu
1.70.0-x86_64-unknown-linux-gnu

active toolchain
----------------

1.69.0-x86_64-unknown-linux-gnu (overridden by '/home/smoelius/gh/trailofbits/audit-solana/rust-toolchain.toml')
rustc 1.69.0 (84c898d65 2023-04-16)
@rbtcollins
Copy link
Contributor

Yes, this is clearly confusing. Probably a error type used in two different places, or perhaps a context message added inappropriately. Searching for the string should let someone find the code and start looking at it readily enough.

@rami3l
Copy link
Member

rami3l commented Aug 15, 2023

@rbtcollins Claim. 1

Footnotes

  1. Is there a place for me to claim this issue instead of simply replying with "claim"?

@rami3l
Copy link
Member

rami3l commented Aug 16, 2023

I.e., I tried to add the component (unsuccessfully), and the instructions tell me how to remove it.

The original error message assumes that you are updating an existing toolchain but some components are no longer available. The full error message template is as follows:

component {} is unavailable for download for channel '{}'
Sometimes not all components are available in any given nightly. 1
If you don't need the component, you can remove it with:\n\n{}

Or, if there are multiple components missing:

some components unavailable for download for channel '{toolchain}': {cs_str}\n
If you don't need the components, you can remove them with:\n\n{remove_msg}\n\n{TOOLSTATE_MSG}

I believe the aforementioned situation (where a toolchain update can be "incomplete" in terms of components) is exclusive to nightlies. Is that correct, @rbtcollins?

... or I can simply say something like "if you are updating an existing toolchain and you don't need the component(s)..."

Footnotes

  1. This line is removed when the toolchain is not nightly.

rami3l added a commit to rami3l/rustup that referenced this issue Aug 22, 2023
rami3l added a commit to rami3l/rustup that referenced this issue Aug 24, 2023
rami3l added a commit to rami3l/rustup that referenced this issue Aug 25, 2023
rami3l added a commit to rami3l/rustup that referenced this issue Oct 5, 2023
rami3l added a commit to rami3l/rustup that referenced this issue Oct 8, 2023
rami3l added a commit to rami3l/rustup that referenced this issue Oct 10, 2023
rami3l added a commit to rami3l/rustup that referenced this issue Oct 10, 2023
@rami3l rami3l self-assigned this Oct 11, 2023
@djc djc closed this as completed in #3453 Oct 26, 2023
djc pushed a commit that referenced this issue Oct 26, 2023
@smoelius
Copy link
Contributor Author

Thanks, @rami3l!

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