Skip to content

Conversation

@rylev
Copy link
Collaborator

@rylev rylev commented May 2, 2024

Fixes #100

As noted in the issue, previously explicit imports were not being aggregated with implicit imports. This could lead to the situation where an explicit import would be substituted for the encoded version of the import that was implicitly imported which might not contain all of the items the explicit import contained.

This changes encoding of imports so that explicit imports are first aggregated with implicit imports and then encoded.

The issue is that dependencies of implicit imports and explicit imports
are not merged and thus if you've already imported a dependency of an
implicit import, the dependency of the explicit import will effectively
be ignored. This is an issue when the explicit import dependency has
different items than the version imported as part of the implicit
import.
@rylev rylev requested a review from peterhuene May 2, 2024 10:27
@rylev rylev force-pushed the merging-import-dependencies branch 2 times, most recently from c0d4d2a to b28a161 Compare May 2, 2024 11:31
Make sure explicit imports are aggregated with implicit imports.

Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
@rylev rylev force-pushed the merging-import-dependencies branch from b28a161 to 4577cdd Compare May 2, 2024 11:35
Copy link
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks for both discovering this issue and providing the fix!

@peterhuene peterhuene merged commit 088a728 into bytecodealliance:main May 2, 2024
@rylev rylev deleted the merging-import-dependencies branch May 2, 2024 16:08
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.

Dependencies of explicitly imported interfaces are not merged with implicitly imported interfaces

2 participants