Biohazrd icon indicating copy to clipboard operation
Biohazrd copied to clipboard

Diagnostics revamp

Open PathogenDavid opened this issue 3 years ago • 0 comments

One of the large parts of Biohazrd that was spared during the big prototype refactor was diagnostics. I changed how/where they get emitted, but they're still very Clang-cerntric and a bit annoying to work with.

  • [ ] Diagnostics should be associable with a TranslatedDeclaration when they aren't being attached to the declaration. (IE: during generation.)
  • [ ] Diagnostics emitted during generation should always be reflected in the output.
    • [ ] Certain diagnostics should be marked as not destroying the output but that they make the output invalid so that ObsoleteAttribute can be applied to generated types. (For instance: The definition of an enum can be translated if the underlying type is unsupported, but the enum shouldn't be usable.)
  • [ ] Diagnostics should be emitted in a way that a Roslyn Analyzer can consume them and show them in the IDE. (This might be an alternative to the previous subtask.)
  • [ ] Diagnostics should get IDs so they can be filtered.
  • [ ] Handle this diagnostic context: https://github.com/MochiLibraries/Biohazrd/issues/238
  • [ ] Diagnostics should be able to be associated with the library as a whole.
  • [ ] Replace tests which validate diagnostic messages with testing diagnostic IDs.

PathogenDavid avatar Sep 09 '20 23:09 PathogenDavid