Skip to content

Conversation

@rodinaarssen
Copy link
Member

Our TextDocumentService implementations now explicitly check, after receiving and handling a DidCloseTextDocument event, whether the closed file still exists. For transient files, such as unsaved untitled files, this will not be the case. In such cases, we now mimic a file deletion event in order to clear out any remaining diagnostics coupled to the closed file. This solves an issue where non-clearable (or, at least, not trivially clearable) diagnostics were kept around in the IDE.

This is a partial fix for @urbanfly's test issues #894.

@DavyLandman DavyLandman enabled auto-merge (squash) November 26, 2025 13:14
Copy link
Member

@toinehartman toinehartman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@sonarqubecloud
Copy link

@DavyLandman DavyLandman merged commit 765894b into main Nov 26, 2025
15 checks passed
@rodinaarssen rodinaarssen deleted the fix-clearing-unknown-files branch November 26, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants