Update flutter_tools to look for new VM service message (#97683)

* Update flutter_tools to look for new VM service message

The Dart SDK will soon move away from the current Observatory message:

"Observatory listening on ..."

To a new message that no longer references Observatory:

"Dart VM Service listening on ..."

This change updates all tests with mocks to check for the new message
and also adds support for the new message in ProtocolDiscovery.

See https://github.com/dart-lang/sdk/issues/46756

* Fix some parsing locations

* Fix analysis failures

* Update message

* Remove extra comment

* Update message

* Add globals prefix
This commit is contained in:
Ben Konyi
2022-02-15 07:33:57 -08:00
committed by GitHub
parent ee0bbf4789
commit 2a2f973120
18 changed files with 75 additions and 70 deletions

View File

@@ -190,7 +190,7 @@ Future<TaskResult> runTask(
.transform<String>(const LineSplitter())
.listen((String line) {
if (!uri.isCompleted) {
final Uri? serviceUri = parseServiceUri(line, prefix: 'Observatory listening on ');
final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('(Observatory|Dart VM Service) listening on '));
if (serviceUri != null)
uri.complete(serviceUri);
}