Repository navigation
Conversation
Generate gobuild with the Go SDK's Dang entrypoint, so the engine reads its types from the generated entrypoint/main.dang instead of building and running the module to ask for them. The module's Go code is built only when one of its functions is called. The workspace installs go-sdk v1.4.0, which has the generator. Its first run kept the old embedded bindings in internal/dagger/core; a second run removed them. Signed-off-by: Erik Sipsma <[email protected]>
Build gobuild's containers and directories with dagger.io/dagger/core's constructors instead of the deprecated global dag client, which the Go SDK no longer generates. Signed-off-by: Erik Sipsma <[email protected]>
Pin the workspace's go-sdk to the commit on go-sdk main that merged dagger/go-sdk#76, which makes a failing function's error text reach its caller through the entrypoint. gobuild's generated files already came from that code, so regenerating changes nothing; go-sdk/generate/stale now agrees with them. Signed-off-by: Erik Sipsma <[email protected]>
Contributor
Author
|
Folded into #95, which now carries this PR's commits unchanged alongside the rest of the per-package build. |
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.
gobuild now runs through the Go SDK's generated Dang entrypoint. A fresh engine reads gobuild's types from the generated
internal/dagger/entrypoint/main.danginstead of building and running gobuild's Go code to ask for them, so loading dagger/go no longer pays for that build. gobuild's Go code is built only when one of its functions is called. Its API is unchanged.go-sdk
The workspace installs go-sdk from the commit on main that merged dagger/go-sdk#76. That change makes a failing function's error text reach its caller through the entrypoint. Without it, a gobuild call whose build fails reports only "exit code: 2" instead of Go's error, and
embed-check, which expects Go's message, would fail.What it changes
Listing dagger/dagger's tests (
dagger check --go --check test -l --all, 4,951 tests), Dagger v1.0.0-beta.24, one 16-CPU arm64 machine, main (as of #89) against this branch, 3 runs each, interleaved, each on a fresh engine. Medians, with the 95% interval of the difference:Compatibility
gobuild still needs Dagger v1.0.0-beta.22 or later, as on main, for
File.extractandContainer.withMountedFiles. Its manifest no longer declares anengineVersion. The generated entrypoint itself needs v1.0.0-beta.18 or later.Commits
internal/dagger/core; a second run removed them.dagger.io/dagger/core's constructors instead of the globaldagclient, and stop generating the global client.