Skip to content

Confusing component add error message #3418

Closed

Description

@smoelius

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)

Activity

  1. rbtcollins commented on Aug 14, 2023

    @rbtcollins
    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.

  2. rami3l commented on Aug 15, 2023

    @rami3l
    Member

    @rbtcollins Claim. 1

    Footnotes

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

  3. rami3l commented on Aug 16, 2023

    @rami3l
    Member

    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. ↩

  4. self-assigned this
    on Oct 11, 2023
  5. added a commit that references this issue on Oct 26, 2023
  6. smoelius commented on Oct 26, 2023

    @smoelius
    ContributorAuthor

    Thanks, @rami3l!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions