rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.28k stars 1.61k forks source link

Cargo check, run, build and rust-analyzer indexing stuck at 99% (@ program name) #18500

Closed aramrw closed 2 days ago

aramrw commented 2 days ago

I tried having someone else clone & try to build the program, it had the same problem for them (I am on Windows 11 & they are on linux). However they were able to get it not to hang by commenting out everything and just having fn main() {}, but that didn't work for me. I also built massive projects like zed, some big tauri applications, some other of my rust programs, and they fully built without any issues.

Everything in the repo is the last thing I had which successfully built & ran before i did cargo add colored. After this the program has been having this hang problem, even though I removed colored, deleted target, cargo clean && cargo build/run/check, updated rustup, tried different ra's from vscode, zed, & neovim, restarted my pc, and tried in wsl.

rust-analyzer version: 0.4.2178-standalone (dd9cd2251 2024-11-08) [c:\Users\arami.vscode\extensions\rust-lang.rust-analyzer-0.4.2178-win32-x64\server\rust-analyzer.exe]

this problem occurs with any rust-analyzer (ie. the ones that get downloaded by neovim's Mason & zed), as well as manually downloading the latest stable release.

rustc version : 1.82.0 (f6e511eec 2024-10-15)

relevant settings : default settings for every editor.

repository link : https://github.com/aramrw/manga-panel-downloader

If you run cargo run, cargo build, cargo check, or just let rust-analyzer try to index the program, it will get stuck at 99% showing everything built but the program name.

ChayimFriedman2 commented 2 days ago

Does this happen with Cargo too (you said cargo build/check are also impacted)? If yes, that's a Cargo issue, not a rust-analyzer one (r-a invokes Cargo).

aramrw commented 2 days ago

My fault, It was actually because of this: https://github.com/dtolnay/thiserror/issues/381