bug fix for wat2wasm demo to remove call to module.resolveNames#2726
Merged
Conversation
Member
|
@kevmoo WDYT? |
Member
|
Seems reasonable but I think we should do a little more investigation as to what happened to this function. I'll see see what gemini comes up with as an explanation for why we can or cannot remove this. |
Contributor
|
I'm embarrassed that it slipped through! |
Collaborator
|
Btw what happened with the macos build? It seems waiting forever for all patches. It should not block this change. |
Member
|
macos-14 was replaced with macos-latest.. I'll update the expectation list. |
Member
|
fixed |
Member
|
thanks @yuvraj-sahu, this change LGTM |
sbc100
approved these changes
Mar 24, 2026
Member
|
By the way I did a little digging and found that |
Contributor
Author
|
Thank you! |
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.
On the wat2wasm demo website, when correct WAT is written (such as with any of the examples), the build log displays the following error:
TypeError: module.resolveNames is not a function. This error seems to originate from the JavaScript filedemo.js, which containsmodule.resolveNames()on line 110. This prevents WebAssembly from being generated.At commit d8e3fe6, the
resolveNamesfunction existed withinlibwabt.jsas an empty function. However, this reference seems to have been removed in the later commit 10dcc58 and its version oflibwabt.js. This function seems to have been empty even in older commits (such as commit 6aac429 and its version oflibwabt.js, where the file had not been edited for four years prior). As such, it appears that simply deleting themodule.resolveNames()call indemo.jsseems to fix the error - though it should be double-checked that there are no side effects of this deletion.This is my first attempted contribution to any major open source project, so please let me know if there are any additional guidelines I may have missed or if there is any other information I should provide. Thanks!