Vscode-rust: rls-vscode doesn't work with multi-root vscode workspaces

Created on 21 Nov 2017  路  7Comments  路  Source: rust-lang/vscode-rust

https://code.visualstudio.com/docs/editor/multi-root-workspaces

No autocomplete / no red-squigglies, etc

RLS shows that it has loaded and is Done, but it everything functions as though rls-vscode isn't even installed.

P-High

All 7 comments

On my laptop, checking the RLS logs in VSCode gives me:

note: rustc 1.23.0-nightly (5f44c653c 2017-11-24) running on x86_64-apple-darwin

thread 'rustc' panicked at 'Could not deserialize save-analysis config: MissingFieldError("reachable_only")', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

I don't know if this is related to workspaces, but this is very likely related to https://github.com/rust-lang/rust/issues/46244.

@yamafaktory this is not related to workspaces, it should be fixed soon...

@nrc Thanks a lot for the feedback, I'll wait for it! It's an awesome work you're doing & an awesome tool too!

The official lsp client we're using already supports workspace extension (https://github.com/Microsoft/vscode-languageserver-node/blob/master/protocol/src/protocol.workspaceFolders.proposed.md), so this needs only toggling on from the client side.
This would also need support from the RLS itself, tracked over at https://github.com/rust-lang-nursery/rls/issues/608.

With a workspace like this:

  |- scripts (or whatever)
  |- docs (or whatever)
  `- rust_project
        |- src
        `- Cargo.tml

(i.e. containing several folders that are not rust related and one that is a rust project)

the extensions will not work because the root of the rust project is not correct.

Is it possible, in this case, to start RLS on the rust folder of the workspace ?
(I suppose this does't need any modifications in RLS)

In addition, if a workspace contains several unrelated rust projects, is it possible to start one RLS by rust folder ?
(I suppose this does't need any modification in RLS either, but must be a more involved change in rls-vscode)

Fixed.

Was this page helpful?
0 / 5 - 0 ratings