Skip to content

Fix wit-encoded exported interfaces with unused type aliases - #372

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-wit-component-panic
Oct 13, 2022
Merged

alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-wit-component-panic

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

Previously a panic would be hit during encoding since type type wasn't encoded. This commit updates to encode all named types unconditionally for exports to ensure this panic isn't hit.

Along the way this also removes an unnecessary index_primitive method and map since during my prior refactorings in this code I found that it was necessary to implement the functionality deeper and forgot to come back and remove the original solution.

Previously a panic would be hit during encoding since type type wasn't
encoded. This commit updates to encode all named types unconditionally
for exports to ensure this panic isn't hit.

Along the way this also removes an unnecessary `index_primitive` method
and map since during my prior refactorings in this code I found that it
was necessary to implement the functionality deeper and forgot to come
back and remove the original solution.
@alexcrichton
alexcrichton marked this pull request as ready for review October 13, 2022 14:48
@alexcrichton
alexcrichton requested a review from pchickey October 13, 2022 14:48
@alexcrichton
alexcrichton merged commit 0aa34ce into bytecodealliance:main Oct 13, 2022
@alexcrichton
alexcrichton deleted the fix-wit-component-panic branch October 13, 2022 18: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.

2 participants