From df675f45ee408389782fd404849475979c125c3a Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Wed, 30 Nov 2016 10:06:48 -0800 Subject: [PATCH] Fix Fuchsia build (#7105) --- packages/flutter_tools/bin/fuchsia_builder.dart | 2 ++ packages/flutter_tools/lib/executable.dart | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/packages/flutter_tools/bin/fuchsia_builder.dart b/packages/flutter_tools/bin/fuchsia_builder.dart index 8dafd3aa93..b243376ef2 100644 --- a/packages/flutter_tools/bin/fuchsia_builder.dart +++ b/packages/flutter_tools/bin/fuchsia_builder.dart @@ -12,6 +12,7 @@ import '../lib/src/base/config.dart'; import '../lib/src/base/context.dart'; import '../lib/src/base/logger.dart'; import '../lib/src/base/os.dart'; +import '../lib/src/base/process_manager.dart'; import '../lib/src/cache.dart'; import '../lib/src/flx.dart'; import '../lib/src/globals.dart'; @@ -36,6 +37,7 @@ Future main(List args) async { executableContext.setVariable(Logger, new StdoutLogger()); executableContext.runInZone(() { // Initialize the context with some defaults. + context.putIfAbsent(ProcessManager, () => new ProcessManager()); context.putIfAbsent(Logger, () => new StdoutLogger()); context.putIfAbsent(Cache, () => new Cache()); context.putIfAbsent(Config, () => new Config()); diff --git a/packages/flutter_tools/lib/executable.dart b/packages/flutter_tools/lib/executable.dart index b25b5f126a..6ab7b053d2 100644 --- a/packages/flutter_tools/lib/executable.dart +++ b/packages/flutter_tools/lib/executable.dart @@ -96,6 +96,10 @@ Future main(List args) async { // Make the context current. _executableContext.runInZone(() { // Initialize the context with some defaults. + // NOTE: Similar lists also exist in `bin/fuchsia_builder.dart` and + // `test/src/context.dart`. If you update this list of defaults, look + // in those locations as well to see if you need a similar update there. + // Seed these context entries first since others depend on them context.putIfAbsent(ProcessManager, () => new ProcessManager()); context.putIfAbsent(Logger, () => new StdoutLogger());