Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
- Update `package:vm_service` to 8.3.0.
- Convert JavaScript stack traces in uncaught exceptions to Dart stack traces.
- Fix failure to set breakpoints on windows with a base change in index.html.
- Add the setIsolatePauseMode method to Chrome Proxy Service.
- Add the `setIsolatePauseMode` method to Chrome Proxy Service.
- Batch extension `Debugger.scriptParsed` events and send batches every 1000ms
to the server.
- Move `batched_stream.dart` into shared utilities.
- Update the method signature for `lookupResolvedPackageUris`.

## 14.0.2
- Update the min SDK constraint to 2.17.0.
Expand Down
6 changes: 4 additions & 2 deletions dwds/lib/src/services/chrome_proxy_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,11 @@ ${globalLoadStrategy.loadModuleSnippet}("dart_sdk").developer.invokeExtension(
return (await _debugger).pause();
}

// Note: Ignore the optional local parameter, it is there to keep the method
// signature consistent with the VM service interface.
@override
Future<UriList> lookupResolvedPackageUris(
String isolateId, List<String> uris) async {
Future<UriList> lookupResolvedPackageUris(String isolateId, List<String> uris,
Copy link
Contributor

@annagrin annagrin Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to update vm_service version to match? We need to require at least the minimum version that contains this new API or webdev users can end up using older vm_service without the parameter...

Copy link
Contributor

@annagrin annagrin Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkonyi I found this PR in dart SDK introducing the change but it does not update the vm_service package version - am I right that we need to add a constraint to this PR to depend on that min version to prevent webdev users from pulling new dwds with old vm_service?

dart-lang/sdk@d6665ae#diff-60648d19c0fe66d08d01fb7a449378bb80241a95601fe86b3d34962586abb886

Copy link
Contributor

@annagrin annagrin Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkonyi if you would like to update the vm_service version later I think it is ok but we cannot publish dwds until that happens and we add the constraint. @elliette still can submit this PR I think, and both vm_service and dwds would be unpublished versions in g3 until then. I hope that I am not wrong:)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkonyi addition - I believe it should be a major version update for vm_service for this all to work out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this patched in g3 first and then I'll do a major release. Unfortunately, a lot of downstream dependencies need to be updated and released with new versions first.

{bool local}) async {
await isInitialized;
return UriList(uris: uris.map(DartUri.toResolvedUri).toList());
}
Expand Down
4 changes: 2 additions & 2 deletions dwds/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
built_collection: ^5.1.1
built_value: ^8.3.0
crypto: ^3.0.2
dds: ^2.2.0
dds: ^2.2.5
file: ^6.1.2
http: ^0.13.4
http_multi_server: ^3.2.0
Expand All @@ -33,7 +33,7 @@ dependencies:
stack_trace: ^1.10.0
sse: ^4.1.0
uuid: ^3.0.6
vm_service: ^8.3.0
vm_service: ^9.0.0
web_socket_channel: ^2.2.0
webkit_inspection_protocol: ^1.0.1

Expand Down
33 changes: 33 additions & 0 deletions dwds/test/chrome_proxy_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,39 @@ void main() {
]));
});

test('lookupPackageUris ignores local parameter', () async {
final vm = await service.getVM();
final isolateId = vm.isolates.first.id;
final scriptList = await service.getScripts(isolateId);

final uris = scriptList.scripts.map((e) => e.uri).toList();
final resolvedUrisWithLocal =
await service.lookupResolvedPackageUris(isolateId, uris, local: true);

final packageUrisWithLocal = await service.lookupPackageUris(
isolateId, resolvedUrisWithLocal.uris);
expect(
packageUrisWithLocal.uris,
containsAll([
'org-dartlang-app:///example/hello_world/main.dart',
'package:path/path.dart',
'package:path/src/path_set.dart',
]));

final resolvedUrisWithoutLocal =
await service.lookupResolvedPackageUris(isolateId, uris, local: true);

final packageUrisWithoutLocal = await service.lookupPackageUris(
isolateId, resolvedUrisWithoutLocal.uris);
expect(
packageUrisWithoutLocal.uris,
containsAll([
'org-dartlang-app:///example/hello_world/main.dart',
'package:path/path.dart',
'package:path/src/path_set.dart',
]));
});

test('lookupPackageUris does not translate non-existent paths', () async {
final vm = await service.getVM();
final isolateId = vm.isolates.first.id;
Expand Down
6 changes: 3 additions & 3 deletions webdev/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ dev_dependencies:
webdriver: ^3.0.0

# Comment out before releasing webdev.
dependency_overrides:
dwds:
path: ../dwds
# dependency_overrides:
# dwds:
# path: ../dwds

executables:
webdev: