Skip to content

Commit 07a53a3

Browse files
jensjohacommit-bot@chromium.org
authored andcommitted
Set onDiagnostic in DDCs incremental compiler code path
Change-Id: Iebff83658bb3b33a316de3f0719cdb44c14ca1b0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108725 Reviewed-by: Jake Macdonald <[email protected]> Commit-Queue: Jens Johansen <[email protected]>
1 parent 464a5a6 commit 07a53a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/dev_compiler/lib/src/kernel/command.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ Future<CompilerResult> _compile(List<String> args,
304304
if (useAnalyzer || !useIncrementalCompiler) {
305305
result = await fe.compile(compilerState, inputs, diagnosticMessageHandler);
306306
} else {
307+
compilerState.options.onDiagnostic = diagnosticMessageHandler;
307308
Component incrementalComponent = await incrementalCompiler.computeDelta(
308309
entryPoints: inputs, fullComponent: true);
309310
hierarchy = incrementalCompiler.userCode.loader.hierarchy;
@@ -319,6 +320,8 @@ Future<CompilerResult> _compile(List<String> args,
319320
}
320321
}
321322
}
323+
compilerState.options.onDiagnostic = null; // See http://dartbug.com/36983.
324+
322325
if (result == null || !succeeded) {
323326
return CompilerResult(1, kernelState: compilerState);
324327
}

0 commit comments

Comments
 (0)