Chris Kipp - The Journey of a Dotty Diagnostic
Channel: ScalaIO FR
Date: 2023-03-11

In this talk we do a deep dive into a seemingly simple topic, diagnostics in Dotty. For a long time we've settled for the bare minimum information when it comes to diagnostics: a message, a position, and a severity level. However, other languages like Rust and Elm have challenged this idea providing rich structured diagnostic information that tools can use. What if we started to expand the diagnostics information dotc provides? How could this help our tooling? There is [ongoing work](https://github.com/lampepfl/dotty/issues/14904) on this and the changes necessary to the ecosystem are much wider than you'd expect. 

Follow along as we trace the journey of a diagnostic starting from the base traits in sbt/zinc, through dotc, through your build tool, through your language server, and finally to your editor. At the end of this talk you'll have a much richer understanding of how diagnostics are created, handled, and forwarded. You'll also see some examples of how things like code actions in Metals become much easier with this structured information.

Twitter : https://twitter.com/ckipp01
Blog : https://www.chris-kipp.io/blog/the-journey-of-a-dotty-diagnostic
Slides : https://www.chris-kipp.io/slides/dotty-diagnostics