generate: stage local dependency closure before codegen#12
Draft
TomChv wants to merge 3 commits into
Draft
Conversation
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. Signed-off-by: Vasek - Tom C <tom@dagger.io>
Temporary: point the polyfill dependency at fix/module-generate-scope-to-path (dagger/polyfill#5) so multi-module / workspace-root generate works. Revert to @main once that PR merges. Signed-off-by: Vasek - Tom C <tom@dagger.io>
Signed-off-by: Vasek - Tom C <tom@dagger.io>
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 generateleaks each module's staged dependency codegen across the merged changesets (a dependency goes missing, or its files conflict on apply).dagger.jsoncurrently pins this polyfill branch — revert topolyfill@mainonce it merges.PR chain
ModuleSource.generateLocalDependencies(+ the runtime fixes found in validation)@generateuses the API@generateuses the APIThe two SDK PRs depend on both the engine PR and the polyfill PR. The engine and polyfill PRs are independent of each other.