Closed ospfranco closed 3 months ago
Same happens on Windows and Linux (rustc 1.78.0 (9b00956e5 2024-04-29))
I was having a similar issue with Windows, VSCode, WSL Ubuntu.
Same issue here
Can anyone trigger it reliably? A public repository causing the issue or a bisection would be appreciated.
Otherwise capturing backtraces of the running threads would help
Can anyone trigger it reliably? A public repository causing the issue or a bisection would be appreciated.
@lnicola I haven't had the chance to dive into the details yet, but can confirm that rust-lang/rustup is one of the repos that has broken 2024-06-10
...
PS: I use :MasonInstall
to install an r-a
distribution on Neovim, which I believe is just a direct download from your releases page. I just performed a downgrade by executing :MasonInstall rust-analyzer@2024-06-03
and now everything is working alright again.
OS: macOS 14.5.0
By git bisect
, I find that the problem may originate from 23a5f31ff4.
Downgrading saves my day... r-a
easily occupies my 7950x in a few minutes with the latest release =(
OS: Ubuntu 2404, bare metal.
I have the same problem on Debian Linux. Downgrading to v0.3.1983
fixes the issue.
The problem might be in the infinite loop: https://github.com/rust-lang/rust-analyzer/blob/14a1f4530ca7d63f0c4137c9b3daa5e15c524b9c/crates/rust-analyzer/src/config.rs#L2562-L2569.
The issue might be in this function: it returns a map {source_root: parent_of_source_root}
, but sometimes dir
might be equal to parent
, which cause the infinite loop we’re seeing above.
Also, the variable i
here seems weird, and I’m not sure what it's for. 👀
同样问题,搞了两小时,换了个旧版本修复了。。无语
Downgrading saves my day... r-a easily occupies my 7950x in a few minutes with the latest release =(
I have the same problem on Debian Linux. Downgrading to v0.3.1983 fixes the issue.
同样问题,搞了两小时,换了个旧版本修复了。。无语
@Veykril @lnicola Can you please pin this issue to increase its visibility first? Many thanks in advance!
Thanks for reporting, I just ran into this issue on Ubuntu Linux. I'm quite new to Rust and assumed I must have been doing something wrong.
For anyone using VSCode / VSCodium / etc., until this is fixed, having a working rust-analyzer can be achieved by:
@Veykril thanks for pushing a fix. will there be a hotfix release of this?
There is a new nightly release published now
same here. win11 WSL2 VSCode
For anyone using VSCode / VSCodium / etc., until this is fixed, having a working rust-analyzer can be achieved by:
if opening VSC freezes your machine near-instantly (was the case for me)
- for good measure, restart, as there can be many rust-analyzer processes still running and consuming most of your CPU
- manually disable the extension in settings.json
- open VSC's extensions panel, find rust-analyzer in the list, click the "cog" icon next to it
- in the menu that appears, select "install another version", then in the list select v0.3.1983
- enable the extension again
According to @Veykril, a new nightly release is out now including the fix. You can switch to the pre-release
version of the VSCode plugin to address this issue. If you're using Neovim/Mason, :MasonInstall rust-analyzer@nightly
should be enough.
For anyone using VSCode / VSCodium / etc., until this is fixed, having a working rust-analyzer can be achieved by:
if opening VSC freezes your machine near-instantly (was the case for me)
- for good measure, restart, as there can be many rust-analyzer processes still running and consuming most of your CPU
- manually disable the extension in settings.json
- open VSC's extensions panel, find rust-analyzer in the list, click the "cog" icon next to it
- in the menu that appears, select "install another version", then in the list select v0.3.1983
- enable the extension again
According to @Veykril, a new nightly release is out now including the fix. You can switch to the
pre-release
version of the VSCode plugin to address this issue. If you're using Neovim/Mason,:MasonInstall rust-analyzer@nightly
should be enough.
Yep, switching to the pre-release worked for me.
A new stable release is now out (v0.3.1995
), fixing this and #17376.
Fix doesn't seem to work on my machine: Fedora Linux 40 with KDE Plasma x86_64, kernel 6.8.11 VS Code 1.90.0, native install
Versions 0.3.1983 and earlier work correctly, versions 0.3.1992 and 0.3.1995 loop indefinitely.
@hackguy25 might be better to file a new issue. A project link and/or thread backtraces would be appreciated.
Currently encountering this in 2024
rust-analyzer version:
0.3.1992
rustc version: rustc 1.78.0 (9b00956e5 2024-04-29)
editor or extension: VSCode
relevant settings: Standard Rustup installation
repository link (if public, optional): n/a
code snippet to reproduce: n/a
VSCode updated my extensions today and on the latest rust-analyzer version things are spinning out of control:
I've worked around it by downgrading the version on VSCode itself: