Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

RLS not installed message, but it is installed #461

Closed
lily-mara opened this issue Dec 4, 2018 · 13 comments
Closed

RLS not installed message, but it is installed #461

lily-mara opened this issue Dec 4, 2018 · 13 comments

Comments

@lily-mara
Copy link

I'm using version 0.4.10 of rls-vscode, and 1.29.1 of VSCode. I have disabled all extensions except rls-vscode. OS is macOS High Sierra.

When opening a rust project in VSCode, I see a message box saying "RLS not installed. Install?" and my only option is to click "Yes." However, I do have the RLS installed, and when I click "Yes", everything works as if the RLS was immediately found, and no extra install step happens.

If I do not click "Yes" on this box, the toolbar spinner stays in the "Starting" state forever.

The log to file feature does not provide any output.

@franky47
Copy link

franky47 commented Dec 4, 2018

I have the same issue, same setup (but on Mojave).

@nrc
Copy link
Member

nrc commented Dec 4, 2018

The check for the RLS is here: https://github.com/rust-lang/rls-vscode/blob/master/src/rustup.ts#L126 If you could debug the extension and find out what stdout is at that point, it would be really useful. Thanks!

@lily-mara
Copy link
Author

"cargo-x86_64-apple-darwin (default)
clippy-preview-x86_64-apple-darwin (installed)
lldb-preview-x86_64-apple-darwin
llvm-tools-preview-x86_64-apple-darwin
rls-x86_64-apple-darwin (installed)
rust-analysis-x86_64-apple-darwin (installed)
rust-docs-x86_64-apple-darwin (default)
rust-src (installed)
rust-std-aarch64-apple-ios
rust-std-aarch64-fuchsia
rust-std-aarch64-linux-android
rust-std-aarch64-unknown-cloudabi
rust-std-aarch64-unknown-linux-gnu
rust-std-aarch64-unknown-linux-musl
rust-std-arm-linux-androideabi
rust-std-arm-unknown-linux-gnueabi
rust-std-arm-unknown-linux-gnueabihf
rust-std-arm-unknown-linux-musleabi
rust-std-arm-unknown-linux-musleabihf
rust-std-armebv7r-none-eabi
rust-std-armebv7r-none-eabihf
rust-std-armv5te-unknown-linux-gnueabi
rust-std-armv5te-unknown-linux-musleabi
rust-std-armv7-apple-ios
rust-std-armv7-linux-androideabi
rust-std-armv7-unknown-cloudabi-eabihf
rust-std-armv7-unknown-linux-gnueabihf
rust-std-armv7-unknown-linux-musleabihf
rust-std-armv7r-none-eabi
rust-std-armv7r-none-eabihf
rust-std-armv7s-apple-ios
rust-std-asmjs-unknown-emscripten
rust-std-i386-apple-ios
rust-std-i586-pc-windows-msvc
rust-std-i586-unknown-linux-gnu
rust-std-i586-unknown-linux-musl
rust-std-i686-apple-darwin
rust-std-i686-linux-android
rust-std-i686-pc-windows-gnu
rust-std-i686-pc-windows-msvc
rust-std-i686-unknown-cloudabi
rust-std-i686-unknown-freebsd
rust-std-i686-unknown-linux-gnu
rust-std-i686-unknown-linux-musl
rust-std-mips-unknown-linux-gnu
rust-std-mips-unknown-linux-musl
rust-std-mips64-unknown-linux-gnuabi64
rust-std-mips64el-unknown-linux-gnuabi64
rust-std-mipsel-unknown-linux-gnu
rust-std-mipsel-unknown-linux-musl
rust-std-powerpc-unknown-linux-gnu
rust-std-powerpc-unknown-linux-gnuspe
rust-std-powerpc64-unknown-linux-gnu
rust-std-powerpc64le-unknown-linux-gnu
rust-std-powerpc64le-unknown-linux-musl
rust-std-riscv32imac-unknown-none-elf
rust-std-riscv32imc-unknown-none-elf
rust-std-s390x-unknown-linux-gnu
rust-std-sparc-unknown-linux-gnu
rust-std-sparc64-unknown-linux-gnu
rust-std-sparcv9-sun-solaris
rust-std-thumbv6m-none-eabi
rust-std-thumbv7em-none-eabi
rust-std-thumbv7em-none-eabihf
rust-std-thumbv7m-none-eabi
rust-std-wasm32-unknown-emscripten
rust-std-wasm32-unknown-unknown
rust-std-x86_64-apple-darwin (default)
rust-std-x86_64-apple-ios
rust-std-x86_64-fuchsia
rust-std-x86_64-linux-android
rust-std-x86_64-pc-windows-gnu
rust-std-x86_64-pc-windows-msvc
rust-std-x86_64-rumprun-netbsd
rust-std-x86_64-sun-solaris
rust-std-x86_64-unknown-cloudabi
rust-std-x86_64-unknown-freebsd
rust-std-x86_64-unknown-hermit
rust-std-x86_64-unknown-linux-gnu
rust-std-x86_64-unknown-linux-gnux32
rust-std-x86_64-unknown-linux-musl
rust-std-x86_64-unknown-netbsd
rust-std-x86_64-unknown-redox
rustc-x86_64-apple-darwin (default)
rustfmt-preview-x86_64-apple-darwin (installed)
"

@lily-mara
Copy link
Author

Changing a setting: "rust-client.rls-name": "rls" from rls-preview fixes this issue for me.

@Xanewok
Copy link
Member

Xanewok commented Dec 4, 2018

Default should be already set to rls per https://github.com/rust-lang/rls-vscode/blob/dca4451a0c94410bbfc558581972d4f39563807e/src/configuration.ts#L58
but we always set it to rls-preview via package.json
https://github.com/rust-lang/rls-vscode/blob/8c7f6133cf1dea4f8c168d91da4b6bb661c7a336/package.json#L221

Xanewok added a commit that referenced this issue Dec 4, 2018
Fixes #461. This should be due to renamed `rls-preview` -> `rls` component for Rust 2018.

r? @nrc
@nrc nrc closed this as completed in #464 Dec 4, 2018
@FliegendeWurst
Copy link

When will the fix be released (on the Marketplace)?

fj pushed a commit to fj/rls-vscode that referenced this issue Feb 17, 2019
Fixes rust-lang#461. This should be due to renamed `rls-preview` -> `rls` component for Rust 2018.

r? @nrc
@lucyllewy
Copy link

lucyllewy commented Mar 18, 2019

this is broken again due to 4af0073 (might be my newness to rust.. looks like I installed a nightly build that doesn't have rls available - ref: https://github.com/rust-lang/rls/blob/master/README.md#error-component-rls-is-unavailable-for-download-nightly)

@Xanewok
Copy link
Member

Xanewok commented Mar 19, 2019

Tomorrow's nightlies should have the rls component back - rust-lang/rust#59279 (comment)

@FliegendeWurst
Copy link

Yes, but the rls-preview component is not available.

@gulshan
Copy link

gulshan commented Mar 31, 2019

Still getting
error: component 'rls' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel 'nightly'

@FliegendeWurst
Copy link

Try installing an older (< 2019-03-23) nightly version. You can check which tools are available in which nightly version here: https://rust-lang-nursery.github.io/rust-toolstate/

@brennie
Copy link

brennie commented Oct 18, 2019

I am still hitting this with rust-client.channel set to "beta"

@mickdekkers
Copy link

I was getting this error too. In my case it turned out to be because I had set a specific nightly as default in rustup (nightly-2020-01-08), but I had the rust-client.channel setting set to nightly. Because of this, the extension was looking for the RLS for nightly, even though it was already installed for nightly-2020-01-08.

The documentation for the rust-client.channel setting states (emphasis mine):

Rust channel to invoke rustup with. Ignored if rustup is disabled. By default, uses the same channel as your currently open project.

So I removed the "rust-client.channel": "nightly" setting to reset it to the default behavior, and now it is able to find and use the installed RLS just fine.

This behavior is a bit confusing, but there's an open PR (#712) to make the default behavior an explicit setting at least.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants