Skip to content

Commit b0a4059

Browse files
authored
Update method signature of lookupResolvedPackageUris (#1633)
1 parent 2c84bf1 commit b0a4059

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

dwds/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
- Update `package:vm_service` to 8.3.0.
88
- Convert JavaScript stack traces in uncaught exceptions to Dart stack traces.
99
- Fix failure to set breakpoints on windows with a base change in index.html.
10-
- Add the setIsolatePauseMode method to Chrome Proxy Service.
10+
- Add the `setIsolatePauseMode` method to Chrome Proxy Service.
1111
- Batch extension `Debugger.scriptParsed` events and send batches every 1000ms
1212
to the server.
1313
- Move `batched_stream.dart` into shared utilities.
14+
- Update the method signature for `lookupResolvedPackageUris`.
1415

1516
## 14.0.2
1617
- Update the min SDK constraint to 2.17.0.

dwds/lib/src/services/chrome_proxy_service.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,11 @@ ${globalLoadStrategy.loadModuleSnippet}("dart_sdk").developer.invokeExtension(
692692
return (await _debugger).pause();
693693
}
694694

695+
// Note: Ignore the optional local parameter, it is there to keep the method
696+
// signature consistent with the VM service interface.
695697
@override
696-
Future<UriList> lookupResolvedPackageUris(
697-
String isolateId, List<String> uris) async {
698+
Future<UriList> lookupResolvedPackageUris(String isolateId, List<String> uris,
699+
{bool local}) async {
698700
await isInitialized;
699701
return UriList(uris: uris.map(DartUri.toResolvedUri).toList());
700702
}

dwds/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
built_collection: ^5.1.1
1515
built_value: ^8.3.0
1616
crypto: ^3.0.2
17-
dds: ^2.2.0
17+
dds: ^2.2.5
1818
file: ^6.1.2
1919
http: ^0.13.4
2020
http_multi_server: ^3.2.0
@@ -33,7 +33,7 @@ dependencies:
3333
stack_trace: ^1.10.0
3434
sse: ^4.1.0
3535
uuid: ^3.0.6
36-
vm_service: ^8.3.0
36+
vm_service: ^9.0.0
3737
web_socket_channel: ^2.2.0
3838
webkit_inspection_protocol: ^1.0.1
3939

dwds/test/chrome_proxy_service_test.dart

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,39 @@ void main() {
14091409
]));
14101410
});
14111411

1412+
test('lookupPackageUris ignores local parameter', () async {
1413+
final vm = await service.getVM();
1414+
final isolateId = vm.isolates.first.id;
1415+
final scriptList = await service.getScripts(isolateId);
1416+
1417+
final uris = scriptList.scripts.map((e) => e.uri).toList();
1418+
final resolvedUrisWithLocal =
1419+
await service.lookupResolvedPackageUris(isolateId, uris, local: true);
1420+
1421+
final packageUrisWithLocal = await service.lookupPackageUris(
1422+
isolateId, resolvedUrisWithLocal.uris);
1423+
expect(
1424+
packageUrisWithLocal.uris,
1425+
containsAll([
1426+
'org-dartlang-app:///example/hello_world/main.dart',
1427+
'package:path/path.dart',
1428+
'package:path/src/path_set.dart',
1429+
]));
1430+
1431+
final resolvedUrisWithoutLocal =
1432+
await service.lookupResolvedPackageUris(isolateId, uris, local: true);
1433+
1434+
final packageUrisWithoutLocal = await service.lookupPackageUris(
1435+
isolateId, resolvedUrisWithoutLocal.uris);
1436+
expect(
1437+
packageUrisWithoutLocal.uris,
1438+
containsAll([
1439+
'org-dartlang-app:///example/hello_world/main.dart',
1440+
'package:path/path.dart',
1441+
'package:path/src/path_set.dart',
1442+
]));
1443+
});
1444+
14121445
test('lookupPackageUris does not translate non-existent paths', () async {
14131446
final vm = await service.getVM();
14141447
final isolateId = vm.isolates.first.id;

webdev/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ dev_dependencies:
4848
webdriver: ^3.0.0
4949

5050
# Comment out before releasing webdev.
51-
dependency_overrides:
52-
dwds:
53-
path: ../dwds
51+
# dependency_overrides:
52+
# dwds:
53+
# path: ../dwds
5454

5555
executables:
5656
webdev:

0 commit comments

Comments
 (0)