Repository navigation
Conversation
TomChv
force-pushed
the
feat/add-module-source-to-CurrentModuleAsSDKClient
branch
3 times, most recently
from
July 15, 2026 11:21
252c397 to
c697fdd
Compare
Member
Author
|
We need the CI engine to use beta.6 in order to make that CI green |
TomChv
force-pushed
the
feat/add-module-source-to-CurrentModuleAsSDKClient
branch
3 times, most recently
from
July 15, 2026 16:27
a7e3189 to
0b87b5b
Compare
Member
Author
|
PR rebased and regenerated with beta.6 |
Member
Author
|
Waiting for #13575 to be merged before merging that one EDIT: it's merged :) |
TomChv
force-pushed
the
feat/add-module-source-to-CurrentModuleAsSDKClient
branch
2 times, most recently
from
July 16, 2026 11:15
6a9d041 to
a2609c3
Compare
Add two additive, v1.0.0-0-gated engine fields so a .dang SDK module can
generate a client from plain data, rather than the engine driving client
generation through the SDK runtime:
- ModuleSource.clientSchemaIntrospectionJSON: the client-facing schema
(hides no core types; promotes the module's own types to Query for
self-bindings). The deps-load + self-promotion logic is extracted from
runClientGenerator into a shared helper reused by both.
- CurrentModuleAsSDKClient.moduleSource: resolves the bound module from
its stored {module, pin} via resolveClientTargetModule, correct for
local and remote/pinned refs alike (not a raw ref-string lookup).
These are the phase-1 primitives the companion client-codegen workflow
consumes. The old engine-driven client path is intentionally left in
place for now; the follow-up cleanup is tracked in
hack/designs/client-codegen-engine-cleanup.md.
Add integration coverage in client_generator_test.go and regenerate the
generated SDK bindings + GraphQL SDL.
Signed-off-by: Vasek - Tom C <[email protected]>
TomChv
force-pushed
the
feat/add-module-source-to-CurrentModuleAsSDKClient
branch
from
July 16, 2026 13:36
a2609c3 to
a5bb87f
Compare
eunomie
approved these changes
Jul 16, 2026
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 20, 2026
Client generation used to run inside dagger/dagger's engine runtime, which opened a nested engine session and coupled client bindings to engine internals. Moving it into this SDK module makes generation ordinary codegen in a plain container: the engine hands over the client-facing schema and the bound module's metadata as data, with no nested session. A generated client now binds exactly one module and ships as a self-contained, scoped npm package. At runtime it serves that single module through Workspace.moduleSource, so the bindings resolve from any plain client session rather than only from a module runtime. Requires the engine client-codegen primitives released in v1.0.0-beta.7 (dagger/dagger#13646 and #13663). Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 21, 2026
Client generation used to run inside dagger/dagger's engine runtime, which opened a nested engine session and coupled client bindings to engine internals. Moving it into this SDK module makes generation ordinary codegen in a plain container: the engine hands over the client-facing schema and the bound module's metadata as data, with no nested session. A generated client now binds exactly one module and ships as a self-contained, scoped npm package. At runtime it serves that single module through Workspace.moduleSource, so the bindings resolve from any plain client session rather than only from a module runtime. Requires the engine client-codegen primitives released in v1.0.0-beta.7 (dagger/dagger#13646 and #13663). Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 21, 2026
Client generation used to run inside dagger/dagger's engine runtime, which
opened a nested engine session and coupled client bindings to engine
internals. Moving it into this SDK module makes generation ordinary codegen in
a plain container: the engine hands over the client-facing schema and the
bound module's metadata as data, with no nested session.
A generated client now binds exactly one module and ships as a self-contained,
scoped npm package. At runtime it serves that single module through
Workspace.moduleSource, so the bindings resolve from any plain client session
rather than only from a module runtime.
Client generation overlays the freshly generated files on the existing client
dir, so user-authored files there (e.g. a hand-written main.ts) survive
regeneration from any cwd. Local bound modules are resolved fresh from the
workspace (the engine's client.moduleSource caches and can miss live edits),
while pinned/immutable git modules keep the engine-resolved source. Module
refs are resolved workspace-root-relative ("/" + ref) so generation works from
any cwd.
Requires the engine client-codegen primitives released in v1.0.0-beta.7
(dagger/dagger#13646 and #13663).
Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 21, 2026
Client generation used to run inside dagger/dagger's engine runtime, which
opened a nested engine session and coupled client bindings to engine
internals. Moving it into this SDK module makes generation ordinary codegen in
a plain container: the engine hands over the client-facing schema and the
bound module's metadata as data, with no nested session.
A generated client now binds exactly one module and ships as a self-contained,
scoped npm package. At runtime it serves that single module through
Workspace.moduleSource, so the bindings resolve from any plain client session
rather than only from a module runtime.
Client generation overlays the freshly generated files on the existing client
dir, so user-authored files there (e.g. a hand-written main.ts) survive
regeneration from any cwd. Local bound modules are resolved fresh from the
workspace (a cached module source can miss live edits), while pinned/immutable
git modules keep their canonical ref. Module refs are resolved
workspace-root-relative ("/" + ref) so generation works from any cwd.
Read the SDK's managed modules and clients from the passed workspace
(ws.sdk(name: currentModule.name)) instead of the ambient current workspace.
Module SDKs can no longer read the ambient workspace (dagger/dagger#13659), and
it was never populated during dagger.cloud @check execution -- which is why the
discovery and generate-all checks failed only in CI. The auto-injected
Workspace argument is always loaded, so the four affected checks now pass there
too.
Split the e2e module by concern into per-group files (utils, runtime, module,
client, init, config), each a small `type` exposed from E2e as a sub-object so
`dagger check` discovers its checks under `e-2-e:<group>:<check>`.
Requires the engine client-codegen primitives released in v1.0.0-beta.7
(dagger/dagger#13646 and #13663).
Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 21, 2026
Client generation used to run inside dagger/dagger's engine runtime, which
opened a nested engine session and coupled client bindings to engine
internals. Moving it into this SDK module makes generation ordinary codegen in
a plain container: the engine hands over the client-facing schema and the
bound module's metadata as data, with no nested session.
A generated client now binds exactly one module and ships as a self-contained,
scoped npm package. At runtime it serves that single module through
Workspace.moduleSource, so the bindings resolve from any plain client session
rather than only from a module runtime.
Client generation overlays the freshly generated files on the existing client
dir, so user-authored files there (e.g. a hand-written main.ts) survive
regeneration from any cwd. Local bound modules are resolved fresh from the
workspace (a cached module source can miss live edits), while pinned/immutable
git modules keep their canonical ref. Module refs are resolved
workspace-root-relative ("/" + ref) so generation works from any cwd.
Read the SDK's managed modules and clients from the passed workspace
(ws.sdk(name: currentModule.name)) instead of the ambient current workspace.
Module SDKs can no longer read the ambient workspace (dagger/dagger#13659), and
it was never populated during dagger.cloud @check execution -- which is why the
discovery and generate-all checks failed only in CI. The auto-injected
Workspace argument is always loaded, so the four affected checks now pass there
too.
Split the e2e module by concern into per-group files (utils, runtime, module,
client, init, config), each a small `type` exposed from E2e as a sub-object so
`dagger check` discovers its checks under `e-2-e:<group>:<check>`.
Requires the engine client-codegen primitives released in v1.0.0-beta.7
(dagger/dagger#13646 and #13663).
Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 29, 2026
Client generation used to run inside dagger/dagger's engine runtime, which opened a nested engine session and coupled client bindings to engine internals. Moving it into this SDK module makes generation ordinary codegen in a plain container: the engine hands over the client-facing schema and the bound module's metadata as data, with no nested session. A generated client now binds exactly one module and ships as a self-contained, scoped npm package. At runtime it serves that single module through Workspace.moduleSource, so the bindings resolve from any plain client session rather than only from a module runtime. Requires the engine client-codegen primitives released in v1.0.0-beta.7 (dagger/dagger#13646 and #13663). Signed-off-by: Tom Chauveau <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 29, 2026
Client generation used to run inside dagger/dagger's engine runtime, which opened a nested engine session and coupled client bindings to engine internals. Moving it into this SDK module makes generation ordinary codegen in a plain container: the engine hands over the client-facing schema and the bound module's metadata as data, with no nested session. A generated client now binds exactly one module and ships as a self-contained, scoped npm package. At runtime it serves that single module through Workspace.moduleSource, so the bindings resolve from any plain client session rather than only from a module runtime. Requires the engine client-codegen primitives released in v1.0.0-beta.7 (dagger/dagger#13646 and #13663). Signed-off-by: Tom Chauveau <[email protected]> Signed-off-by: Vasek - Tom C <[email protected]>
TomChv
added a commit
to dagger/typescript-sdk
that referenced
this pull request
Jul 29, 2026
Client generation used to run inside dagger/dagger's engine runtime, which opened a nested engine session and coupled client bindings to engine internals. Moving it into this SDK module makes generation ordinary codegen in a plain container: the engine hands over the client-facing schema and the bound module's metadata as data, with no nested session. A generated client now binds exactly one module and ships as a self-contained, scoped npm package. At runtime it serves that single module through Workspace.moduleSource, so the bindings resolve from any plain client session rather than only from a module runtime. Requires the engine client-codegen primitives released in v1.0.0-beta.7 (dagger/dagger#13646 and #13663). Signed-off-by: Tom Chauveau <[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.
Add two additive, v1.0.0-0-gated engine fields so a .dang SDK module can generate a client from plain data, rather than the engine driving client generation through the SDK runtime:
These are the phase-1 primitives the companion client-codegen workflow consumes. The old engine-driven client path is intentionally left in place for now; the follow-up cleanup is tracked in hack/designs/client-codegen-engine-cleanup.md.
Add integration coverage in client_generator_test.go and regenerate the generated SDK bindings + GraphQL SDL.