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

Installation help message is printed when attempting to use uninstalled component for toolchains created with toolchain link #2531

Closed
camelid opened this issue Oct 21, 2020 · 4 comments
Labels
bug fixed-next-release This issue will be fixed in the next release of rustup.

Comments

@camelid
Copy link
Member

camelid commented Oct 21, 2020

Problem
Currently if a component is not installed for a custom-linked toolchain, you will get an error message like this:

error: 'rustc' is not installed for the toolchain 'r2stage1'
To install, run `rustup component add rustc --toolchain r2stage1`

Yet that is not helpful since the toolchain is not an official toolchain that just doesn't have the component installed. Instead, the error should be something like:

error: 'rustc' is not installed for the toolchain 'r2stage1'
The toolchain 'r2stage' was created with `rustup toolchain link` so you will have to install the component yourself.

Steps

  1. Link a toolchain; e.g.: rustup toolchain link stage1 rust/build/x86_64-apple-darwin/stage1
  2. Delete a component (e.g. by running ./x.py clean with the example in (1))
  3. Try using the component: rustc +r2stage1 foo.rs

Possible Solution(s)
I suggest an error like this:

error: 'rustc' is not installed for the toolchain 'r2stage1'
The toolchain 'r2stage' was created with `rustup toolchain link` so you will have to install the component yourself.

Notes

Output of rustup --version: rustup 1.22.1 (b01adbbc3 2020-07-08)

@camelid camelid added the bug label Oct 21, 2020
@camelid camelid changed the title Only print install help message if toolchain is not a linked toolchain Installation help message is printed when attempting to use uninstalled component for toolchains created with toolchain link Oct 21, 2020
@camelid
Copy link
Member Author

camelid commented Oct 21, 2020

(Sorry for the not super clear title -- I wasn't sure how to describe the issue)

@kinnison
Copy link
Contributor

I think this is related to #2470 which was fixed in #2487 and so will be in the next release.

I'm tagging this as such so that you'll know when we make the next release.

@kinnison kinnison added the fixed-next-release This issue will be fixed in the next release of rustup. label Oct 27, 2020
@camelid
Copy link
Member Author

camelid commented Oct 27, 2020

Oh, great! Thanks @jyn514 :)

@kinnison
Copy link
Contributor

Rustup 1.23.0 is now out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed-next-release This issue will be fixed in the next release of rustup.
Projects
None yet
Development

No branches or pull requests

2 participants