Revert Roslyn diagnostics workaround (fix #16360)#19812
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
T-Gro
left a comment
There was a problem hiding this comment.
LGTM – clean revert of the workaround now that Roslyn handles the diagnostics correctly. The ExceptWith logic is the right way to deduplicate, and the new tests cover the key scenarios well.
Two minor suggestions (non-blocking):
-
Rename the HACK methods: Now that the workaround is gone, the TODO comments explaining the HACK names were removed, but the method names still carry the
_HACK_PLEASE_REFER_TO_COMMENT_INSIDEsuffix. Consider renaming them back to their original names (e.g.VerifyDiagnosticBetweenMarkers,VerifyErrorBetweenMarkers,VerifyErrorAtMarker) since the hack is no longer needed. -
Warning not duplicated across passes test: The source
let x = 42at module level doesn't produce any warnings (it's a public binding), soallWarningsis always empty and the assertion trivially passes. Consider using source that actually emits a warning (e.g.open Systemwithout using anything from it, or a private unused binding) to make the test meaningful.
❗ Release notes required
Warning No PR link found in some release notes, please consider adding it.
|
Fixes #16360
Summary
Reverts the workaround introduced in #15982 that was causing F# diagnostics to appear doubled in VS tooltips. The original workaround was added because Roslyn wasn't surfacing diagnostics properly (#15972), but that issue has since been resolved on the Roslyn side.
Changes