Add more detail error messages when installing with some components has failed.#1595
Conversation
kinnison
left a comment
There was a problem hiding this comment.
Over-all the concept is probably good, though I worry about directing people to the rust-toolstate page directly.
I wonder if we should consider different messages depending on the channel selected. If this is nightly, the message you suggest would be suitable, but if this is stable or beta, that suggests something less good going on which might benefit from a different kind of message.
| let _ = write!( | ||
| buf, | ||
| "some components unavailable for download: {}\n\ | ||
| if you want these components, please install and use latest successful build version, \ |
There was a problem hiding this comment.
You're missing a 'the' between 'use' and 'latest'
| buf, | ||
| "some components unavailable for download: {}\n\ | ||
| if you want these components, please install and use latest successful build version, \ | ||
| which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ |
There was a problem hiding this comment.
I'd drop the 'out' replace the ',' with '.' and change 'like this.' to '\nTo do this, run something like:\n'
| which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | ||
| rustup install nightly-2018-12-27", | ||
| cs_str | ||
| ); |
There was a problem hiding this comment.
Could you pull the message out into a const please
| "some components unavailable for download: 'rustc', 'cargo'\n\ | ||
| if you want these components, please install and use latest successful build version, \ | ||
| which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | ||
| rustup install nightly-2018-12-27", |
| let _ = write!( | ||
| buf, | ||
| "some components unavailable for download: {}\n\ | ||
| if you want these components, please install and use latest successful build version, \ |
There was a problem hiding this comment.
| if you want these components, please install and use latest successful build version, \ | |
| if you require these components, please install and use the latest successful build, \ |
| buf, | ||
| "some components unavailable for download: {}\n\ | ||
| if you want these components, please install and use latest successful build version, \ | ||
| which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ |
There was a problem hiding this comment.
| which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | |
| which you can find at https://rust-lang-nursery.github.io/rust-toolstate, for example.\n\ |
| which you can find out at https://rust-lang-nursery.github.io/rust-toolstate, like this.\n\ | ||
| rustup install nightly-2018-12-27", | ||
| cs_str | ||
| ); |
There was a problem hiding this comment.
Could you pull the message out into a const please
|
I was thinking you would use something like |
|
@nrc I see, thanks! |
|
@nrc Fixed and passed CI |
|
Thanks! |
Error message that we get when installing with some components failed may seem unkind for beginners.
Many users create issue at component's repository.
For example,
rust-lang/rls#1186
rust-lang/rls#641
rust-lang/rustfmt#3244
rust-lang/rust-clippy#2869
So I might want to add more information.
(But there may be more suitable message.)