-
Notifications
You must be signed in to change notification settings - Fork 163
statusBar "RLS: working" all the time, spinning continuously #186
Comments
It is not normal and shouldn't happen. It should only spin intermittently as your code is building. Could try turning on some logging to get some more info please? How to do that is described in debugging.md. |
I'm running into the same continuous spinning of "RLS: working." Looking at the User Settings auto-completions, I did set the other option though:
Re-running with
AFAIK,
I'm also running VSCode from this same Terminal via EDIT: I also enabled
|
I ran again only with
I believe it is the same message as @akappel . The funny thing is that I think the extension is working, but not 100%. Sometimes it takes a while to show the linter. When I first installed this extensions in another computer, I didn't had this kind of delay, neither this continuous spinning. Maybe these could be relate, but not the case right now. |
Useful info, thanks. I'll try to investigate. Is the project you're trying to build public? Could you link to it please? |
It's just an exercise I'm doing from "The Book". This is the repo: https://github.com/gubasso/closures-workout |
For the sake of facilitating some cross communication, I believe this exact same error has also been reported in rls proper, both rust-lang/rls#548 and rust-lang/rls#544 appear to be tackling the same bug as reported here. |
Thanks @eric1221bday. It looks like, based on what @Xanewok posted in rust-lang/rls#544, that it may be a change in semantics in rls-analysis. rust-dev-tools/rls-analysis@37508ae The weird thing is that this commit is almost a month old, and it seems like the oldest reported issue didn't start until 4 days ago. EDIT: Never mind, it might actually have been experienced by others for a longer time period, based on rust-lang/rls#450. |
As a side note it would nice if extension could report panic instead of continuously working. |
I forked and pulled down the https://github.com/nrc/rls-analysis code and wrote the following test in the ...
...
use std::panic;
use std::env;
#[test]
fn it_should_find_rustc_via_path() {
// ensure that the env. vars aren't set (restore later if they are)
let key_sysroot = "SYSROOT";
let env_sysroot = match env::var_os(&key_sysroot) {
Some(val) => {
env::remove_var(&key_sysroot);
val.to_str().unwrap().to_owned()
},
None => {String::new()}
};
let key_rustc = "RUSTC";
let env_rustc = match env::var_os(&key_rustc) {
Some(val) => {
env::remove_var(&key_rustc);
val.to_str().unwrap().to_owned()
},
None => {String::new()}
};
// run test
let result = panic::catch_unwind(|| {
sys_root_path();
});
// restore env vars if they were set (in case other tests rely on them)
env::set_var(key_sysroot, env_sysroot);
env::set_var(key_rustc, env_rustc);
assert!(result.is_ok(), "sys_root_path() did not find rustc when it should");
}
...
... (Sorry for the verbose env. var setup; I'm still getting used to idiomatic Rust) This test case runs successfully, since my rustc binary is on the PATH. If you want to try it out yourself, I ran the following command:
|
Doing some further digging, I noticed that a portion of the extension code I'm hitting doesn't actually set the What this means is that my
...and reran the extension via VSCode debugger (using the resulting VSCode editor window to open a simple hello-world project I have) and still got the same log result:
One thing I did notice, though, was that when I opened the
Sadly, after removing my Sorry if that was a bit of a rabbit-hole but my thought process was that if the other VSCode Rust extension can start the RLS server and this extension can't, it may have to do with how we're setting up the environment variables when it's started through |
I tried a dummy approach... uninstalled and installed rust and vscode, tried to began all over again :) First, installed rust, then vscode, and for last, the extension rust-rls... And then I got the warn message: "RLS could not set RUST_SRC_PATH for Racer because it could not read the Rust sysroot." Everything else ran accordingly, but this message kept on even after installing all the extension. And the issue continued (continuous spinning). Could this message be related with this issue? |
@gubasso it looks as though the fix has been made via rust-dev-tools/rls-analysis#119. I'm not entirely sure when to expect it to be released so we can pull it down. @nrc is there a time table on when we should issue a |
Many thanks @akappel ! |
It's in the bors queue right now (rust-lang/rust#45902), so when that PR hits nightly you'll be good to go. I hope that happens in the next few days, but being more exact is difficult. |
for anyone following this issue, (My rls still isn't working in different ways but I'm going to make sure that it's not user error) |
@MaxBittker , just tried now and the problem persists... |
It is in the nightly now, if |
@nrc Tried and there are no problems with RLS any longer. So seems to be working just fine. |
Rust nightly (79cfce3d3 2017-11-12) landed. The spinner now returns from „working“ to „done“. So I think this bug can now be closed. 🎉 |
Performed a
Starting up VSCode gives the fabled "RLS: done" 👍 . |
Thanks for the reports all! |
Worked for me too! Thanks guys!!! |
While I'm with VS Code open in any Rust code, even when I'm not typing, the "RLS: working" status is permanent and never changes to "RLS: Done".
I've installed this extension in another computer (linux, same distro and configs), and this problem didn't occur.
Is it normal?
The text was updated successfully, but these errors were encountered: