Better error message when no toolchain is installed#2657
Conversation
| 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.
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.
- 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.
Sure, though stable is just shorthand for stable-{host-triple}
There was a problem hiding this comment.
I changed it. I don't think it is worth to suggest typing the whole host triple.
3fb6cbd to
504b610
Compare
| 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.
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