Stream: t-compiler/wg-diagnostics

Topic: diagnostics refactoring


davidtwco (Feb 25 2019 at 10:11, on Zulip):

@Esteban Küber is there anything I can work on that would be helpful with the diagnostics refactoring discussed at the All Hands?

Esteban Küber (Mar 14 2019 at 17:52, on Zulip):

There are a few things that you could do, one option would be to lay the work to move rustc to use https://crates.io/crates/annotate-snippets

oli (Mar 18 2019 at 14:56, on Zulip):

Would a preliminary step be to create a RenderDiagnostic<Engine> trait that we can implement for structs containing all info needed for a specific diagnostic (we can start with just a few errors and create structs for them). Then we can implement both RenderDiagnostic<Diagnostic> and RenderDiagnostic<annotate_snippets::Snippet>.

davidtwco (Mar 18 2019 at 14:59, on Zulip):

I think that's a sensible approach.

davidtwco (Mar 18 2019 at 15:00, on Zulip):

(apologies, I had it on my to-do list to reply to @Esteban Küber's message and think about using annotate-snippets)

oli (Mar 18 2019 at 15:00, on Zulip):

I mean, as a very small first step, you can just do the RenderDiagnostic<Diagnostic> part

oli (Mar 18 2019 at 15:02, on Zulip):

If we can start ripping diagnostics code out of the regular logic paths, that would already be a big boon

Last update: Nov 15 2019 at 10:05UTC