Encode instance exports properly#980
Merged
peterhuene merged 5 commits intobytecodealliance:mainfrom Apr 16, 2023
Merged
Conversation
Member
|
Thanks! Would it be easy enough to add a test for this as well? |
peterhuene
reviewed
Apr 13, 2023
peterhuene
reviewed
Apr 13, 2023
peterhuene
reviewed
Apr 13, 2023
Member
peterhuene
left a comment
There was a problem hiding this comment.
Just the two comments.
The import-complex baseline will need updating, so you'll need to run the tests locally with BLESS=1 cargo test.
Regarding the tests, perhaps we should add a wit-component decode call on the composed bytes to ensure we can get back the wit definition.
7c6c854 to
8e79c4d
Compare
8e79c4d to
790635a
Compare
peterhuene
reviewed
Apr 14, 2023
peterhuene
approved these changes
Apr 14, 2023
Member
peterhuene
left a comment
There was a problem hiding this comment.
Looks great, thanks for fixing this!
Just the one minor nit and I think this is good to merge.
Member
|
Thanks @rylev! |
Mossaka
pushed a commit
to Mossaka/wasm-tools-fork
that referenced
this pull request
May 29, 2023
* Encode instance exports properly * Fix tests * Bless test * Test component by decoding it with wit_component * Make error message clearer
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 #977
Instance exports were not being reflected in the TypeMap meaning that future declarations would refer to the direct type definition instead of the export definition. This updates that handling so that the type map is updated with the index of the export.
Big thanks to @peterhuene for the helpful hints!