Skip to content

Commit f94574d

Browse files
committed
Don't merge in the original diagnostics
1 parent a954b6f commit f94574d

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

server/src/incrementalCompilation.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -630,18 +630,13 @@ function processAndPublishDiagnostics(
630630

631631
const fileUri = utils.pathToURI(entry.file.sourceFilePath);
632632

633-
// Get compiler diagnostics from main build (if any) and combine with incremental diagnostics
634-
const compilerDiagnosticsForFile =
635-
getCurrentCompilerDiagnosticsForFile(fileUri);
636-
const allDiagnostics = [...res, ...compilerDiagnosticsForFile];
637-
638633
// Update filesWithDiagnostics to track this file
639634
// entry.project.rootPath is guaranteed to match a key in projectsFiles
640635
// (see triggerIncrementalCompilationOfFile where the entry is created)
641636
const projectFile = projectsFiles.get(entry.project.rootPath);
642637

643638
if (projectFile != null) {
644-
if (allDiagnostics.length > 0) {
639+
if (res.length > 0) {
645640
projectFile.filesWithDiagnostics.add(fileUri);
646641
} else {
647642
// Only remove if there are no diagnostics at all
@@ -654,7 +649,7 @@ function processAndPublishDiagnostics(
654649
method: "textDocument/publishDiagnostics",
655650
params: {
656651
uri: fileUri,
657-
diagnostics: allDiagnostics,
652+
diagnostics: res,
658653
},
659654
};
660655
send(notification);

0 commit comments

Comments
 (0)