| Index: pkg/dev_compiler/tool/build_pkgs.dart
|
| diff --git a/pkg/dev_compiler/tool/build_pkgs.dart b/pkg/dev_compiler/tool/build_pkgs.dart
|
| index 04be68b647e7ced32845a0d0f21d402e6126df19..901e9a8a4c0d6cb217a47947b5cc5c8daa2a0d86 100755
|
| --- a/pkg/dev_compiler/tool/build_pkgs.dart
|
| +++ b/pkg/dev_compiler/tool/build_pkgs.dart
|
| @@ -1,4 +1,5 @@
|
| #!/usr/bin/env dart
|
| +import 'dart:async';
|
| import 'dart:io';
|
|
|
| import 'package:dev_compiler/src/compiler/command.dart';
|
| @@ -11,7 +12,7 @@ import 'package:dev_compiler/src/compiler/command.dart';
|
| ///
|
| /// If no arguments are passed, builds the all of the modules tested on Travis.
|
| /// If "test" is passed, only builds the modules needed by the tests.
|
| -void main(List<String> arguments) {
|
| +Future<Null> main(List<String> arguments) async {
|
| var test = arguments.length == 1 && arguments[0] == 'test';
|
|
|
| new Directory("gen/codegen_output/pkg").createSync(recursive: true);
|
| @@ -19,42 +20,42 @@ void main(List<String> arguments) {
|
| // Build leaf packages. These have no other package dependencies.
|
|
|
| // Under pkg.
|
| - compileModule('async_helper');
|
| - compileModule('expect', libs: ['minitest']);
|
| - compileModule('js', libs: ['js_util']);
|
| - compileModule('meta');
|
| + await compileModule('async_helper');
|
| + await compileModule('expect', libs: ['minitest']);
|
| + await compileModule('js', libs: ['js_util']);
|
| + await compileModule('meta');
|
| if (!test) {
|
| - compileModule('lookup_map');
|
| - compileModule('microlytics', libs: ['html_channels']);
|
| - compileModule('typed_mock');
|
| + await compileModule('lookup_map');
|
| + await compileModule('microlytics', libs: ['html_channels']);
|
| + await compileModule('typed_mock');
|
| }
|
|
|
| // Under third_party/pkg.
|
| - compileModule('collection');
|
| - compileModule('matcher');
|
| - compileModule('path');
|
| + await compileModule('collection');
|
| + await compileModule('matcher');
|
| + await compileModule('path');
|
| if (!test) {
|
| - compileModule('args', libs: ['command_runner']);
|
| - compileModule('charcode');
|
| - compileModule('fixnum');
|
| - compileModule('logging');
|
| - compileModule('markdown');
|
| - compileModule('mime');
|
| - compileModule('plugin', libs: ['manager']);
|
| - compileModule('typed_data');
|
| - compileModule('usage');
|
| - compileModule('utf');
|
| - compileModule('when');
|
| + await compileModule('args', libs: ['command_runner']);
|
| + await compileModule('charcode');
|
| + await compileModule('fixnum');
|
| + await compileModule('logging');
|
| + await compileModule('markdown');
|
| + await compileModule('mime');
|
| + await compileModule('plugin', libs: ['manager']);
|
| + await compileModule('typed_data');
|
| + await compileModule('usage');
|
| + await compileModule('utf');
|
| + await compileModule('when');
|
| }
|
|
|
| // Composite packages with dependencies.
|
| - compileModule('stack_trace', deps: ['path']);
|
| + await compileModule('stack_trace', deps: ['path']);
|
| if (!test) {
|
| - compileModule('async', deps: ['collection']);
|
| + await compileModule('async', deps: ['collection']);
|
| }
|
|
|
| if (test) {
|
| - compileModule('unittest',
|
| + await compileModule('unittest',
|
| deps: ['matcher', 'path', 'stack_trace'],
|
| libs: ['html_config', 'html_individual_config', 'html_enhanced_config'],
|
| unsafeForceCompile: true);
|
| @@ -63,8 +64,10 @@ void main(List<String> arguments) {
|
|
|
| /// Compiles a [module] with a single matching ".dart" library and additional
|
| /// [libs] and [deps] on other modules.
|
| -void compileModule(String module,
|
| - {List<String> libs, List<String> deps, bool unsafeForceCompile: false}) {
|
| +Future<Null> compileModule(String module,
|
| + {List<String> libs,
|
| + List<String> deps,
|
| + bool unsafeForceCompile: false}) async {
|
| var args = [
|
| '--dart-sdk-summary=lib/sdk/ddc_sdk.sum',
|
| '-ogen/codegen_output/pkg/$module.js'
|
| @@ -100,5 +103,5 @@ void compileModule(String module,
|
| 'test/codegen/async_helper.dart');
|
| }
|
|
|
| - compile(args);
|
| + await compile(args);
|
| }
|
|
|