Stream: t-compiler/rust-analyzer

Topic: Difficult repros


Brennan Vincent (Mar 03 2021 at 15:39, on Zulip):

Hi all, a bit of a meta-question.

If I have a big mess of heavily generic code for which rust-analyzer isn't correctly inferring types, it is acceptable to create a GitHub issue whose repro instructions are basically just "go download this big mess of code from here" ?

I've done this a few times already, but I'm not sure if it's annoying to the team to get things that aren't minimal repros.

Florian Diebold (Mar 03 2021 at 15:39, on Zulip):

well, it's going to make it more likely that your bug will get looked at if you have a small repro, but any actual repro is already helpful ;)

Brennan Vincent (Mar 03 2021 at 15:41, on Zulip):

The biggest risk is that someone from the r-a team spends time figuring out what is going wrong, and then determines it is a dupe of a known issue

Florian Diebold (Mar 03 2021 at 15:41, on Zulip):

it can be really helpful to try to minimize the repro though, you can often remove large swathes of dependencies and code. keep in mind that the repro doesn't need to _work_. you can remove lots of code and replace most function bodies by loop {}

Brennan Vincent (Mar 03 2021 at 15:41, on Zulip):

That is a good point.

matklad (Mar 03 2021 at 15:42, on Zulip):

Commenting out deps in Cargo.toml and module declarations is also a good start

Florian Diebold (Mar 03 2021 at 15:43, on Zulip):

but you could also post your big repro first, maybe I or someone else will immediately recognize it as a known problem. If it's involving lots of traits etc. that's unlikely though

Jeremy Kolb (Mar 03 2021 at 20:37, on Zulip):

I wonder if we could create an LSP record/replay feature

Laurențiu (Mar 03 2021 at 20:51, on Zulip):

We can already log the LSP messages and we could presumably replay them to a new server instance.

Brennan Vincent (Mar 03 2021 at 21:03, on Zulip):

This question became irrelevant in this case, since I was indeed able to come up with a simple repro: https://github.com/rust-analyzer/rust-analyzer/issues/7864

But it is good to know the expectation for the future :)

Last update: Jul 27 2021 at 21:15UTC