You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go SDK generation depends on its own generated output #13605
Codegen imports dagger.io/dagger, which the root go.mod replaces with ./sdk/go. Therefore, codegen requires a valid generated client before it can generate that client.
Solution
Make codegen build independently of its generated output, using either a minimal bootstrap client or a prebuilt codegen binary.
I have submitted a fix for this issue via PR #13713 (using the Bootstrap Client + sdkfs subpackage approach).
Summary of Fix:
cmd/codegen/internal/bootstrap: Added a minimal, self-contained Dagger client for codegen (Client, Request, Response, ID, Module, TypeDef, etc.) that doesn't depend on dagger.io/dagger.
sdk/go/sdkfs: Created a standalone subpackage embedding go.mod and go.sum without compiling generated client files. Re-exported GoMod/GoSum in sdk/go/fs.go for backward compatibility.
Decoupled Codegen: Replaced all dagger.io/dagger imports in cmd/codegen with bootstrap types.
Verification:
All reproduction scenarios (truncated/missing/invalid sdk/go/dagger.gen.go) now build cleanly:
Activity
feat(codegen): add bootstrap package for self-contained codegen
feat(sdk/go): add sdkfs subpackage embedding SDK module files
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
feat(sdk/go): add sdkfs subpackage embedding SDK module files
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
feat(codegen): add bootstrap package for self-contained codegen
feat(sdk/go): add sdkfs subpackage embedding SDK module files
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
feat(codegen): add bootstrap package for self-contained codegen
feat(sdk/go): add sdkfs subpackage embedding SDK module files
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
feat(codegen): add bootstrap package for self-contained codegen
feat(sdk/go): add sdkfs subpackage embedding SDK module files
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
feat(codegen): add bootstrap package for self-contained codegen
feat(sdk/go): add sdkfs subpackage embedding SDK module files
refactor(codegen): switch from dagger.io/dagger to bootstrap
chore: add changelog entry for dagger#13605 fix
fix(codegen): resolve Go SDK self-bootstrap loop (dagger#13605)
hitesh0106 commentedon Jul 22, 2026
Hi @shykes @sipsma 👋
I have submitted a fix for this issue via PR #13713 (using the Bootstrap Client +
sdkfssubpackage approach).Summary of Fix:
cmd/codegen/internal/bootstrap: Added a minimal, self-contained Dagger client for codegen (Client,Request,Response,ID,Module,TypeDef, etc.) that doesn't depend ondagger.io/dagger.sdk/go/sdkfs: Created a standalone subpackage embeddinggo.modandgo.sumwithout compiling generated client files. Re-exportedGoMod/GoSuminsdk/go/fs.gofor backward compatibility.dagger.io/daggerimports incmd/codegenwithbootstraptypes.Verification:
All reproduction scenarios (truncated/missing/invalid
sdk/go/dagger.gen.go) now build cleanly:truncate -s 0 sdk/go/dagger.gen.go && go build ./cmd/codegen/...➔ Exit 0rm sdk/go/dagger.gen.go && go build ./cmd/codegen/...➔ Exit 0Feedback and reviews are welcome!