This repository was archived by the owner on Dec 29, 2022. It is now read-only.
Description My setup
vscode: 1.14.0
OS: macOS 10.12.6
rustup: 1.5.0
rust: 1.20.0-nightly (f85579d 2017-07-12)
vscode RLS plugin: 0.4.2
vscode Perforce plugin: 2.1.1
vscode RLS settings:
"rust.rustup" : {
"toolchain" : " nightly-x86_64-apple-darwin" ,
"nightlyToolchain" : " nightly-x86_64-apple-darwin"
},
"rust.mode" : " rls" ,
"rust.rls" : {
"useRustfmt" : true ,
"env" : {
"RUST_BACKTRACE" : " 1" ,
"RUST_LOG" : " trace"
}
}
Steps to reproduce
open any Rust project folder (a simple bin or lib project generated with cargo new will do);
open any .rs file in the project
the Rust Language Server OUTPUT window will display the following crash messages:
TRACE:rls::server: parse_message > {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"perforce://print/Users/rick/work/rust/doublecho/src/main.rs?-q","languageId":"rust","version":1,"text":""}}}
TRACE:rls::server: Handling DidOpenTextDocument (params: DidOpenTextDocumentParams { text_document: TextDocumentItem { uri: "perforce://print/Users/rick/work/rust/doublecho/src/main.rs?-q", language_id: Some("rust"), version: Some(1), text: "" } })
thread 'main' panicked at 'called Result::unwrap() on an Err value: StringError("URI scheme is not file")', src/libcore/result.rs:860:4
[snip]
[Error - 2:18:18 PM] Connection to server got closed. Server will not be restarted.
Apparently the perforce://print/... uri sent by the Perforce plugin was causing the "URI scheme is not file" error for RLS.
A workaround is to disable the Perforce plugin for rust workspaces.
Reactions are currently unavailable