From 00b410a4663758d5fda74aedd1948279136c4ed8 Mon Sep 17 00:00:00 2001 From: Lau Ching Jun Date: Wed, 11 Sep 2024 10:39:20 -0700 Subject: [PATCH] Update the signature of DDS launcher callback. (#154949) Following https://dart-review.googlesource.com/c/sdk/+/383901 --- packages/flutter_tools/lib/src/base/dds.dart | 6 ++---- .../test/general.shard/flutter_tester_device_test.dart | 2 +- .../test/general.shard/resident_runner_test.dart | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/flutter_tools/lib/src/base/dds.dart b/packages/flutter_tools/lib/src/base/dds.dart index 6b9524224f..6a5ece2c29 100644 --- a/packages/flutter_tools/lib/src/base/dds.dart +++ b/packages/flutter_tools/lib/src/base/dds.dart @@ -28,7 +28,7 @@ typedef DDSLauncherCallback = Future Function({ bool enableServicePortFallback, List cachedUserTags, String? dartExecutable, - Uri? google3WorkspaceRoot, + String? google3WorkspaceRoot, }); // TODO(fujino): This should be direct injected, rather than mutable global state. @@ -91,9 +91,7 @@ class DartDevelopmentService with DartDevelopmentServiceLocalOperationsMixin { ? const ['AppStartUp'] : const [], devToolsServerAddress: devToolsServerAddress, - google3WorkspaceRoot: google3WorkspaceRoot != null - ? Uri.parse(google3WorkspaceRoot) - : null, + google3WorkspaceRoot: google3WorkspaceRoot, dartExecutable: globals.artifacts!.getArtifactPath( Artifact.engineDartBinary, ), diff --git a/packages/flutter_tools/test/general.shard/flutter_tester_device_test.dart b/packages/flutter_tools/test/general.shard/flutter_tester_device_test.dart index bbb0bfd09e..e2f4eca3c9 100644 --- a/packages/flutter_tools/test/general.shard/flutter_tester_device_test.dart +++ b/packages/flutter_tools/test/general.shard/flutter_tester_device_test.dart @@ -277,7 +277,7 @@ void main() { bool enableServicePortFallback = false, List cachedUserTags = const [], String? dartExecutable, - Uri? google3WorkspaceRoot, + String? google3WorkspaceRoot, }) async { return FakeDartDevelopmentServiceLauncher(uri: Uri.parse('http://localhost:1234')); }; diff --git a/packages/flutter_tools/test/general.shard/resident_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_runner_test.dart index 5518ef1a6e..864e190fbf 100644 --- a/packages/flutter_tools/test/general.shard/resident_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_runner_test.dart @@ -1947,7 +1947,7 @@ flutter: bool enableServicePortFallback = false, List cachedUserTags = const [], String? dartExecutable, - Uri? google3WorkspaceRoot, + String? google3WorkspaceRoot, }) { throw DartDevelopmentServiceException.existingDdsInstance( 'Existing DDS at http://localhost/existingDdsInMessage.', @@ -1996,7 +1996,7 @@ flutter: bool enableServicePortFallback = false, List cachedUserTags = const [], String? dartExecutable, - Uri? google3WorkspaceRoot, + String? google3WorkspaceRoot, }) async { expect(remoteVmServiceUri, Uri(scheme: 'foo', host: 'bar')); expect(enableAuthCodes, isFalse); @@ -2043,7 +2043,7 @@ flutter: bool enableServicePortFallback = false, List cachedUserTags = const [], String? dartExecutable, - Uri? google3WorkspaceRoot, + String? google3WorkspaceRoot, }) { expect(remoteVmServiceUri, Uri(scheme: 'foo', host: 'bar')); expect(enableAuthCodes, isTrue);