@@ -50,7 +50,7 @@ Directory createTempSync(String prefix) =>
5050final Memoizer tempdirsCache = new Memoizer ();
5151
5252/// Global so that the lock is retained for the life of the process.
53- Future <Null > _lockFuture;
53+ Future <void > _lockFuture;
5454Completer <FlutterRepo > _cleanFlutterRepo;
5555
5656/// Returns true if we need to replace the existing flutter. We never release
@@ -337,7 +337,7 @@ Future<List<Map>> _buildSdkDocs(String sdkDocsPath, Future<String> futureCwd,
337337 return await launcher.runStreamed (
338338 Platform .resolvedExecutable,
339339 [
340- '--checked ' ,
340+ '--enable-asserts ' ,
341341 pathLib.join ('bin' , 'dartdoc.dart' ),
342342 '--output' ,
343343 '${sdkDocsPath }' ,
@@ -361,7 +361,7 @@ Future<List<Map>> _buildTestPackageDocs(
361361 return await launcher.runStreamed (
362362 Platform .resolvedExecutable,
363363 [
364- '--checked ' ,
364+ '--enable-asserts ' ,
365365 pathLib.join (cwd, 'bin' , 'dartdoc.dart' ),
366366 '--output' ,
367367 outputDir,
@@ -520,7 +520,7 @@ class FlutterRepo {
520520 new SubprocessLauncher ('flutter${label == null ? "" : "-$label " }' , env);
521521 }
522522
523- Future <Null > _init () async {
523+ Future <void > _init () async {
524524 new Directory (flutterPath).createSync (recursive: true );
525525 await launcher.runStreamed (
526526 'git' , ['clone' , 'https://github.com/flutter/flutter.git' , '.' ],
@@ -605,7 +605,7 @@ Future<String> _buildPubPackageDocs(String pubPackageName,
605605 await launcher.runStreamed (
606606 Platform .resolvedExecutable,
607607 [
608- '--checked ' ,
608+ '--enable-asserts ' ,
609609 pathLib.join (Directory .current.absolute.path, 'bin' , 'dartdoc.dart' ),
610610 '--json' ,
611611 '--show-progress' ,
@@ -654,7 +654,8 @@ _getPackageVersion() {
654654@Task ('Rebuild generated files' )
655655build () async {
656656 var launcher = new SubprocessLauncher ('build' );
657- await launcher.runStreamed (sdkBin ('pub' ), ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
657+ await launcher.runStreamed (sdkBin ('pub' ),
658+ ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
658659}
659660
660661/// Paths in this list are relative to lib/.
@@ -677,7 +678,8 @@ checkBuild() async {
677678 }
678679 }
679680
680- await launcher.runStreamed (sdkBin ('pub' ), ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
681+ await launcher.runStreamed (sdkBin ('pub' ),
682+ ['run' , 'build_runner' , 'build' , '--delete-conflicting-outputs' ]);
681683 for (String relPath in _generated_files_list) {
682684 File newVersion = new File (pathLib.join ('lib' , relPath));
683685 if (! await newVersion.exists ()) {
@@ -707,25 +709,24 @@ publish() async {
707709
708710@Task ('Run all the tests.' )
709711test () async {
710- await testPreviewDart2 ();
711- await testDart1 ();
712+ await testDart2 ();
712713 await testFutures.wait ();
713714}
714715
715716List <File > get binFiles => new Directory ('bin' )
716717 .listSync (recursive: true )
717718 .where ((e) => e is File && e.path.endsWith ('.dart' ))
718719 .cast <File >()
719- . .toList ();
720+ .toList ();
720721
721722List <File > get testFiles => new Directory ('test' )
722723 .listSync (recursive: true )
723724 .where ((e) => e is File && e.path.endsWith ('test.dart' ))
724725 .cast <File >()
725- . .toList ();
726+ .toList ();
726727
727- testPreviewDart2 () async {
728- List <String > parameters = ['--preview-dart-2' , '-- enable-asserts' ];
728+ testDart2 () async {
729+ List <String > parameters = ['--enable-asserts' ];
729730
730731 for (File dartFile in testFiles) {
731732 await testFutures.addFuture (
@@ -749,35 +750,15 @@ testPreviewDart2() async {
749750 }
750751}
751752
752- testDart1 () async {
753- List <String > parameters = ['--checked' ];
754- for (File dartFile in testFiles) {
755- await testFutures.addFuture (
756- new SubprocessLauncher ('dart1-${pathLib .basename (dartFile .path )}' )
757- .runStreamed (
758- Platform .resolvedExecutable,
759- < String > []
760- ..addAll (parameters)
761- ..add (dartFile.path)));
762- }
763-
764- for (File dartFile in binFiles) {
765- await testFutures.addFuture (new SubprocessLauncher (
766- 'dart1-bin-${pathLib .basename (dartFile .path )}-help' )
767- .runStreamed (
768- Platform .resolvedExecutable,
769- < String > []
770- ..addAll (parameters)
771- ..add (dartFile.path)
772- ..add ('--help' )));
773- }
774- }
775-
776753@Task ('Generate docs for dartdoc' )
777754testDartdoc () async {
778755 var launcher = new SubprocessLauncher ('test-dartdoc' );
779- await launcher.runStreamed (Platform .resolvedExecutable,
780- ['--checked' , 'bin/dartdoc.dart' , '--output' , dartdocDocsDir.path]);
756+ await launcher.runStreamed (Platform .resolvedExecutable, [
757+ '--enable-asserts' ,
758+ 'bin/dartdoc.dart' ,
759+ '--output' ,
760+ dartdocDocsDir.path
761+ ]);
781762 expectFileContains (pathLib.join (dartdocDocsDir.path, 'index.html' ),
782763 ['<title>dartdoc - Dart API docs</title>' ]);
783764 final RegExp object = new RegExp ('<li>Object</li>' , multiLine: true );
@@ -793,7 +774,7 @@ testDartdocRemote() async {
793774 '<a href="https://api.dartlang.org/(dev|stable)/[^/]*/dart-core/Object-class.html">Object</a>' ,
794775 multiLine: true );
795776 await launcher.runStreamed (Platform .resolvedExecutable, [
796- '--checked ' ,
777+ '--enable-asserts ' ,
797778 'bin/dartdoc.dart' ,
798779 '--link-to-remote' ,
799780 '--output' ,
@@ -821,7 +802,7 @@ Future<WarningsCollection> _buildDartdocFlutterPluginDocs() async {
821802 await flutterRepo.launcher.runStreamed (
822803 Platform .resolvedExecutable,
823804 [
824- '--checked ' ,
805+ '--enable-asserts ' ,
825806 pathLib.join (Directory .current.path, 'bin' , 'dartdoc.dart' ),
826807 '--json' ,
827808 '--link-to-remote' ,
@@ -869,7 +850,7 @@ updateTestPackageDocs() async {
869850 await launcher.runStreamed (
870851 Platform .resolvedExecutable,
871852 [
872- '--checked ' ,
853+ '--enable-asserts ' ,
873854 pathLib.join ('..' , '..' , 'bin' , 'dartdoc.dart' ),
874855 '--auto-include-dependencies' ,
875856 '--example-path-prefix' ,
0 commit comments