RLS is panicking on one of my projects after upgrading to 1.31.0. Here is the output from VSCode, but I suppose it isn't very helpful due to the lack of symbols.
[Info - 5:24:43 PM] Connection to server got closed. Server will restart.
thread 'main' panicked at 'Could not convert URI to path: ()', libcore\result.rs:1009:5
stack backtrace:
0: <std::sync::mpsc::select::Select as core::fmt::Debug>::fmt
1: <std::path::Iter<'a> as core::convert::AsRef<std::path::Path>>::as_ref
2: std::panicking::take_hook
3: std::panicking::take_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::begin_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
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_odb_object_id
20: BaseThreadInitThunk
21: RtlUserThreadStart
The only thing different about this project compared to any of my others is that this one uses cargo workspaces.
I'm not sure what other info could be helpful, but it seems to crash immediately upon opening this project. The project is closed-source so I cannot share it, sorry.
My project which uses a cargo workspace also crashes rust 1.31 rls: https://github.com/doxxx/aoc2018
I was using this project with rust nightly just two days ago.
This may be a useful bit of info: if I run rls --cli from the project folder, it doesn't crash. Only the RLS launched through VSCode crashes.
Some more information: If I open one of the subprojects in the cargo workspace directly in VS Code, then RLS works. If I open the parent folder which contains the Cargo.toml with the workspace declaration, then it crashes.
I tried downgrading to 1.30.1 using rustup and was still getting the same error... I wonder if the vscode extension was recently updated?
Edit: I see that it was indeed recently updated, maybe this is the cause of the problem:
0.5.1 - 2018-12-06
Try harder to find Cargo.toml
Account for the rls-preview to rls component name change (and remove the rust-client.rls-name option)
Additionally I can confirm these results locally:
If I open one of the subprojects in the cargo workspace directly in VS Code, then RLS works
I can't reproduce in atom, so along with rls --cli working perhaps this is a vscode regression. https://github.com/rust-lang/rls-vscode
Same problem here with the same workaround working, opening up the individual crate works but the workspace fails.
I've confirmed that downgrading the vscode extension to 0.5.0 fixes this issue. Continuing the discussion over here: https://github.com/rust-lang/rls-vscode/issues/468