vscode-swift icon indicating copy to clipboard operation
vscode-swift copied to clipboard

Parser serialized diagnostic file instead of scraping diagnostics from the build log

Open ahoppen opened this issue 1 year ago • 6 comments

Instead of scraping the build log for errors/warnings/notes using a regex, it would be cleaner if the VS Code extension would read the diagnostic file emitted by -serialize-diagnostics-path. That way VS Code could also show notes that are attached to errors as their children, instead of displaying them as a top level problem.

ahoppen avatar Jan 20 '24 22:01 ahoppen

When did this go in? I know it was being planned but didn't know what state it was in.

adam-fowler avatar Jan 20 '24 22:01 adam-fowler

What do you mean by “this“? AFAIK the Swift compiler has been able to emit serialized diagnostic files for quite a while, possibly forever.

ahoppen avatar Jan 22 '24 17:01 ahoppen

Ok I didn't know about it. Anyway VSCode expects extensions to be parsing compiler output to produce the output of the problems pane. It doesn't really have an interface for extensions to add problems, well at least not a publicly advertised one. What you are suggesting kinda goes against what VSCode expects of extensions. I'll leave this open , as there might be a way, but can't guarantee anything.

adam-fowler avatar Jan 22 '24 17:01 adam-fowler

Oh, interesting. I would have expected that other languages also used serialized diagnostics to produce structured diagnostics.

ahoppen avatar Jan 22 '24 17:01 ahoppen

This relates to #750 and the coordination between diagnostics that come from parsing the output of a task and the diagnostics that come out of source kit lsp.

daveyc123 avatar Apr 19 '24 14:04 daveyc123

happy to grab this one

award999 avatar Apr 22 '24 14:04 award999