You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify if/when clients should clear document diagnostics from pull requests #1542
The official VS Code language client clears diagnostics obtained via a document diagnostic pull request when all editor tabs associated with that document are closed. This is handy for servers that implement "single-document" diagnostics (where the diagnostics are only visible while the associated file is open), like the JSON server built into VS Code. However, it's not clear from the specification if this (or similar) behavior is required for clients.
I suppose clients could decide not to implement any behavior like that, if it aligns better with the native way to handle diagnostics? But it's not entirely clear how clients are expected to behave when handling document diagnostics obtained from pull requests and what the standard way to implement "single-document" diagnostics as a server is.
This is left open on purpose since it depends on what clients want to do with that information. Consider a case where a client renders a diagnostic overlay for files visible in the explorer. In this case an editor is not open however the diagnostics shouldn't be cleared either.
The rule for the server for document diagnostic pull is the same as for any other language feature request (like hover, ...): the server has to compute an accurate information for the document in that point of time.
I will close the issue since the pull should behave like any other language request. Please ping if you disagree.
Activity
dbaeumer commentedon Sep 6, 2022
This is left open on purpose since it depends on what clients want to do with that information. Consider a case where a client renders a diagnostic overlay for files visible in the explorer. In this case an editor is not open however the diagnostics shouldn't be cleared either.
The rule for the server for document diagnostic pull is the same as for any other language feature request (like hover, ...): the server has to compute an accurate information for the document in that point of time.
I will close the issue since the pull should behave like any other language request. Please ping if you disagree.