Revert "Reland "Remove references to Observatory (#118577)" (#121215)" (#121555)
Revert "Reland "Remove references to Observatory (#118577)""
diff --git a/.github/ISSUE_TEMPLATE/5_performance_speed.md b/.github/ISSUE_TEMPLATE/5_performance_speed.md
index ba7f317..889da8a 100644
--- a/.github/ISSUE_TEMPLATE/5_performance_speed.md
+++ b/.github/ISSUE_TEMPLATE/5_performance_speed.md
@@ -41,7 +41,7 @@
can have an intuitive understanding of what happened. Don’t use
"adb screenrecord", as that affects the performance of the profile run.
-5. Open Flutter DevTools and save a timeline trace of the performance issue
+5. Open Observatory and save a timeline trace of the performance issue
so we know which functions might be causing it. See "How to Collect
and Read Timeline Traces" on this blog post:
https://medium.com/flutter/profiling-flutter-applications-using-the-timeline-a1a434964af3#a499
diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
index c6f5c08..3a76a73 100644
--- a/dev/devicelab/lib/framework/runner.dart
+++ b/dev/devicelab/lib/framework/runner.dart
@@ -202,7 +202,7 @@
.transform<String>(const LineSplitter())
.listen((String line) {
if (!uri.isCompleted) {
- final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('The Dart VM service is listening on '));
+ final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('(Observatory|The Dart VM service is) listening on '));
if (serviceUri != null) {
uri.complete(serviceUri);
}
diff --git a/dev/devicelab/lib/framework/utils.dart b/dev/devicelab/lib/framework/utils.dart
index ea45d19..e30a685 100644
--- a/dev/devicelab/lib/framework/utils.dart
+++ b/dev/devicelab/lib/framework/utils.dart
@@ -664,14 +664,14 @@
bool canRun(String path) => _processManager.canRun(path);
final RegExp _obsRegExp =
- RegExp('A Dart VM Service .* is available at: ');
+ RegExp('An Observatory debugger .* is available at: ');
final RegExp _obsPortRegExp = RegExp(r'(\S+:(\d+)/\S*)$');
final RegExp _obsUriRegExp = RegExp(r'((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
/// Tries to extract a port from the string.
///
/// The `prefix`, if specified, is a regular expression pattern and must not contain groups.
-/// `prefix` defaults to the RegExp: `A Dart VM Service .* is available at: `.
+/// `prefix` defaults to the RegExp: `An Observatory debugger .* is available at: `.
int? parseServicePort(String line, {
Pattern? prefix,
}) {
@@ -689,7 +689,7 @@
/// Tries to extract a URL from the string.
///
/// The `prefix`, if specified, is a regular expression pattern and must not contain groups.
-/// `prefix` defaults to the RegExp: `A Dart VM Service .* is available at: `.
+/// `prefix` defaults to the RegExp: `An Observatory debugger .* is available at: `.
Uri? parseServiceUri(String line, {
Pattern? prefix,
}) {
diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart
index b675387..6cc1d0d 100644
--- a/dev/devicelab/lib/tasks/perf_tests.dart
+++ b/dev/devicelab/lib/tasks/perf_tests.dart
@@ -1184,11 +1184,11 @@
await _generateSkSL();
// Build the app with SkSL artifacts and run that app
- final String vmServiceUri = await _runApp(skslPath: _skslJsonFileName);
+ final String observatoryUri = await _runApp(skslPath: _skslJsonFileName);
// Attach to the running app and run the final driver test to get metrics.
final TaskResult result = await internalRun(
- existingApp: vmServiceUri,
+ existingApp: observatoryUri,
);
_runProcess.kill();
@@ -1207,8 +1207,8 @@
// `--write-sksl-on-exit` option doesn't seem to be compatible with
// `flutter drive --existing-app` as it will complain web socket connection
// issues.
- final String vmServiceUri = await _runApp(cacheSkSL: true);
- await super.internalRun(cacheSkSL: true, existingApp: vmServiceUri);
+ final String observatoryUri = await _runApp(cacheSkSL: true);
+ await super.internalRun(cacheSkSL: true, existingApp: observatoryUri);
_runProcess.kill();
await _runProcess.exitCode;
diff --git a/dev/devicelab/test/utils_test.dart b/dev/devicelab/test/utils_test.dart
index c51ac5a..ca3e12b 100644
--- a/dev/devicelab/test/utils_test.dart
+++ b/dev/devicelab/test/utils_test.dart
@@ -19,7 +19,7 @@
group('parse service', () {
const String badOutput = 'No uri here';
- const String sampleOutput = 'A Dart VM Service on '
+ const String sampleOutput = 'An Observatory debugger and profiler on '
'Pixel 3 XL is available at: http://127.0.0.1:9090/LpjUpsdEjqI=/';
test('uri', () {
diff --git a/packages/flutter/lib/src/foundation/binding.dart b/packages/flutter/lib/src/foundation/binding.dart
index 78b5ce1..f4dd874 100644
--- a/packages/flutter/lib/src/foundation/binding.dart
+++ b/packages/flutter/lib/src/foundation/binding.dart
@@ -138,7 +138,7 @@
/// First calls [initInstances] to have bindings initialize their
/// instance pointers and other state, then calls
/// [initServiceExtensions] to have bindings initialize their
- /// VM service extensions, if any.
+ /// observatory service extensions, if any.
BindingBase() {
developer.Timeline.startSync('Framework initialization');
assert(() {
diff --git a/packages/flutter/lib/src/painting/shader_warm_up.dart b/packages/flutter/lib/src/painting/shader_warm_up.dart
index 29bc0ec..6a28c25 100644
--- a/packages/flutter/lib/src/painting/shader_warm_up.dart
+++ b/packages/flutter/lib/src/painting/shader_warm_up.dart
@@ -69,10 +69,10 @@
///
/// To decide which draw operations to be added to your custom warm up
/// process, consider capturing an skp using `flutter screenshot
- /// --vm-service-uri=<uri> --type=skia` and analyzing it with
+ /// --observatory-uri=<uri> --type=skia` and analyzing it with
/// <https://debugger.skia.org/>. Alternatively, one may run the app with
/// `flutter run --trace-skia` and then examine the raster thread in the
- /// Flutter DevTools timeline to see which Skia draw operations are commonly used,
+ /// observatory timeline to see which Skia draw operations are commonly used,
/// and which shader compilations are causing jank.
@protected
Future<void> warmUpOnCanvas(ui.Canvas canvas);
diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart
index af01875..81452f4 100644
--- a/packages/flutter/lib/src/widgets/app.dart
+++ b/packages/flutter/lib/src/widgets/app.dart
@@ -1172,7 +1172,7 @@
/// If true, forces the performance overlay to be visible in all instances.
///
- /// Used by the `showPerformanceOverlay` VM service extension.
+ /// Used by the `showPerformanceOverlay` observatory extension.
static bool showPerformanceOverlayOverride = false;
/// If true, forces the widget inspector to be visible.
@@ -1182,12 +1182,12 @@
/// The inspector allows you to select a location on your device or emulator
/// and view what widgets and render objects associated with it. An outline of
/// the selected widget and some summary information is shown on device and
- /// more detailed information is shown in the IDE or DevTools.
+ /// more detailed information is shown in the IDE or Observatory.
static bool debugShowWidgetInspectorOverride = false;
/// If false, prevents the debug banner from being visible.
///
- /// Used by the `debugAllowBanner` VM service extension.
+ /// Used by the `debugAllowBanner` observatory extension.
///
/// This is how `flutter run` turns off the banner when you take a screen shot
/// with "s".
diff --git a/packages/flutter/lib/src/widgets/debug.dart b/packages/flutter/lib/src/widgets/debug.dart
index b6245a4..3e8c84d 100644
--- a/packages/flutter/lib/src/widgets/debug.dart
+++ b/packages/flutter/lib/src/widgets/debug.dart
@@ -33,8 +33,8 @@
/// Combined with [debugPrintScheduleBuildForStacks], this lets you watch a
/// widget's dirty/clean lifecycle.
///
-/// To get similar information but showing it on the timeline available from
-/// Flutter DevTools rather than getting it in the console (where it can be
+/// To get similar information but showing it on the timeline available from the
+/// Observatory rather than getting it in the console (where it can be
/// overwhelming), consider [debugProfileBuildsEnabled].
///
/// See also:
diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart
index 6cc84ed..6db53bf 100644
--- a/packages/flutter/lib/src/widgets/widget_inspector.dart
+++ b/packages/flutter/lib/src/widgets/widget_inspector.dart
@@ -703,7 +703,7 @@
/// operation making it easier to avoid memory leaks.
///
/// All methods in this class are appropriate to invoke from debugging tools
-/// using the VM service protocol to evaluate Dart expressions of the
+/// using the Observatory service protocol to evaluate Dart expressions of the
/// form `WidgetInspectorService.instance.methodName(arg1, arg2, ...)`. If you
/// make changes to any instance method of this class you need to verify that
/// the [Flutter IntelliJ Plugin](https://github.com/flutter/flutter-intellij/blob/master/README.md)
@@ -712,7 +712,7 @@
/// All methods returning String values return JSON.
mixin WidgetInspectorService {
/// Ring of cached JSON values to prevent JSON from being garbage
- /// collected before it can be requested over the VM service protocol.
+ /// collected before it can be requested over the Observatory protocol.
final List<String?> _serializeRing = List<String?>.filled(20, null);
int _serializeRingIndex = 0;
@@ -739,7 +739,7 @@
/// when the inspection target changes on device.
InspectorSelectionChangedCallback? selectionChangedCallback;
- /// The VM service protocol does not keep alive object references so this
+ /// The Observatory protocol does not keep alive object references so this
/// class needs to manually manage groups of objects that should be kept
/// alive.
final Map<String, Set<_InspectorReferenceData>> _groups = <String, Set<_InspectorReferenceData>>{};
@@ -1690,7 +1690,7 @@
/// Wrapper around `json.encode` that uses a ring of cached values to prevent
/// the Dart garbage collector from collecting objects between when
- /// the value is returned over the VM service protocol and when the
+ /// the value is returned over the Observatory protocol and when the
/// separate observatory protocol command has to be used to retrieve its full
/// contents.
//
diff --git a/packages/flutter_tools/bin/fuchsia_tester.dart b/packages/flutter_tools/bin/fuchsia_tester.dart
index c0017d2..e62b299 100644
--- a/packages/flutter_tools/bin/fuchsia_tester.dart
+++ b/packages/flutter_tools/bin/fuchsia_tester.dart
@@ -148,7 +148,7 @@
),
),
watcher: collector,
- enableVmService: collector != null,
+ enableObservatory: collector != null,
precompiledDillFiles: tests,
concurrency: math.max(1, globals.platform.numberOfProcessors - 2),
icudtlPath: globals.fs.path.absolute(argResults[_kOptionIcudtl] as String),
diff --git a/packages/flutter_tools/bin/xcode_backend.dart b/packages/flutter_tools/bin/xcode_backend.dart
index 8eeab92..ec85e9c 100644
--- a/packages/flutter_tools/bin/xcode_backend.dart
+++ b/packages/flutter_tools/bin/xcode_backend.dart
@@ -60,9 +60,9 @@
// 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 @@
],
);
- 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 @@
// 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 @@
'-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,
],
);
diff --git a/packages/flutter_tools/doc/attach.md b/packages/flutter_tools/doc/attach.md
index 565115d..303cb80 100644
--- a/packages/flutter_tools/doc/attach.md
+++ b/packages/flutter_tools/doc/attach.md
@@ -17,7 +17,7 @@
will search for an already running Flutter app or module if available.
Otherwise, the tool will wait for the next Flutter app or module to launch
before attaching.
-1. If the app or module is already running and the specific VM Service port is
+1. If the app or module is already running and the specific observatory port is
known, it can be explicitly provided to attach via the command-line, e.g.
`$ flutter attach --debug-port 12345`
diff --git a/packages/flutter_tools/doc/daemon.md b/packages/flutter_tools/doc/daemon.md
index b1e2f5f..7ea3690 100644
--- a/packages/flutter_tools/doc/daemon.md
+++ b/packages/flutter_tools/doc/daemon.md
@@ -140,7 +140,7 @@
#### app.debugPort
-This is sent when a VM service port is available for a started app. The `params` field will be a map with the fields `appId`, `port`, and `wsUri`. Clients should prefer using the `wsUri` field in preference to synthesizing a URI using the `port` field. An optional field, `baseUri`, is populated if a path prefix is required for setting breakpoints on the target device.
+This is sent when an observatory port is available for a started app. The `params` field will be a map with the fields `appId`, `port`, and `wsUri`. Clients should prefer using the `wsUri` field in preference to synthesizing a URI using the `port` field. An optional field, `baseUri`, is populated if a path prefix is required for setting breakpoints on the target device.
#### app.started
diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart
index eadc603..7b43e08 100644
--- a/packages/flutter_tools/lib/src/android/android_device.dart
+++ b/packages/flutter_tools/lib/src/android/android_device.dart
@@ -599,12 +599,12 @@
}
final bool traceStartup = platformArgs['trace-startup'] as bool? ?? false;
- ProtocolDiscovery? vmServiceDiscovery;
+ ProtocolDiscovery? observatoryDiscovery;
if (debuggingOptions.debuggingEnabled) {
- vmServiceDiscovery = ProtocolDiscovery.vmService(
+ observatoryDiscovery = ProtocolDiscovery.observatory(
// Avoid using getLogReader, which returns a singleton instance, because the
- // VM Service discovery will dipose at the end. creating a new logger here allows
+ // observatory discovery will dispose at the end. creating a new logger here allows
// logs to be surfaced normally during `flutter drive`.
await AdbLogReader.createLogReader(
this,
@@ -687,13 +687,13 @@
}
// Wait for the service protocol port here. This will complete once the
- // device has printed "VM Service is listening on...".
- _logger.printTrace('Waiting for VM Service port to be available...');
+ // device has printed "Observatory is listening on...".
+ _logger.printTrace('Waiting for observatory port to be available...');
try {
- Uri? vmServiceUri;
+ Uri? observatoryUri;
if (debuggingOptions.buildInfo.isDebug || debuggingOptions.buildInfo.isProfile) {
- vmServiceUri = await vmServiceDiscovery?.uri;
- if (vmServiceUri == null) {
+ observatoryUri = await observatoryDiscovery?.uri;
+ if (observatoryUri == null) {
_logger.printError(
'Error waiting for a debug connection: '
'The log reader stopped unexpectedly',
@@ -701,12 +701,12 @@
return LaunchResult.failed();
}
}
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ return LaunchResult.succeeded(observatoryUri: observatoryUri);
} on Exception catch (error) {
_logger.printError('Error waiting for a debug connection: $error');
return LaunchResult.failed();
} finally {
- await vmServiceDiscovery?.cancel();
+ await observatoryDiscovery?.cancel();
}
}
diff --git a/packages/flutter_tools/lib/src/base/dds.dart b/packages/flutter_tools/lib/src/base/dds.dart
index eba8d38..c7fe0fa 100644
--- a/packages/flutter_tools/lib/src/base/dds.dart
+++ b/packages/flutter_tools/lib/src/base/dds.dart
@@ -35,7 +35,7 @@
final Completer<void> _completer = Completer<void>();
Future<void> startDartDevelopmentService(
- Uri vmServiceUri, {
+ Uri observatoryUri, {
required Logger logger,
int? hostPort,
bool? ipv6,
@@ -49,11 +49,11 @@
);
logger.printTrace(
'Launching a Dart Developer Service (DDS) instance at $ddsUri, '
- 'connecting to VM service at $vmServiceUri.',
+ 'connecting to VM service at $observatoryUri.',
);
try {
_ddsInstance = await ddsLauncherCallback(
- vmServiceUri,
+ observatoryUri,
serviceUri: ddsUri,
enableAuthCodes: disableServiceAuthCodes != true,
ipv6: ipv6 ?? false,
diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart
index 1df9fba..db7d729 100644
--- a/packages/flutter_tools/lib/src/build_info.dart
+++ b/packages/flutter_tools/lib/src/build_info.dart
@@ -394,16 +394,16 @@
throw ArgumentError('$value is not a supported build mode');
}
- /// Built in JIT mode with no optimizations, enabled asserts, and a VM service.
+ /// Built in JIT mode with no optimizations, enabled asserts, and an observatory.
static const BuildMode debug = BuildMode._('debug');
- /// Built in AOT mode with some optimizations and a VM service.
+ /// Built in AOT mode with some optimizations and an observatory.
static const BuildMode profile = BuildMode._('profile');
- /// Built in AOT mode with all optimizations and no VM service.
+ /// Built in AOT mode with all optimizations and no observatory.
static const BuildMode release = BuildMode._('release');
- /// Built in JIT mode with all optimizations and no VM service.
+ /// Built in JIT mode with all optimizations and no observatory.
static const BuildMode jitRelease = BuildMode._('jit_release');
static const List<BuildMode> values = <BuildMode>[
diff --git a/packages/flutter_tools/lib/src/commands/attach.dart b/packages/flutter_tools/lib/src/commands/attach.dart
index 6469f29..438681b 100644
--- a/packages/flutter_tools/lib/src/commands/attach.dart
+++ b/packages/flutter_tools/lib/src/commands/attach.dart
@@ -56,7 +56,7 @@
/// ```
/// $ flutter attach
/// ```
-/// As soon as a new VM Service is detected the command attaches to it and
+/// As soon as a new observatory is detected the command attaches to it and
/// enables hot reloading.
///
/// To attach to a flutter mod running on a fuchsia device, `--module` must
@@ -97,18 +97,18 @@
..addOption(
'debug-port',
hide: !verboseHelp,
- help: '(deprecated) Device port where the Dart VM Service is listening. Requires '
+ help: '(deprecated) Device port where the observatory is listening. Requires '
'"--disable-service-auth-codes" to also be provided to the Flutter '
'application at launch, otherwise this command will fail to connect to '
'the application. In general, "--debug-url" should be used instead.',
)..addOption(
'debug-url',
aliases: <String>[ 'debug-uri' ], // supported for historical reasons
- help: 'The URL at which the Dart VM Service is listening.',
+ help: 'The URL at which the observatory is listening.',
)..addOption(
'app-id',
help: 'The package name (Android) or bundle identifier (iOS) for the app. '
- 'This can be specified to avoid being prompted if multiple Dart VM Service ports '
+ 'This can be specified to avoid being prompted if multiple observatory ports '
'are advertised.\n'
'If you have multiple devices or emulators running, you should include the '
'device hostname as well, e.g. "com.example.myApp@my-iphone".\n'
@@ -169,7 +169,7 @@
--module=mod_name`. This can be called either before or after the application
is started.
-If the app or module is already running and the specific vmService port is
+If the app or module is already running and the specific observatory port is
known, it can be explicitly provided to attach via the command-line, e.g.
`$ flutter attach --debug-port 12345`''';
@@ -225,10 +225,10 @@
'the value of --ipv6 on its own.',
);
}
- if (debugPort == null && debugUri == null && argResults!.wasParsed(FlutterCommand.vmServicePortOption)) {
+ if (debugPort == null && debugUri == null && argResults!.wasParsed(FlutterCommand.observatoryPortOption)) {
throwToolExit(
'When the --debug-port or --debug-url is unknown, this command does not use '
- 'the value of --vm-service-port.',
+ 'the value of --observatory-port.',
);
}
if (debugPort != null && debugUri != null) {
@@ -281,7 +281,7 @@
)
: null;
- Stream<Uri>? vmServiceUri;
+ Stream<Uri>? observatoryUri;
bool usesIpv6 = ipv6!;
final String ipv6Loopback = InternetAddress.loopbackIPv6.address;
final String ipv4Loopback = InternetAddress.loopbackIPv4.address;
@@ -298,7 +298,7 @@
FuchsiaIsolateDiscoveryProtocol? isolateDiscoveryProtocol;
try {
isolateDiscoveryProtocol = device.getIsolateDiscoveryProtocol(module);
- vmServiceUri = Stream<Uri>.value(await isolateDiscoveryProtocol.uri).asBroadcastStream();
+ observatoryUri = Stream<Uri>.value(await isolateDiscoveryProtocol.uri).asBroadcastStream();
} on Exception {
isolateDiscoveryProtocol?.dispose();
final List<ForwardedPort> ports = device.portForwarder.forwardedPorts.toList();
@@ -351,7 +351,7 @@
Future<Uri?>? protocolDiscoveryFuture;
if (compatibleWithProtocolDiscovery) {
- final ProtocolDiscovery vmServiceDiscovery = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery vmServiceDiscovery = ProtocolDiscovery.observatory(
device.getLogReader(),
portForwarder: device.portForwarder,
ipv6: ipv6!,
@@ -372,14 +372,14 @@
}
discoveryStatus.stop();
- vmServiceUri = foundUrl == null
+ observatoryUri = foundUrl == null
? null
: Stream<Uri>.value(foundUrl).asBroadcastStream();
}
// If MDNS discovery fails or we're not on iOS, fallback to ProtocolDiscovery.
- if (vmServiceUri == null) {
- final ProtocolDiscovery vmServiceDiscovery =
- ProtocolDiscovery.vmService(
+ if (observatoryUri == null) {
+ final ProtocolDiscovery observatoryDiscovery =
+ ProtocolDiscovery.observatory(
// If it's an Android device, attaching relies on past log searching
// to find the service protocol.
await device.getLogReader(includePastLogs: device is AndroidDevice),
@@ -390,12 +390,12 @@
logger: _logger,
);
_logger.printStatus('Waiting for a connection from Flutter on ${device.name}...');
- vmServiceUri = vmServiceDiscovery.uris;
+ observatoryUri = observatoryDiscovery.uris;
// Determine ipv6 status from the scanned logs.
- usesIpv6 = vmServiceDiscovery.ipv6;
+ usesIpv6 = observatoryDiscovery.ipv6;
}
} else {
- vmServiceUri = Stream<Uri>
+ observatoryUri = Stream<Uri>
.fromFuture(
buildVMServiceUri(
device,
@@ -413,7 +413,7 @@
int? result;
if (daemon != null) {
final ResidentRunner runner = await createResidentRunner(
- vmServiceUris: vmServiceUri,
+ observatoryUris: observatoryUri,
device: device,
flutterProject: flutterProject,
usesIpv6: usesIpv6,
@@ -446,7 +446,7 @@
}
while (true) {
final ResidentRunner runner = await createResidentRunner(
- vmServiceUris: vmServiceUri,
+ observatoryUris: observatoryUri,
device: device,
flutterProject: flutterProject,
usesIpv6: usesIpv6,
@@ -476,7 +476,7 @@
}
terminalHandler?.stop();
assert(result != null);
- if (runner.exited || !runner.isWaitingForVmService) {
+ if (runner.exited || !runner.isWaitingForObservatory) {
break;
}
_logger.printStatus('Waiting for a new connection from Flutter on ${device.name}...');
@@ -495,7 +495,7 @@
}
Future<ResidentRunner> createResidentRunner({
- required Stream<Uri> vmServiceUris,
+ required Stream<Uri> observatoryUris,
required Device device,
required FlutterProject flutterProject,
required bool usesIpv6,
@@ -510,7 +510,7 @@
userIdentifier: userIdentifier,
platform: _platform,
);
- flutterDevice.vmServiceUris = vmServiceUris;
+ flutterDevice.observatoryUris = observatoryUris;
final List<FlutterDevice> flutterDevices = <FlutterDevice>[flutterDevice];
final DebuggingOptions debuggingOptions = DebuggingOptions.enabled(
buildInfo,
diff --git a/packages/flutter_tools/lib/src/commands/custom_devices.dart b/packages/flutter_tools/lib/src/commands/custom_devices.dart
index aec955e..c667ace 100644
--- a/packages/flutter_tools/lib/src/commands/custom_devices.dart
+++ b/packages/flutter_tools/lib/src/commands/custom_devices.dart
@@ -650,7 +650,7 @@
description: 'Should the device use port forwarding? '
'Using port forwarding is the default because it works in all cases, however if your '
'remote device has a static IP address and you have a way of '
- 'specifying the "--vm-service-host=<ip>" engine option, you might prefer '
+ 'specifying the "--observatory-host=<ip>" engine option, you might prefer '
'not using port forwarding.',
);
diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart
index 559880e..e8bf089 100644
--- a/packages/flutter_tools/lib/src/commands/daemon.dart
+++ b/packages/flutter_tools/lib/src/commands/daemon.dart
@@ -1016,9 +1016,7 @@
);
return <String, Object?>{
'started': result.started,
- 'vmServiceUri': result.vmServiceUri?.toString(),
- // TODO(bkonyi): remove once clients have migrated to relying on vmServiceUri.
- 'observatoryUri': result.vmServiceUri?.toString(),
+ 'observatoryUri': result.observatoryUri?.toString(),
};
}
diff --git a/packages/flutter_tools/lib/src/commands/drive.dart b/packages/flutter_tools/lib/src/commands/drive.dart
index 379009a..01918fb 100644
--- a/packages/flutter_tools/lib/src/commands/drive.dart
+++ b/packages/flutter_tools/lib/src/commands/drive.dart
@@ -81,7 +81,7 @@
'running, and "--no-keep-app-running" overrides it.',
)
..addOption('use-existing-app',
- help: 'Connect to an already running instance via the given Dart VM Service URL. '
+ help: 'Connect to an already running instance via the given observatory URL. '
'If this option is given, the application will not be automatically started, '
'and it will only be stopped if "--no-keep-app-running" is explicitly set.',
valueHelp: 'url',
diff --git a/packages/flutter_tools/lib/src/commands/screenshot.dart b/packages/flutter_tools/lib/src/commands/screenshot.dart
index c291acb..6152c8e 100644
--- a/packages/flutter_tools/lib/src/commands/screenshot.dart
+++ b/packages/flutter_tools/lib/src/commands/screenshot.dart
@@ -15,7 +15,7 @@
const String _kOut = 'out';
const String _kType = 'type';
-const String _kVmServiceUrl = 'vm-service-url';
+const String _kObservatoryUrl = 'observatory-url';
const String _kDeviceType = 'device';
const String _kSkiaType = 'skia';
const String _kRasterizerType = 'rasterizer';
@@ -29,13 +29,13 @@
help: 'Location to write the screenshot.',
);
argParser.addOption(
- _kVmServiceUrl,
+ _kObservatoryUrl,
aliases: <String>[ 'observatory-url' ], // for historical reasons
valueHelp: 'URI',
- help: 'The VM Service URL to which to connect.\n'
+ help: 'The Observatory URL to which to connect.\n'
'This is required when "--$_kType" is "$_kSkiaType" or "$_kRasterizerType".\n'
- 'To find the VM service URL, use "flutter run" and look for '
- '"A Dart VM Service ... is available at" in the output.',
+ 'To find the Observatory URL, use "flutter run" and look for '
+ '"An Observatory ... is available at" in the output.',
);
argParser.addOption(
_kType,
@@ -46,8 +46,8 @@
_kDeviceType: "Delegate to the device's native screenshot capabilities. This "
'screenshots the entire screen currently being displayed (including content '
'not rendered by Flutter, like the device status bar).',
- _kSkiaType: 'Render the Flutter app as a Skia picture. Requires "--$_kVmServiceUrl".',
- _kRasterizerType: 'Render the Flutter app using the rasterizer. Requires "--$_kVmServiceUrl."',
+ _kSkiaType: 'Render the Flutter app as a Skia picture. Requires "--$_kObservatoryUrl".',
+ _kRasterizerType: 'Render the Flutter app using the rasterizer. Requires "--$_kObservatoryUrl."',
},
defaultsTo: _kDeviceType,
);
@@ -70,11 +70,11 @@
Device? device;
- Future<void> _validateOptions(String? screenshotType, String? vmServiceUrl) async {
+ Future<void> _validateOptions(String? screenshotType, String? observatoryUrl) async {
switch (screenshotType) {
case _kDeviceType:
- if (vmServiceUrl != null) {
- throwToolExit('VM Service URI cannot be provided for screenshot type $screenshotType');
+ if (observatoryUrl != null) {
+ throwToolExit('Observatory URI cannot be provided for screenshot type $screenshotType');
}
device = await findTargetDevice();
if (device == null) {
@@ -85,18 +85,18 @@
}
break;
default:
- if (vmServiceUrl == null) {
- throwToolExit('VM Service URI must be specified for screenshot type $screenshotType');
+ if (observatoryUrl == null) {
+ throwToolExit('Observatory URI must be specified for screenshot type $screenshotType');
}
- if (vmServiceUrl.isEmpty || Uri.tryParse(vmServiceUrl) == null) {
- throwToolExit('VM Service URI "$vmServiceUrl" is invalid');
+ if (observatoryUrl.isEmpty || Uri.tryParse(observatoryUrl) == null) {
+ throwToolExit('Observatory URI "$observatoryUrl" is invalid');
}
}
}
@override
Future<FlutterCommandResult> verifyThenRunCommand(String? commandPath) async {
- await _validateOptions(stringArgDeprecated(_kType), stringArgDeprecated(_kVmServiceUrl));
+ await _validateOptions(stringArgDeprecated(_kType), stringArgDeprecated(_kObservatoryUrl));
return super.verifyThenRunCommand(commandPath);
}
@@ -150,8 +150,8 @@
}
Future<bool> runSkia(File? outputFile) async {
- final Uri vmServiceUrl = Uri.parse(stringArgDeprecated(_kVmServiceUrl)!);
- final FlutterVmService vmService = await connectToVmService(vmServiceUrl, logger: globals.logger);
+ final Uri observatoryUrl = Uri.parse(stringArgDeprecated(_kObservatoryUrl)!);
+ final FlutterVmService vmService = await connectToVmService(observatoryUrl, logger: globals.logger);
final vm_service.Response? skp = await vmService.screenshotSkp();
if (skp == null) {
globals.printError(
@@ -174,8 +174,8 @@
}
Future<bool> runRasterizer(File? outputFile) async {
- final Uri vmServiceUrl = Uri.parse(stringArgDeprecated(_kVmServiceUrl)!);
- final FlutterVmService vmService = await connectToVmService(vmServiceUrl, logger: globals.logger);
+ final Uri observatoryUrl = Uri.parse(stringArgDeprecated(_kObservatoryUrl)!);
+ final FlutterVmService vmService = await connectToVmService(observatoryUrl, logger: globals.logger);
final vm_service.Response? response = await vmService.screenshot();
if (response == null) {
globals.printError(
diff --git a/packages/flutter_tools/lib/src/commands/test.dart b/packages/flutter_tools/lib/src/commands/test.dart
index 801856b..19e0572 100644
--- a/packages/flutter_tools/lib/src/commands/test.dart
+++ b/packages/flutter_tools/lib/src/commands/test.dart
@@ -464,7 +464,7 @@
tags: tags,
excludeTags: excludeTags,
watcher: watcher,
- enableVmService: collector != null || startPaused || boolArgDeprecated('enable-vmservice'),
+ enableObservatory: collector != null || startPaused || boolArgDeprecated('enable-vmservice'),
ipv6: boolArgDeprecated('ipv6'),
machine: machine,
updateGoldens: boolArgDeprecated('update-goldens'),
diff --git a/packages/flutter_tools/lib/src/custom_devices/custom_device.dart b/packages/flutter_tools/lib/src/custom_devices/custom_device.dart
index 864c592..0093d57 100644
--- a/packages/flutter_tools/lib/src/custom_devices/custom_device.dart
+++ b/packages/flutter_tools/lib/src/custom_devices/custom_device.dart
@@ -309,7 +309,7 @@
'purge-persistent-cache=true',
if (debuggingOptions.debuggingEnabled) ...<String>[
if (debuggingOptions.deviceVmServicePort != null)
- 'vm-service-port=${debuggingOptions.deviceVmServicePort}',
+ 'observatory-port=${debuggingOptions.deviceVmServicePort}',
if (debuggingOptions.buildInfo.isDebug) ...<String>[
'enable-checked-mode=true',
'verify-entry-points=true',
@@ -374,7 +374,7 @@
assert(_process == null);
_process = process;
- final ProtocolDiscovery discovery = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery discovery = ProtocolDiscovery.observatory(
logReader,
portForwarder: _device._config.usesPortForwarding ? _device.portForwarder : null,
logger: _logger,
@@ -388,14 +388,14 @@
// in the same microtask AFAICT but this way we're on the safe side.
logReader.listenToProcessOutput(process);
- final Uri? vmServiceUri = await discovery.uri;
+ final Uri? observatoryUri = await discovery.uri;
await discovery.cancel();
if (_device._config.usesPortForwarding) {
- _forwardedHostPort = vmServiceUri?.port;
+ _forwardedHostPort = observatoryUri?.port;
}
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ return LaunchResult.succeeded(observatoryUri: observatoryUri);
}
void _maybeUnforwardPort() {
diff --git a/packages/flutter_tools/lib/src/debug_adapters/flutter_test_adapter.dart b/packages/flutter_tools/lib/src/debug_adapters/flutter_test_adapter.dart
index 22f83d7..3072d19 100644
--- a/packages/flutter_tools/lib/src/debug_adapters/flutter_test_adapter.dart
+++ b/packages/flutter_tools/lib/src/debug_adapters/flutter_test_adapter.dart
@@ -153,7 +153,7 @@
/// Handles the test.processStarted event from Flutter that provides the VM Service URL.
void _handleTestStartedProcess(Map<String, Object?> params) {
- final String? vmServiceUriString = params['vmServiceUri'] as String?;
+ final String? vmServiceUriString = params['observatoryUri'] as String?;
// For no-debug mode, this event may be still sent so ignore it if we know
// we're not debugging, or its URI is null.
if (!enableDebugger || vmServiceUriString == null) {
diff --git a/packages/flutter_tools/lib/src/desktop_device.dart b/packages/flutter_tools/lib/src/desktop_device.dart
index 8041365..ae1df62 100644
--- a/packages/flutter_tools/lib/src/desktop_device.dart
+++ b/packages/flutter_tools/lib/src/desktop_device.dart
@@ -152,17 +152,17 @@
if (debuggingOptions.buildInfo.isRelease == true) {
return LaunchResult.succeeded();
}
- final ProtocolDiscovery vmServiceDiscovery = ProtocolDiscovery.vmService(_deviceLogReader,
+ final ProtocolDiscovery observatoryDiscovery = ProtocolDiscovery.observatory(_deviceLogReader,
devicePort: debuggingOptions.deviceVmServicePort,
hostPort: debuggingOptions.hostVmServicePort,
ipv6: ipv6,
logger: _logger,
);
try {
- final Uri? vmServiceUri = await vmServiceDiscovery.uri;
- if (vmServiceUri != null) {
+ final Uri? observatoryUri = await observatoryDiscovery.uri;
+ if (observatoryUri != null) {
onAttached(package, buildInfo, process);
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ return LaunchResult.succeeded(observatoryUri: observatoryUri);
}
_logger.printError(
'Error waiting for a debug connection: '
@@ -171,7 +171,7 @@
} on Exception catch (error) {
_logger.printError('Error waiting for a debug connection: $error');
} finally {
- await vmServiceDiscovery.cancel();
+ await observatoryDiscovery.cancel();
}
return LaunchResult.failed();
}
@@ -270,7 +270,7 @@
// tool and the device, usually in debug or profile mode.
if (debuggingOptions.debuggingEnabled) {
if (debuggingOptions.deviceVmServicePort != null) {
- addFlag('vm-service-port=${debuggingOptions.deviceVmServicePort}');
+ addFlag('observatory-port=${debuggingOptions.deviceVmServicePort}');
}
if (debuggingOptions.buildInfo.isDebug) {
addFlag('enable-checked-mode=true');
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index 8d4b8c9..276670a 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -933,7 +933,7 @@
return <String>[
if (enableDartProfiling) '--enable-dart-profiling',
if (disableServiceAuthCodes) '--disable-service-auth-codes',
- if (disablePortPublication) '--disable-vm-service-publication',
+ if (disablePortPublication) '--disable-observatory-publication',
if (startPaused) '--start-paused',
// Wrap dart flags in quotes for physical devices
if (environmentType == EnvironmentType.physical && dartVmFlags.isNotEmpty)
@@ -960,14 +960,14 @@
if (platformArgs['trace-startup'] as bool? ?? false) '--trace-startup',
if (enableImpeller) '--enable-impeller',
if (environmentType == EnvironmentType.physical && deviceVmServicePort != null)
- '--vm-service-port=$deviceVmServicePort',
+ '--observatory-port=$deviceVmServicePort',
// The simulator "device" is actually on the host machine so no ports will be forwarded.
// Use the suggested host port.
if (environmentType == EnvironmentType.simulator && hostVmServicePort != null)
- '--vm-service-port=$hostVmServicePort',
- // Tell the VM service to listen on all interfaces, don't restrict to the loopback.
+ '--observatory-port=$hostVmServicePort',
+ // Tell the observatory to listen on all interfaces, don't restrict to the loopback.
if (interfaceType == IOSDeviceConnectionInterface.network)
- '--vm-service-host=${ipv6 ? '::0' : '0.0.0.0'}',
+ '--observatory-host=${ipv6 ? '::0' : '0.0.0.0'}',
];
}
@@ -1066,24 +1066,21 @@
}
class LaunchResult {
- LaunchResult.succeeded({ Uri? vmServiceUri, Uri? observatoryUri }) :
- started = true,
- vmServiceUri = vmServiceUri ?? observatoryUri;
-
+ LaunchResult.succeeded({ this.observatoryUri }) : started = true;
LaunchResult.failed()
: started = false,
- vmServiceUri = null;
+ observatoryUri = null;
- bool get hasVmService => vmServiceUri != null;
+ bool get hasObservatory => observatoryUri != null;
final bool started;
- final Uri? vmServiceUri;
+ final Uri? observatoryUri;
@override
String toString() {
final StringBuffer buf = StringBuffer('started=$started');
- if (vmServiceUri != null) {
- buf.write(', vmService=$vmServiceUri');
+ if (observatoryUri != null) {
+ buf.write(', observatory=$observatoryUri');
}
return buf.toString();
}
@@ -1112,9 +1109,9 @@
/// Describes an app running on the device.
class DiscoveredApp {
- DiscoveredApp(this.id, this.vmServicePort);
+ DiscoveredApp(this.id, this.observatoryPort);
final String id;
- final int vmServicePort;
+ final int observatoryPort;
}
// An empty device log reader
diff --git a/packages/flutter_tools/lib/src/drive/drive_service.dart b/packages/flutter_tools/lib/src/drive/drive_service.dart
index b3340db..30c0d04 100644
--- a/packages/flutter_tools/lib/src/drive/drive_service.dart
+++ b/packages/flutter_tools/lib/src/drive/drive_service.dart
@@ -196,7 +196,7 @@
throwToolExit('Application failed to start. Will not run test. Quitting.', exitCode: 1);
}
return reuseApplication(
- result.vmServiceUri!,
+ result.observatoryUri!,
device,
debuggingOptions,
ipv6,
diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
index cddf8bd..1640f7d 100644
--- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
@@ -52,11 +52,11 @@
Future<void> _kDefaultDartDevelopmentServiceStarter(
Device device,
- Uri vmServiceUri,
+ Uri observatoryUri,
bool disableServiceAuthCodes,
) async {
await device.dds.startDartDevelopmentService(
- vmServiceUri,
+ observatoryUri,
hostPort: 0,
ipv6: true,
disableServiceAuthCodes: disableServiceAuthCodes,
@@ -458,12 +458,12 @@
globals.printTrace(
'App started in a non-release mode. Setting up vmservice connection.');
- // In a debug or profile build, try to find the vmService uri.
+ // In a debug or profile build, try to find the observatory uri.
final FuchsiaIsolateDiscoveryProtocol discovery =
getIsolateDiscoveryProtocol(appName);
try {
- final Uri vmServiceUri = await discovery.uri;
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ final Uri observatoryUri = await discovery.uri;
+ return LaunchResult.succeeded(observatoryUri: observatoryUri);
} finally {
discovery.dispose();
}
@@ -620,7 +620,7 @@
return addr;
}();
- /// List the ports currently running a dart vmService.
+ /// List the ports currently running a dart observatory.
Future<List<int>> servicePorts() async {
const String findCommand = 'find /hub -name vmservice-port';
final RunResult findResult = await shell(findCommand);
diff --git a/packages/flutter_tools/lib/src/globals.dart b/packages/flutter_tools/lib/src/globals.dart
index 596c5a6..260eaf5 100644
--- a/packages/flutter_tools/lib/src/globals.dart
+++ b/packages/flutter_tools/lib/src/globals.dart
@@ -284,4 +284,5 @@
const String kDefaultFrameworkChannel = 'master';
// Used to build RegExp instances which can detect the VM service message.
-final RegExp kVMServiceMessageRegExp = RegExp(r'The Dart VM service is listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
+const String kServicePrefixRegExp = '(?:Observatory|The Dart VM service is)';
+final RegExp kVMServiceMessageRegExp = RegExp(kServicePrefixRegExp + r' listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart
index 00db24a..470c253 100644
--- a/packages/flutter_tools/lib/src/ios/devices.dart
+++ b/packages/flutter_tools/lib/src/ios/devices.dart
@@ -357,10 +357,10 @@
'Installing and launching...',
);
try {
- ProtocolDiscovery? vmServiceDiscovery;
+ ProtocolDiscovery? observatoryDiscovery;
int installationResult = 1;
if (debuggingOptions.debuggingEnabled) {
- _logger.printTrace('Debugging is enabled, connecting to vmService');
+ _logger.printTrace('Debugging is enabled, connecting to observatory');
final DeviceLogReader deviceLogReader = getLogReader(app: package);
// If the device supports syslog reading, prefer launching the app without
@@ -378,8 +378,8 @@
deviceLogReader.debuggerStream = iosDeployDebugger;
}
}
- // Don't port foward if debugging with a network device.
- vmServiceDiscovery = ProtocolDiscovery.vmService(
+ // Don't port forward if debugging with a network device.
+ observatoryDiscovery = ProtocolDiscovery.observatory(
deviceLogReader,
portForwarder: interfaceType == IOSDeviceConnectionInterface.network ? null : portForwarder,
hostPort: debuggingOptions.hostVmServicePort,
@@ -435,7 +435,7 @@
Uri? localUri;
if (interfaceType == IOSDeviceConnectionInterface.network) {
// Wait for Dart VM Service to start up.
- final Uri? serviceURL = await vmServiceDiscovery?.uri;
+ final Uri? serviceURL = await observatoryDiscovery?.uri;
if (serviceURL == null) {
await iosDeployDebugger?.stopAndDumpBacktrace();
return LaunchResult.failed();
@@ -463,14 +463,14 @@
mDNSLookupTimer.cancel();
} else {
- localUri = await vmServiceDiscovery?.uri;
+ localUri = await observatoryDiscovery?.uri;
}
timer.cancel();
if (localUri == null) {
await iosDeployDebugger?.stopAndDumpBacktrace();
return LaunchResult.failed();
}
- return LaunchResult.succeeded(vmServiceUri: localUri);
+ return LaunchResult.succeeded(observatoryUri: localUri);
} on ProcessException catch (e) {
await iosDeployDebugger?.stopAndDumpBacktrace();
_logger.printError(e.message);
diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart
index c4b852a..1c9bf39 100644
--- a/packages/flutter_tools/lib/src/ios/simulators.dart
+++ b/packages/flutter_tools/lib/src/ios/simulators.dart
@@ -450,9 +450,9 @@
platformArgs,
);
- ProtocolDiscovery? vmServiceDiscovery;
+ ProtocolDiscovery? observatoryDiscovery;
if (debuggingOptions.debuggingEnabled) {
- vmServiceDiscovery = ProtocolDiscovery.vmService(
+ observatoryDiscovery = ProtocolDiscovery.observatory(
getLogReader(app: package),
ipv6: ipv6,
hostPort: debuggingOptions.hostVmServicePort,
@@ -485,13 +485,13 @@
}
// Wait for the service protocol port here. This will complete once the
- // device has printed "Dart VM Service is listening on..."
- globals.printTrace('Waiting for VM Service port to be available...');
+ // device has printed "Observatory is listening on..."
+ globals.printTrace('Waiting for observatory port to be available...');
try {
- final Uri? deviceUri = await vmServiceDiscovery?.uri;
+ final Uri? deviceUri = await observatoryDiscovery?.uri;
if (deviceUri != null) {
- return LaunchResult.succeeded(vmServiceUri: deviceUri);
+ return LaunchResult.succeeded(observatoryUri: deviceUri);
}
globals.printError(
'Error waiting for a debug connection: '
@@ -500,7 +500,7 @@
} on Exception catch (error) {
globals.printError('Error waiting for a debug connection: $error');
} finally {
- await vmServiceDiscovery?.cancel();
+ await observatoryDiscovery?.cancel();
}
return LaunchResult.failed();
}
diff --git a/packages/flutter_tools/lib/src/macos/application_package.dart b/packages/flutter_tools/lib/src/macos/application_package.dart
index f022cf0..3debf60 100644
--- a/packages/flutter_tools/lib/src/macos/application_package.dart
+++ b/packages/flutter_tools/lib/src/macos/application_package.dart
@@ -29,7 +29,7 @@
/// `applicationBinary` is the path to the framework directory created by an
/// Xcode build. By default, this is located under
/// "~/Library/Developer/Xcode/DerivedData/" and contains an executable
- /// which is expected to start the application and send the vmService
+ /// which is expected to start the application and send the observatory
/// port over stdout.
static MacOSApp? fromPrebuiltApp(FileSystemEntity applicationBinary) {
final _BundleInfo? bundleInfo = _executableFromBundle(applicationBinary);
diff --git a/packages/flutter_tools/lib/src/mdns_discovery.dart b/packages/flutter_tools/lib/src/mdns_discovery.dart
index bff5d06..c4b1f8f 100644
--- a/packages/flutter_tools/lib/src/mdns_discovery.dart
+++ b/packages/flutter_tools/lib/src/mdns_discovery.dart
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:async';
-
import 'package:meta/meta.dart';
import 'package:multicast_dns/multicast_dns.dart';
@@ -41,7 +39,7 @@
final Usage _flutterUsage;
@visibleForTesting
- static const String dartVmServiceName = '_dartVmService._tcp.local';
+ static const String dartVmServiceName = '_dartobservatory._tcp.local';
static MDnsVmServiceDiscovery? get instance => context.get<MDnsVmServiceDiscovery>();
diff --git a/packages/flutter_tools/lib/src/preview_device.dart b/packages/flutter_tools/lib/src/preview_device.dart
index aff36ee..9c2a7bb 100644
--- a/packages/flutter_tools/lib/src/preview_device.dart
+++ b/packages/flutter_tools/lib/src/preview_device.dart
@@ -139,16 +139,16 @@
_process = process;
_logReader.initializeProcess(process);
- final ProtocolDiscovery vmServiceDiscovery = ProtocolDiscovery.vmService(_logReader,
+ final ProtocolDiscovery observatoryDiscovery = ProtocolDiscovery.observatory(_logReader,
devicePort: debuggingOptions.deviceVmServicePort,
hostPort: debuggingOptions.hostVmServicePort,
ipv6: ipv6,
logger: _logger,
);
try {
- final Uri? vmServiceUri = await vmServiceDiscovery.uri;
- if (vmServiceUri != null) {
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ final Uri? observatoryUri = await observatoryDiscovery.uri;
+ if (observatoryUri != null) {
+ return LaunchResult.succeeded(observatoryUri: observatoryUri);
}
_logger.printError(
'Error waiting for a debug connection: '
@@ -157,7 +157,7 @@
} on Exception catch (error) {
_logger.printError('Error waiting for a debug connection: $error');
} finally {
- await vmServiceDiscovery.cancel();
+ await observatoryDiscovery.cancel();
}
return LaunchResult.failed();
}
diff --git a/packages/flutter_tools/lib/src/protocol_discovery.dart b/packages/flutter_tools/lib/src/protocol_discovery.dart
index 197346c..a220863 100644
--- a/packages/flutter_tools/lib/src/protocol_discovery.dart
+++ b/packages/flutter_tools/lib/src/protocol_discovery.dart
@@ -29,7 +29,7 @@
);
}
- factory ProtocolDiscovery.vmService(
+ factory ProtocolDiscovery.observatory(
DeviceLogReader logReader, {
DevicePortForwarder? portForwarder,
Duration? throttleDuration,
@@ -38,10 +38,10 @@
required bool ipv6,
required Logger logger,
}) {
- const String kVmServiceService = 'VM Service';
+ const String kObservatoryService = 'Observatory';
return ProtocolDiscovery._(
logReader,
- kVmServiceService,
+ kObservatoryService,
portForwarder: portForwarder,
throttleDuration: throttleDuration ?? const Duration(milliseconds: 200),
hostPort: hostPort,
@@ -59,7 +59,7 @@
final bool ipv6;
final Logger _logger;
- /// The time to wait before forwarding a new VM Service URIs from [logReader].
+ /// The time to wait before forwarding a new observatory URIs from [logReader].
final Duration throttleDuration;
StreamSubscription<String>? _deviceLogSubscription;
@@ -81,12 +81,12 @@
/// The discovered service URLs.
///
- /// When a new VM Service URL: is available in [logReader],
+ /// When a new observatory URL: is available in [logReader],
/// the URLs are forwarded at most once every [throttleDuration].
/// Returns when no event has been observed for [throttleTimeout].
///
/// Port forwarding is only attempted when this is invoked,
- /// for each VM Service URL in the stream.
+ /// for each observatory URL in the stream.
Stream<Uri> get uris {
final Stream<Uri> uriStream = _uriStreamController.stream
.transform(_throttle<Uri>(
@@ -107,7 +107,7 @@
return globals.kVMServiceMessageRegExp.firstMatch(line);
}
- Uri? _getVmServiceUri(String line) {
+ Uri? _getObservatoryUri(String line) {
final Match? match = _getPatternMatch(line);
if (match != null) {
return Uri.parse(match[1]!);
@@ -118,7 +118,7 @@
void _handleLine(String line) {
Uri? uri;
try {
- uri = _getVmServiceUri(line);
+ uri = _getObservatoryUri(line);
} on FormatException catch (error, stackTrace) {
_uriStreamController.addError(error, stackTrace);
}
@@ -126,7 +126,7 @@
return;
}
if (devicePort != null && uri.port != devicePort) {
- _logger.printTrace('skipping potential VM Service $uri due to device port mismatch');
+ _logger.printTrace('skipping potential observatory $uri due to device port mismatch');
return;
}
_uriStreamController.add(uri);
diff --git a/packages/flutter_tools/lib/src/proxied_devices/devices.dart b/packages/flutter_tools/lib/src/proxied_devices/devices.dart
index 63d005e..f9a98cc 100644
--- a/packages/flutter_tools/lib/src/proxied_devices/devices.dart
+++ b/packages/flutter_tools/lib/src/proxied_devices/devices.dart
@@ -245,12 +245,12 @@
'userIdentifier': userIdentifier,
}));
final bool started = _cast<bool>(result['started']);
- final String? vmServiceUriStr = _cast<String?>(result['vmServiceUri']);
- final Uri? vmServiceUri = vmServiceUriStr == null ? null : Uri.parse(vmServiceUriStr);
+ final String? observatoryUriStr = _cast<String?>(result['observatoryUri']);
+ final Uri? observatoryUri = observatoryUriStr == null ? null : Uri.parse(observatoryUriStr);
if (started) {
- if (vmServiceUri != null) {
- final int hostPort = await proxiedPortForwarder.forward(vmServiceUri.port);
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri.replace(port: hostPort));
+ if (observatoryUri != null) {
+ final int hostPort = await proxiedPortForwarder.forward(observatoryUri.port);
+ return LaunchResult.succeeded(observatoryUri: observatoryUri.replace(port: hostPort));
} else {
return LaunchResult.succeeded();
}
diff --git a/packages/flutter_tools/lib/src/resident_devtools_handler.dart b/packages/flutter_tools/lib/src/resident_devtools_handler.dart
index 2dc0aae..0d210fd 100644
--- a/packages/flutter_tools/lib/src/resident_devtools_handler.dart
+++ b/packages/flutter_tools/lib/src/resident_devtools_handler.dart
@@ -114,7 +114,7 @@
if (_residentRunner.reportedDebuggers) {
// Since the DevTools only just became available, we haven't had a chance to
// report their URLs yet. Do so now.
- _residentRunner.printDebuggerList(includeVmService: false);
+ _residentRunner.printDebuggerList(includeObservatory: false);
}
}
diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart
index d900865..c230b6d 100644
--- a/packages/flutter_tools/lib/src/resident_runner.dart
+++ b/packages/flutter_tools/lib/src/resident_runner.dart
@@ -224,21 +224,21 @@
final DevelopmentSceneImporter? developmentSceneImporter;
DevFSWriter? devFSWriter;
- Stream<Uri?>? vmServiceUris;
+ Stream<Uri?>? observatoryUris;
FlutterVmService? vmService;
DevFS? devFS;
ApplicationPackage? package;
// ignore: cancel_subscriptions
StreamSubscription<String>? _loggingSubscription;
- bool? _isListeningForVmServiceUri;
+ bool? _isListeningForObservatoryUri;
- /// Whether the stream [vmServiceUris] is still open.
- bool get isWaitingForVmService => _isListeningForVmServiceUri ?? false;
+ /// Whether the stream [observatoryUris] is still open.
+ bool get isWaitingForObservatory => _isListeningForObservatoryUri ?? false;
/// If the [reloadSources] parameter is not null the 'reloadSources' service
/// will be registered.
/// The 'reloadSources' service can be used by other Service Protocol clients
- /// connected to the VM (e.g. VmService) to request a reload of the source
+ /// connected to the VM (e.g. Observatory) to request a reload of the source
/// code of the running application (a.k.a. HotReload).
/// The 'compileExpression' service can be used to compile user-provided
/// expressions requested during debugging of the application.
@@ -262,29 +262,29 @@
late StreamSubscription<void> subscription;
bool isWaitingForVm = false;
- subscription = vmServiceUris!.listen((Uri? vmServiceUri) async {
+ subscription = observatoryUris!.listen((Uri? observatoryUri) async {
// FYI, this message is used as a sentinel in tests.
- globals.printTrace('Connecting to service protocol: $vmServiceUri');
+ globals.printTrace('Connecting to service protocol: $observatoryUri');
isWaitingForVm = true;
bool existingDds = false;
FlutterVmService? service;
if (enableDds) {
void handleError(Exception e, StackTrace st) {
- globals.printTrace('Fail to connect to service protocol: $vmServiceUri: $e');
+ globals.printTrace('Fail to connect to service protocol: $observatoryUri: $e');
if (!completer.isCompleted) {
- completer.completeError('failed to connect to $vmServiceUri', st);
+ completer.completeError('failed to connect to $observatoryUri', st);
}
}
- // First check if the VM service is actually listening on vmServiceUri as
+ // First check if the VM service is actually listening on observatoryUri as
// this may not be the case when scraping logcat for URIs. If this URI is
// from an old application instance, we shouldn't try and start DDS.
try {
- service = await connectToVmService(vmServiceUri!, logger: globals.logger);
+ service = await connectToVmService(observatoryUri!, logger: globals.logger);
await service.dispose();
} on Exception catch (exception) {
- globals.printTrace('Fail to connect to service protocol: $vmServiceUri: $exception');
- if (!completer.isCompleted && !_isListeningForVmServiceUri!) {
- completer.completeError('failed to connect to $vmServiceUri');
+ globals.printTrace('Fail to connect to service protocol: $observatoryUri: $exception');
+ if (!completer.isCompleted && !_isListeningForObservatoryUri!) {
+ completer.completeError('failed to connect to $observatoryUri');
}
return;
}
@@ -294,7 +294,7 @@
// attaching to a VM service with existing clients, etc.).
try {
await device!.dds.startDartDevelopmentService(
- vmServiceUri,
+ observatoryUri,
hostPort: ddsPort,
ipv6: ipv6,
disableServiceAuthCodes: disableServiceAuthCodes,
@@ -324,7 +324,7 @@
service = await Future.any<dynamic>(
<Future<dynamic>>[
connectToVmService(
- enableDds ? (device!.dds.uri ?? vmServiceUri!): vmServiceUri!,
+ enableDds ? (device!.dds.uri ?? observatoryUri!): observatoryUri!,
reloadSources: reloadSources,
restart: restart,
compileExpression: compileExpression,
@@ -338,30 +338,30 @@
]
) as FlutterVmService?;
} on Exception catch (exception) {
- globals.printTrace('Fail to connect to service protocol: $vmServiceUri: $exception');
- if (!completer.isCompleted && !_isListeningForVmServiceUri!) {
- completer.completeError('failed to connect to $vmServiceUri');
+ globals.printTrace('Fail to connect to service protocol: $observatoryUri: $exception');
+ if (!completer.isCompleted && !_isListeningForObservatoryUri!) {
+ completer.completeError('failed to connect to $observatoryUri');
}
return;
}
if (completer.isCompleted) {
return;
}
- globals.printTrace('Successfully connected to service protocol: $vmServiceUri');
+ globals.printTrace('Successfully connected to service protocol: $observatoryUri');
vmService = service;
(await device!.getLogReader(app: package)).connectedVMService = vmService;
completer.complete();
await subscription.cancel();
}, onError: (dynamic error) {
- globals.printTrace('Fail to handle VM Service URI: $error');
+ globals.printTrace('Fail to handle observatory URI: $error');
}, onDone: () {
- _isListeningForVmServiceUri = false;
+ _isListeningForObservatoryUri = false;
if (!completer.isCompleted && !isWaitingForVm) {
completer.completeError(Exception('connection to device ended too early'));
}
});
- _isListeningForVmServiceUri = true;
+ _isListeningForObservatoryUri = true;
return completer.future;
}
@@ -471,12 +471,12 @@
await stopEchoingDeviceLog();
return 2;
}
- if (result.hasVmService) {
- vmServiceUris = Stream<Uri?>
- .value(result.vmServiceUri)
+ if (result.hasObservatory) {
+ observatoryUris = Stream<Uri?>
+ .value(result.observatoryUri)
.asBroadcastStream();
} else {
- vmServiceUris = const Stream<Uri>
+ observatoryUris = const Stream<Uri>
.empty()
.asBroadcastStream();
}
@@ -536,12 +536,12 @@
await stopEchoingDeviceLog();
return 2;
}
- if (result.hasVmService) {
- vmServiceUris = Stream<Uri?>
- .value(result.vmServiceUri)
+ if (result.hasObservatory) {
+ observatoryUris = Stream<Uri?>
+ .value(result.observatoryUri)
.asBroadcastStream();
} else {
- vmServiceUris = const Stream<Uri>
+ observatoryUris = const Stream<Uri>
.empty()
.asBroadcastStream();
}
@@ -1131,10 +1131,10 @@
@override
bool hotMode;
- /// Returns true if every device is streaming vmService URIs.
- bool get isWaitingForVmService {
+ /// Returns true if every device is streaming observatory URIs.
+ bool get isWaitingForObservatory {
return flutterDevices.every((FlutterDevice? device) {
- return device!.isWaitingForVmService;
+ return device!.isWaitingForObservatory;
});
}
@@ -1478,7 +1478,7 @@
bool get reportedDebuggers => _reportedDebuggers;
bool _reportedDebuggers = false;
- void printDebuggerList({ bool includeVmService = true, bool includeDevtools = true }) {
+ void printDebuggerList({ bool includeObservatory = true, bool includeDevtools = true }) {
final DevToolsServerAddress? devToolsServerAddress = residentDevtoolsHandler!.activeDevToolsServer;
if (!residentDevtoolsHandler!.readyToAnnounce) {
includeDevtools = false;
@@ -1488,10 +1488,10 @@
if (device!.vmService == null) {
continue;
}
- if (includeVmService) {
+ if (includeObservatory) {
// Caution: This log line is parsed by device lab tests.
globals.printStatus(
- 'A Dart VM Service on ${device.device!.name} is available at: '
+ 'An Observatory debugger and profiler on ${device.device!.name} is available at: '
'${device.vmService!.httpAddress}',
);
}
diff --git a/packages/flutter_tools/lib/src/run_cold.dart b/packages/flutter_tools/lib/src/run_cold.dart
index f8dc2571..a8ba6cf 100644
--- a/packages/flutter_tools/lib/src/run_cold.dart
+++ b/packages/flutter_tools/lib/src/run_cold.dart
@@ -69,7 +69,7 @@
return 1;
}
- // Connect to the VM Service.
+ // Connect to observatory.
if (debuggingEnabled) {
try {
await connectToServiceProtocol(allowExistingDdsInstance: false);
@@ -93,7 +93,7 @@
}
}
- if (flutterDevices.first.vmServiceUris != null) {
+ if (flutterDevices.first.observatoryUris != null) {
// For now, only support one debugger connection.
connectionInfoCompleter?.complete(DebugConnectionInfo(
httpUri: flutterDevices.first.vmService!.httpAddress,
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
index cb808a3..e8c8955 100644
--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
+++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
@@ -139,10 +139,7 @@
/// Will be `null` until the top-most command has begun execution.
static FlutterCommand? get current => context.get<FlutterCommand>();
- /// The option name for a custom VM Service port.
- static const String vmServicePortOption = 'vm-service-port';
-
- /// The option name for a custom VM Service port.
+ /// The option name for a custom observatory port.
static const String observatoryPortOption = 'observatory-port';
/// The option name for a custom DevTools server address.
@@ -382,22 +379,14 @@
);
}
- /// Adds options for connecting to the Dart VM Service port.
+ /// Adds options for connecting to the Dart VM observatory port.
void usesPortOptions({ required bool verboseHelp }) {
- argParser.addOption(vmServicePortOption,
- help: '(deprecated; use host-vmservice-port instead) '
- 'Listen to the given port for a Dart VM Service connection.\n'
- 'Specifying port 0 (the default) will find a random free port.\n '
- 'if the Dart Development Service (DDS) is enabled, this will not be the port '
- 'of the VmService instance advertised on the command line.',
- hide: !verboseHelp,
- );
argParser.addOption(observatoryPortOption,
help: '(deprecated; use host-vmservice-port instead) '
- 'Listen to the given port for a Dart VM Service connection.\n'
+ 'Listen to the given port for an observatory debugger connection.\n'
'Specifying port 0 (the default) will find a random free port.\n '
'if the Dart Development Service (DDS) is enabled, this will not be the port '
- 'of the VmService instance advertised on the command line.',
+ 'of the Observatory instance advertised on the command line.',
hide: !verboseHelp,
);
argParser.addOption('device-vmservice-port',
@@ -501,21 +490,19 @@
return ddsEnabled;
}();
- bool get _hostVmServicePortProvided => (argResults?.wasParsed(vmServicePortOption) ?? false)
- || (argResults?.wasParsed(observatoryPortOption) ?? false)
+ bool get _hostVmServicePortProvided => (argResults?.wasParsed('observatory-port') ?? false)
|| (argResults?.wasParsed('host-vmservice-port') ?? false);
int _tryParseHostVmservicePort() {
- final String? vmServicePort = stringArgDeprecated(vmServicePortOption) ??
- stringArgDeprecated(observatoryPortOption);
+ final String? observatoryPort = stringArgDeprecated('observatory-port');
final String? hostPort = stringArgDeprecated('host-vmservice-port');
- if (vmServicePort == null && hostPort == null) {
- throwToolExit('Invalid port for `--vm-service-port/--host-vmservice-port`');
+ if (observatoryPort == null && hostPort == null) {
+ throwToolExit('Invalid port for `--observatory-port/--host-vmservice-port`');
}
try {
- return int.parse((vmServicePort ?? hostPort)!);
+ return int.parse((observatoryPort ?? hostPort)!);
} on FormatException catch (error) {
- throwToolExit('Invalid port for `--vm-service-port/--host-vmservice-port`: $error');
+ throwToolExit('Invalid port for `--observatory-port/--host-vmservice-port`: $error');
}
}
@@ -541,10 +528,10 @@
return null;
}
- /// Gets the vmservice port provided to in the 'vm-service-port' or
+ /// Gets the vmservice port provided to in the 'observatory-port' or
/// 'host-vmservice-port option.
///
- /// Only one of "host-vmservice-port" and "vm-service-port" may be
+ /// Only one of "host-vmservice-port" and "observatory-port" may be
/// specified.
///
/// If no port is set, returns null.
@@ -552,10 +539,9 @@
if (!_usesPortOption || !_hostVmServicePortProvided) {
return null;
}
- if ((argResults?.wasParsed(vmServicePortOption) ?? false)
- && (argResults?.wasParsed(observatoryPortOption) ?? false)
+ if ((argResults?.wasParsed('observatory-port') ?? false)
&& (argResults?.wasParsed('host-vmservice-port') ?? false)) {
- throwToolExit('Only one of "--vm-service-port" and '
+ throwToolExit('Only one of "--observatory-port" and '
'"--host-vmservice-port" may be specified.');
}
// If DDS is enabled and no explicit DDS port is provided, use the
diff --git a/packages/flutter_tools/lib/src/test/coverage_collector.dart b/packages/flutter_tools/lib/src/test/coverage_collector.dart
index 1881fb64..d41732c 100644
--- a/packages/flutter_tools/lib/src/test/coverage_collector.dart
+++ b/packages/flutter_tools/lib/src/test/coverage_collector.dart
@@ -100,18 +100,18 @@
/// has been run to completion so that all coverage data has been recorded.
///
/// The returned [Future] completes when the coverage is collected.
- Future<void> collectCoverageIsolate(Uri vmServiceUri) async {
- _logMessage('collecting coverage data from $vmServiceUri...');
+ Future<void> collectCoverageIsolate(Uri observatoryUri) async {
+ _logMessage('collecting coverage data from $observatoryUri...');
final Map<String, dynamic> data = await collect(
- vmServiceUri, libraryNames, branchCoverage: branchCoverage);
+ observatoryUri, libraryNames, branchCoverage: branchCoverage);
- _logMessage('($vmServiceUri): collected coverage data; merging...');
+ _logMessage('($observatoryUri): collected coverage data; merging...');
_addHitmap(await coverage.HitMap.parseJson(
data['coverage'] as List<Map<String, dynamic>>,
packagePath: packageDirectory,
checkIgnoredLines: true,
));
- _logMessage('($vmServiceUri): done merging coverage data into global coverage map.');
+ _logMessage('($observatoryUri): done merging coverage data into global coverage map.');
}
/// Collects coverage for the given [Process] using the given `port`.
@@ -141,11 +141,11 @@
}
);
- final Future<void> collectionComplete = testDevice.vmServiceUri
- .then((Uri? vmServiceUri) {
- _logMessage('collecting coverage data from $testDevice at $vmServiceUri...');
+ final Future<void> collectionComplete = testDevice.observatoryUri
+ .then((Uri? observatoryUri) {
+ _logMessage('collecting coverage data from $testDevice at $observatoryUri...');
return collect(
- vmServiceUri!, libraryNames, serviceOverride: serviceOverride,
+ observatoryUri!, libraryNames, serviceOverride: serviceOverride,
branchCoverage: branchCoverage)
.then<void>((Map<String, dynamic> result) {
_logMessage('Collected coverage data.');
diff --git a/packages/flutter_tools/lib/src/test/event_printer.dart b/packages/flutter_tools/lib/src/test/event_printer.dart
index 3cc572a..4c99bf7 100644
--- a/packages/flutter_tools/lib/src/test/event_printer.dart
+++ b/packages/flutter_tools/lib/src/test/event_printer.dart
@@ -17,10 +17,10 @@
final TestWatcher? _parent;
@override
- void handleStartedDevice(Uri? vmServiceUri) {
+ void handleStartedDevice(Uri? observatoryUri) {
_sendEvent('test.startedProcess',
- <String, dynamic>{'vmServiceUri': vmServiceUri?.toString()});
- _parent?.handleStartedDevice(vmServiceUri);
+ <String, dynamic>{'observatoryUri': observatoryUri?.toString()});
+ _parent?.handleStartedDevice(observatoryUri);
}
@override
diff --git a/packages/flutter_tools/lib/src/test/flutter_platform.dart b/packages/flutter_tools/lib/src/test/flutter_platform.dart
index a9bf867..c4f02e0 100644
--- a/packages/flutter_tools/lib/src/test/flutter_platform.dart
+++ b/packages/flutter_tools/lib/src/test/flutter_platform.dart
@@ -34,7 +34,7 @@
import 'watcher.dart';
/// The address at which our WebSocket server resides and at which the sky_shell
-/// processes will host the VmService server.
+/// processes will host the Observatory server.
final Map<InternetAddressType, InternetAddress> _kHosts = <InternetAddressType, InternetAddress>{
InternetAddressType.IPv4: InternetAddress.loopbackIPv4,
InternetAddressType.IPv6: InternetAddress.loopbackIPv6,
@@ -46,15 +46,13 @@
///
/// On systems where each [FlutterPlatform] is only used to run one test suite
/// (that is, one Dart file with a `*_test.dart` file name and a single `void
-/// main()`), you can set a VM Service port explicitly.
+/// main()`), you can set an observatory port explicitly.
FlutterPlatform installHook({
TestWrapper testWrapper = const TestWrapper(),
required String shellPath,
required DebuggingOptions debuggingOptions,
TestWatcher? watcher,
- // TODO(bkonyi): remove after roll into google3.
bool enableObservatory = false,
- bool enableVmService = false,
bool machine = false,
String? precompiledDillPath,
Map<String, String>? precompiledDillFiles,
@@ -70,7 +68,7 @@
TestTimeRecorder? testTimeRecorder,
UriConverter? uriConverter,
}) {
- assert(enableVmService || enableObservatory || (!debuggingOptions.startPaused && debuggingOptions.hostVmServicePort == null));
+ assert(enableObservatory || (!debuggingOptions.startPaused && debuggingOptions.hostVmServicePort == null));
// registerPlatformPlugin can be injected for testing since it's not very mock-friendly.
platformPluginRegistration ??= (FlutterPlatform platform) {
@@ -86,7 +84,7 @@
debuggingOptions: debuggingOptions,
watcher: watcher,
machine: machine,
- enableVmService: enableVmService || enableObservatory,
+ enableObservatory: enableObservatory,
host: _kHosts[serverType],
precompiledDillPath: precompiledDillPath,
precompiledDillFiles: precompiledDillFiles,
@@ -278,7 +276,7 @@
required this.shellPath,
required this.debuggingOptions,
this.watcher,
- this.enableVmService,
+ this.enableObservatory,
this.machine,
this.host,
this.precompiledDillPath,
@@ -297,7 +295,7 @@
final String shellPath;
final DebuggingOptions debuggingOptions;
final TestWatcher? watcher;
- final bool? enableVmService;
+ final bool? enableObservatory;
final bool? machine;
final InternetAddress? host;
final String? precompiledDillPath;
@@ -359,7 +357,7 @@
if (_testCount > 0) {
// Fail if there will be a port conflict.
if (debuggingOptions.hostVmServicePort != null) {
- throwToolExit('installHook() was called with a VM Service port or debugger mode enabled, but then more than one test suite was run.');
+ throwToolExit('installHook() was called with an observatory port or debugger mode enabled, but then more than one test suite was run.');
}
// Fail if we're passing in a precompiled entry-point.
if (precompiledDillPath != null) {
@@ -426,7 +424,7 @@
processManager: globals.processManager,
logger: globals.logger,
shellPath: shellPath,
- enableVmService: enableVmService!,
+ enableObservatory: enableObservatory!,
machine: machine,
debuggingOptions: debuggingOptions,
host: host,
@@ -514,13 +512,13 @@
await Future.any<void>(<Future<void>>[
testDevice.finished,
() async {
- final Uri? processVmServiceUri = await testDevice.vmServiceUri;
- if (processVmServiceUri != null) {
- globals.printTrace('test $ourTestCount: VM Service uri is available at $processVmServiceUri');
+ final Uri? processObservatoryUri = await testDevice.observatoryUri;
+ if (processObservatoryUri != null) {
+ globals.printTrace('test $ourTestCount: Observatory uri is available at $processObservatoryUri');
} else {
- globals.printTrace('test $ourTestCount: VM Service uri is not available');
+ globals.printTrace('test $ourTestCount: Observatory uri is not available');
}
- watcher?.handleStartedDevice(processVmServiceUri);
+ watcher?.handleStartedDevice(processObservatoryUri);
final StreamChannel<String> remoteChannel = await remoteChannelFuture;
globals.printTrace('test $ourTestCount: connected to test device, now awaiting test result');
diff --git a/packages/flutter_tools/lib/src/test/flutter_tester_device.dart b/packages/flutter_tools/lib/src/test/flutter_tester_device.dart
index 8a39c2d..9b09f12 100644
--- a/packages/flutter_tools/lib/src/test/flutter_tester_device.dart
+++ b/packages/flutter_tools/lib/src/test/flutter_tester_device.dart
@@ -36,7 +36,7 @@
required this.logger,
required this.shellPath,
required this.debuggingOptions,
- required this.enableVmService,
+ required this.enableObservatory,
required this.machine,
required this.host,
required this.testAssetDirectory,
@@ -45,8 +45,8 @@
required this.compileExpression,
required this.fontConfigManager,
required this.uriConverter,
- }) : assert(!debuggingOptions.startPaused || enableVmService),
- _gotProcessVmServiceUri = enableVmService
+ }) : assert(!debuggingOptions.startPaused || enableObservatory),
+ _gotProcessObservatoryUri = enableObservatory
? Completer<Uri?>() : (Completer<Uri?>()..complete());
/// Used for logging to identify the test that is currently being executed.
@@ -57,7 +57,7 @@
final Logger logger;
final String shellPath;
final DebuggingOptions debuggingOptions;
- final bool enableVmService;
+ final bool enableObservatory;
final bool? machine;
final InternetAddress? host;
final String? testAssetDirectory;
@@ -67,7 +67,7 @@
final FontConfigManager fontConfigManager;
final UriConverter? uriConverter;
- final Completer<Uri?> _gotProcessVmServiceUri;
+ final Completer<Uri?> _gotProcessObservatoryUri;
final Completer<int> _exitCode = Completer<int>();
Process? _process;
@@ -89,7 +89,7 @@
logger.printTrace('test $id: test harness socket server is running at port:${_server!.port}');
final List<String> command = <String>[
shellPath,
- if (enableVmService) ...<String>[
+ if (enableObservatory) ...<String>[
// Some systems drive the _FlutterPlatform class in an unusual way, where
// only one test file is processed at a time, and the operating
// environment hands out specific ports ahead of time in a cooperative
@@ -99,12 +99,12 @@
//
// I mention this only so that you won't be tempted, as I was, to apply
// the obvious simplification to this code and remove this entire feature.
- '--vm-service-port=${debuggingOptions.enableDds ? 0 : debuggingOptions.hostVmServicePort }',
+ '--observatory-port=${debuggingOptions.enableDds ? 0 : debuggingOptions.hostVmServicePort }',
if (debuggingOptions.startPaused) '--start-paused',
if (debuggingOptions.disableServiceAuthCodes) '--disable-service-auth-codes',
]
else
- '--disable-vm-service',
+ '--disable-observatory',
if (host!.type == InternetAddressType.IPv6) '--ipv6',
if (icudtlPath != null) '--icu-data-file-path=$icudtlPath',
'--enable-checked-mode',
@@ -154,11 +154,11 @@
logger.printTrace('test $id: Started flutter_tester process at pid ${_process!.pid}');
// Pipe stdout and stderr from the subprocess to our printStatus console.
- // We also keep track of what VM Service port the engine used, if any.
+ // We also keep track of what observatory port the engine used, if any.
_pipeStandardStreamsToConsole(
process: _process!,
- reportVmServiceUri: (Uri detectedUri) async {
- assert(!_gotProcessVmServiceUri.isCompleted);
+ reportObservatoryUri: (Uri detectedUri) async {
+ assert(!_gotProcessObservatoryUri.isCompleted);
assert(debuggingOptions.hostVmServicePort == null ||
debuggingOptions.hostVmServicePort == detectedUri.port);
@@ -194,11 +194,12 @@
if (debuggingOptions.startPaused && !machine!) {
logger.printStatus('The test process has been started.');
- logger.printStatus('You can now connect to it using vmService. To connect, load the following Web site in your browser:');
+ logger.printStatus('You can now connect to it using observatory. To connect, load the following Web site in your browser:');
logger.printStatus(' $forwardingUri');
logger.printStatus('You should first set appropriate breakpoints, then resume the test in the debugger.');
}
- _gotProcessVmServiceUri.complete(forwardingUri);
+
+ _gotProcessObservatoryUri.complete(forwardingUri);
},
);
@@ -206,8 +207,8 @@
}
@override
- Future<Uri?> get vmServiceUri {
- return _gotProcessVmServiceUri.future;
+ Future<Uri?> get observatoryUri {
+ return _gotProcessObservatoryUri.future;
}
@override
@@ -292,7 +293,7 @@
void _pipeStandardStreamsToConsole({
required Process process,
- required Future<void> Function(Uri uri) reportVmServiceUri,
+ required Future<void> Function(Uri uri) reportObservatoryUri,
}) {
for (final Stream<List<int>> stream in <Stream<List<int>>>[
process.stderr,
@@ -309,9 +310,9 @@
if (match != null) {
try {
final Uri uri = Uri.parse(match[1]!);
- await reportVmServiceUri(uri);
+ await reportObservatoryUri(uri);
} on Exception catch (error) {
- logger.printError('Could not parse shell VM Service port message: $error');
+ logger.printError('Could not parse shell observatory port message: $error');
}
} else {
logger.printStatus('Shell: $line');
diff --git a/packages/flutter_tools/lib/src/test/flutter_web_goldens.dart b/packages/flutter_tools/lib/src/test/flutter_web_goldens.dart
index ce71755..3cc7c89 100644
--- a/packages/flutter_tools/lib/src/test/flutter_web_goldens.dart
+++ b/packages/flutter_tools/lib/src/test/flutter_web_goldens.dart
@@ -84,7 +84,7 @@
}
final List<String> command = <String>[
shellPath!,
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=${_fileSystem.path.join('.dart_tool', 'package_config.json')}',
output,
diff --git a/packages/flutter_tools/lib/src/test/integration_test_device.dart b/packages/flutter_tools/lib/src/test/integration_test_device.dart
index 598bcc7..4993090 100644
--- a/packages/flutter_tools/lib/src/test/integration_test_device.dart
+++ b/packages/flutter_tools/lib/src/test/integration_test_device.dart
@@ -35,7 +35,7 @@
ApplicationPackage? _applicationPackage;
final Completer<void> _finished = Completer<void>();
- final Completer<Uri> _gotProcessVmServiceUri = Completer<Uri>();
+ final Completer<Uri> _gotProcessObservatoryUri = Completer<Uri>();
/// Starts the device.
///
@@ -62,19 +62,19 @@
if (!launchResult.started) {
throw TestDeviceException('Unable to start the app on the device.', StackTrace.current);
}
- final Uri? vmServiceUri = launchResult.vmServiceUri;
- if (vmServiceUri == null) {
- throw TestDeviceException('The VM Service is not available on the test device.', StackTrace.current);
+ final Uri? observatoryUri = launchResult.observatoryUri;
+ if (observatoryUri == null) {
+ throw TestDeviceException('Observatory is not available on the test device.', StackTrace.current);
}
// No need to set up the log reader because the logs are captured and
// streamed to the package:test_core runner.
- _gotProcessVmServiceUri.complete(vmServiceUri);
+ _gotProcessObservatoryUri.complete(observatoryUri);
globals.printTrace('test $id: Connecting to vm service');
final FlutterVmService vmService = await connectToVmService(
- vmServiceUri,
+ observatoryUri,
logger: globals.logger,
compileExpression: compileExpression,
).timeout(
@@ -116,7 +116,7 @@
}
@override
- Future<Uri> get vmServiceUri => _gotProcessVmServiceUri.future;
+ Future<Uri> get observatoryUri => _gotProcessObservatoryUri.future;
@override
Future<void> kill() async {
diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart
index cb0390c..107af2b 100644
--- a/packages/flutter_tools/lib/src/test/runner.dart
+++ b/packages/flutter_tools/lib/src/test/runner.dart
@@ -30,7 +30,7 @@
List<String> plainNames = const <String>[],
String? tags,
String? excludeTags,
- bool enableVmService = false,
+ bool enableObservatory = false,
bool ipv6 = false,
bool machine = false,
String? precompiledDillPath,
@@ -68,7 +68,7 @@
List<String> plainNames = const <String>[],
String? tags,
String? excludeTags,
- bool enableVmService = false,
+ bool enableObservatory = false,
bool ipv6 = false,
bool machine = false,
String? precompiledDillPath,
@@ -197,7 +197,7 @@
shellPath: shellPath,
debuggingOptions: debuggingOptions,
watcher: watcher,
- enableVmService: enableVmService,
+ enableObservatory: enableObservatory,
machine: machine,
serverType: serverType,
precompiledDillPath: precompiledDillPath,
diff --git a/packages/flutter_tools/lib/src/test/test_device.dart b/packages/flutter_tools/lib/src/test/test_device.dart
index 722fe60..28ff364 100644
--- a/packages/flutter_tools/lib/src/test/test_device.dart
+++ b/packages/flutter_tools/lib/src/test/test_device.dart
@@ -21,8 +21,8 @@
/// or raw source file.
Future<StreamChannel<String>> start(String entrypointPath);
- /// Should complete with null if the VM Service is not enabled.
- Future<Uri?> get vmServiceUri;
+ /// Should complete with null if the observatory is not enabled.
+ Future<Uri?> get observatoryUri;
/// Terminates the test device.
Future<void> kill();
diff --git a/packages/flutter_tools/lib/src/test/watcher.dart b/packages/flutter_tools/lib/src/test/watcher.dart
index 55b6d14..028bfec 100644
--- a/packages/flutter_tools/lib/src/test/watcher.dart
+++ b/packages/flutter_tools/lib/src/test/watcher.dart
@@ -8,9 +8,9 @@
abstract class TestWatcher {
/// Called after the test device starts.
///
- /// If startPaused was true, the caller needs to resume in DevTools to
+ /// If startPaused was true, the caller needs to resume in Observatory to
/// start running the tests.
- void handleStartedDevice(Uri? vmServiceUri) { }
+ void handleStartedDevice(Uri? observatoryUri) { }
/// Called after the tests finish but before the test device exits.
///
diff --git a/packages/flutter_tools/lib/src/tester/flutter_tester.dart b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
index 9dd9206..162370f 100644
--- a/packages/flutter_tools/lib/src/tester/flutter_tester.dart
+++ b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
@@ -174,11 +174,11 @@
if (debuggingOptions.disableServiceAuthCodes)
'--disable-service-auth-codes',
if (debuggingOptions.hostVmServicePort != null)
- '--vm-service-port=${debuggingOptions.hostVmServicePort}',
+ '--observatory-port=${debuggingOptions.hostVmServicePort}',
applicationKernelFilePath,
];
- ProtocolDiscovery? vmServiceDiscovery;
+ ProtocolDiscovery? observatoryDiscovery;
try {
_logger.printTrace(command.join(' '));
_process = await _processManager.start(command,
@@ -190,7 +190,7 @@
return LaunchResult.succeeded();
}
- vmServiceDiscovery = ProtocolDiscovery.vmService(
+ observatoryDiscovery = ProtocolDiscovery.observatory(
getLogReader(),
hostPort: debuggingOptions.hostVmServicePort,
devicePort: debuggingOptions.deviceVmServicePort,
@@ -199,9 +199,9 @@
);
_logReader.initializeProcess(_process!);
- final Uri? vmServiceUri = await vmServiceDiscovery.uri;
- if (vmServiceUri != null) {
- return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ final Uri? observatoryUri = await observatoryDiscovery.uri;
+ if (observatoryUri != null) {
+ return LaunchResult.succeeded(observatoryUri: observatoryUri);
}
_logger.printError(
'Failed to launch $package: '
@@ -210,7 +210,7 @@
} on Exception catch (error) {
_logger.printError('Failed to launch $package: $error');
} finally {
- await vmServiceDiscovery?.cancel();
+ await observatoryDiscovery?.cancel();
}
return LaunchResult.failed();
}
diff --git a/packages/flutter_tools/lib/src/tracing.dart b/packages/flutter_tools/lib/src/tracing.dart
index 6e43d19..0ed9456 100644
--- a/packages/flutter_tools/lib/src/tracing.dart
+++ b/packages/flutter_tools/lib/src/tracing.dart
@@ -120,7 +120,7 @@
}
}
-/// Download the startup trace information from the given VM Service client and
+/// Download the startup trace information from the given observatory client and
/// store it to `$output/start_up_info.json`.
Future<void> downloadStartupTrace(FlutterVmService vmService, {
bool awaitFirstFrame = true,
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart
index f0096a0..d37d611 100644
--- a/packages/flutter_tools/lib/src/vmservice.dart
+++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -73,7 +73,7 @@
/// The VM Service Protocol allows clients to register custom services that
/// can be invoked by other clients through the service protocol itself.
///
-/// Clients like VmService use external 'reloadSources' services,
+/// Clients like Observatory use external 'reloadSources' services,
/// when available, instead of the VM internal one. This allows these clients to
/// invoke Flutter HotReload when connected to a Flutter Application started in
/// hot mode.
diff --git a/packages/flutter_tools/lib/src/web/web_device.dart b/packages/flutter_tools/lib/src/web/web_device.dart
index 8969fa5..3938a96 100644
--- a/packages/flutter_tools/lib/src/web/web_device.dart
+++ b/packages/flutter_tools/lib/src/web/web_device.dart
@@ -153,7 +153,7 @@
);
}
_logger.sendEvent('app.webLaunchUrl', <String, Object>{'url': url, 'launched': launchChrome});
- return LaunchResult.succeeded(vmServiceUri: Uri.parse(url));
+ return LaunchResult.succeeded(observatoryUri: Uri.parse(url));
}
@override
@@ -474,7 +474,7 @@
'Consider using the Chrome or Edge devices for an improved development workflow.'
);
_logger.sendEvent('app.webLaunchUrl', <String, Object?>{'url': url, 'launched': false});
- return LaunchResult.succeeded(vmServiceUri: url != null ? Uri.parse(url): null);
+ return LaunchResult.succeeded(observatoryUri: url != null ? Uri.parse(url): null);
}
@override
diff --git a/packages/flutter_tools/static/custom-devices.schema.json b/packages/flutter_tools/static/custom-devices.schema.json
index da0a784..8bac5c0 100644
--- a/packages/flutter_tools/static/custom-devices.schema.json
+++ b/packages/flutter_tools/static/custom-devices.schema.json
@@ -91,14 +91,14 @@
]
},
"runDebug": {
- "description": "The command to be invoked to run the app in debug mode. The name of the app to be started is available via the ${appName} string interpolation. Make sure the flutter cmdline output is available via this commands stdout/stderr since the SDK needs the \"VM Service is now listening on ...\" message to function. If the forwardPort command is not specified, the VM Service URL will be connected to as-is, without any port forwarding. In that case you need to make sure it is reachable from your host device, possibly via the \"--vm-service-host=<ip>\" engine flag.",
+ "description": "The command to be invoked to run the app in debug mode. The name of the app to be started is available via the ${appName} string interpolation. Make sure the flutter cmdline output is available via this commands stdout/stderr since the SDK needs the \"Observatory is now listening on ...\" message to function. If the forwardPort command is not specified, the observatory URL will be connected to as-is, without any port forwarding. In that case you need to make sure it is reachable from your host device, possibly via the \"--observatory-host=<ip>\" engine flag.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"default": [
- "ssh", "pi@raspberrypi", "flutter-pi /tmp/${appName} --vm-service-host=192.168.178.123"
+ "ssh", "pi@raspberrypi", "flutter-pi /tmp/${appName} --observatory-host=192.168.178.123"
]
},
"forwardPort": {
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
index 4e716d3..42d91c6 100644
--- a/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
+++ b/packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
@@ -118,8 +118,8 @@
testDeviceManager.devices = <Device>[device];
final Completer<void> completer = Completer<void>();
final StreamSubscription<String> loggerSubscription = logger.stream.listen((String message) {
- if (message == '[verbose] VM Service URL on device: http://127.0.0.1:$devicePort') {
- // The "VM Service URL on device" message is output by the ProtocolDiscovery when it found the VM Service.
+ if (message == '[verbose] Observatory URL on device: http://127.0.0.1:$devicePort') {
+ // The "Observatory URL on device" message is output by the ProtocolDiscovery when it found the observatory.
completer.complete();
}
});
@@ -131,7 +131,7 @@
bool enableDevTools,
) async => 0;
hotRunner.exited = false;
- hotRunner.isWaitingForVmService = false;
+ hotRunner.isWaitingForObservatory = false;
final FakeHotRunnerFactory hotRunnerFactory = FakeHotRunnerFactory()
..hotRunner = hotRunner;
@@ -186,7 +186,7 @@
bool enableDevTools,
) async => 0;
hotRunner.exited = false;
- hotRunner.isWaitingForVmService = false;
+ hotRunner.isWaitingForObservatory = false;
final FakeHotRunnerFactory hotRunnerFactory = FakeHotRunnerFactory()
..hotRunner = hotRunner;
@@ -207,8 +207,8 @@
expect(portForwarder.hostPort, hostPort);
expect(hotRunnerFactory.devices, hasLength(1));
final FlutterDevice flutterDevice = hotRunnerFactory.devices.first;
- final Uri? vmServiceUri = await flutterDevice.vmServiceUris?.first;
- expect(vmServiceUri.toString(), 'http://127.0.0.1:$hostPort/xyz/');
+ final Uri? observatoryUri = await flutterDevice.observatoryUris?.first;
+ expect(observatoryUri.toString(), 'http://127.0.0.1:$hostPort/xyz/');
}, overrides: <Type, Generator>{
FileSystem: () => testFileSystem,
ProcessManager: () => FakeProcessManager.any(),
@@ -252,7 +252,7 @@
bool enableDevTools,
) async => 0;
hotRunner.exited = false;
- hotRunner.isWaitingForVmService = false;
+ hotRunner.isWaitingForObservatory = false;
final FakeHotRunnerFactory hotRunnerFactory = FakeHotRunnerFactory()
..hotRunner = hotRunner;
@@ -274,8 +274,8 @@
expect(hotRunnerFactory.devices, hasLength(1));
final FlutterDevice flutterDevice = hotRunnerFactory.devices.first;
- final Uri? vmServiceUri = await flutterDevice.vmServiceUris?.first;
- expect(vmServiceUri.toString(), 'http://111.111.111.111:123/xyz/');
+ final Uri? observatoryUri = await flutterDevice.observatoryUris?.first;
+ expect(observatoryUri.toString(), 'http://111.111.111.111:123/xyz/');
}, overrides: <Type, Generator>{
FileSystem: () => testFileSystem,
ProcessManager: () => FakeProcessManager.any(),
@@ -324,7 +324,7 @@
bool enableDevTools,
) async => 0;
hotRunner.exited = false;
- hotRunner.isWaitingForVmService = false;
+ hotRunner.isWaitingForObservatory = false;
final FakeHotRunnerFactory hotRunnerFactory = FakeHotRunnerFactory()
..hotRunner = hotRunner;
@@ -346,8 +346,8 @@
expect(hotRunnerFactory.devices, hasLength(1));
final FlutterDevice flutterDevice = hotRunnerFactory.devices.first;
- final Uri? vmServiceUri = await flutterDevice.vmServiceUris?.first;
- expect(vmServiceUri.toString(), 'http://111.111.111.111:123/xyz/');
+ final Uri? observatoryUri = await flutterDevice.observatoryUris?.first;
+ expect(observatoryUri.toString(), 'http://111.111.111.111:123/xyz/');
}, overrides: <Type, Generator>{
FileSystem: () => testFileSystem,
ProcessManager: () => FakeProcessManager.any(),
@@ -400,7 +400,7 @@
bool enableDevTools,
) async => 0;
hotRunner.exited = false;
- hotRunner.isWaitingForVmService = false;
+ hotRunner.isWaitingForObservatory = false;
final FakeHotRunnerFactory hotRunnerFactory = FakeHotRunnerFactory()
..hotRunner = hotRunner;
@@ -422,8 +422,8 @@
expect(hotRunnerFactory.devices, hasLength(1));
final FlutterDevice flutterDevice = hotRunnerFactory.devices.first;
- final Uri? vmServiceUri = await flutterDevice.vmServiceUris?.first;
- expect(vmServiceUri.toString(), 'http://111.111.111.111:123/xyz/');
+ final Uri? observatoryUri = await flutterDevice.observatoryUris?.first;
+ expect(observatoryUri.toString(), 'http://111.111.111.111:123/xyz/');
}, overrides: <Type, Generator>{
FileSystem: () => testFileSystem,
ProcessManager: () => FakeProcessManager.any(),
@@ -460,7 +460,7 @@
),
});
- testUsingContext('finds VM Service port and forwards', () async {
+ testUsingContext('finds observatory port and forwards', () async {
device.onGetLogReader = () {
fakeLogReader.addLine('Foo');
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
@@ -469,8 +469,8 @@
testDeviceManager.devices = <Device>[device];
final Completer<void> completer = Completer<void>();
final StreamSubscription<String> loggerSubscription = logger.stream.listen((String message) {
- if (message == '[verbose] VM Service URL on device: http://127.0.0.1:$devicePort') {
- // The "VM Service URL on device" message is output by the ProtocolDiscovery when it found the VM Service.
+ if (message == '[verbose] Observatory URL on device: http://127.0.0.1:$devicePort') {
+ // The "Observatory URL on device" message is output by the ProtocolDiscovery when it found the observatory.
completer.complete();
}
});
@@ -499,7 +499,7 @@
DeviceManager: () => testDeviceManager,
});
- testUsingContext('Fails with tool exit on bad VmService uri', () async {
+ testUsingContext('Fails with tool exit on bad Observatory uri', () async {
device.onGetLogReader = () {
fakeLogReader.addLine('Foo');
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
@@ -545,7 +545,7 @@
bool enableDevTools,
) async => 0;
hotRunner.exited = false;
- hotRunner.isWaitingForVmService = false;
+ hotRunner.isWaitingForObservatory = false;
final FakeHotRunnerFactory hotRunnerFactory = FakeHotRunnerFactory()
..hotRunner = hotRunner;
@@ -618,7 +618,7 @@
DeviceManager: () => testDeviceManager,
},);
- testUsingContext('exits when vm-service-port is specified and debug-port is not', () async {
+ testUsingContext('exits when observatory-port is specified and debug-port is not', () async {
device.onGetLogReader = () {
fakeLogReader.addLine('Foo');
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
@@ -637,10 +637,10 @@
fileSystem: testFileSystem,
);
await expectLater(
- createTestCommandRunner(command).run(<String>['attach', '--vm-service-port', '100']),
+ createTestCommandRunner(command).run(<String>['attach', '--observatory-port', '100']),
throwsToolExit(
message: 'When the --debug-port or --debug-url is unknown, this command does not use '
- 'the value of --vm-service-port.',
+ 'the value of --observatory-port.',
),
);
}, overrides: <Type, Generator>{
@@ -735,7 +735,7 @@
DeviceManager: () => testDeviceManager,
});
- testUsingContext('skips in ipv4 mode with a provided VM Service port', () async {
+ testUsingContext('skips in ipv4 mode with a provided observatory port', () async {
testDeviceManager.devices = <Device>[device];
final Completer<void> completer = Completer<void>();
@@ -760,7 +760,7 @@
'attach',
'--debug-port',
'$devicePort',
- '--vm-service-port',
+ '--observatory-port',
'$hostPort',
// Ensure DDS doesn't use hostPort by binding to a random port.
'--dds-port',
@@ -780,7 +780,7 @@
DeviceManager: () => testDeviceManager,
});
- testUsingContext('skips in ipv6 mode with a provided VM Service port', () async {
+ testUsingContext('skips in ipv6 mode with a provided observatory port', () async {
testDeviceManager.devices = <Device>[device];
final Completer<void> completer = Completer<void>();
@@ -805,7 +805,7 @@
'attach',
'--debug-port',
'$devicePort',
- '--vm-service-port',
+ '--observatory-port',
'$hostPort',
'--ipv6',
// Ensure DDS doesn't use hostPort by binding to a random port.
@@ -992,7 +992,7 @@
bool exited = false;
@override
- bool isWaitingForVmService = true;
+ bool isWaitingForObservatory = true;
@override
Future<int> attach({
@@ -1198,7 +1198,7 @@
@override
Future<void> startDartDevelopmentService(
- Uri vmServiceUri, {
+ Uri observatoryUri, {
required Logger logger,
int? hostPort,
bool? ipv6,
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/daemon_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/daemon_test.dart
index a50433e..18f76e8 100644
--- a/packages/flutter_tools/test/commands.shard/hermetic/daemon_test.dart
+++ b/packages/flutter_tools/test/commands.shard/hermetic/daemon_test.dart
@@ -430,8 +430,8 @@
final String? applicationPackageId = applicationPackageIdResponse.data['result'] as String?;
// Try starting the app.
- final Uri vmServiceUri = Uri.parse('http://127.0.0.1:12345/vmService');
- device.launchResult = LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ final Uri observatoryUri = Uri.parse('http://127.0.0.1:12345/observatory');
+ device.launchResult = LaunchResult.succeeded(observatoryUri: observatoryUri);
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{
'id': 1,
'method': 'device.startApp',
@@ -446,7 +446,7 @@
expect(device.startAppPackage, applicationPackage);
final Map<String, Object?> startAppResult = startAppResponse.data['result']! as Map<String, Object?>;
expect(startAppResult['started'], true);
- expect(startAppResult['vmServiceUri'], vmServiceUri.toString());
+ expect(startAppResult['observatoryUri'], observatoryUri.toString());
// Try stopping the app.
daemonStreams.inputs.add(DaemonMessage(<String, Object?>{
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/proxied_devices_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/proxied_devices_test.dart
index fed7e60..a77e516 100644
--- a/packages/flutter_tools/test/commands.shard/hermetic/proxied_devices_test.dart
+++ b/packages/flutter_tools/test/commands.shard/hermetic/proxied_devices_test.dart
@@ -161,8 +161,8 @@
final FakeApplicationPackage applicationPackage = FakeApplicationPackage();
applicationPackageFactory.applicationPackage = applicationPackage;
- final Uri vmServiceUri = Uri.parse('http://127.0.0.1:12345/vmService');
- fakeDevice.launchResult = LaunchResult.succeeded(vmServiceUri: vmServiceUri);
+ final Uri observatoryUri = Uri.parse('http://127.0.0.1:12345/observatory');
+ fakeDevice.launchResult = LaunchResult.succeeded(observatoryUri: observatoryUri);
final LaunchResult launchResult = await device.startApp(
prebuiltApplicationPackage,
@@ -170,8 +170,8 @@
);
expect(launchResult.started, true);
- // The returned vmServiceUri was a forwarded port, so we cannot compare them directly.
- expect(launchResult.vmServiceUri!.path, vmServiceUri.path);
+ // The returned observatoryUri was a forwarded port, so we cannot compare them directly.
+ expect(launchResult.observatoryUri!.path, observatoryUri.path);
expect(applicationPackageFactory.applicationBinaryRequested!.readAsStringSync(), 'dummy content');
expect(applicationPackageFactory.platformRequested, TargetPlatform.android_arm);
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/screenshot_command_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/screenshot_command_test.dart
index 42954dc..f3a4d25 100644
--- a/packages/flutter_tools/test/commands.shard/hermetic/screenshot_command_test.dart
+++ b/packages/flutter_tools/test/commands.shard/hermetic/screenshot_command_test.dart
@@ -28,26 +28,26 @@
};
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
- .run(<String>['screenshot', '--type=skia', '--vm-service-url=http://localhost:8181']),
+ .run(<String>['screenshot', '--type=skia', '--observatory-url=http://localhost:8181']),
throwsA(isException.having((Exception exception) => exception.toString(), 'message', contains('dummy'))),
);
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
- .run(<String>['screenshot', '--type=rasterizer', '--vm-service-url=http://localhost:8181']),
+ .run(<String>['screenshot', '--type=rasterizer', '--observatory-url=http://localhost:8181']),
throwsA(isException.having((Exception exception) => exception.toString(), 'message', contains('dummy'))),
);
});
- testUsingContext('rasterizer and skia screenshots require VM Service uri', () async {
+ testUsingContext('rasterizer and skia screenshots require observatory uri', () async {
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
.run(<String>['screenshot', '--type=skia']),
- throwsToolExit(message: 'VM Service URI must be specified for screenshot type skia')
+ throwsToolExit(message: 'Observatory URI must be specified for screenshot type skia')
);
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
.run(<String>['screenshot', '--type=rasterizer',]),
- throwsToolExit(message: 'VM Service URI must be specified for screenshot type rasterizer'),
+ throwsToolExit(message: 'Observatory URI must be specified for screenshot type rasterizer'),
);
});
@@ -58,10 +58,10 @@
);
});
- testUsingContext('device screenshots cannot provided VM Service', () async {
+ testUsingContext('device screenshots cannot provided Observatory', () async {
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
- .run(<String>['screenshot', '--vm-service-url=http://localhost:8181']),
- throwsToolExit(message: 'VM Service URI cannot be provided for screenshot type device'),
+ .run(<String>['screenshot', '--observatory-url=http://localhost:8181']),
+ throwsToolExit(message: 'Observatory URI cannot be provided for screenshot type device'),
);
});
});
diff --git a/packages/flutter_tools/test/commands.shard/hermetic/test_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/test_test.dart
index ed189de..e783add 100644
--- a/packages/flutter_tools/test/commands.shard/hermetic/test_test.dart
+++ b/packages/flutter_tools/test/commands.shard/hermetic/test_test.dart
@@ -298,7 +298,7 @@
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
});
- testUsingContext('Pipes enable-vmService', () async {
+ testUsingContext('Pipes enable-observatory', () async {
final FakeFlutterTestRunner testRunner = FakeFlutterTestRunner(0);
final TestCommand testCommand = TestCommand(testRunner: testRunner);
@@ -313,7 +313,7 @@
'test/fake_test.dart',
]);
expect(
- testRunner.lastEnableVmServiceValue,
+ testRunner.lastEnableObservatoryValue,
true,
);
@@ -326,7 +326,7 @@
'test/fake_test.dart',
]);
expect(
- testRunner.lastEnableVmServiceValue,
+ testRunner.lastEnableObservatoryValue,
true,
);
@@ -337,7 +337,7 @@
'test/fake_test.dart',
]);
expect(
- testRunner.lastEnableVmServiceValue,
+ testRunner.lastEnableObservatoryValue,
false,
);
}, overrides: <Type, Generator>{
@@ -848,7 +848,7 @@
int exitCode;
Duration? leastRunTime;
- bool? lastEnableVmServiceValue;
+ bool? lastEnableObservatoryValue;
late DebuggingOptions lastDebuggingOptionsValue;
String? lastFileReporterValue;
String? lastReporterOption;
@@ -862,7 +862,7 @@
List<String> plainNames = const <String>[],
String? tags,
String? excludeTags,
- bool enableVmService = false,
+ bool enableObservatory = false,
bool ipv6 = false,
bool machine = false,
String? precompiledDillPath,
@@ -886,7 +886,7 @@
String? integrationTestUserIdentifier,
TestTimeRecorder? testTimeRecorder,
}) async {
- lastEnableVmServiceValue = enableVmService;
+ lastEnableObservatoryValue = enableObservatory;
lastDebuggingOptionsValue = debuggingOptions;
lastFileReporterValue = fileReporter;
lastReporterOption = reporter;
diff --git a/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart b/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart
index ac67828..1ed77e1 100644
--- a/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart
+++ b/packages/flutter_tools/test/general.shard/android/android_device_start_test.dart
@@ -285,7 +285,7 @@
userIdentifier: '10',
);
- // This fails to start due to VM Service discovery issues.
+ // This fails to start due to observatory discovery issues.
expect(launchResult.started, false);
expect(processManager, hasNoRemainingExpectations);
});
diff --git a/packages/flutter_tools/test/general.shard/cold_test.dart b/packages/flutter_tools/test/general.shard/cold_test.dart
index 8688166..84f3c4f 100644
--- a/packages/flutter_tools/test/general.shard/cold_test.dart
+++ b/packages/flutter_tools/test/general.shard/cold_test.dart
@@ -141,7 +141,7 @@
FakeFlutterDevice(this.device);
@override
- Stream<Uri> get vmServiceUris => const Stream<Uri>.empty();
+ Stream<Uri> get observatoryUris => const Stream<Uri>.empty();
@override
final Device device;
diff --git a/packages/flutter_tools/test/general.shard/coverage_collector_test.dart b/packages/flutter_tools/test/general.shard/coverage_collector_test.dart
index be5792e..aa41240 100644
--- a/packages/flutter_tools/test/general.shard/coverage_collector_test.dart
+++ b/packages/flutter_tools/test/general.shard/coverage_collector_test.dart
@@ -647,7 +647,7 @@
Future<void> kill() => Future<void>.value();
@override
- Future<Uri?> get vmServiceUri => Future<Uri?>.value(Uri());
+ Future<Uri?> get observatoryUri => Future<Uri?>.value(Uri());
@override
Future<StreamChannel<String>> start(String entrypointPath) {
diff --git a/packages/flutter_tools/test/general.shard/custom_devices/custom_device_test.dart b/packages/flutter_tools/test/general.shard/custom_devices/custom_device_test.dart
index 7a56f6c..56e70f2 100644
--- a/packages/flutter_tools/test/general.shard/custom_devices/custom_device_test.dart
+++ b/packages/flutter_tools/test/general.shard/custom_devices/custom_device_test.dart
@@ -359,7 +359,7 @@
expect(forwardPortCommandCompleter.isCompleted, true);
});
- testWithoutContext('CustomDevice forwards VM Service port correctly when port forwarding is configured', () async {
+ testWithoutContext('CustomDevice forwards observatory port correctly when port forwarding is configured', () async {
final Completer<void> runDebugCompleter = Completer<void>();
final Completer<void> forwardPortCompleter = Completer<void>();
@@ -391,7 +391,7 @@
final LaunchResult launchResult = await appSession.start(debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug));
expect(launchResult.started, true);
- expect(launchResult.vmServiceUri, Uri.parse('http://127.0.0.1:12345/abcd/'));
+ expect(launchResult.observatoryUri, Uri.parse('http://127.0.0.1:12345/abcd/'));
expect(runDebugCompleter.isCompleted, false);
expect(forwardPortCompleter.isCompleted, false);
@@ -400,7 +400,7 @@
expect(forwardPortCompleter.isCompleted, true);
});
- testWithoutContext('CustomDeviceAppSession forwards VM Service port correctly when port forwarding is not configured', () async {
+ testWithoutContext('CustomDeviceAppSession forwards observatory port correctly when port forwarding is not configured', () async {
final Completer<void> runDebugCompleter = Completer<void>();
final FakeProcessManager processManager = FakeProcessManager.list(
@@ -428,7 +428,7 @@
final LaunchResult launchResult = await appSession.start(debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug));
expect(launchResult.started, true);
- expect(launchResult.vmServiceUri, Uri.parse('http://192.168.178.123:12345/abcd/'));
+ expect(launchResult.observatoryUri, Uri.parse('http://192.168.178.123:12345/abcd/'));
expect(runDebugCompleter.isCompleted, false);
expect(await appSession.stop(), true);
@@ -501,8 +501,8 @@
bundleBuilder: FakeBundleBuilder()
);
expect(result.started, true);
- expect(result.hasVmService, true);
- expect(result.vmServiceUri, Uri.tryParse('http://127.0.0.1:12345/abcd/'));
+ expect(result.hasObservatory, true);
+ expect(result.observatoryUri, Uri.tryParse('http://127.0.0.1:12345/abcd/'));
expect(runDebugCompleter.isCompleted, false);
expect(forwardPortCompleter.isCompleted, false);
diff --git a/packages/flutter_tools/test/general.shard/desktop_device_test.dart b/packages/flutter_tools/test/general.shard/desktop_device_test.dart
index 582e50e..937f0c7 100644
--- a/packages/flutter_tools/test/general.shard/desktop_device_test.dart
+++ b/packages/flutter_tools/test/general.shard/desktop_device_test.dart
@@ -96,7 +96,7 @@
);
expect(result.started, true);
- expect(result.vmServiceUri, Uri.parse('http://127.0.0.1/0'));
+ expect(result.observatoryUri, Uri.parse('http://127.0.0.1/0'));
});
testWithoutContext('Null executable path fails gracefully', () async {
diff --git a/packages/flutter_tools/test/general.shard/device_test.dart b/packages/flutter_tools/test/general.shard/device_test.dart
index 6b4e1bc..d97a6a2 100644
--- a/packages/flutter_tools/test/general.shard/device_test.dart
+++ b/packages/flutter_tools/test/general.shard/device_test.dart
@@ -509,7 +509,7 @@
<String>[
'--enable-dart-profiling',
'--disable-service-auth-codes',
- '--disable-vm-service-publication',
+ '--disable-observatory-publication',
'--start-paused',
'--dart-flags="--foo,--null_assertions"',
'--use-test-fonts',
@@ -529,7 +529,7 @@
'--route=/test',
'--trace-startup',
'--enable-impeller',
- '--vm-service-port=0',
+ '--observatory-port=0',
].join(' '),
);
});
@@ -573,7 +573,7 @@
'--enable-dart-profiling',
'--enable-checked-mode',
'--verify-entry-points',
- '--vm-service-host=0.0.0.0',
+ '--observatory-host=0.0.0.0',
].join(' '),
);
});
@@ -597,7 +597,7 @@
'--enable-dart-profiling',
'--enable-checked-mode',
'--verify-entry-points',
- '--vm-service-host=::0',
+ '--observatory-host=::0',
].join(' '),
);
});
@@ -669,7 +669,7 @@
<String>[
'--enable-dart-profiling',
'--disable-service-auth-codes',
- '--disable-vm-service-publication',
+ '--disable-observatory-publication',
'--start-paused',
'--dart-flags=--foo,--null_assertions',
'--use-test-fonts',
@@ -689,7 +689,7 @@
'--route=/test',
'--trace-startup',
'--enable-impeller',
- '--vm-service-port=1',
+ '--observatory-port=1',
].join(' '),
);
});
diff --git a/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart b/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart
index dc68e7d..e40e567 100644
--- a/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart
+++ b/packages/flutter_tools/test/general.shard/drive/drive_service_test.dart
@@ -114,7 +114,7 @@
]);
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService);
final Device device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
))..failOnce = true;
await expectLater(
@@ -139,7 +139,7 @@
]);
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService);
final Device device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
));
await driverService.start(BuildInfo.profile, device, DebuggingOptions.enabled(BuildInfo.profile), true);
@@ -170,7 +170,7 @@
final FakeDevtoolsLauncher launcher = FakeDevtoolsLauncher();
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService, devtoolsLauncher: launcher);
final Device device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
));
await driverService.start(BuildInfo.profile, device, DebuggingOptions.enabled(BuildInfo.profile), true);
@@ -202,7 +202,7 @@
]);
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService);
final Device device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
));
await driverService.start(BuildInfo.profile, device, DebuggingOptions.enabled(BuildInfo.profile), true);
@@ -232,7 +232,7 @@
]);
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService);
final Device device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
));
final FakeDartDevelopmentService dds = device.dds as FakeDartDevelopmentService;
@@ -258,7 +258,7 @@
final FakeProcessManager processManager = FakeProcessManager.empty();
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService);
final FakeDevice device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
));
await driverService.start(BuildInfo.profile, device, DebuggingOptions.enabled(BuildInfo.profile), true);
@@ -290,7 +290,7 @@
final FakeProcessManager processManager = FakeProcessManager.empty();
final DriverService driverService = setUpDriverService(processManager: processManager, vmService: fakeVmServiceHost.vmService);
final FakeDevice device = FakeDevice(LaunchResult.succeeded(
- vmServiceUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
+ observatoryUri: Uri.parse('http://127.0.0.1:63426/1UasC_ihpXY=/'),
));
await driverService.start(BuildInfo.profile, device, DebuggingOptions.enabled(BuildInfo.profile), true);
@@ -551,7 +551,7 @@
@override
Future<void> startDartDevelopmentService(
- Uri vmServiceUri, {
+ Uri observatoryUri, {
required Logger logger,
int? hostPort,
bool? ipv6,
diff --git a/packages/flutter_tools/test/general.shard/flutter_platform_test.dart b/packages/flutter_tools/test/general.shard/flutter_platform_test.dart
index 89510dc..68e457d 100644
--- a/packages/flutter_tools/test/general.shard/flutter_platform_test.dart
+++ b/packages/flutter_tools/test/general.shard/flutter_platform_test.dart
@@ -26,14 +26,14 @@
group('FlutterPlatform', () {
testUsingContext('ensureConfiguration throws an error if an '
- 'explicitVmServicePort is specified and more than one test file', () async {
+ 'explicitObservatoryPort is specified and more than one test file', () async {
final FlutterPlatform flutterPlatform = FlutterPlatform(
shellPath: '/',
debuggingOptions: DebuggingOptions.enabled(
BuildInfo.debug,
hostVmServicePort: 1234,
),
- enableVmService: false,
+ enableObservatory: false,
);
flutterPlatform.loadChannel('test1.dart', FakeSuitePlatform());
@@ -49,7 +49,7 @@
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
shellPath: '/',
precompiledDillPath: 'example.dill',
- enableVmService: false,
+ enableObservatory: false,
);
flutterPlatform.loadChannel('test1.dart', FakeSuitePlatform());
@@ -87,7 +87,7 @@
disableServiceAuthCodes: true,
hostVmServicePort: 200,
),
- enableVmService: true,
+ enableObservatory: true,
machine: true,
precompiledDillPath: 'def',
precompiledDillFiles: expectedPrecompiledDillFiles,
@@ -107,7 +107,7 @@
expect(flutterPlatform.debuggingOptions.startPaused, equals(true));
expect(flutterPlatform.debuggingOptions.disableServiceAuthCodes, equals(true));
expect(flutterPlatform.debuggingOptions.hostVmServicePort, equals(200));
- expect(flutterPlatform.enableVmService, equals(true));
+ expect(flutterPlatform.enableObservatory, equals(true));
expect(flutterPlatform.machine, equals(true));
expect(flutterPlatform.host, InternetAddress.loopbackIPv6);
expect(flutterPlatform.precompiledDillPath, equals('def'));
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 ac29e20..8edeafa 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
@@ -38,13 +38,13 @@
FlutterTesterTestDevice createDevice({
List<String> dartEntrypointArgs = const <String>[],
- bool enableVmService = false,
+ bool enableObservatory = false,
}) =>
TestFlutterTesterDevice(
platform: platform,
fileSystem: fileSystem,
processManager: processManager,
- enableVmService: enableVmService,
+ enableObservatory: enableObservatory,
dartEntrypointArgs: dartEntrypointArgs,
uriConverter: (String input) => '$input/converted',
);
@@ -63,7 +63,7 @@
FakeCommand flutterTestCommand(String expectedFlutterTestValue) {
return FakeCommand(command: const <String>[
'/',
- '--disable-vm-service',
+ '--disable-observatory',
'--ipv6',
'--enable-checked-mode',
'--verify-entry-points',
@@ -121,7 +121,7 @@
const FakeCommand(
command: <String>[
'/',
- '--disable-vm-service',
+ '--disable-observatory',
'--ipv6',
'--enable-checked-mode',
'--verify-entry-points',
@@ -156,7 +156,7 @@
const FakeCommand(
command: <String>[
'/',
- '--vm-service-port=0',
+ '--observatory-port=0',
'--ipv6',
'--enable-checked-mode',
'--verify-entry-points',
@@ -173,12 +173,12 @@
stderr: 'failure',
),
]);
- device = createDevice(enableVmService: true);
+ device = createDevice(enableObservatory: true);
});
- testUsingContext('skips setting VM Service port and uses the input port for DDS instead', () async {
+ testUsingContext('skips setting observatory port and uses the input port for DDS instead', () async {
await device.start('example.dill');
- await device.vmServiceUri;
+ await device.observatoryUri;
final Uri uri = await (device as TestFlutterTesterDevice).ddsServiceUriFuture();
expect(uri.port, 1234);
@@ -186,7 +186,7 @@
testUsingContext('sets up UriConverter from context', () async {
await device.start('example.dill');
- await device.vmServiceUri;
+ await device.observatoryUri;
final FakeDartDevelopmentService dds = (device as TestFlutterTesterDevice).dds
as FakeDartDevelopmentService;
@@ -206,7 +206,7 @@
required super.platform,
required super.fileSystem,
required super.processManager,
- required super.enableVmService,
+ required super.enableObservatory,
required List<String> dartEntrypointArgs,
required UriConverter uriConverter,
}) : super(
diff --git a/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_start_test.dart b/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_start_test.dart
index eb1cb57..f7e23f7 100644
--- a/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_start_test.dart
+++ b/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_start_test.dart
@@ -152,7 +152,7 @@
final LaunchResult launchResult =
await setupAndStartApp(prebuilt: true, mode: BuildMode.release);
expect(launchResult.started, isFalse);
- expect(launchResult.hasVmService, isFalse);
+ expect(launchResult.hasObservatory, isFalse);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
@@ -167,7 +167,7 @@
final LaunchResult launchResult =
await setupAndStartApp(prebuilt: true, mode: BuildMode.release);
expect(launchResult.started, isTrue);
- expect(launchResult.hasVmService, isFalse);
+ expect(launchResult.hasObservatory, isFalse);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
@@ -194,7 +194,7 @@
final LaunchResult launchResult = await device.startApp(app,
prebuiltApplication: true, debuggingOptions: debuggingOptions);
expect(launchResult.started, isFalse);
- expect(launchResult.hasVmService, isFalse);
+ expect(launchResult.hasObservatory, isFalse);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
@@ -220,7 +220,7 @@
final LaunchResult launchResult = await device.startApp(app,
prebuiltApplication: true, debuggingOptions: debuggingOptions);
expect(launchResult.started, isTrue);
- expect(launchResult.hasVmService, isFalse);
+ expect(launchResult.hasObservatory, isFalse);
expect(await device.stopApp(app), isTrue);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
@@ -252,7 +252,7 @@
final LaunchResult launchResult =
await setupAndStartApp(prebuilt: true, mode: BuildMode.debug);
expect(launchResult.started, isTrue);
- expect(launchResult.hasVmService, isTrue);
+ expect(launchResult.hasObservatory, isTrue);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
@@ -413,7 +413,7 @@
final LaunchResult launchResult =
await setupAndStartApp(prebuilt: true, mode: BuildMode.release);
expect(launchResult.started, isFalse);
- expect(launchResult.hasVmService, isFalse);
+ expect(launchResult.hasObservatory, isFalse);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
@@ -429,7 +429,7 @@
final LaunchResult launchResult =
await setupAndStartApp(prebuilt: true, mode: BuildMode.release);
expect(launchResult.started, isFalse);
- expect(launchResult.hasVmService, isFalse);
+ expect(launchResult.hasObservatory, isFalse);
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
diff --git a/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart b/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart
index 641d4e0..d3d5114 100644
--- a/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart
+++ b/packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart
@@ -1035,7 +1035,7 @@
implements DartDevelopmentService {
@override
Future<void> startDartDevelopmentService(
- Uri vmServiceUri, {
+ Uri observatoryUri, {
required Logger logger,
int? hostPort,
bool? ipv6,
diff --git a/packages/flutter_tools/test/general.shard/integration_test_device_test.dart b/packages/flutter_tools/test/general.shard/integration_test_device_test.dart
index 804275e..6d2a90c 100644
--- a/packages/flutter_tools/test/general.shard/integration_test_device_test.dart
+++ b/packages/flutter_tools/test/general.shard/integration_test_device_test.dart
@@ -58,7 +58,7 @@
},
);
-final Uri vmServiceUri = Uri.parse('http://localhost:1234');
+final Uri observatoryUri = Uri.parse('http://localhost:1234');
void main() {
late FakeVmServiceHost fakeVmServiceHost;
@@ -71,7 +71,7 @@
'ephemeral',
'ephemeral',
type: PlatformType.android,
- launchResult: LaunchResult.succeeded(vmServiceUri: vmServiceUri),
+ launchResult: LaunchResult.succeeded(observatoryUri: observatoryUri),
),
debuggingOptions: DebuggingOptions.enabled(
BuildInfo.debug,
@@ -126,7 +126,7 @@
testUsingContext('Can start the entrypoint', () async {
await testDevice.start('entrypointPath');
- expect(await testDevice.vmServiceUri, vmServiceUri);
+ expect(await testDevice.observatoryUri, observatoryUri);
expect(testDevice.finished, doesNotComplete);
}, overrides: <Type, Generator>{
ApplicationPackageFactory: () => FakeApplicationPackageFactory(),
@@ -161,7 +161,7 @@
}) async => fakeVmServiceHost.vmService,
});
- testUsingContext('when the device starts without providing an vmService URI', () async {
+ testUsingContext('when the device starts without providing an observatory URI', () async {
final TestDevice testDevice = IntegrationTestTestDevice(
id: 1,
device: FakeDevice(
diff --git a/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart b/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart
index 916c3e2..e26ef2b 100644
--- a/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart
+++ b/packages/flutter_tools/test/general.shard/ios/ios_device_start_prebuilt_test.dart
@@ -85,7 +85,7 @@
if (!isNetworkDevice) '--no-wifi',
'--args',
if (isNetworkDevice)
- '--enable-dart-profiling --enable-checked-mode --verify-entry-points --vm-service-host=0.0.0.0'
+ '--enable-dart-profiling --enable-checked-mode --verify-entry-points --observatory-host=0.0.0.0'
else
'--enable-dart-profiling --enable-checked-mode --verify-entry-points',
],
@@ -152,7 +152,7 @@
);
expect(launchResult.started, true);
- expect(launchResult.hasVmService, true);
+ expect(launchResult.hasObservatory, true);
expect(await device.stopApp(iosApp), false);
});
@@ -190,7 +190,7 @@
);
expect(launchResult.started, true);
- expect(launchResult.hasVmService, true);
+ expect(launchResult.hasObservatory, true);
expect(await device.stopApp(iosApp), false);
});
@@ -230,7 +230,7 @@
);
expect(launchResult.started, true);
- expect(launchResult.hasVmService, true);
+ expect(launchResult.hasObservatory, true);
expect(await device.stopApp(iosApp), false);
expect(logger.errorText, contains('The Dart VM Service was not discovered after 30 seconds. This is taking much longer than expected...'));
expect(utf8.decoder.convert(stdin.writes.first), contains('process interrupt'));
@@ -275,7 +275,7 @@
);
expect(launchResult.started, true);
- expect(launchResult.hasVmService, true);
+ expect(launchResult.hasObservatory, true);
expect(await device.stopApp(iosApp), false);
expect(logger.errorText, contains('The Dart VM Service was not discovered after 45 seconds. This is taking much longer than expected...'));
expect(logger.errorText, contains('Click "Allow" to the prompt asking if you would like to find and connect devices on your local network.'));
@@ -308,7 +308,7 @@
);
expect(launchResult.started, true);
- expect(launchResult.hasVmService, false);
+ expect(launchResult.hasObservatory, false);
expect(await device.stopApp(iosApp), false);
expect(processManager, hasNoRemainingExpectations);
});
@@ -335,7 +335,7 @@
<String>[
'--enable-dart-profiling',
'--disable-service-auth-codes',
- '--disable-vm-service-publication',
+ '--disable-observatory-publication',
'--start-paused',
'--dart-flags="--foo,--null_assertions"',
'--use-test-fonts',
diff --git a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart
index 3bd597e..367b784 100644
--- a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart
+++ b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart
@@ -1067,7 +1067,7 @@
'--purge-persistent-cache',
'--dart-flags=--baz,--null_assertions',
'--enable-impeller',
- '--vm-service-port=0',
+ '--observatory-port=0',
]));
}, overrides: <Type, Generator>{
PlistParser: () => testPlistParser,
diff --git a/packages/flutter_tools/test/general.shard/preview_device_test.dart b/packages/flutter_tools/test/general.shard/preview_device_test.dart
index fa94d86..f1f4426 100644
--- a/packages/flutter_tools/test/general.shard/preview_device_test.dart
+++ b/packages/flutter_tools/test/general.shard/preview_device_test.dart
@@ -78,7 +78,7 @@
);
expect(result.started, true);
- expect(result.vmServiceUri, Uri.parse('http://127.0.0.1:64494/fZ_B2N6JRwY=/'));
+ expect(result.observatoryUri, Uri.parse('http://127.0.0.1:64494/fZ_B2N6JRwY=/'));
});
}
diff --git a/packages/flutter_tools/test/general.shard/protocol_discovery_test.dart b/packages/flutter_tools/test/general.shard/protocol_discovery_test.dart
index 0bd89a3..cea1746 100644
--- a/packages/flutter_tools/test/general.shard/protocol_discovery_test.dart
+++ b/packages/flutter_tools/test/general.shard/protocol_discovery_test.dart
@@ -17,7 +17,7 @@
setUp(() {
logReader = FakeDeviceLogReader();
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
throttleDuration: const Duration(milliseconds: 5),
@@ -106,7 +106,7 @@
testWithoutContext('uri waits for correct log line', () async {
final Future<Uri?> uriFuture = discoverer.uri;
- logReader.addLine('VM Service not listening...');
+ logReader.addLine('Observatory not listening...');
final Uri timeoutUri = Uri.parse('http://timeout');
final Uri? actualUri = await uriFuture.timeout(
const Duration(milliseconds: 100),
@@ -139,7 +139,7 @@
});
testWithoutContext('skips uri if port does not match the requested vmservice - requested last', () async {
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
devicePort: 12346,
@@ -155,7 +155,7 @@
});
testWithoutContext('skips uri if port does not match the requested vmservice - requested first', () async {
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
devicePort: 12346,
@@ -179,7 +179,7 @@
});
testWithoutContext('first uri in the stream is the last one from the log that matches the port', () async {
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
devicePort: 12345,
@@ -195,7 +195,7 @@
});
testWithoutContext('protocol discovery does not crash if the log reader is closed while delaying', () async {
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
devicePort: 12346,
@@ -216,7 +216,7 @@
const Duration kThrottleDuration = Duration(milliseconds: 10);
FakeAsync().run((FakeAsync time) {
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
throttleDuration: kThrottleDuration,
@@ -250,7 +250,7 @@
const Duration kThrottleTimeInMilliseconds = Duration(milliseconds: 10);
FakeAsync().run((FakeAsync time) {
- discoverer = ProtocolDiscovery.vmService(
+ discoverer = ProtocolDiscovery.observatory(
logReader,
ipv6: false,
devicePort: 12345,
@@ -285,7 +285,7 @@
group('port forwarding', () {
testWithoutContext('default port', () async {
final FakeDeviceLogReader logReader = FakeDeviceLogReader();
- final ProtocolDiscovery discoverer = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery discoverer = ProtocolDiscovery.observatory(
logReader,
portForwarder: MockPortForwarder(99),
ipv6: false,
@@ -305,7 +305,7 @@
testWithoutContext('specified port', () async {
final FakeDeviceLogReader logReader = FakeDeviceLogReader();
- final ProtocolDiscovery discoverer = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery discoverer = ProtocolDiscovery.observatory(
logReader,
portForwarder: MockPortForwarder(99),
hostPort: 1243,
@@ -326,7 +326,7 @@
testWithoutContext('specified port zero', () async {
final FakeDeviceLogReader logReader = FakeDeviceLogReader();
- final ProtocolDiscovery discoverer = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery discoverer = ProtocolDiscovery.observatory(
logReader,
portForwarder: MockPortForwarder(99),
hostPort: 0,
@@ -347,7 +347,7 @@
testWithoutContext('ipv6', () async {
final FakeDeviceLogReader logReader = FakeDeviceLogReader();
- final ProtocolDiscovery discoverer = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery discoverer = ProtocolDiscovery.observatory(
logReader,
portForwarder: MockPortForwarder(99),
hostPort: 54777,
@@ -368,7 +368,7 @@
testWithoutContext('ipv6 with Ascii Escape code', () async {
final FakeDeviceLogReader logReader = FakeDeviceLogReader();
- final ProtocolDiscovery discoverer = ProtocolDiscovery.vmService(
+ final ProtocolDiscovery discoverer = ProtocolDiscovery.observatory(
logReader,
portForwarder: MockPortForwarder(99),
hostPort: 54777,
diff --git a/packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart b/packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart
index 8c36d4e..171030c 100644
--- a/packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart
+++ b/packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart
@@ -421,7 +421,7 @@
expect(handler.launchedInBrowser, isTrue);
});
- testWithoutContext('Converts a VM Service URI with a query parameter to a pretty display string', () {
+ testWithoutContext('Converts a VmService URI with a query parameter to a pretty display string', () {
const String value = 'http://127.0.0.1:9100?uri=http%3A%2F%2F127.0.0.1%3A57922%2F_MXpzytpH20%3D%2F';
final Uri uri = Uri.parse(value);
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 aab4d50..636e752 100644
--- a/packages/flutter_tools/test/general.shard/resident_runner_test.dart
+++ b/packages/flutter_tools/test/general.shard/resident_runner_test.dart
@@ -1492,7 +1492,7 @@
commandHelp.c,
commandHelp.q,
'',
- 'A Dart VM Service on FakeDevice is available at: null',
+ 'An Observatory debugger and profiler on FakeDevice is available at: null',
'',
].join('\n')
));
@@ -1521,7 +1521,7 @@
commandHelp.c,
commandHelp.q,
'',
- 'A Dart VM Service on FakeDevice is available at: null',
+ 'An Observatory debugger and profiler on FakeDevice is available at: null',
'',
].join('\n')
));
@@ -2123,7 +2123,7 @@
};
final TestFlutterDevice flutterDevice = TestFlutterDevice(
device,
- vmServiceUris: Stream<Uri>.value(testUri),
+ observatoryUris: Stream<Uri>.value(testUri),
);
bool caught = false;
final Completer<void>done = Completer<void>();
@@ -2166,7 +2166,7 @@
};
final TestFlutterDevice flutterDevice = TestFlutterDevice(
device,
- vmServiceUris: Stream<Uri>.value(testUri),
+ observatoryUris: Stream<Uri>.value(testUri),
);
final Completer<void> done = Completer<void>();
await runZonedGuarded(
@@ -2199,7 +2199,7 @@
};
final TestFlutterDevice flutterDevice = TestFlutterDevice(
device,
- vmServiceUris: Stream<Uri>.value(testUri),
+ observatoryUris: Stream<Uri>.value(testUri),
);
final Completer<void>done = Completer<void>();
await runZonedGuarded(
@@ -2238,7 +2238,7 @@
};
final TestFlutterDevice flutterDevice = TestFlutterDevice(
device,
- vmServiceUris: Stream<Uri>.value(testUri),
+ observatoryUris: Stream<Uri>.value(testUri),
);
await flutterDevice.connect(allowExistingDdsInstance: true, ipv6: true, disableServiceAuthCodes: true);
await done.future;
@@ -2279,7 +2279,7 @@
};
final TestFlutterDevice flutterDevice = TestFlutterDevice(
device,
- vmServiceUris: Stream<Uri>.value(testUri),
+ observatoryUris: Stream<Uri>.value(testUri),
);
await flutterDevice.connect(allowExistingDdsInstance: true, ipv6: true, disableServiceAuthCodes: true);
await done.future;
@@ -2319,7 +2319,7 @@
};
final TestFlutterDevice flutterDevice = TestFlutterDevice(
device,
- vmServiceUris: Stream<Uri>.value(testUri),
+ observatoryUris: Stream<Uri>.value(testUri),
);
bool caught = false;
final Completer<void>done = Completer<void>();
@@ -2487,13 +2487,13 @@
}
class TestFlutterDevice extends FlutterDevice {
- TestFlutterDevice(super.device, { Stream<Uri>? vmServiceUris })
- : _vmServiceUris = vmServiceUris, super(buildInfo: BuildInfo.debug, developmentShaderCompiler: const FakeShaderCompiler());
+ TestFlutterDevice(super.device, { Stream<Uri>? observatoryUris })
+ : _observatoryUris = observatoryUris, super(buildInfo: BuildInfo.debug, developmentShaderCompiler: const FakeShaderCompiler());
- final Stream<Uri>? _vmServiceUris;
+ final Stream<Uri>? _observatoryUris;
@override
- Stream<Uri> get vmServiceUris => _vmServiceUris!;
+ Stream<Uri> get observatoryUris => _observatoryUris!;
}
class ThrowingForwardingFileSystem extends ForwardingFileSystem {
@@ -2530,7 +2530,7 @@
TargetPlatform get targetPlatform => TargetPlatform.android;
@override
- Stream<Uri?> get vmServiceUris => Stream<Uri?>.value(testUri);
+ Stream<Uri?> get observatoryUris => Stream<Uri?>.value(testUri);
@override
FlutterVmService? get vmService => vmServiceHost?.call()?.vmService;
diff --git a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
index d00bbba..4d38c6e 100644
--- a/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
+++ b/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
@@ -1597,7 +1597,7 @@
ResidentCompiler? generator;
@override
- Stream<Uri?> get vmServiceUris => Stream<Uri?>.value(testUri);
+ Stream<Uri?> get observatoryUris => Stream<Uri?>.value(testUri);
@override
DevelopmentShaderCompiler get developmentShaderCompiler => const FakeShaderCompiler();
diff --git a/packages/flutter_tools/test/general.shard/test/event_printer_test.dart b/packages/flutter_tools/test/general.shard/test/event_printer_test.dart
index 7cb7d28..5d1117f 100644
--- a/packages/flutter_tools/test/general.shard/test/event_printer_test.dart
+++ b/packages/flutter_tools/test/general.shard/test/event_printer_test.dart
@@ -10,7 +10,7 @@
void main() {
group(EventPrinter, () {
- final Uri vmServiceUri = Uri.parse('http://localhost:1234');
+ final Uri observatoryUri = Uri.parse('http://localhost:1234');
late EventPrinter eventPrinter;
late StringBuffer output;
@@ -23,30 +23,30 @@
final FakeDevice device = FakeDevice();
expect(() => eventPrinter.handleFinishedTest(device), returnsNormally);
- expect(() => eventPrinter.handleStartedDevice(vmServiceUri), returnsNormally);
+ expect(() => eventPrinter.handleStartedDevice(observatoryUri), returnsNormally);
expect(() => eventPrinter.handleTestCrashed(device), returnsNormally);
expect(() => eventPrinter.handleTestTimedOut(device), returnsNormally);
});
group('handleStartedDevice', () {
- testWithoutContext('with non-null VM Service', () {
- eventPrinter.handleStartedDevice(vmServiceUri);
+ testWithoutContext('with non-null observatory', () {
+ eventPrinter.handleStartedDevice(observatoryUri);
expect(
output.toString(),
'\n'
- '[{"event":"test.startedProcess","params":{"vmServiceUri":"http://localhost:1234"}}]'
+ '[{"event":"test.startedProcess","params":{"observatoryUri":"http://localhost:1234"}}]'
'\n',
);
});
- testWithoutContext('with null VM Service', () {
+ testWithoutContext('with null observatory', () {
eventPrinter.handleStartedDevice(null);
expect(
output.toString(),
'\n'
- '[{"event":"test.startedProcess","params":{"vmServiceUri":null}}]'
+ '[{"event":"test.startedProcess","params":{"observatoryUri":null}}]'
'\n',
);
});
diff --git a/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart b/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart
index c284f76..27751bb 100644
--- a/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart
+++ b/packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart
@@ -140,7 +140,7 @@
testUsingContext('performs a build and starts in debug mode', () async {
final FlutterTesterApp app = FlutterTesterApp.fromCurrentDirectory(fileSystem);
- final Uri vmServiceUri = Uri.parse('http://127.0.0.1:6666/');
+ final Uri observatoryUri = Uri.parse('http://127.0.0.1:6666/');
final Completer<void> completer = Completer<void>();
fakeProcessManager.addCommand(FakeCommand(
command: const <String>[
@@ -155,7 +155,7 @@
completer: completer,
stdout:
'''
-The Dart VM service is listening on $vmServiceUri
+The Dart VM service is listening on $observatoryUri
Hello!
''',
));
@@ -166,14 +166,14 @@
);
expect(result.started, isTrue);
- expect(result.vmServiceUri, vmServiceUri);
+ expect(result.observatoryUri, observatoryUri);
expect(logLines.last, 'Hello!');
expect(fakeProcessManager, hasNoRemainingExpectations);
}, overrides: startOverrides);
testUsingContext('performs a build and starts in debug mode with track-widget-creation', () async {
final FlutterTesterApp app = FlutterTesterApp.fromCurrentDirectory(fileSystem);
- final Uri vmServiceUri = Uri.parse('http://127.0.0.1:6666/');
+ final Uri observatoryUri = Uri.parse('http://127.0.0.1:6666/');
final Completer<void> completer = Completer<void>();
fakeProcessManager.addCommand(FakeCommand(
command: const <String>[
@@ -188,7 +188,7 @@
completer: completer,
stdout:
'''
-The Dart VM service is listening on $vmServiceUri
+The Dart VM service is listening on $observatoryUri
Hello!
''',
));
@@ -199,7 +199,7 @@
);
expect(result.started, isTrue);
- expect(result.vmServiceUri, vmServiceUri);
+ expect(result.observatoryUri, observatoryUri);
expect(logLines.last, 'Hello!');
expect(fakeProcessManager, hasNoRemainingExpectations);
}, overrides: startOverrides);
diff --git a/packages/flutter_tools/test/general.shard/vmservice_test.dart b/packages/flutter_tools/test/general.shard/vmservice_test.dart
index c5238a3..837706b 100644
--- a/packages/flutter_tools/test/general.shard/vmservice_test.dart
+++ b/packages/flutter_tools/test/general.shard/vmservice_test.dart
@@ -59,7 +59,7 @@
);
void main() {
- testWithoutContext('VM Service registers reloadSources', () async {
+ testWithoutContext('VmService registers reloadSources', () async {
Future<void> reloadSources(String isolateId, { bool? pause, bool? force}) async {}
final MockVMService mockVMService = MockVMService();
@@ -76,7 +76,7 @@
expect(mockVMService.services, containsPair('reloadSources', 'Flutter Tools'));
});
- testWithoutContext('VM Service registers flutterMemoryInfo service', () async {
+ testWithoutContext('VmService registers flutterMemoryInfo service', () async {
final FakeDevice mockDevice = FakeDevice();
final MockVMService mockVMService = MockVMService();
@@ -93,7 +93,7 @@
expect(mockVMService.services, containsPair('flutterMemoryInfo', 'Flutter Tools'));
});
- testWithoutContext('VM Service registers flutterGetSkSL service', () async {
+ testWithoutContext('VmService registers flutterGetSkSL service', () async {
final MockVMService mockVMService = MockVMService();
await setUpVmService(
null,
@@ -108,7 +108,7 @@
expect(mockVMService.services, containsPair('flutterGetSkSL', 'Flutter Tools'));
});
- testWithoutContext('VM Service throws tool exit on service registration failure.', () async {
+ testWithoutContext('VmService throws tool exit on service registration failure.', () async {
final MockVMService mockVMService = MockVMService()
..errorOnRegisterService = true;
@@ -123,7 +123,7 @@
), throwsToolExit());
});
- testWithoutContext('VM Service throws tool exit on service registration failure with awaited future.', () async {
+ testWithoutContext('VmService throws tool exit on service registration failure with awaited future.', () async {
final MockVMService mockVMService = MockVMService()
..errorOnRegisterService = true;
@@ -138,7 +138,7 @@
), throwsToolExit());
});
- testWithoutContext('VM Service registers flutterPrintStructuredErrorLogMethod', () async {
+ testWithoutContext('VmService registers flutterPrintStructuredErrorLogMethod', () async {
final MockVMService mockVMService = MockVMService();
await setUpVmService(
null,
@@ -152,7 +152,7 @@
expect(mockVMService.listenedStreams, contains(vm_service.EventStreams.kExtension));
});
- testWithoutContext('VM Service returns correct FlutterVersion', () async {
+ testWithoutContext('VMService returns correct FlutterVersion', () async {
final MockVMService mockVMService = MockVMService();
await setUpVmService(
null,
@@ -167,7 +167,7 @@
expect(mockVMService.services, containsPair('flutterVersion', 'Flutter Tools'));
});
- testUsingContext('VM Service prints messages for connection failures', () {
+ testUsingContext('VMService prints messages for connection failures', () {
final BufferLogger logger = BufferLogger.test();
FakeAsync().run((FakeAsync time) {
final Uri uri = Uri.parse('ws://127.0.0.1:12345/QqL7EFEDNG0=/ws');
diff --git a/packages/flutter_tools/test/general.shard/web/golden_comparator_test.dart b/packages/flutter_tools/test/general.shard/web/golden_comparator_test.dart
index 7f3570e..32ad2c2 100644
--- a/packages/flutter_tools/test/general.shard/web/golden_comparator_test.dart
+++ b/packages/flutter_tools/test/general.shard/web/golden_comparator_test.dart
@@ -40,7 +40,7 @@
processManager.addCommand(FakeCommand(
command: const <String>[
'shell',
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=.dart_tool/package_config.json',
'compiler_output',
@@ -74,7 +74,7 @@
processManager.addCommand(FakeCommand(
command: const <String>[
'shell',
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=.dart_tool/package_config.json',
'compiler_output',
@@ -107,7 +107,7 @@
processManager.addCommand(FakeCommand(
command: const <String>[
'shell',
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=.dart_tool/package_config.json',
'compiler_output',
@@ -143,7 +143,7 @@
processManager.addCommand(FakeCommand(
command: const <String>[
'shell',
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=.dart_tool/package_config.json',
'compiler_output',
@@ -152,7 +152,7 @@
processManager.addCommand(FakeCommand(
command: const <String>[
'shell',
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=.dart_tool/package_config.json',
'compiler_output',
@@ -186,7 +186,7 @@
processManager.addCommand(FakeCommand(
command: const <String>[
'shell',
- '--disable-vm-service',
+ '--disable-observatory',
'--non-interactive',
'--packages=.dart_tool/package_config.json',
'compiler_output',
diff --git a/packages/flutter_tools/test/general.shard/xcode_backend_test.dart b/packages/flutter_tools/test/general.shard/xcode_backend_test.dart
index fe7bb29..626db26 100644
--- a/packages/flutter_tools/test/general.shard/xcode_backend_test.dart
+++ b/packages/flutter_tools/test/general.shard/xcode_backend_test.dart
@@ -195,12 +195,12 @@
});
});
- group('test_vm_service_bonjour_service', () {
+ group('test_observatory_bonjour_service', () {
test('handles when the Info.plist is missing', () {
final Directory buildDir = fileSystem.directory('/path/to/builds');
buildDir.createSync(recursive: true);
final TestContext context = TestContext(
- <String>['test_vm_service_bonjour_service'],
+ <String>['test_observatory_bonjour_service'],
<String, String>{
'CONFIGURATION': 'Debug',
'BUILT_PRODUCTS_DIR': buildDir.path,
@@ -212,7 +212,7 @@
expect(
context.stdout,
contains(
- 'Info.plist does not exist. Skipping _dartVmService._tcp NSBonjourServices insertion.'),
+ 'Info.plist does not exist. Skipping _dartobservatory._tcp NSBonjourServices insertion.'),
);
});
});
diff --git a/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart b/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart
index fd2a7f7..6b0081f 100644
--- a/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart
+++ b/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart
@@ -157,7 +157,7 @@
expect(_containsBitcode(outputFlutterFrameworkBinary.path, processManager), isFalse);
});
- testWithoutContext('Info.plist dart VM Service Bonjour service', () {
+ testWithoutContext('Info.plist dart observatory Bonjour service', () {
final String infoPlistPath = fileSystem.path.join(
outputApp.path,
'Info.plist',
@@ -173,7 +173,7 @@
infoPlistPath,
],
);
- final bool bonjourServicesFound = (bonjourServices.stdout as String).contains('_dartVmService._tcp');
+ final bool bonjourServicesFound = (bonjourServices.stdout as String).contains('_dartobservatory._tcp');
expect(bonjourServicesFound, buildMode == BuildMode.debug);
final ProcessResult localNetworkUsage = processManager.runSync(
diff --git a/packages/flutter_tools/test/integration.shard/flutter_run_with_error_test.dart b/packages/flutter_tools/test/integration.shard/flutter_run_with_error_test.dart
index 4088ce9..19b3bca 100644
--- a/packages/flutter_tools/test/integration.shard/flutter_run_with_error_test.dart
+++ b/packages/flutter_tools/test/integration.shard/flutter_run_with_error_test.dart
@@ -52,7 +52,7 @@
transformToLines(process.stdout).listen((String line) async {
stdout.writeln(line);
- if (line.startsWith('A Dart VM Service on')) {
+ if (line.startsWith('An Observatory debugger')) {
final RegExp exp = RegExp(r'http://127.0.0.1:(\d+)/');
final RegExpMatch match = exp.firstMatch(line)!;
final String port = match.group(1)!;
diff --git a/packages/flutter_tools/test/integration.shard/observatory_port_test.dart b/packages/flutter_tools/test/integration.shard/observatory_port_test.dart
index 453ce8c..e1d4241 100644
--- a/packages/flutter_tools/test/integration.shard/observatory_port_test.dart
+++ b/packages/flutter_tools/test/integration.shard/observatory_port_test.dart
@@ -20,13 +20,13 @@
return port;
}
-Future<void> waitForVmServiceMessage(Process process, int port) async {
+Future<void> waitForObservatoryMessage(Process process, int port) async {
final Completer<void> completer = Completer<void>();
process.stdout
.transform(utf8.decoder)
.listen((String line) {
printOnFailure(line);
- if (line.contains('A Dart VM Service on Flutter test device is available at')) {
+ if (line.contains('An Observatory debugger and profiler on Flutter test device is available at')) {
if (line.contains('http://127.0.0.1:$port')) {
completer.complete();
} else {
@@ -53,43 +53,43 @@
tryToDelete(tempDir);
});
- testWithoutContext('flutter run --vm-service-port', () async {
+ testWithoutContext('flutter run --observatory-port', () async {
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final int port = await getFreePort();
- // If only --vm-service-port is provided, --vm-service-port will be used by DDS
+ // If only --observatory-port is provided, --observatory-port will be used by DDS
// and the VM service will bind to a random port.
final Process process = await processManager.start(<String>[
flutterBin,
'run',
'--show-test-device',
- '--vm-service-port=$port',
+ '--observatory-port=$port',
'-d',
'flutter-tester',
], workingDirectory: tempDir.path);
- await waitForVmServiceMessage(process, port);
+ await waitForObservatoryMessage(process, port);
process.kill();
await process.exitCode;
});
- testWithoutContext('flutter run --dds-port --vm-service-port', () async {
+ testWithoutContext('flutter run --dds-port --observatory-port', () async {
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
- final int vmServicePort = await getFreePort();
+ final int observatoryPort = await getFreePort();
int ddsPort = await getFreePort();
- while(ddsPort == vmServicePort) {
+ while(ddsPort == observatoryPort) {
ddsPort = await getFreePort();
}
- // If both --dds-port and --vm-service-port are provided, --dds-port will be used by
- // DDS and --vm-service-port will be used by the VM service.
+ // If both --dds-port and --observatory-port are provided, --dds-port will be used by
+ // DDS and --observatory-port will be used by the VM service.
final Process process = await processManager.start(<String>[
flutterBin,
'run',
'--show-test-device',
- '--vm-service-port=$vmServicePort',
+ '--observatory-port=$observatoryPort',
'--dds-port=$ddsPort',
'-d',
'flutter-tester',
], workingDirectory: tempDir.path);
- await waitForVmServiceMessage(process, ddsPort);
+ await waitForObservatoryMessage(process, ddsPort);
process.kill();
await process.exitCode;
});
@@ -107,7 +107,7 @@
'-d',
'flutter-tester',
], workingDirectory: tempDir.path);
- await waitForVmServiceMessage(process, ddsPort);
+ await waitForObservatoryMessage(process, ddsPort);
process.kill();
await process.exitCode;
});
diff --git a/packages/flutter_tools/test/integration.shard/overall_experience_test.dart b/packages/flutter_tools/test/integration.shard/overall_experience_test.dart
index 3ee5ecd..cb7bd83 100644
--- a/packages/flutter_tools/test/integration.shard/overall_experience_test.dart
+++ b/packages/flutter_tools/test/integration.shard/overall_experience_test.dart
@@ -502,7 +502,7 @@
<String>['run', '-dflutter-tester', testScript],
testDirectory,
<Transition>[
- Barrier(RegExp(r'^A Dart VM Service on Flutter test device is available at: ')),
+ Barrier(RegExp(r'^An Observatory debugger and profiler on Flutter test device is available at: ')),
Barrier(RegExp(r'^The Flutter DevTools debugger and profiler on Flutter test device is available at: '), handler: (String line) {
return 'r';
}),
@@ -594,7 +594,7 @@
'c Clear the screen',
'q Quit (terminate the application on the device).',
'',
- startsWith('A Dart VM Service on Flutter test device is available at: http://'),
+ startsWith('An Observatory debugger and profiler on Flutter test device is available at: http://'),
startsWith('The Flutter DevTools debugger and profiler on Flutter test device is available at: http://'),
'',
'Flutter run key commands.',
@@ -621,7 +621,7 @@
'c Clear the screen',
'q Quit (terminate the application on the device).',
'',
- startsWith('A Dart VM Service on Flutter test device is available at: http://'),
+ startsWith('An Observatory debugger and profiler on Flutter test device is available at: http://'),
startsWith('The Flutter DevTools debugger and profiler on Flutter test device is available at: http://'),
'',
'Application finished.',
diff --git a/packages/flutter_tools/test/integration.shard/test_driver.dart b/packages/flutter_tools/test/integration.shard/test_driver.dart
index c7894d8..2a6a19f 100644
--- a/packages/flutter_tools/test/integration.shard/test_driver.dart
+++ b/packages/flutter_tools/test/integration.shard/test_driver.dart
@@ -812,7 +812,7 @@
if (withDebugger) {
final Map<String, Object?> startedProcessParams =
(await _waitFor(event: 'test.startedProcess', timeout: appStartTimeout))['params']! as Map<String, Object?>;
- final String vmServiceHttpString = startedProcessParams['vmServiceUri']! as String;
+ final String vmServiceHttpString = startedProcessParams['observatoryUri']! as String;
_vmServiceWsUri = Uri.parse(vmServiceHttpString).replace(scheme: 'ws', path: '/ws');
await connectToVmService(pauseOnExceptions: pauseOnExceptions);
// Allow us to run code before we start, eg. to set up breakpoints.
diff --git a/packages/flutter_tools/test/integration.shard/xcode_backend_test.dart b/packages/flutter_tools/test/integration.shard/xcode_backend_test.dart
index 36cfa61..01484aa 100644
--- a/packages/flutter_tools/test/integration.shard/xcode_backend_test.dart
+++ b/packages/flutter_tools/test/integration.shard/xcode_backend_test.dart
@@ -66,7 +66,7 @@
expect(result.exitCode, isNot(0));
}, skip: !io.Platform.isMacOS); // [intended] requires macos toolchain.
- group('vmService Bonjour service keys', () {
+ group('observatory Bonjour service keys', () {
late Directory buildDirectory;
late File infoPlist;
@@ -78,7 +78,7 @@
test('handles when the Info.plist is missing', () async {
final ProcessResult result = await Process.run(
xcodeBackendPath,
- <String>['test_vm_service_bonjour_service'],
+ <String>['test_observatory_bonjour_service'],
environment: <String, String>{
'CONFIGURATION': 'Debug',
'BUILT_PRODUCTS_DIR': buildDirectory.path,
@@ -102,7 +102,7 @@
final ProcessResult result = await Process.run(
xcodeBackendPath,
- <String>['test_vm_service_bonjour_service'],
+ <String>['test_observatory_bonjour_service'],
environment: <String, String>{
'CONFIGURATION': 'Release',
'BUILT_PRODUCTS_DIR': buildDirectory.path,
@@ -112,7 +112,7 @@
final String actualInfoPlist = infoPlist.readAsStringSync();
expect(actualInfoPlist, isNot(contains('NSBonjourServices')));
- expect(actualInfoPlist, isNot(contains('dartVmService')));
+ expect(actualInfoPlist, isNot(contains('dartobservatory')));
expect(actualInfoPlist, isNot(contains('NSLocalNetworkUsageDescription')));
expect(result.exitCode, 0);
@@ -124,7 +124,7 @@
final ProcessResult result = await Process.run(
xcodeBackendPath,
- <String>['test_vm_service_bonjour_service'],
+ <String>['test_observatory_bonjour_service'],
environment: <String, String>{
'CONFIGURATION': buildConfiguration,
'BUILT_PRODUCTS_DIR': buildDirectory.path,
@@ -134,7 +134,7 @@
final String actualInfoPlist = infoPlist.readAsStringSync();
expect(actualInfoPlist, contains('NSBonjourServices'));
- expect(actualInfoPlist, contains('dartVmService'));
+ expect(actualInfoPlist, contains('dartobservatory'));
expect(actualInfoPlist, contains('NSLocalNetworkUsageDescription'));
expect(result.exitCode, 0);
@@ -158,7 +158,7 @@
final ProcessResult result = await Process.run(
xcodeBackendPath,
- <String>['test_vm_service_bonjour_service'],
+ <String>['test_observatory_bonjour_service'],
environment: <String, String>{
'CONFIGURATION': 'Debug',
'BUILT_PRODUCTS_DIR': buildDirectory.path,
@@ -173,7 +173,7 @@
<dict>
<key>NSBonjourServices</key>
<array>
- <string>_dartVmService._tcp</string>
+ <string>_dartobservatory._tcp</string>
<string>_bogus._tcp</string>
</array>
<key>NSLocalNetworkUsageDescription</key>