-
Notifications
You must be signed in to change notification settings - Fork 312
Encode instance exports properly #980
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
Encode instance exports properly #980
Conversation
|
Thanks! Would it be easy enough to add a test for this as well? |
peterhuene
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for fixing this!
Just the one minor nit and I think this is good to merge.
|
Thanks @rylev! |
* Encode instance exports properly * Fix tests * Bless test * Test component by decoding it with wit_component * Make error message clearer
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!