Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsp: Always send empty diagnostics when deleted #1080

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

charlieegan3
Copy link
Member

Previously, we would only send empty diagnostics when the file had had diagnostics before, this did not include parse errors so when a file still had parse errors, it'd remain in client long after the server had cleared it.

This PR also makes some changes to process the cases of clearing files outside the l.diagnosticRequestFile loop as it was tricky to handle the types of empty updates in there.

before

Screen.Recording.2024-09-09.at.14.24.20.mov

after

Screen.Recording.2024-09-09.at.14.25.09.mov

Previously, we would only send empty diagnostics when the file
had had diagnostics before, this did not include parse errors so when a
file still had parse errors, it'd remain in client long after the server
had cleared it.
Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

Looks good to me! Some test failure though :P

@charlieegan3 charlieegan3 merged commit 6badb5d into StyraInc:main Sep 9, 2024
4 checks passed
@charlieegan3 charlieegan3 deleted the clear-old-files branch September 9, 2024 13:48
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Previously, we would only send empty diagnostics when the file
had had diagnostics before, this did not include parse errors so when a
file still had parse errors, it'd remain in client long after the server
had cleared it.
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.

2 participants