-
Notifications
You must be signed in to change notification settings - Fork 38.9k
vscode.languages.getDiagnostics() output depends on task run and file opening order #256118
Copy link
Copy link
Open
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation-pending
Description
Version: 1.102.0
OS: Windows_NT x64 10.0.19045
Source: #245092 (comment)
Steps to Reproduce:
git clone https://github.com/n-gist/getDiagnostics-test.git
If need, install go-to-problem-1.0.0.vsix for testing vscode.languages.getDiagnostics() output, which logs to output channel named getDiagnostics() test, code:
// Ctrl+F8
const showCounters = () => {
for (const d of vscode.languages.getDiagnostics()) {
channel.appendLine(`${d[1].length}, ${d[0].toString()}`)
}
}
// Shift+F8
const showContent = () => {
for (const d of vscode.languages.getDiagnostics()) {
channel.appendLine(`(${d[1].length}) ${d[0].toString()}:`)
for (const e of d[1]) channel.appendLine(JSON.stringify(e))
channel.appendLine('')
}
}- Start
tsc: watchtask - Open file
src/main.ts getDiagnostics()outputs 6 entries for main.ts. Expected: 3
Note: entries coming from task differs from extension ones. Their range.start and range.end equals. Not sure if this is an issue, or thats just how problem matchers work, giving only one, starting position
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation-pending