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
Create a VS Code extension that listens for diagnostics changes and looks at the URIs of the documents whose diagnostics have changed. E.g.
vscode.languages.onDidChangeDiagnostics((e: vscode.DiagnosticChangeEvent) => {
for (let uri of e.uris) {
console.log(uri.fsPath);
}
});
Run this extension alongside the C# extension.
Create an error so that the C# extension reports that a document has diagnostics.
Resolve the error.
EXPECTED:
The onDidChangeDiagnostics callback is called with the URI of the document that went from having diagnostics to having none.
ACTUAL:
The onDidChangeDiagnostics callback is called with no URIs.
This can be worked around by maintaining a list of documents that have diagnostics, and any time we receive a DiagnosticChangeEvent asking VS Code for all diagnostics, and then checking if any documents went from having diagnostics to no longer having them. However, this seems like something VS Code should be handling. It’s also interesting that this doesn’t seem to be a problem for other languages/extensions.
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
EXPECTED:
The
onDidChangeDiagnostics
callback is called with the URI of the document that went from having diagnostics to having none.ACTUAL:
The
onDidChangeDiagnostics
callback is called with no URIs.This can be worked around by maintaining a list of documents that have diagnostics, and any time we receive a DiagnosticChangeEvent asking VS Code for all diagnostics, and then checking if any documents went from having diagnostics to no longer having them. However, this seems like something VS Code should be handling. It’s also interesting that this doesn’t seem to be a problem for other languages/extensions.
The text was updated successfully, but these errors were encountered: