Draft
Conversation
- bug_static_method_ignores_interface: static resource methods look up in globals instead of the interface object - bug_async_export_rejection_swallowed: void async export rejection is silently swallowed via task_return with empty stack - bug_root_level_flags_dropped: partition_imports skips root-level flags/enums/variants defined directly in a world Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
The [static] handler looked up the method directly in globals, ignoring func.interface(). This meant static methods on resources inside an interface would fail at runtime. Mirror the constructor/method pattern: when func.interface() is Some, look up the resource class from the interface object first. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
The catch_cb closure called task_return with an empty value stack, which silently swallowed rejections for void async exports. Replace with a panic that includes the JS error message so the host sees a trap instead of a false Ok. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
partition_imports guarded flags, enums, and variants with if *.interface().is_some(), silently dropping any defined at the world root level. The WIT spec allows typedef-item inside a world, so remove the guards to match how functions are already handled. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
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.
While trying to learn this repo I had ai help see if there's any bugs. Here are some findings with suggested bug fixes. Feel free to close this PR and implement differently too