Stream: t-compiler/wg-rls-2.0

Topic: name resolution is stuck


Amanieu (Jan 12 2020 at 15:57, on Zulip):

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.

matklad (Jan 12 2020 at 15:59, on Zulip):

@Amanieu could you check if it is stuck with this commit reverted: https://github.com/rust-analyzer/rust-analyzer/commit/9dc1826cfaa75983a83f9eb7f788067d5dedf5a7 ?

matklad (Jan 12 2020 at 15:59, on Zulip):

(that's just a while guess, but, if this is a regressio, the above commit is a likely culprit)

Amanieu (Jan 12 2020 at 16:00, on Zulip):

Hmm how do I check my rust-analyzer version?

Amanieu (Jan 12 2020 at 16:00, on Zulip):

actually wait

matklad (Jan 12 2020 at 16:00, on Zulip):

ra_lsp_server --version

Amanieu (Jan 12 2020 at 16:00, on Zulip):

My build is d5abe4cfddd5c6e14100f20d27d3de38fe7201f5, from Jan 8

matklad (Jan 12 2020 at 16:00, on Zulip):

It should print commit

matklad (Jan 12 2020 at 16:01, on Zulip):

Ah, so this is pre-existing, which makes it more fun

matklad (Jan 12 2020 at 16:02, on Zulip):

I would try updating rust-analyzer then first, we landed a couple of fixes to macros and that one about name resolution

matklad (Jan 12 2020 at 16:03, on Zulip):

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

Amanieu (Jan 12 2020 at 16:07, on Zulip):

Is there a way to find out which name/macro it can't resolve?

Amanieu (Jan 12 2020 at 16:07, on Zulip):

Unfortunately this is quite a big project with 50k lines and 14 crates in a workspace.

Amanieu (Jan 12 2020 at 16:14, on Zulip):

Huh it seems to work now

Amanieu (Jan 12 2020 at 16:14, on Zulip):

But it's been rather on and off, sometimes working, sometimes not.

matklad (Jan 12 2020 at 16:45, on Zulip):

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)

Last update: Jan 21 2020 at 08:20UTC