Hello!
With the following project configuration the rls is working fine in on of the crates("foo" or "bar", depending on which one was opened first), but "RLS Starting" hangs forever in the second one. Is it a known bug?
mkdir workspaces_test && cd workspaces_test
cat <<EOF > test.code-workspace
{
"folders": [
{
"path": "bar"
},
{
"path": "foo"
}
],
"settings": {}
}
EOF
cargo init --bin foo
cargo init --bin bar
code test.code-workspace
Tested on rls 1.34.0 (0d6f53e 2019-02-14)
and rls 1.36.0 (5b8e99b 2019-05-01)
I managed to figure out how to debug extensions aaaand... it turns out this looks like it's being caused by ClientWorkspace#registerCommands()
being executed again. My current VS Code version doesn't allow registering multiple commands. I'm working on a patch to fix this right now, and I'll update if I end up dropping the task. Below is the stack trace:
rejected promise not handled within 1 second: Error: command 'rls.update' already exists
stack trace: Error: command 'rls.update' already exists
at d.registerCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:496:447)
at Object.registerCommand (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:715:422)
at ClientWorkspace.registerCommands (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:221:58)
at ClientWorkspace.<anonymous> (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:203:18)
at Generator.next (<anonymous>)
at __awaiter (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:7:71)
at new Promise (<anonymous>)
at __awaiter (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:3:12)
at ClientWorkspace.start (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:161:16)
at didOpenTextDocument (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:61:19)
at vscode_1.workspace.onDidOpenTextDocument.doc (/Users/zkat/Documents/code/personal/rust/rls-vscode/out/extension.js:26:57)
@not-fl3 I still have to do some work and refactoring on it before it's 100% there, but if you want to get this bit working in the process, you can just clone https://github.com/zkat/rls-vscode/commit/6e5cae8a456817b7b5b75fd46935d8d86486a363 and run npm i && npm run installDevExtension
.
https://github.com/rust-lang/rls-vscode/pull/601 is a thing now. Cheers.
Most helpful comment
https://github.com/rust-lang/rls-vscode/pull/601 is a thing now. Cheers.