feat(diagnostic): clear pull state on close#5453
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds workspace pull state cleanup when documents are closed to prevent stale diagnostic information from persisting. The change ensures that when a document is closed, both document and workspace diagnostic pull states are cleared, preventing scenarios where old workspace diagnostic resultIds could reference diagnostics that no longer exist.
Key Changes:
- Added workspace pull state cleanup on document close in the diagnostic feature
- Increased test timeouts for several flaky completion tests from default to 10000ms
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/language-client/diagnostic.ts | Added forget() call to clear workspace pull state when documents close, preventing stale diagnostic references |
| src/tests/completion/basic.test.ts | Increased timeout values for four completion tests to address test reliability |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5453 +/- ##
==========================================
- Coverage 97.98% 97.96% -0.02%
==========================================
Files 280 280
Lines 27866 27867 +1
Branches 5770 5770
==========================================
- Hits 27304 27301 -3
- Misses 105 106 +1
- Partials 457 460 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
FYI microsoft/vscode-languageserver-node#1674