Skip to content

Conversation

dhruvmanila
Copy link
Member

Summary

This PR fixes a bug where in openFilesOnly diagnostic mode, VS Code wouldn't clean up the diagnostics even though the server asked it to by sending an empty publish diagnostics.

This is not the long-term solution but a quick fix. Ideally, the server would dynamically register for workspace diagnostics but that requires listening for didChangeConfiguration notification which I'm going to be working on with astral-sh/ty#82.

Test Plan

Before

This uses the latest stable version of ty.

Screen.Recording.2025-07-11.at.08.54.30.mov

After

This uses the debug build of ty from this PR.

Screen.Recording.2025-07-11.at.08.55.06.mov

@dhruvmanila dhruvmanila added the bug Something isn't working label Jul 11, 2025
@dhruvmanila dhruvmanila requested a review from dcreager as a code owner July 11, 2025 03:27
@dhruvmanila dhruvmanila added server Related to the LSP server ty Multi-file analysis & type inference labels Jul 11, 2025
Copy link
Contributor

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@sharkdp sharkdp removed their request for review July 11, 2025 06:07
@AlexWaygood AlexWaygood removed their request for review July 11, 2025 08:19
@dhruvmanila dhruvmanila merged commit 25c4295 into main Jul 11, 2025
40 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/stale-diagnostic-open-files-mode branch July 11, 2025 10:59
@dhruvmanila dhruvmanila mentioned this pull request Jul 15, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Related to the LSP server ty Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants