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
If a Dockerfile gets deleted, the language server does not push an empty [] of Diagnostics back to the client. This means that the client will continue to display warnings and errors to the user for a file that no longer exists.
There are two ways to solve this.
When a Dockerfile is closed in the client's editor, its diagnostics would just get wiped. When a file gets deleted, clients presumably also close the file so that would cause its diagnostics to get cleared. This would match the behaviour of other existing language servers that are maintained by Microsoft. According to the specification...
Diagnostics are “owned” by the server so it is the server’s responsibility to clear them if necessary. The following rule is used for VS Code servers that generate diagnostics:
if a language is single file only (for example HTML) then diagnostics are cleared by the server when the file is closed.
if a language has a project system (for example C#) diagnostics are not cleared when a file closes. When a project is opened all diagnostics for all files are recomputed (or read from a cache).
Ask the client to notify the language server when Dockerfiles are deleted by registering for the workspace/didChangeWatchedFiles notification. We have to use a glob pattern here though. Theoretically, if you opened a file named test.txt in a client's Dockerfile editor then validation errors and warnings would get created for it as the editor would talk to the language server. However, when it gets deleted the server wouldn't be notified of this as test.txt would not match any sane glob pattern that we think up of for Dockerfiles.
The text was updated successfully, but these errors were encountered:
If a Dockerfile gets deleted, the language server does not push an empty
[]
ofDiagnostic
s back to the client. This means that the client will continue to display warnings and errors to the user for a file that no longer exists.There are two ways to solve this.
workspace/didChangeWatchedFiles
notification. We have to use a glob pattern here though. Theoretically, if you opened a file namedtest.txt
in a client's Dockerfile editor then validation errors and warnings would get created for it as the editor would talk to the language server. However, when it gets deleted the server wouldn't be notified of this astest.txt
would not match any sane glob pattern that we think up of for Dockerfiles.The text was updated successfully, but these errors were encountered: