De-duplicate errors from sourcekitd and swiftc in the Problems view
In the problems pane, it would be nice if we could de-duplicate errors reported by sourcekitd and swiftc. My suggestion for this would be: If sourcekitd reports an error at the same location with the same message as swiftc, hide it.
I would love to be able to do this, but VSCode considers these two class of errors as coming from different sources and will not merge them.
If I had access to the full problems list I could filter the sourcekitd errors, but I haven't found a way to access the problems list. Also the problem with filtering the sourcekitd errors is I would lose the codeActions attached to these errors.
And I suppose (sorry if this is a stupid question) you can’t intercept the errors coming from sourcekit-lsp, right to merge them with build issues and then publish them using your own diagnostics provider.
Interestingly, I just checked what clangd + CMake does and it doesn’t show the build errors in the Problems View at all. I don’t think that’s the way to go but I find at an interesting data point nonetheless.
I can't intercept the build errors, but I can intercept the sourcekit-lsp errors. But without knowing what the build errors are I'm not sure what I can do with the sklsp errors.
Yeah not showing build errors would be bad. Sourcekit-LSP only picks up the errors for the files that are open, if I understand correctly
Seems related to #750. I can investigate this one as well. I know that TypeScript handles this well. Would be nice to see how they do it.
I don't think the Typescript extension displays errors from the compiler. The only errors displayed come from the LSP server.
See #759