Skip to content

rust-analyzer hangs when using crate proptest #7987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
soenkehahn opened this issue Mar 12, 2021 · 4 comments · Fixed by #8005
Closed

rust-analyzer hangs when using crate proptest #7987

soenkehahn opened this issue Mar 12, 2021 · 4 comments · Fixed by #8005

Comments

@soenkehahn
Copy link

I'm using rust-analyzer from within vscode through the rust-analyzer extension. I ran into an issue where it hangs when using the crate proptest. Here's a minimal example:

https://github.com/soenkehahn/ra-bug

Opening src/main.rs in vscode makes the rust-analyzer extension hang. Also, the process ~/.config/Code/User/globalStorage/matklad.rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu keeps using one cpu afterwards, even when quitting vscode. I have to manually kill it to get rid of it.

Here's what I'm using:
ubuntu 20.10
vscode 1.54.2
matklad.rust-analyzer 0.2.513
rust-analyzer d54e115

Please, let me know if I can provide more information! Thanks a lot for working on rust-analyzer!!! :)

@jhpratt
Copy link
Member

jhpratt commented Mar 13, 2021

Related? #7953

@soenkehahn
Copy link
Author

@jhpratt: Maybe. It sounds similar. In my case indexing often works fine. I.e. I have a bigger project where I'm also using the proptest crate, and -- if I'm not working on those tests -- rust-analyzer usually works fine. Just when touching the proptest related code, it often starts hanging. #7953 sounds like it always hangs, and never works. Still might be related of course.

@edwin0cheng
Copy link
Member

In OP case, it is because we are not handling some ill-form macro properly, which cased a infinite-loop.

#8005 should fix it.

@bors bors bot closed this as completed in 7808982 Mar 14, 2021
@soenkehahn
Copy link
Author

Hi @edwin0cheng! Can confirm, this seems to be fixed. Just tested with current master (commit af8440b). Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants