Skip to content

Implement lookupResolvedPackageUris and lookupPackageUris #1458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

annagrin
Copy link
Contributor

@annagrin annagrin commented Dec 1, 2021

Closes: #1446

- implement the new API from vm service 7.4.0
- add tests
- does not suport dart: scheme uris yet:
  dart-lang#1457

Closes: dart-lang#1446
@google-cla google-cla bot added the cla: yes label Dec 1, 2021
Copy link
Contributor

@nshahan nshahan left a comment

Choose a reason for hiding this comment

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

LGTM with one comment.

@annagrin annagrin requested a review from bkonyi December 1, 2021 23:56
Copy link
Collaborator

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

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

LGTM!

@annagrin
Copy link
Contributor Author

annagrin commented Dec 10, 2021

@bkonyi @nshahan I actually figured out how to resolve SDK paths, added it to this PR. Appreciate another review!

@annagrin annagrin requested review from bkonyi and nshahan December 10, 2021 22:53
Copy link
Collaborator

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

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

Updated changes LGTM (sorry for the delay, was OOO)

Copy link
Contributor

@nshahan nshahan left a comment

Choose a reason for hiding this comment

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

LGTM

/// The way we resolve file: URLs into package: URLs
static PackageConfig _packageConfig;

/// The way we resolve dart: URLs into org-dartland-sdk: URLs
Copy link
Contributor

Choose a reason for hiding this comment

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

dartland -> dartlang?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks!

Comment on lines +1310 to +1314
containsAll([
contains('/_test/example/hello_world/main.dart'),
contains('/lib/path.dart'),
contains('/lib/src/path_set.dart'),
]));
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little confused why expectation needs containsAll() with nested contains(). Is that on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

containsAll matches the array, and the nested contains match the elements. I like that our matches allow that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement new methods from vm_service 7.4.0: lookupPackageUris, lookupResolvedPackageUris
4 participants