Update the signature of DDS launcher callback. (#154949)

Following https://dart-review.googlesource.com/c/sdk/+/383901
This commit is contained in:
Lau Ching Jun 2024-09-11 10:39:20 -07:00 committed by GitHub
parent b5ce70a760
commit 00b410a466
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 8 deletions

View File

@ -28,7 +28,7 @@ typedef DDSLauncherCallback = Future<DartDevelopmentServiceLauncher> Function({
bool enableServicePortFallback,
List<String> 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 <String>['AppStartUp']
: const <String>[],
devToolsServerAddress: devToolsServerAddress,
google3WorkspaceRoot: google3WorkspaceRoot != null
? Uri.parse(google3WorkspaceRoot)
: null,
google3WorkspaceRoot: google3WorkspaceRoot,
dartExecutable: globals.artifacts!.getArtifactPath(
Artifact.engineDartBinary,
),

View File

@ -277,7 +277,7 @@ void main() {
bool enableServicePortFallback = false,
List<String> cachedUserTags = const <String>[],
String? dartExecutable,
Uri? google3WorkspaceRoot,
String? google3WorkspaceRoot,
}) async {
return FakeDartDevelopmentServiceLauncher(uri: Uri.parse('http://localhost:1234'));
};

View File

@ -1947,7 +1947,7 @@ flutter:
bool enableServicePortFallback = false,
List<String> cachedUserTags = const <String>[],
String? dartExecutable,
Uri? google3WorkspaceRoot,
String? google3WorkspaceRoot,
}) {
throw DartDevelopmentServiceException.existingDdsInstance(
'Existing DDS at http://localhost/existingDdsInMessage.',
@ -1996,7 +1996,7 @@ flutter:
bool enableServicePortFallback = false,
List<String> cachedUserTags = const <String>[],
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<String> cachedUserTags = const <String>[],
String? dartExecutable,
Uri? google3WorkspaceRoot,
String? google3WorkspaceRoot,
}) {
expect(remoteVmServiceUri, Uri(scheme: 'foo', host: 'bar'));
expect(enableAuthCodes, isTrue);