only remove _initialize function from module snapshots#12540
Merged
dicej merged 2 commits intobytecodealliance:mainfrom Feb 9, 2026
Merged
only remove _initialize function from module snapshots#12540dicej merged 2 commits intobytecodealliance:mainfrom
_initialize function from module snapshots#12540dicej merged 2 commits intobytecodealliance:mainfrom
Conversation
Removing `_initialize` from snapshots of wit-component-produced components leads to invalid inputs because it breaks the alias `wit-component` creates. Moreover, removing that function is redundant because it is only called from a start function which is also removed during snapshotting. Ideally, removing `_initialize` and any aliases which point to it would be taken care of a general-purpose component dead code removal tool, but no such tool exists yet. In the meantime, leaving it there creates a bit of code bloat but is otherwise harmless.
Subscribe to Label Actioncc @fitzgen DetailsThis issue or pull request has been labeled: "wizer"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
931e5e0 to
29a2e88
Compare
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.
Removing
_initializefrom snapshots of wit-component-produced components leads to invalid inputs because it breaks the aliaswit-componentcreates. Moreover, removing that function is redundant because it is only called from a start function which is also removed during snapshotting.Ideally, removing
_initializeand any aliases which point to it would be taken care of a general-purpose component dead code removal tool, but no such tool exists yet. In the meantime, leaving it there creates a bit of code bloat but is otherwise harmless.