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

Add option to respect Rustup default toolchain (rust-toolchain file)

Open joliss opened this issue 8 years ago • 2 comments

I'm using VS Code Rust 0.4.2, so pardon me if the behavior has changed in the meantime:

In one of my Rust projects, I have a rust-toolchain file, which instructs Rustup to use a different Rust toolchain version per its override precedence rules. I was surprised that VS Code didn't respect that file, and it took me a while to figure out that I had set a toolchain version in rust.rustup.toolchain.

I want to suggest that it might be useful to have an option to respect Rustup's choice of toolchain, and that this might be a reasonable default when rust.rustup.toolchain isn't set, rather than prompting the user.

joliss avatar Aug 18 '17 18:08 joliss

@joliss, I didn't know about it.

I suppose the extension should behave as follows: When activating the extension must check if the configuration parameter "rust.rustup.toolchain" is specified. If it is not, it must execute rustup show in order to get the toolchain used for the directory. After that, it must ask the user if the user wants to use the specified toolchain. If not, it must show the list of available toolchains (as it does now).

What do you think about it?

KalitaAlexey avatar Sep 05 '17 10:09 KalitaAlexey

@KalitaAlexey: Why ask the programmer if he or she wants to use the toolchain in rust-toolchain? I would at most show a notice this config file is present and was used.

sanmai-NL avatar Oct 06 '17 09:10 sanmai-NL