Revert elimination of Dart 1 (#18460)

fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
This commit is contained in:
Chris Bracken
2018-06-13 12:46:39 -07:00
committed by GitHub
parent 210e2fa333
commit 2ae48845a8
171 changed files with 1247 additions and 439 deletions

View File

@@ -111,7 +111,7 @@ const CommonFinders find = const CommonFinders._();
/// If computation is asynchronous, the function may return a [Future].
///
/// See also [FlutterDriver.waitFor].
typedef EvaluatorFunction = dynamic Function();
typedef dynamic EvaluatorFunction();
/// Drives a Flutter Application running in another process.
class FlutterDriver {
@@ -770,7 +770,7 @@ class VMServiceClientConnection {
}
/// A function that connects to a Dart VM service given the [url].
typedef VMServiceConnectFunction = Future<VMServiceClientConnection> Function(String url);
typedef Future<VMServiceClientConnection> VMServiceConnectFunction(String url);
/// The connection function used by [FlutterDriver.connect].
///

View File

@@ -33,7 +33,7 @@ const String _extensionMethod = 'ext.flutter.$_extensionMethodName';
///
/// Messages are described in string form and should return a [Future] which
/// eventually completes to a string response.
typedef DataHandler = Future<String> Function(String message);
typedef Future<String> DataHandler(String message);
class _DriverBinding extends BindingBase with ServicesBinding, SchedulerBinding, GestureBinding, PaintingBinding, RendererBinding, WidgetsBinding {
_DriverBinding(this._handler);
@@ -68,14 +68,14 @@ void enableFlutterDriverExtension({ DataHandler handler }) {
}
/// Signature for functions that handle a command and return a result.
typedef CommandHandlerCallback = Future<Result> Function(Command c);
typedef Future<Result> CommandHandlerCallback(Command c);
/// Signature for functions that deserialize a JSON map to a command object.
typedef CommandDeserializerCallback = Command Function(Map<String, String> params);
typedef Command CommandDeserializerCallback(Map<String, String> params);
/// Signature for functions that run the given finder and return the [Element]
/// found, if any, or null otherwise.
typedef FinderConstructor = Finder Function(SerializableFinder finder);
typedef Finder FinderConstructor(SerializableFinder finder);
/// The class that manages communication between a Flutter Driver test and the
/// application being remote-controlled, on the application side.