Rls: Installation instructions are outdated

Created on 3 Dec 2017  路  20Comments  路  Source: rust-lang/rls

When I try to install RLS with rustup I'll get a lot of errors because of the nightly toolchain, if I do it without nightly just on stable it works like a charm. This was on MacOS 10.13.1.

Most helpful comment

This can happen when the rls-preview build fails for some reason. 2017-11-30 still has it:

rustup install nightly-2017-11-30
rustup component add rls-preview --toolchain nightly-2017-11-30
rustup component add rust-analysis --toolchain nightly-2017-11-30
rustup component add rust-src --toolchain nightly-2017-11-30

Then you can set the version of Rust you want RLS to use in VS Code preferences. (I added "rust-client.channel": "nightly-2017-11-30" to my user preferences.

I imagine this can't be closed until the root cause (the failed build) is diagnosed. This got it running for me. (Note, however, that there is a bug with that version, which is believed fixed in the nonexistent nightly.

All 20 comments

Yup, I'm running into this after I rustuped least night:

位 rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: latest update on 2017-12-02, rust version 1.24.0-nightly (bb42071f6 2017-12-01)
info: downloading component 'rustc'
 36.4 MiB /  36.4 MiB (100 %)  99.2 KiB/s ETA:   0 s
info: downloading component 'rust-std'
 52.1 MiB /  52.1 MiB (100 %) 422.1 KiB/s ETA:   0 s
info: downloading component 'cargo'
  2.9 MiB /   2.9 MiB (100 %) 361.6 KiB/s ETA:   0 s
info: downloading component 'rust-docs'
  4.6 MiB /   4.6 MiB (100 %) 406.4 KiB/s ETA:   0 s
info: downloading component 'rust-analysis'
info: downloading component 'rust-src'
  2.3 MiB /   2.3 MiB (100 %) 428.6 KiB/s ETA:   0 s
info: removing component 'rustc'
info: removing component 'rust-std'
info: removing component 'cargo'
info: removing component 'rust-docs'
info: removing component 'rls-preview'
info: removing component 'rust-analysis'
info: removing component 'rust-src'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: installing component 'rust-analysis'
info: installing component 'rust-src'
info: checking for self-updates

  stable-x86_64-apple-darwin unchanged - rustc 1.22.1 (05e2e1c41 2017-11-22)
   nightly-x86_64-apple-darwin updated - rustc 1.24.0-nightly (bb42071f6 2017-12-01)

Seems like it removed rls-preview, but did not reinstall. Only discovered it after VS Code started complaining.

This can happen when the rls-preview build fails for some reason. 2017-11-30 still has it:

rustup install nightly-2017-11-30
rustup component add rls-preview --toolchain nightly-2017-11-30
rustup component add rust-analysis --toolchain nightly-2017-11-30
rustup component add rust-src --toolchain nightly-2017-11-30

Then you can set the version of Rust you want RLS to use in VS Code preferences. (I added "rust-client.channel": "nightly-2017-11-30" to my user preferences.

I imagine this can't be closed until the root cause (the failed build) is diagnosed. This got it running for me. (Note, however, that there is a bug with that version, which is believed fixed in the nonexistent nightly.

Note: nightly-2017-11-20 fixed the problem for me. Had to turn off clippy though.

EDIT: updated this, I had further bugs with rls in 2017-11-22 which aren't in 20. I'll check if they recur when the nightly resumes.

This seems like a recurring problem where sometimes rls-preview doesn't make it into nightly: https://www.reddit.com/r/rust/comments/7hczbn/rls_component_gone/

There seems to be a way to install the component from an earlier Nightly that included it (or indeed from stable if you want a more stable but slightly older RLS).

Looks like this happened again (seems more frequent than before).

I have the same problem :-)

FWIW I tried all the versions backwards one by one, and currently installing nightly-2017-12-16 seems to be the latest that works (if you're using VSCode, just set rust-client.channel to this, reload window and it will guide you through the installation process).

nightly-2017-12-16

And the latest rustfmt-nightly didn't compile against it for me, which was the reason I have upgraded the toolchain in the first place, and now I have no RLS. Indispensable core development tools randomly unavailable... not to mention the usual clippy story... All this is quite disappointing, I must say.

And the latest rustfmt-nightly didn't compile against it for me

Yeah, for rustfmt you would need to go much further back, or just call it using cargo +nightly fmt for now.

FWIW after posting here I've been told that RLS actually works on stable toolchain now, which is a huge step forward towards (pun unintended) stability.

Is it worth updating the readme?

More importantly, since it looks like a recurring problem, could there be a tutorial on how to build this by oneself, instead of relying on rustup?

could there be a tutorial on how to build this by oneself

This problem reoccurs exactly because RLS can't be built by CI whenever the nightly Rust gets breaking changes. It's better to use RLS on stable channel instead if you want stability (or not update to newer nightly too frequently).

Then we should update the README to state this imo.

There is a feature request for rustup to warn users before they upgrade : https://github.com/rust-lang-nursery/rustup.rs/issues/1277

Is there a way of listing nightly builds/channels and the respective components?

defaulting to stable toolchain allowed me to install rls-preview

Otherwise, it is possible (and quite easy) to clone this repository and then build rls manually, provided you can wait a few hours for the dependencies to catch up with the API changes within rustc. I did this, and then (in my case), configured ale (in Vim) to use a custom path to rls.

It's not as easy as executing rustup component add rls-preview, but it's useful when the very latest features are required in your projects and you'd like to use rls anyway.

I'm curious (I'm not a core contributor here, so consider it a process question :) ): are we leaving this open because we want to use it as a tracking issue for all problems of this sort? It seems like the issue originally mentioned was fixed (even if it's been re-broken since). I'd expect these issues to pop up periodically, indicating Rust nightly has changed, and once rls is updated to match, the issue gets resolved.

But maybe there is something extra we want? Is the intent of this issue is to find a set of install instructions that works 100% of the time and update the README so that it is always accurate (and if rls breaks with a nightly, it stays accurate)?

Ideally the README always has accurate, near 100% working installation instructions. So if RLS breaks it also states what alternative actions you can take to get it to work. We should strive to make our ecosystem as painless as possible, RLS is an integral part of our ecosystem. Currently it's also a pain to get it to work sometimes because it breaks and there are no alternative instructions. I want to fix this with this issue. I don't want to keep it open forever and keep the experience painful.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dnsco picture dnsco  路  5Comments

PumpkinSeed picture PumpkinSeed  路  3Comments

dpc picture dpc  路  4Comments

FrankvdStam picture FrankvdStam  路  3Comments

paulirotta picture paulirotta  路  3Comments