Handle module name collisions in MinifyImportsAndExports using a new output format#8550
Open
kripken wants to merge 7 commits intoWebAssembly:mainfrom
Open
Handle module name collisions in MinifyImportsAndExports using a new output format#8550kripken wants to merge 7 commits intoWebAssembly:mainfrom
kripken wants to merge 7 commits intoWebAssembly:mainfrom
Conversation
This was referenced Mar 30, 2026
kripken
added a commit
to emscripten-core/emscripten
that referenced
this pull request
Mar 30, 2026
…C] (#26578) The new format uses JSON and supports overlapping module names. Corresponding Binaryen change: WebAssembly/binaryen#8550
sbc100
approved these changes
Mar 31, 2026
| } | ||
| } | ||
| std::cout << "\n ]\n"; | ||
| std::cout << "}\n"; |
Member
There was a problem hiding this comment.
Does binaryen write json elsewhere? If so mabye we can make utilities for dumping this kind of data?
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.
Before we just minified the basename, ignoring the module name entirely. That
meant we errored if two modules had the same basename,
Fix this by tracking module names alongside base names.
The output format must change to support this, as we need to print out the
module name as well. While making a breaking change here, change the
output to JSON which will handle escaping properly, and is more structured
and explicit.
Fixes #8203
Needs a corresponding Emscripten change to parse the new output format.