rust-lang / rls

Repository for the Rust Language Server (aka RLS)
Other
3.53k stars 257 forks source link

Component rls unavailable for download - README hints do not suffice #1758

Open AndiDog opened 2 years ago

AndiDog commented 2 years ago

The README says to pin to a specific version found at https://rust-lang.github.io/rustup-components-history/ – however, that site only shows the last 7 days. It currently (at time of writing: 2022-01-10) does not even list "rls" anywhere, likely because no recent RLS builds are available for the nightly toolchain. Thus, I had to trick around like this

for n in $(seq 10 30); do if rustup toolchain add nightly-2021-11-${n} -c rls; then break; fi; done

in order to find that the latest available toolchain with RLS was 2021-11-09 at the time.

Other, more obvious solutions such as finding the latest successful CI build (linked from the button in the README: https://github.com/rust-lang/rls/actions?query=workflow%3ACI+branch%3Amaster) did not work for me, likely because their date does not necessarily relate directly to the (nightly) toolchain release date.

Having to pin a version isn't super bad, but then users should be given better hints how to solve it. Modern Rust projects often require nightly builds, so having RLS is essential for developer experience.

ms140569 commented 2 years ago

According to this site:

https://rust-lang-nursery.github.io/rust-toolstate/

the latest available build of RLS was 2021-12-04. I've doublechecked and this is correct, but it took me quite a while to get there. Therefore i totally agree with @AndiDog that there need to be better ways to figure this out ...

MingweiSamuel commented 2 years ago

Related: https://github.com/rust-lang/rust/issues/91543 https://github.com/rust-lang/rust/pull/91355 https://github.com/racer-rust/racer/pull/1174

calebcartwright commented 2 years ago

This is going to become significantly less of an issue now that RLS has removed the auto-publish crates from its dependency tree, and will become completely obviated if/when RLS moves to the subtree model.

Worth noting, however, that those looking for a RLS containing nightly can always use the in-repo toolchain file as a reference, using that date, potentially plus a day or two to account for release delays.

Users that have a previously installed nightly toolchain containing RLS and want to update to the latest RLS-containing nightly can utilize rustup's default behavior, which will update to the latest version that contains the components you already have installed.

Those two, combined if necessary, should cover most/all scenarios.

MingweiSamuel commented 2 years ago

About rustup, it seems to only go back a few weeks to check for needed components before failing, and since RLS hasn't built in longer than that it just fails currently

calebcartwright commented 2 years ago

About rustup, it seems to only go back a few weeks to check for needed components before failing, and since RLS hasn't built in longer than that it just fails currently

Well TIL :mortar_board: