editor-rs / vscode-rust

Rust for Visual Studio Code
MIT License
474 stars 62 forks source link

Dose this plugin support Windows GNU toolchain? #394

Closed dainslef closed 5 years ago

dainslef commented 5 years ago

Version of VSCode: 1.33.1 Version of the extension: 0.6.1 OS: Windows 10 1809

Description: I have installed the stable gnu toochain, the rustup show command output:

Default host: x86_64-pc-windows-msvc

stable-x86_64-pc-windows-gnu (default)
rustc 1.34.1 (fc50f328b 2019-04-24)

Output of the "Rust logging" channel:

[Error - 7:43:31 PM] Starting client failed
Error: Command failed: rustup component list --toolchain stable
error: toolchain 'stable-x86_64-pc-windows-msvc' is not installed

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Socket.ChildProcess.spawn.stream.socket.on (internal/child_process.js:380:11)
    at Socket.emit (events.js:182:13)
    at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)

Can't the plugin work with Windows GNU toolchain?

dainslef commented 5 years ago

I finally find the solution of my problem. The plugin needs the DEFAULT HOST of rustup match the current toolchain, use command:

rustup set default-host x86_64-pc-windows-gnu

change the default host to Window GNU toolchain will solve the problem.