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

Cannot run with custom build of RLS #304

Closed
alexreg opened this issue Apr 27, 2018 · 4 comments
Closed

Cannot run with custom build of RLS #304

alexreg opened this issue Apr 27, 2018 · 4 comments

Comments

@alexreg
Copy link

alexreg commented Apr 27, 2018

I've created a custom build of RLS and symlinked the rls binary into build/x86_64-apple-darwin/stage2/bin along with cargo (rustc is already built to there of course). I think created a toolchain from the stage2 directory using rustup. Next, in my workspace config in VSCode, I set "rust-client.channel": "local".

However, upon opening my VSCode workspace, I get error popups:

  • Couldn't start client Rust Language Server
  • Unexpected error initialising RLS - error running rustup

If I run code --verbose workspace from the command-line, I get the following telling error message:

[43383:0427/023404.567902:INFO:CONSOLE(260)] "%c[Extension Host] %cError: Command failed: rustup component list --toolchain local
error: toolchain 'local' does not support components
info: caused by: invalid toolchain name: 'local'

	at ChildProcess.exithandler (child_process.js:217:12)
	at emitTwo (events.js:106:13)
	at ChildProcess.emit (events.js:194:7)
	at maybeClose (internal/child_process.js:899:16)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) %c(at /Users/alex/.vscode/extensions/rust-lang.rust-0.4.1/out/src/rustup.js:137:21)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (260)

So the question is, how do I solve this? How can I build a toolchain that "supports components"?

@nrc
Copy link
Member

nrc commented Apr 29, 2018

You can use the hidden setting rls.path to specify the path to your RLS, that's the most reliable way to run a custom RLS. Sorry this ought to be documented. Let me know if you still have problems.

@nrc nrc closed this as completed Apr 29, 2018
@alexreg
Copy link
Author

alexreg commented May 1, 2018

@nrc, Yep, does the trick, thanks. rust-client.rlsPath seems to be the preferred property, but either works.

@shehzadaliqadri
Copy link

how to change path ?

@shehzadaliqadri
Copy link

Please solve this Issue:
raza@Raza-Ubuntu:~$ cargo install racer
Updating crates.io index
Installing racer v2.1.19
Compiling semver-parser v0.7.0
Compiling arrayvec v0.4.10
Compiling nodrop v0.1.13
Compiling cfg-if v0.1.7
Compiling libc v0.2.50
Compiling rand_core v0.4.0
Compiling lazy_static v1.3.0
Compiling memoffset v0.2.1
Compiling scopeguard v0.3.3
Compiling stable_deref_trait v1.1.1
Compiling byteorder v1.3.1
Compiling proc-macro2 v0.4.27
Compiling rustc-rayon-core v0.1.2
Compiling smallvec v0.6.9
Compiling rustc-rayon v0.1.2
error[E0554]: #![feature] may not be used on the stable release channel
--> /home/raza/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/smallvec-0.6.9/lib.rs:33:32
|
33 | #![cfg_attr(feature = "union", feature(untagged_unions))]
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
--> /home/raza/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/smallvec-0.6.9/lib.rs:35:37
|
35 | #![cfg_attr(feature = "may_dangle", feature(dropck_eyepatch))]
| ^^^^^^^^^^^^^^^^^^^^^^^^

Compiling unicode-xid v0.1.0
Compiling bitflags v1.0.4
Compiling syn v0.15.29
error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0554.
error: Could not compile smallvec.
warning: build failed, waiting for other jobs to finish...
error: failed to compile racer v2.1.19, intermediate artifacts can be found at /tmp/cargo-installarnQai

Caused by:
build failed

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

3 participants