Repository navigation
generate: stage local dependency closure before codegen - #12
Merged
TomChv merged 1 commit intoJul 28, 2026
Merged
Conversation
This was referenced Jul 23, 2026
TomChv
force-pushed
the
feat/aggregate-local-dep-in-worskpace-when-generating
branch
from
July 27, 2026 14:51
967deae to
cabeb6c
Compare
Before generating each managed module, stage its transitive local dependency closure via ModuleSource.generateLocalDependencies and overlay it onto the workspace, so the module's codegen sees up-to-date dependency bindings — including dependencies owned by other SDKs. The staged dependency codegen is ephemeral: it appears in both the fork's before and after, so it cancels in the merge, leaving only each module's own changes. Bumps the polyfill pin to pick up dagger/polyfill#5, which scopes module generation to the module path. Signed-off-by: Tom Chauveau <[email protected]>
TomChv
force-pushed
the
feat/aggregate-local-dep-in-worskpace-when-generating
branch
from
July 27, 2026 14:53
cabeb6c to
de07a8b
Compare
TomChv
marked this pull request as ready for review
July 28, 2026 10:10
tiborvass
approved these changes
Jul 28, 2026
TomChv
added a commit
that referenced
this pull request
Aug 7, 2026
Ports dagger/java-sdk#13: the repository's dagger.toml registered this SDK against the e2e fixture modules and the fixture client, so the real workspace advertised test fixtures as managed. That registration moves to a test-only dagger.toml under the fixtures directory, reached through Fixtures.workspace. Incomplete — pushed for discussion, not for merge. discovery:* passes. generate:* and client:* cannot work as written, because codegen needs the session's client-backed workspace and the fixtures config can only be selected by a synthetic one: - asWorkspace(cwd:) re-runs config detection, so the nested dagger.toml is selected, but the workspace carries no client ID and ModuleSource.generateLocalDependencies (mod.dang:97, added in #12) fails in withWorkspaceClientContext. - Workspace.withWorkdir keeps the client but only clones and sets Cwd, so ConfigFile stays the repository's dagger.toml and currentModule.asSDK(ws) reports the SDK is not installed. Codegen then resolves "typescript" to the builtin SDK rather than this one, which passes for the wrong reason. java-sdk does not hit this: its Mod.generate reads only introspectionSchemaJSON and builds the generated files in its own container, so a synthetic workspace is enough. Unblocking here needs an engine change — withWorkdir re-detecting config, or generateLocalDependencies working on a synthetic workspace. 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.
Uses the new
ModuleSource.generateLocalDependenciesengine API. Before generating each managed module,generateAll(the@generatefunction) andMod.generatestage the module's transitive local dependency closure onto the workspace viawithChanges, then generate against the staged workspace — so the module's codegen sees up-to-date dependency bindings, including dependencies owned by other SDKs.Depends on
generateLocalDependenciesengine field + regenerated bindings.dagger.jsonis back onpolyfill@main.PR chain
ModuleSource.generateLocalDependencies(+ the runtime fixes found in validation)@generateuses the API@generateuses the APIBoth SDK PRs depend on the engine PR (#13715). The polyfill scoping fix is merged.