2018 Update VSCode+RLS Issues


#1

Yesterday I successfully updated my current project to build with the 2018 update. The only minor issue seems to be that since updating, RLS in VSCode has started failing and rust build options no longer show up in the list of available tasks. Cargo build/doc/test still all work from the command line though.

I set “rust-client.revealOutputChannelOn”: “info” in order to try to debug it. I consistently see the following upon opening any *.rs file.

thread 'main' panicked at 'Could not convert URI to path: ()', src\libcore\result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
[Info  - 7:21:15 PM] Connection to server got closed. Server will restart.
thread 'main' panicked at 'Could not convert URI to path: ()', src\libcore\result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
[Info  - 7:21:16 PM] Connection to server got closed. Server will restart.
thread 'main' panicked at 'Could not convert URI to path: ()', src\libcore\result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
[Info  - 7:21:17 PM] Connection to server got closed. Server will restart.
thread 'main' panicked at 'Could not convert URI to path: ()', src\libcore\result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
[Info  - 7:21:18 PM] Connection to server got closed. Server will restart.
thread 'main' panicked at 'Could not convert URI to path: ()', src\libcore\result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
[Error - 7:21:19 PM] Connection to server got closed. Server will not be restarted.

EDIT: Here it is with backtrace enabled:

thread 'main' panicked at 'Could not convert URI to path: ()', src\libcore\result.rs:1009:5
stack backtrace:
   0: std::sys_common::alloc::realloc_fallback
   1: std::panicking::take_hook
   2: std::panicking::take_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic_fmt
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: std::panicking::update_panic_count
  16: _rust_maybe_catch_panic
  17: std::rt::lang_start_internal
  18: <unknown>
  19: git_libgit2_opts
  20: BaseThreadInitThunk
  21: RtlUserThreadStart
[Info  - 11:10:03 AM] Connection to server got closed. Server will restart.

#2

Sorry if I interrupted this thread, but I wanted to add another feature I’m missing from the rls with version 2018: without extern crate it doesn’t recognize crates I use, although rust now supports only writing it once in the Cargo.toml. but for the RLS to recognize my dependencies, I still keep the extern crates around, which I kinda dislike because it’s just to keep my tooling happy, not for myself…


#3

There’s a bug in the VSC plugin that affects windows.users. (I’m not sure if any other platform users are affected, i assume not.) It will make rls panic when you open a cargo workspace folder.

The fix is here: https://github.com/rust-lang/rls-vscode/pull/469


#4

Meanwhile you can temporarily downgrade to the 0.5.0 version of the vsc plugin.


#5

0.5.3 backed out the changes from 0.5.2


#6

Things have been working since the backout, thanks!