Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Provide clearer instructions regarding setting the toolchain #383

Open
pradyunsg opened this issue Jun 8, 2018 · 3 comments · May be fixed by #390
Open

Provide clearer instructions regarding setting the toolchain #383

pradyunsg opened this issue Jun 8, 2018 · 3 comments · May be fixed by #390

Comments

@pradyunsg
Copy link

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
Copy link
Author

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.

@chances
Copy link

chances commented Jun 21, 2018

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.

@richarddewit
Copy link

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

@richarddewit richarddewit linked a pull request Jan 9, 2019 that will close this issue
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants