Skip to content

add --include-versions option to Go generator#1574

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
dicej:go-include-versions
Mar 30, 2026
Merged

add --include-versions option to Go generator#1574
alexcrichton merged 1 commit intobytecodealliance:mainfrom
dicej:go-include-versions

Conversation

@dicej
Copy link
Copy Markdown
Collaborator

@dicej dicej commented Mar 30, 2026

By default, the Go generator (like the C generator) will generate symbols which include the WIT package version in the name only if the target world references more than one version of that package. However, that makes publishing bindings in a library hazardous, because the name of that symbol will change if the world is updated to reference a second version of the package.

This new option allows the user to override the default and include the versions in names unconditionally.

By default, the Go generator (like the C generator) will generate symbols which
include the WIT package version in the name only if the target world references
more than one version of that package.  However, that makes publishing bindings
in a library hazardous, because the name of that symbol will change if the world
is updated to reference a second version of the package.

This new option allows the user to override the default and include the versions
in names unconditionally.
dicej added a commit to dicej/componentize-go that referenced this pull request Mar 30, 2026
@alexcrichton alexcrichton added this pull request to the merge queue Mar 30, 2026
Merged via the queue into bytecodealliance:main with commit 6a13b24 Mar 30, 2026
28 checks passed
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