Skip to content
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

Fold resolve_world_from_name helper into select_world #1611

Merged

Conversation

alexcrichton
Copy link
Member

This is a follow-up to #1577 to refactor a bit to have bindings generators continue to use Resolve::select_world for figuring out what to generate bindings for.

This is a follow-up to bytecodealliance#1577 to refactor a bit to have bindings
generators continue to use `Resolve::select_world` for figuring out what
to generate bindings for.
Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

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

Thanks, this solves the problems I was having with the upgrade!

.is_ok());
}

fn parse_into(resolve: &mut Resolve, wit: &str) -> PackageId {
fn parse_into(resolve: &mut Resolve, wit: &str) -> Vec<PackageId> {
Copy link
Contributor

Choose a reason for hiding this comment

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

How do you feel about making this a pub method (take &mut Self)? We do the same UnresolvedPackageGroup::parse Resolve::append pattern in many places in test code.

* Rename `Resolve::append` to `Resolve::push_group`
* Add `Resolve::push_str`
* Change `&Path` arguments to `impl AsRef<Path>`
@alexcrichton alexcrichton added this pull request to the merge queue Jun 11, 2024
Merged via the queue into bytecodealliance:main with commit 34fbd2a Jun 11, 2024
27 checks passed
@alexcrichton alexcrichton deleted the refactor-select-world branch June 11, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants