Vscode-rust: RLS fails to install toolchain 'nightly-X' does not contain component 'rls-preview'

Created on 29 Oct 2017  ·  4Comments  ·  Source: rust-lang/vscode-rust

This isn't a bug with the extension as per se, but I suspect people will go to this repo first.

The issue relates to RLS (and components) missing from nightly builds: https://github.com/rust-lang-nursery/rls/issues/535

The easiest workaround is to the beta toolchain, to do this on a per project basis, cd to the project and type: rustup override set beta

Alternatively if you want use the beta toolchain as your default: rustup default beta

Then set your rustup channel (rust-client.channel) in your user settings to stop the extension from failing to find RLS e.g. "rust-client.channel": "beta"

If you want to use nightly the last known working version is: 2017-10-24, to set the toolchain you'd do the following:

rustup override set nightly-2017-10-24
rustup component add rls-preview --toolchain nightly-2017-10-24
rustup component add rust-analysis --toolchain nightly-2017-10-24
rustup component add rust-src --toolchain nightly-2017-10-24

For nightly you have to also pin it to the specific release date: "rust-client.channel": "nightly-2017-10-24"

Hope this helps!

Most helpful comment

Answering my own question. Just look at the build history and see when the last successful build was and use that date. Also, the extra steps for using nightly are not necessary. All you have to do is set "rust-client.channel".

All 4 comments

This should be fixed as of today because nightly has rls-preview again \o/

What's the easiest way to find the latest nightly build that includes rls?

Answering my own question. Just look at the build history and see when the last successful build was and use that date. Also, the extra steps for using nightly are not necessary. All you have to do is set "rust-client.channel".

To clarify this for others who may have encountered the RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot. warning in vs code, the current released plugin 0.3.1 still hardcodes to nightly when trying to set the path for racer. This is fixed for HEAD but that's not released yet.

Was this page helpful?
0 / 5 - 0 ratings