vscode-rust icon indicating copy to clipboard operation
vscode-rust copied to clipboard

Provide clearer instructions regarding setting the toolchain

Open pradyunsg opened this issue 7 years ago • 3 comments

Version of VSCode: 1.24.0 Version of the extension: 0.4.2 OS: MacOS High Sierra

Description

As a newbie to Rust, I got confused about what I was supposed to do to set the toolchain. I initially tried "rust.rustup.toolchain": "nightly", setting the absolute path to all the tools and more before realizing, oh, it's a dictionary after I open up the project's configuration. Even then it took me a while to realize the value expected is the complete string as output by rustup toolchain list.

My suggestion is that in legacy mode, if the user has not set their toolchain, the message shown should tell the user how they are to configure the toolchain; where to obtain it and where to set it.

On a somewhat related note: Some configuration items (like rust.rustup) are currently set to null by default. If set to an empty dictionary or better yet, a dictionary with all the keys and null values, it would serve as a useful hint about the structure of the configuration. (should this be a separate issue?)

Output of the "Rust logging" channel

DEBUG: Rustup: updateToolchains: this.toolchains=[{"channel":"stable","host":"x86_64-apple-darwin","isDefault":false},{"channel":"nightly","host":"x86_64-apple-darwin","isDefault":true}]
DEBUG: activate: processPossibleSetButMissingUserToolchain: toolchainKind=toolchain
DEBUG: activate: processPossibleSetButMissingUserToolchain: no user toolchain
DEBUG: activate: handleMissingRustupUserToolchain: toolchainKind=toolchain

and the following dialog was shown:

screen shot 2018-06-08 at 11 33 18 pm

pradyunsg avatar Jun 08 '18 18:06 pradyunsg

Oh lol. As it turns out, dismissing the notification gives a prompt for choosing a toolchain. I guess this issue then becomes to communicate in that notification that dismissing the notification would open a prompt.

pradyunsg avatar Jun 08 '18 18:06 pradyunsg

Version of VSCode: 1.24.1 Version of the extension: 0.4.2 OS: MacOS High Sierra

I observed the dialog, dismissed it, and then was presented with a toolchain selection box. I wanted to make sure I selected the correct toolchain so I switched to Chrome and back, but the selection box had disappeared.

I see this in the "Rust logging" output channel:

DEBUG: Rustup: updateToolchains: this.toolchains=[{"channel":"stable","host":"x86_64-apple-darwin","isDefault":true},{"channel":"nightly","host":"2018-06-02-x86_64-apple-darwin","isDefault":false}]

That message seems to imply that the extension is not using my desired toolchain.


Edit: I restarted VS Code and was presented with the dialog and selection box again. Though, I agree this could still be made more clear.

chances avatar Jun 21 '18 04:06 chances

This is really counter-intuitive :sweat_smile: took me some time to find this issue. Please let the message tell you to close the dialog to select a toolchain.

richarddewit avatar Jan 09 '19 11:01 richarddewit