diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart index 425b5937d43..367d4640ce7 100644 --- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart +++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart @@ -76,6 +76,7 @@ class IncrementalCompiler extends DeprecatedIncrementalKernelGenerator { @override Future computeDelta({Uri entryPoint}) async { ticker.reset(); + entryPoint ??= context.options.inputs.single; return context.runInContext>((CompilerContext c) async { if (platform == null) { UriTranslator uriTranslator = await c.options.getUriTranslator(); diff --git a/pkg/front_end/test/fasta/incremental_hello_test.dart b/pkg/front_end/test/fasta/incremental_hello_test.dart index 54cd6bb8093..df123aa14c1 100644 --- a/pkg/front_end/test/fasta/incremental_hello_test.dart +++ b/pkg/front_end/test/fasta/incremental_hello_test.dart @@ -35,15 +35,15 @@ test() async { ..strongMode = false ..onProblem = problemHandler; + final Uri helloDart = Uri.base.resolve("pkg/front_end/testcases/hello.dart"); + final ProcessedOptions options = - new ProcessedOptions(optionBuilder, false, []); + new ProcessedOptions(optionBuilder, false, [helloDart]); IncrementalCompiler compiler = new IncrementalCompiler(new CompilerContext(options)); - Uri helloDart = Uri.base.resolve("pkg/front_end/testcases/hello.dart"); - - FastaDelta delta = await compiler.computeDelta(entryPoint: helloDart); + FastaDelta delta = await compiler.computeDelta(); // Expect that the new program contains at least the following libraries: // dart:core, dart:async, and hello.dart.