Skip to content

Commit 9bb2fe5

Browse files
authored
Support latest null safe vm_service (#2617)
1 parent 160a5cc commit 9bb2fe5

File tree

10 files changed

+30
-26
lines changed

10 files changed

+30
-26
lines changed

packages/devtools/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.9.6+2
2+
* Support null safe `package:vm_service` version `>=6.x.x`.
3+
4+
## 0.9.6+1
5+
* Fallback to port 0 if we cannot connect the DevTools server to ports 9100-9109 #2600
6+
17
## 0.9.6
28
* Remove use of Flutter service worker [#2586](https://github.com/flutter/devtools/pull/2586)
39
* Badge performance tab when UI jank is detected and add a setting to enable/disable this functionality. [#2580](https://github.com/flutter/devtools/pull/2580)

packages/devtools/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ description: A suite of web-based performance tooling for Dart and Flutter.
88
# package remaining purely as a container for the compiled copy of the devtools
99
# app. That ensures that version constraints for the devtools_app do not impact
1010
# this package.
11-
version: 0.9.6
11+
version: 0.9.6+2
1212

1313
homepage: https://github.com/flutter/devtools
1414

1515
environment:
1616
sdk: '>=2.3.0 <3.0.0'
1717

1818
dependencies:
19-
devtools_server: 0.9.6
20-
devtools_shared: 0.9.6
19+
devtools_server: 0.9.6+2
20+
devtools_shared: 0.9.6+2
2121
http: ^0.12.0+1
2222

2323
dependency_overrides:

packages/devtools_app/lib/devtools.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
// that updates all versions for DevTools.
88
// Note: a regexp in tools/update_version.sh matches the following line so
99
// if you change it you must also modify tools/update_version.sh.
10-
const String version = '0.9.6';
10+
const String version = '0.9.6+2';

packages/devtools_app/lib/src/vm_service_wrapper.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ class VmServiceWrapper implements VmService {
9999
}
100100

101101
@override
102-
Future<Response> callMethod(String method, {String isolateId, Map args}) {
102+
Future<Response> callMethod(String method,
103+
{String isolateId, Map<String, dynamic> args}) {
103104
return trackFuture('callMethod $method',
104105
_vmService.callMethod(method, isolateId: isolateId, args: args));
105106
}
@@ -108,7 +109,7 @@ class VmServiceWrapper implements VmService {
108109
Future<Response> callServiceExtension(
109110
String method, {
110111
String isolateId,
111-
Map args,
112+
Map<String, dynamic> args,
112113
}) {
113114
return trackFuture(
114115
'callServiceExtension $method',
@@ -152,7 +153,7 @@ class VmServiceWrapper implements VmService {
152153
Future get onDone => _vmService.onDone;
153154

154155
@override
155-
void dispose() => _vmService.dispose();
156+
Future<void> dispose() => _vmService.dispose();
156157

157158
@override
158159
Future<Response> evaluate(
@@ -1037,7 +1038,7 @@ extension VmServicePrivate on VmServiceWrapper {
10371038
String method, {
10381039
@required T Function(Map<String, dynamic>) parser,
10391040
String isolateId,
1040-
Map args,
1041+
Map<String, dynamic> args,
10411042
}) async {
10421043
if (!enablePrivateRpcs) {
10431044
throw StateError('Attempted to invoke private RPC');

packages/devtools_app/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Web-based performance tooling for Dart and Flutter.
66
# When publishing new versions of this package be sure to publish a new version
77
# of package:devtools as well. package:devtools contains a compiled snapshot of
88
# this package.
9-
version: 0.9.6
9+
version: 0.9.6+2
1010

1111
homepage: https://github.com/flutter/devtools
1212

@@ -26,7 +26,7 @@ dependencies:
2626
ansicolor: 1.0.5
2727
async: ^2.0.0
2828
collection: ^1.15.0-nnbd
29-
devtools_shared: 0.9.6+1
29+
devtools_shared: 0.9.6+2
3030
file: ^5.1.0
3131
flutter:
3232
sdk: flutter
@@ -44,15 +44,15 @@ dependencies:
4444
string_scanner: ^1.1.0-nullsafety.3
4545
url_launcher: ^5.0.0
4646
url_launcher_web: ^0.1.1+6
47-
vm_service: ^5.4.0
47+
vm_service: '6.0.0-nullsafety.1'
4848
vm_snapshot_analysis: ^0.5.5
4949
web_socket_channel: ^1.1.0
5050

5151
dev_dependencies:
5252
build_runner: ^1.3.0
5353
devtools: #^0.1.7
5454
path: ../devtools
55-
devtools_testing: 0.9.6
55+
devtools_testing: 0.9.6+2
5656
flutter_test:
5757
sdk: flutter
5858
mockito: ^4.0.0

packages/devtools_app/test/support/cli_test_driver.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ class AppFixture {
5656
}
5757

5858
Future<void> teardown() async {
59-
serviceConnection.dispose();
60-
// Dispose is synchronous, so wait for it to finish closing before
61-
// terminating the process.
62-
await serviceConnection.onDone;
59+
await serviceConnection.dispose();
6360
process.kill();
6461
}
6562
}

packages/devtools_server/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: A server that supports Dart DevTools.
33

44
# Note: this version should only be updated by running tools/update_version.sh
55
# that updates all versions of packages from packages/devtools.
6-
version: 0.9.6
6+
version: 0.9.6+2
77

88
homepage: https://github.com/flutter/devtools
99

@@ -13,7 +13,7 @@ environment:
1313
dependencies:
1414
args: ^1.5.1
1515
browser_launcher: ^0.1.5
16-
devtools_shared: 0.9.6
16+
devtools_shared: 0.9.6+2
1717
intl: ^0.16.1
1818
meta: ^1.1.0
1919
path: ^1.6.0
@@ -23,7 +23,7 @@ dependencies:
2323
shelf_static: ^0.2.8
2424
http_multi_server: ^2.2.0
2525
usage: ^3.4.1
26-
vm_service: ^5.0.0+1
26+
vm_service: '>=5.0.0+1 < 7.0.0'
2727

2828
dependency_overrides:
2929
# The "#OVERRIDE_FOR_DEVELOPMENT" lines are stripped out when we publish.

packages/devtools_shared/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Package of shared structures between devtools_app and devtools_serv
33

44
# Note: this version should only be updated by running tools/update_version.sh
55
# that updates all versions of packages from packages/devtools.
6-
version: 0.9.6+1
6+
version: 0.9.6+2
77

88
homepage: https://github.com/flutter/devtools
99

packages/devtools_testing/lib/support/flutter_test_driver.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ class FlutterRunTestDriver extends FlutterTestDriver {
398398
Future<int> detach() async {
399399
if (vmService != null) {
400400
debugPrint('Closing VM service');
401-
vmService.dispose();
401+
await vmService.dispose();
402402
}
403403
if (_currentRunningAppId != null) {
404404
debugPrint('Detaching from app');
@@ -423,7 +423,7 @@ class FlutterRunTestDriver extends FlutterTestDriver {
423423
Future<int> stop() async {
424424
if (vmService != null) {
425425
debugPrint('Closing VM service');
426-
vmService.dispose();
426+
await vmService.dispose();
427427
}
428428
if (_currentRunningAppId != null) {
429429
debugPrint('Stopping app');

packages/devtools_testing/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: devtools_testing
22
description: Package of shared testing code for Dart DevTools.
33
# Note: this version should only be updated by running tools/update_version.sh
44
# that updates all versions of packages from packages/devtools.
5-
version: 0.9.6
5+
version: 0.9.6+2
66

77
homepage: https://github.com/flutter/devtools
88

99
environment:
1010
sdk: '>=2.3.0 <3.0.0'
1111

1212
dependencies:
13-
devtools_app: 0.9.6
14-
devtools_shared: 0.9.6
13+
devtools_app: 0.9.6+2
14+
devtools_shared: 0.9.6+2
1515
flutter:
1616
sdk: flutter
1717
flutter_test:
@@ -21,7 +21,7 @@ dependencies:
2121
package_resolver: ^1.0.0
2222
pedantic: ^1.7.0
2323
test: any # This version is pinned by Flutter so we don't need to set one explicitly.
24-
vm_service: ^5.0.0+1
24+
vm_service: '>=5.0.0+1 < 7.0.0'
2525

2626

2727
dev_dependencies:

0 commit comments

Comments
 (0)