Repository navigation
Conversation
Generation finds the local replace targets go.mod requires, the packages the module imports from them and the files those packages embed, and lists them in the entrypoint's resources member. The engine (dagger v1.0.0-beta.17 or later) loads them with the module, the entrypoint builds from currentModule.contextDirectory, and function results are reused until one of these files changes. Exported functions take no ws argument. This removes the call-time workspace discovery of #64: the go-inputs helper, the required ws check and docs/workspace-compilation.md. It keeps released beta.17 runtime SDK (b988cb0), unified client unmarshalling and the dagger runtime import alias (5464694), and embed walk errors (745835a, moved to the scanner). Modules without files outside their directory generate the same files as before. A build that misses a listed file now says to run dagger generate instead of only Go's go get suggestion. Signed-off-by: Yves Brissaud <[email protected]>
The include fixture's functions take no ws again, and the checks of collections, refusals, and calls on the beta.17 pin that reuse a result across sessions and compute it again after an included file changes, from another repository, by path and from a git source. New: a caller module that reaches the app through a generated client, a control module without files outside its directory whose result is reused, and a stale resources list that fails with the hint to run dagger generate. The floor check stays the beta.16 refusal, so the workspace floor engine dependency goes. Signed-off-by: Yves Brissaud <[email protected]>
Replace targets above the module copy lost their .. steps when resolved from the copy near the file system root, so a module three levels below the repository root (replace github.com/dagger/dagger => ../../..) failed with "reads ../../../go.mod, which is missing". 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.
Drops #64's required
ws *dagger.Workspaceargument and run-time file discovery. Generation again lists outside files (from go.mod replaces, imports, embeds) in the entrypoint'sresources, which dagger v1.0.0-beta.17 loads; the module builds and runs fromcurrentModule.contextDirectory. #64's other fixes stay. A build missing a file now says to rundagger generate.On beta.17, results are reused across sessions (0.3 s vs 7-10 s per call on a 16.6k-file workspace); calls from another repository or git work, which failed with
ws.Needs the engine to keep
resources; without it (dagger/dagger#14661):replacement directory ../lib does not exist. Modules without outside files: byte-identical output. Limits: regenerate after changing replaces, imports or embeds; other outside files are absent at run time; over-inclusion (all build tags, whole embed directories).e2e passes on beta.17 and beta.16; beta.12 floor pending.
Non-test: +301/-530.
Walkthrough: https://gistpreview.github.io/?98bb2a0f32e045d6ead3339aaaf44818