mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 10:33:03 +00:00
Use options.input if entryPoint is null
Change-Id: Ia7ce42d2caa025b0e1a31872f23bd0364d6cf5f7 Reviewed-on: https://dart-review.googlesource.com/30820 Reviewed-by: Jens Johansen <jensj@google.com>
This commit is contained in:
parent
c41e92de84
commit
ac068b3cb4
|
@ -76,6 +76,7 @@ class IncrementalCompiler extends DeprecatedIncrementalKernelGenerator {
|
|||
@override
|
||||
Future<FastaDelta> computeDelta({Uri entryPoint}) async {
|
||||
ticker.reset();
|
||||
entryPoint ??= context.options.inputs.single;
|
||||
return context.runInContext<Future<FastaDelta>>((CompilerContext c) async {
|
||||
if (platform == null) {
|
||||
UriTranslator uriTranslator = await c.options.getUriTranslator();
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue