Open izderadicka opened 4 years ago
I am experiencing the same problem. Using VSC 1.43.1, Rust extension 0.7.0, rust 1.41.0-x86_64-apple-darwin and OS is macOS Mojave 10.14.6.
Same problem here. The version of VSCode is 1.43.2 with Rust extension 0.7.0 and Rust 1.41.1 toolchain on macOS Mojave 10.14.4.
Also running into the same issue.
After being frustrated by this for a few days, I switched over to the rust-analyzer extension. It's working great, is much faster, and has a bunch of extra features.
Same here, with VSCode 1.43.2, rls 1.41.0 (b27e117 2020-01-13), rustc 1.42.0 (b8cedc004 2020-03-09), and Rust (rls) extension 0.7.0 on Linux x64 5.3.0-42-generic.
Same with rls extension 0.7.3, rls 1.41.0, rustc 1.44.0-nightly.
Happens to me every few minutes: extension 0.7.3, rls 1.41.0, rustc 1.43.0
Update: I moved to rust-analyze as well. It performs much faster without this kind of issues.
Still problem, however RLS seems to be working - errors are detected etc. But indexing indicator is rolling - definitely annoying
Thanks to the earlier comments, I also switched to rust-analyzer; it's different, but it does work very well and offers other neat features.
A point that I think has not been made yet about this issue is that when the rls spinner is stuck on "indexing", the tool-tip (variable type) hints stop working.
I debugged this a bit and it seems that this happens when the analysis database thread panicks for some reason - we don't ever finish indexing in that case but we handle our builds and diagnostics just fine.
This will need further work on the RLS itself. By the way, do you have a concrete, reliable reproduction case? I only managed to reproduce these failures by accident and couldn't find a reliable way to reproduce this.
It often happens for me when I'm typing crappy code. While I'm in the middle of writing some code, it's typically uncompilable junk, and the rls seems to die because of it.
Even code without any issues is indexing forever on my site. The restart of VScode is not providing any release in this case. No solution since three versions available.
Any movement here?
I'm still getting this problem on VSCode 1.48.2 (on Mac) and rustc 1.46.0 (04488afe3 2020-08-24)
Still happening
Got the same issue myself. Swapped to the analyzer and tried the nightly (same issue) but they both have their own downsides.
pkill -f cargo
Will release the lock on the target directory.
Same issue
I started getting this issue too - Ctrl+Shift+P
and Restart Rust Server
seems to be a workaround, but it gets annoying to having to do this quite often.
Turns out this is an issue of the Rust extension
. I switched to rust-analyzer
and it's faster, lighter, and seems to have a ton of more features compared to Rust extension
: and it doesn't get stuck in "indexing".
rust-analyzer
takes a lot of time to index stuff which is very annoying when a part of the project isn't even in Rust.
And it fails to discover some of the projects, there is an open bug about this.
And, using an independent parser, as of 2021-10 it does not support type ascription.
I ended up disabling both extensions and enabling one or the other on a per-workspace basis.
rust-analyzer
and it's faster, lighter, and seems to have a ton of more features
On one of my projects rust-analyzer
is stuck indexing dependencies in an infinite loop, until eventually it goes out of memory. So it isn't like one fails and other is all sunshine and rainbows.
Clearly some different design decisions has been made between the two. Rust extension
might be much lighter and faster if you take the rust-analyzer
dependency indexing into account. Seems that Rust extension
does a lot of work on demand, whereas rust-analyzer
tries to prepare beforehand, which makes the moment-to-moment code editing with rust-analyzer
much heavier.
Facing the same issue. The indexing thread never terminates and runs in an infinite loop simply wasting resources. I switched to rust-analyzer
, the plug-in is in alpha state, but works cool.
I wouldn't read too much into the "the project is in alpha status" warning on the VS Code Marketplace.
From time time time RLS got stuck on indexing - see screenshot of status bar
then action RUST: Restart RLS is not working, neitheir manual kill of rls. Only restart of VS code.
I looked bit in logs but did found anything useful - looks like something related rather to VSC and extension then to rls - as rls restart does not help?
Using VSC 1.42.1, Rust extension 0.7.0, rls - rls 1.41.0 (5fde462 2020-02-21) and OS is Ubuntu 18.04.