Revert "Reland "Remove references to Observatory (#118577)" (#121215)" (#121555)

Revert "Reland "Remove references to Observatory (#118577)""
This commit is contained in:
Michael Goderbauer
2023-02-27 15:46:53 -08:00
committed by GitHub
parent c8d80163b0
commit 275ab9c69b
90 changed files with 490 additions and 511 deletions

View File

@@ -60,9 +60,9 @@ class Context {
// Thinning is handled during the bundle asset assemble build target, so just embed.
embedFlutterFrameworks();
break;
case 'test_vm_service_bonjour_service':
case 'test_observatory_bonjour_service':
// Exposed for integration testing only.
addVmServiceBonjourService();
addObservatoryBonjourService();
}
}
@@ -220,11 +220,11 @@ class Context {
],
);
addVmServiceBonjourService();
addObservatoryBonjourService();
}
// Add the vmService publisher Bonjour service to the produced app bundle Info.plist.
void addVmServiceBonjourService() {
// Add the observatory publisher Bonjour service to the produced app bundle Info.plist.
void addObservatoryBonjourService() {
final String buildMode = parseFlutterBuildMode();
// Debug and profile only.
@@ -239,13 +239,13 @@ class Context {
// The file will be present on re-run.
echo(
'${environment['INFOPLIST_PATH'] ?? ''} does not exist. Skipping '
'_dartVmService._tcp NSBonjourServices insertion. Try re-building to '
'_dartobservatory._tcp NSBonjourServices insertion. Try re-building to '
'enable "flutter attach".');
return;
}
// If there are already NSBonjourServices specified by the app (uncommon),
// insert the vmService service name to the existing list.
// insert the observatory service name to the existing list.
ProcessResult result = runSync(
'plutil',
<String>[
@@ -265,19 +265,19 @@ class Context {
'-insert',
'NSBonjourServices.0',
'-string',
'_dartVmService._tcp',
'_dartobservatory._tcp',
builtProductsPlist,
],
);
} else {
// Otherwise, add the NSBonjourServices key and vmService service name.
// Otherwise, add the NSBonjourServices key and observatory service name.
runSync(
'plutil',
<String>[
'-insert',
'NSBonjourServices',
'-json',
'["_dartVmService._tcp"]',
'["_dartobservatory._tcp"]',
builtProductsPlist,
],
);