Vscode-rust: Why does it install Nightly?

Created on 29 Apr 2018  路  4Comments  路  Source: rust-lang/vscode-rust

I installed this vscode extension. It is nice! However, I noticed: When I first installed it, it installed first rust nightly, then it installed RLS. It was as if the vscode setup believed that nightly was necessary in order to boot RLS. However, a Rust user I talked to informed me that RLS has not required nightly since Rust 1.21. The RLS instructions https://github.com/rust-lang-nursery/rls suggest only that you need to install the most current version.

Is the Rust Nightly install actually necessary, or is this just a vestigial quirk of when RLS required nightly?

bug

Most helpful comment

Just installed v0.4.2 and got I got two messages from "Rust (rls) (Extension)":

nightly toolchain not installed. install?"

and

RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot.

image

I'm on osx, with the latest of vscode and just updated with rustup.


I was able to fix this by setting "rust-client.channel": "stable" in user settings.

This is what I actually did, though I'm sure there is a simpler way. I doubt installing the components manually is necessary.

  • Installed the extension (and got the error popups)
  • Ran rustup component add rls-preview rust-analysis rust-src from the command line
  • Set the user-setting "rust-client.channel": "stable"
  • Disabled the extension and reloaded the workspace
  • Re-enabled the extension and the workspace
  • Working!

All 4 comments

I think this is a vestigial quirk, will investigate...

Just installed v0.4.2 and got I got two messages from "Rust (rls) (Extension)":

nightly toolchain not installed. install?"

and

RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot.

image

I'm on osx, with the latest of vscode and just updated with rustup.


I was able to fix this by setting "rust-client.channel": "stable" in user settings.

This is what I actually did, though I'm sure there is a simpler way. I doubt installing the components manually is necessary.

  • Installed the extension (and got the error popups)
  • Ran rustup component add rls-preview rust-analysis rust-src from the command line
  • Set the user-setting "rust-client.channel": "stable"
  • Disabled the extension and reloaded the workspace
  • Re-enabled the extension and the workspace
  • Working!

I think the extension parses the output of rustup show but it probably changed...

rustup doesn't seem to have stable machine parsable output for this, see https://github.com/rust-lang-nursery/rustup.rs/issues/450.

See: https://github.com/rust-lang-nursery/rls-vscode/blob/3dc3987eb215cb4d72252ea17e853e19023cea48/src/rustup.ts#L193-L212

It would be great if "rust-client.channel": "stable" was the default setting because rustup installs the stable toolchain by default as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexreg picture alexreg  路  3Comments

japert picture japert  路  4Comments

hpesoj picture hpesoj  路  5Comments

olehmisar picture olehmisar  路  5Comments

views63 picture views63  路  5Comments