vscode-rust icon indicating copy to clipboard operation
vscode-rust copied to clipboard

RLS stuck on indexing

Open izderadicka opened this issue 5 years ago • 23 comments

From time time time RLS got stuck on indexing - see screenshot of status bar image

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.

izderadicka avatar Mar 06 '20 09:03 izderadicka

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.

borsboom avatar Mar 24 '20 14:03 borsboom

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.

SLMT avatar Mar 26 '20 06:03 SLMT

Also running into the same issue.

anweiss avatar Mar 31 '20 00:03 anweiss

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.

borsboom avatar Mar 31 '20 01:03 borsboom

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.

thethomasboyer avatar Mar 31 '20 15:03 thethomasboyer

Same with rls extension 0.7.3, rls 1.41.0, rustc 1.44.0-nightly.

HalfVoxel avatar Apr 23 '20 14:04 HalfVoxel

Happens to me every few minutes: extension 0.7.3, rls 1.41.0, rustc 1.43.0

nlfiedler avatar Apr 25 '20 00:04 nlfiedler

Update: I moved to rust-analyze as well. It performs much faster without this kind of issues.

SLMT avatar Apr 25 '20 06:04 SLMT

Still problem, however RLS seems to be working - errors are detected etc. But indexing indicator is rolling - definitely annoying

izderadicka avatar Apr 25 '20 08:04 izderadicka

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.

nlfiedler avatar Apr 25 '20 15:04 nlfiedler

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.

Xanewok avatar Apr 26 '20 20:04 Xanewok

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.

nlfiedler avatar Apr 26 '20 21:04 nlfiedler

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.

rabe42 avatar Jun 06 '20 10:06 rabe42

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)

ChrisWhealy avatar Sep 03 '20 11:09 ChrisWhealy

Still happening

ckmercantile avatar Nov 20 '20 16:11 ckmercantile

Got the same issue myself. Swapped to the analyzer and tried the nightly (same issue) but they both have their own downsides.

tensor-programming avatar Dec 02 '20 23:12 tensor-programming

pkill -f cargo

Will release the lock on the target directory.

jkelleyrtp avatar Jan 11 '21 02:01 jkelleyrtp

Same issue

iiiMatt avatar Apr 22 '21 08:04 iiiMatt

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.

a3y3 avatar Apr 28 '21 16:04 a3y3

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".

a3y3 avatar Apr 29 '21 16:04 a3y3

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.

ArtemGr avatar Apr 29 '21 17:04 ArtemGr

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.

Narasimha1997 avatar Jul 01 '21 09:07 Narasimha1997

I wouldn't read too much into the "the project is in alpha status" warning on the VS Code Marketplace.

lnicola avatar Jul 01 '21 09:07 lnicola