-
Notifications
You must be signed in to change notification settings - Fork 888
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
Better error message when no toolchain is installed #2657
Conversation
src/errors.rs
Outdated
@@ -297,7 +297,7 @@ error_chain! { | |||
} | |||
ToolchainNotSelected { | |||
description("toolchain is not selected") | |||
display("no override and no default toolchain set") | |||
display("no override and no default toolchain set; run 'rustup default [toolchain]' to select one") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the word 'select' here, I think it implies showing a menu - which it won't (but we do on windows during first install kindof).
I can suggest two alternatives to move this forward.
- s/select/set/
- extend the places this is used to determine the default toolchain for the platform, and then pass that into the error, so that it can become a copy-and-pastable valid command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Sure
- If there is no default toolchain set, can we really get a default toolchain ? Maybe we should just suggest
rustup default stable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, though stable is just shorthand for stable-{host-triple}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it. I don't think it is worth to suggest typing the whole host triple.
3fb6cbd
to
504b610
Compare
src/errors.rs
Outdated
@@ -297,7 +297,7 @@ error_chain! { | |||
} | |||
ToolchainNotSelected { | |||
description("toolchain is not selected") | |||
display("no override and no default toolchain set") | |||
display("no override and no default toolchain set; run 'rustup default stable' to download and set the stable toolchain as default") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not mention downloading here: it may already be present, or not, and its not the essence of the thing.
504b610
to
ba09130
Compare
I believe the test failure is a spurious one, and I've filed an issue to look into it. In the meantime, are you now happy with the wording Robert? |
I'm attempting to contribute to this conversation even though I don't know what I'm doing. (Maybe that is helpful. Maybe people who know what they are doing never see this error message anyway.) I thought it would be useful to build rust programs on windows under the GNU tools provided by Msys2... So, my toolchain is
If I understand correctly (and that's a big if!), if I had done I hope this helps. |
@daveloyall we haven't released this change yet. |
Fix #395