Merging import dependencies#102
Merged
peterhuene merged 2 commits intobytecodealliance:mainfrom May 2, 2024
Merged
Conversation
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.
c0d4d2a to
b28a161
Compare
Make sure explicit imports are aggregated with implicit imports. Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
b28a161 to
4577cdd
Compare
peterhuene
approved these changes
May 2, 2024
Member
peterhuene
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks for both discovering this issue and providing the fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.