swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
706 stars 47 forks source link

Remove stale swiftc diagnostics #860

Closed award999 closed 2 weeks ago

award999 commented 3 weeks ago

Remove stale swiftc diagnostics

Issue: #750

If the user modifies source and SourceKit diagnostics differ, they may want to cleanup all the old swiftc ones. This will be turned on by default. The swiftc must match with a former SourceKit one, and once SourceKit returns a new list of diagnostics, if that matched diagnostic is no longer there, assume it is fix and remove the matching swiftc error

Tie this to a setting so the user can turn off.

Keep track of all current diagnostics regardless of source to allow for this cleanup, and has the added benefit that we can update the list when the diagnosticsCollection setting changes.

adam-fowler commented 3 weeks ago

Is there any situation where someone would want to keep the stale diagnostics?

award999 commented 2 weeks ago

Is there any situation where someone would want to keep the stale diagnostics?

I am concerned we are adding too many configuration settings. We now have 10 possible diagnostic lists. In what situation would someone want to not remove stale swifts diagnostics? Otherwise everything looks good

You're right, really just using it as a "kill switch" but I cannot think of a user case. Will address that