Reland "Remove references to Observatory (#118577)" (#121606)

This reverts commit 275ab9c69b.
This commit is contained in:
Ben Konyi
2023-02-28 11:57:04 -05:00
committed by GitHub
parent 8fc499aaf0
commit ecd7518df5
90 changed files with 519 additions and 491 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_observatory_bonjour_service':
case 'test_vm_service_bonjour_service':
// Exposed for integration testing only.
addObservatoryBonjourService();
addVmServiceBonjourService();
}
}
@@ -220,11 +220,11 @@ class Context {
],
);
addObservatoryBonjourService();
addVmServiceBonjourService();
}
// Add the observatory publisher Bonjour service to the produced app bundle Info.plist.
void addObservatoryBonjourService() {
// Add the vmService publisher Bonjour service to the produced app bundle Info.plist.
void addVmServiceBonjourService() {
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 '
'_dartobservatory._tcp NSBonjourServices insertion. Try re-building to '
'_dartVmService._tcp NSBonjourServices insertion. Try re-building to '
'enable "flutter attach".');
return;
}
// If there are already NSBonjourServices specified by the app (uncommon),
// insert the observatory service name to the existing list.
// insert the vmService service name to the existing list.
ProcessResult result = runSync(
'plutil',
<String>[
@@ -265,19 +265,19 @@ class Context {
'-insert',
'NSBonjourServices.0',
'-string',
'_dartobservatory._tcp',
'_dartVmService._tcp',
builtProductsPlist,
],
);
} else {
// Otherwise, add the NSBonjourServices key and observatory service name.
// Otherwise, add the NSBonjourServices key and vmService service name.
runSync(
'plutil',
<String>[
'-insert',
'NSBonjourServices',
'-json',
'["_dartobservatory._tcp"]',
'["_dartVmService._tcp"]',
builtProductsPlist,
],
);