I'm getting the following error in one of my projects:
[2020-01-10T23:31:07Z ERROR ra_hir_def::nameres::collector] name resolution is stuck
Unfortunately it's closed-source so I can't share the code. I can however help to debug the problem if you can suggest any direction to start looking.
@Amanieu could you check if it is stuck with this commit reverted: https://github.com/rust-analyzer/rust-analyzer/commit/9dc1826cfaa75983a83f9eb7f788067d5dedf5a7 ?
(that's just a while guess, but, if this is a regressio, the above commit is a likely culprit)
Hmm how do I check my rust-analyzer version?
My build is d5abe4cfddd5c6e14100f20d27d3de38fe7201f5, from Jan 8
It should print commit
Ah, so this is pre-existing, which makes it more fun
I would try updating rust-analyzer then first, we landed a couple of fixes to macros and that one about name resolution
In general, I am afraid that the only way to debug thouse kinds of bug is by minimizing reproducible example, and we don't have tools to automate that unfortunatelly
Is there a way to find out which name/macro it can't resolve?
Unfortunately this is quite a big project with 50k lines and 14 crates in a workspace.
Huh it seems to work now
But it's been rather on and off, sometimes working, sometimes not.
Yeah, unfortunately we dont' have a way to print the offending bit of code. I guess, we should just change the panic message there to give more info, at least the crate name (which is actually non-trivial: we are very careful to only expose opaque ids of things, and not their names, to help with incrementality. And this really hurts when you try to debug things)