Skip to content

[Progress] - start utilizing data in diagnostics to forward "quickfixes" to tools #17337

Closed
@ckipp01

Description

@ckipp01

This is a follow-up to the work outlined in this issue. While the work in that
issue focused around forwarding the DiagnosticCode and DiagnosticRelatedInformation, this issue is meant to track the work that is necessary to start utilizing the data field in the Diagnostic in order to forward quick fixes right from the compiler to your editor. Just to given an example, here a POC that was done during the Scala Tooling Summit showing a fix
coming from the compiler and being consumed from IntelliJ.

227951211-dd28ccdc-9f2c-4090-8c74-793fae191cd0.1.mov

Like the other issue there are a fair amount of steps to start utilizing data in
this way. I've outlined the various steps below:

Just to give a few examples, here are some candidates that came up during the discussions around this:

  • implement all members
  • add type for recursion automatically if possible
  • auto import implicits
  • add an import enabling a (experimental/compatibility/...) language feature - in some (most?) situations this could be alternatively achieved (globally rather than just in a single file) by adding a compiler option but this seems much more complicated as each build tool specifies compiler options in a different way and the compiler should be build tool agnostic
  • add missing case clauses in a pattern match - E029
  • remove redundant/disallowed keyword - E015, E037, E062, E063, E064, E065

I can update this as I get more details, but just creating this to start tracking progress on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions