Repository navigation
codegen(go): fix source links in dependency bindings - #14665
Merged
Merged
Conversation
vito
added a commit
to vito/dagger
that referenced
this pull request
Oct 14, 2026
Record the Go dependency binding source link fix. Signed-off-by: Alex Suraci <[email protected]>
grouville
self-requested a review
October 14, 2026 00:54
grouville
approved these changes
Oct 14, 2026
vito
added a commit
to vito/dagger
that referenced
this pull request
Oct 15, 2026
Record the Go dependency binding source link fix. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
fix-go-dep-source-links
branch
from
October 15, 2026 21:28
c8024fe to
3da2ab1
Compare
Dependency bindings moved into internal/dagger/core, but ModuleRelPath still assumed files were generated into internal/dagger, so their source-location comments pointed one directory short of the context root (e.g. .dagger/.dagger/...). Git workspaces did not show it: the go-sdk module rewrites those comments from the real file depth, so the generated files changed depending on how the workspace was loaded. Derive the prefix from the directory each file is generated into. Signed-off-by: Alex Suraci <[email protected]>
Record the Go dependency binding source link fix. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
fix-go-dep-source-links
branch
from
October 15, 2026 22:09
3da2ab1 to
9b3732a
Compare
vito
added a commit
that referenced
this pull request
Oct 16, 2026
Dependency bindings live in internal/dagger/core/, one directory deeper than the fixed prefix codegen used before #14665, so their source comments climbed one directory too few. Match what go-sdk/generate produces from a git workspace, which the go-sdk/generate/stale check compares against. Signed-off-by: Alex Suraci <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 18, 2026
Cloud generates from a git workspace. A beta.18 run on a local checkout writes these source links one directory short; dagger#14665 fixes that on main but is not released yet. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 20, 2026
Cloud generates from a git workspace. A beta.18 run on a local checkout wrote these source links one directory short; dagger#14665, released in v1.0.0-beta.19, fixes that, so both modes now agree. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 21, 2026
Cloud generates from a git workspace. A beta.18 run on a local checkout wrote these source links one directory short; dagger#14665, released in v1.0.0-beta.19, fixes that, so both modes now agree. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 22, 2026
Cloud generates from a git workspace. A beta.18 run on a local checkout wrote these source links one directory short; dagger#14665, released in v1.0.0-beta.19, fixes that, so both modes now agree. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 22, 2026
Cloud generates from a git workspace. A beta.18 run on a local checkout wrote these source links one directory short; dagger#14665, released in v1.0.0-beta.19, fixes that, so both modes now agree. Signed-off-by: Yves Brissaud <[email protected]>
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.
Go module codegen writes dependency bindings to
internal/dagger/core/<dep>.gen.go, butModuleRelPathstill added a fixed../..prefix, which only fits files ininternal/dagger/. So in those files, the source-location comments climbed one directory too few. For example, in.dagger/modules/engine-dev/internal/dagger/core/notify.gen.go:That path resolves to
.dagger/.dagger/modules/..., which doesn't exist.Git workspaces didn't show the bug. There the engine writes GitHub links, and the go-sdk module's
normalize-source-linksturns them back into local paths using each file's real depth. So the samego-sdk/generategave different output from a local checkout and from a git ref, and these lines changed back and forth between regens (see #14662).This PR builds the prefix from the directory each file is written to. Dependency files in module mode use
internal/dagger/core. All other files, and standalone clients, keep the old behavior.TypeScript isn't affected: its dependency files sit next to
client.gen.tsinsdk/src/api/, which matches its fixed../../../.Testing
ModuleRelPath.generatedContextDirectoryfor.dagger/modules/python-client-devwith the repo as a local directory.core/dockerd.gen.gonow has the six-../paths, which match the git-workspace output.