From 4bbcdf77cc9bc5a59443ce2d3dbeff58d20b1301 Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Mon, 7 Feb 2022 13:18:27 -0800 Subject: [PATCH 1/2] Change support for VM service message from "Dart VM Service listening" to "The Dart VM Service is listening" See https://github.com/dart-lang/sdk/issues/46756 --- lib/src/util.dart | 2 +- test/util_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/util.dart b/lib/src/util.dart index 506d89c3..592a8508 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -44,7 +44,7 @@ Future retry(Future Function() f, Duration interval, /// Potentially useful as a means to extract it from log statements. Uri? extractVMServiceUri(String str) { final listeningMessageRegExp = RegExp( - r'(?:Observatory|Dart VM Service) listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)', + r'(?:Observatory|The Dart VM Service is) listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)', ); final match = listeningMessageRegExp.firstMatch(str); if (match != null) { diff --git a/test/util_test.dart b/test/util_test.dart index 403a022a..b31120b4 100644 --- a/test/util_test.dart +++ b/test/util_test.dart @@ -130,7 +130,7 @@ void main() { }); test('handles new Dart VM service message format', () { - const msg = 'Dart VM Service listening on http://foo.bar:9999/cG90YXRv/'; + const msg = 'The Dart VM Service is listening on http://foo.bar:9999/cG90YXRv/'; expect( extractVMServiceUri(msg), Uri.parse('http://foo.bar:9999/cG90YXRv/')); }); From edada7787bed80757889af8ff1a248e1d9a53fb2 Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Mon, 7 Feb 2022 13:21:00 -0800 Subject: [PATCH 2/2] Formatting --- test/util_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/util_test.dart b/test/util_test.dart index b31120b4..a0077c79 100644 --- a/test/util_test.dart +++ b/test/util_test.dart @@ -130,7 +130,8 @@ void main() { }); test('handles new Dart VM service message format', () { - const msg = 'The Dart VM Service is listening on http://foo.bar:9999/cG90YXRv/'; + const msg = + 'The Dart VM Service is listening on http://foo.bar:9999/cG90YXRv/'; expect( extractVMServiceUri(msg), Uri.parse('http://foo.bar:9999/cG90YXRv/')); });