Stream: t-compiler/rust-analyzer

Topic: merging cargo check and RA diagnostics

Florian Diebold (Dec 13 2020 at 17:40, on Zulip):

With us implementing more and more diagnostics natively, we should probably think about how to avoid having duplicates from cargo check all the time? Maybe we could define for each native diagnostic which rustc error code corresponds to it, and then merge them on the IDE level if the rustc diagnostic is there as expected. Might be more complicated than that because of differing spans though. Or does no-one else consider this a problem? :thinking:

matklad (Dec 13 2020 at 17:47, on Zulip):

I think we should definitelly assign error codes to our diagnostics, and make sure that they match with rustc ones

matklad (Dec 13 2020 at 17:48, on Zulip):

We probably should impelment some diagnostic merging logic as well, but I am the wrong person to access urgency here -- I don't use cargo check

matklad (Dec 13 2020 at 17:48, on Zulip):

As a pre-requsite, it'd be good to refactor the code that maps JSON diagnostic to LSP -- I feel like it could be simplified quite a bit

Jeremy Kolb (Dec 13 2020 at 21:44, on Zulip):

Yeah that code is a little complicated

Last update: Jul 24 2021 at 20:45UTC