Skip to content

gomod: avoid type-name collision under beta.26 - #102

Merged
sipsma merged 1 commit into
mainfrom
codex/go-beta26-compat
Nov 10, 2026
Merged

sipsma merged 1 commit into
mainfrom
codex/go-beta26-compat

Conversation

@tiborvass

@tiborvass tiborvass commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

gomod's beta.26 requirement activates naming rules that collapse its Gomod and GoMod declarations into the same schema type. Consumers then lose access to library helpers or the fields of the modules it returns.

Rename the secondary type to Module, exported as GomodModule, and update its internal references. Add a regression check that exercises the library's Go image helper and the returned module's path and selection API.

Related to dagger/dagger#15134. Platform-aware prebuilding is tracked separately in #100.

Validation: all 11 gomod checks pass on the released v1.0.0-beta.26 engine:

dagger --engine=image://registry.dagger.io/engine:v1.0.0-beta.26 check --gomod-checks --generated=false -j 4

@tiborvass
tiborvass force-pushed the codex/go-beta26-compat branch from e010fbc to 5110c7c Compare November 10, 2026 18:01
@tiborvass tiborvass changed the title Restore platform-aware builds and fix gomod beta.26 type names gomod: avoid type-name collision under beta.26 Nov 10, 2026
@tiborvass
tiborvass marked this pull request as ready for review November 10, 2026 18:19
@sipsma
sipsma merged commit b0476af into main Nov 10, 2026
92 checks passed
sipsma added a commit to dagger/dagger that referenced this pull request Nov 10, 2026
The engine image's entries call each Go module's prebuild with the
platform it builds for, which dagger/go's gobuild takes since its
per-platform build merged (dagger/go#100). The built-in Go SDK pinned a
dagger/go main from before that merge, whose prebuild takes no platform,
so the entries failed. It now pins dagger/go's main with that merge and
with gomod's beta.26 type names kept distinct (dagger/go#102), and go-sdk
moves to the commit that names the same dagger/go (dagger/go-sdk#103), as
the entries require. The workspace's own dagger/go module stays where it
was: the checks' engine loads it, and that engine is older than the
per-platform build needs.

Signed-off-by: Erik Sipsma <[email protected]>
dagger-ci pushed a commit to dagger/dagger-go-sdk that referenced this pull request Nov 10, 2026
The engine image's entries call each Go module's prebuild with the
platform it builds for, which dagger/go's gobuild takes since its
per-platform build merged (dagger/go#100). The built-in Go SDK pinned a
dagger/go main from before that merge, whose prebuild takes no platform,
so the entries failed. It now pins dagger/go's main with that merge and
with gomod's beta.26 type names kept distinct (dagger/go#102), and go-sdk
moves to the commit that names the same dagger/go (dagger/go-sdk#103), as
the entries require. The workspace's own dagger/go module stays where it
was: the checks' engine loads it, and that engine is older than the
per-platform build needs.

Signed-off-by: Erik Sipsma <[email protected]>
eunomie pushed a commit to eunomie/dagger that referenced this pull request Nov 10, 2026
The workspace loaded dagger/go 8dce822, which has gomod's beta.26 engine
version but not dagger/go#102, which keeps gomod's library and module
types distinct at beta.26. Pin b0476af, dagger/go's main, the commit the
built-in Go SDK and go-sdk's daggerGo already use.

b0476af needs Dagger v1.0.0-beta.26 or later: its builds call
Directory.withPlatform.

Signed-off-by: Erik Sipsma <[email protected]>
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