Skip to content

feat(go): reach dependencies through the global client - #70

Merged
eunomie merged 1 commit into
dagger:mainfrom
eunomie:global-client-dependencies
Oct 16, 2026
Merged

eunomie merged 1 commit into
dagger:mainfrom
eunomie:global-client-dependencies

Conversation

@eunomie

@eunomie eunomie commented Oct 16, 2026

Copy link
Copy Markdown
Member

A legacy module migrated with globalClient and unifiedClients lost its dependency calls: dag.App() and dagger.AppWordsOpts did not exist in the module package, because the shared core has no dependencies and each one is a standalone client in internal/dagger/clients/<dep>.

The module Client now embeds each dependency client, connected lazily on the same session, so dag.App(...) keeps the dependency's exact signature. dagger.X references to a dependency name get type X = dep0.X (or const), so option structs stay the same type. Dependency packages use private dep<N> qualifiers; a name two dependencies export stays unaliased. Nothing changes without globalClient.

Tests: TestGlobalClientIncludesDependencies (two dependencies, one named core, one shared name). On v1.0.0-beta.18, dag.App().Words(ctx, dagger.AppWordsOpts{Sep: "-"}) runs unchanged.

Not covered: manifest [[dependencies]] are still refused; the dependency must be a scope client with unifiedClients.

Legacy author code calls dag.Wolfi() and uses dagger.WolfiContainerOpts;
with unified clients those live in the generated dependency clients.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie merged commit 99a87f3 into dagger:main Oct 16, 2026
9 checks passed
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 20, 2026
No go-sdk tag has the beta.18 sources contract (dagger/go-sdk#67), the
include migration (dagger/go-sdk#69) or dependencies through the global
client (dagger/go-sdk#70).

Signed-off-by: Yves Brissaud <[email protected]>
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 21, 2026
No go-sdk tag has the beta.18 sources contract (dagger/go-sdk#67), the
include migration (dagger/go-sdk#69) or dependencies through the global
client (dagger/go-sdk#70).

Signed-off-by: Yves Brissaud <[email protected]>
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 22, 2026
No go-sdk tag has the beta.18 sources contract (dagger/go-sdk#67), the
include migration (dagger/go-sdk#69) or dependencies through the global
client (dagger/go-sdk#70).

Signed-off-by: Yves Brissaud <[email protected]>
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 22, 2026
No go-sdk tag has the beta.18 sources contract (dagger/go-sdk#67), the
include migration (dagger/go-sdk#69) or dependencies through the global
client (dagger/go-sdk#70).

Signed-off-by: Yves Brissaud <[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.

1 participant