From d875ebe2e42511a26d6e25205e5b716217a220f0 Mon Sep 17 00:00:00 2001 From: Mikkel Nygaard Ravn Date: Thu, 24 May 2018 20:09:27 +0200 Subject: [PATCH] Revert "Enable --sync-async in Flutter. (#17866)" (#17878) This reverts commit 39d7f22a966b2de74565a3f6811cfa28234cba78. --- .../flutter_test/exception_handling_expectation.txt | 5 +---- .../flutter_test/test_async_utils_guarded_test.dart | 5 +---- packages/flutter_test/lib/src/binding.dart | 6 ------ packages/flutter_tools/lib/src/compile.dart | 2 -- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/dev/automated_tests/flutter_test/exception_handling_expectation.txt b/dev/automated_tests/flutter_test/exception_handling_expectation.txt index 346aa983bc..4c0fb6e523 100644 --- a/dev/automated_tests/flutter_test/exception_handling_expectation.txt +++ b/dev/automated_tests/flutter_test/exception_handling_expectation.txt @@ -43,10 +43,7 @@ Who lives, who dies, who tells your story\? When the exception was thrown, this was the stack: #[0-9]+ +main. \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:16:9\) -#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\) -#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\) -#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\) -#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\) +#[0-9]+ +main. \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:15:77\) #[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\) <> ^\(elided [0-9]+ .+\)$ diff --git a/dev/automated_tests/flutter_test/test_async_utils_guarded_test.dart b/dev/automated_tests/flutter_test/test_async_utils_guarded_test.dart index d709a3f0b3..f04a139954 100644 --- a/dev/automated_tests/flutter_test/test_async_utils_guarded_test.dart +++ b/dev/automated_tests/flutter_test/test_async_utils_guarded_test.dart @@ -14,10 +14,7 @@ class TestTestBinding extends AutomatedTestWidgetsFlutterBinding { Future guardedHelper(WidgetTester tester) { return TestAsyncUtils.guard(() async { - await tester.pumpWidget(const Directionality( - textDirection: TextDirection.ltr, - child: const Text('Hello'), - )); + await tester.pumpWidget(const Text('Hello')); }); } diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index 792eb7602c..9630449ef7 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -767,12 +767,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding { }); return new Future.microtask(() async { - // Run all queued microtasks. - await new Future.microtask(() {}); - // When the test had an exception, the test-framework already - // ran the teardown functions, removing the _fakeAsync function. - if (_fakeAsync == null) - return null; // Resolve interplay between fake async and real async calls. _fakeAsync.flushMicrotasks(); while (_pendingAsyncTasks != null) { diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index 8c204a8734..dc065d6d0c 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -120,7 +120,6 @@ class KernelCompiler { '--sdk-root', sdkRoot, '--strong', - '--sync-async', '--target=flutter', ]; if (trackWidgetCreation) @@ -253,7 +252,6 @@ class ResidentCompiler { _sdkRoot, '--incremental', '--strong', - '--sync-async', '--target=flutter', ]; if (outputPath != null) {