Repository navigation
fix(gobuild): quote linker string values - #107
Merged
Merged
Conversation
Go build -n prints arguments for display, leaving ampersands unquoted and shell expansions active inside double quotes. Replaying a RunnerHost URL therefore backgrounds the linker and tries to execute the next -X. Decode Go-quoted -X values and quote them for shell replay while retaining the generated toolchain and build-ID expansions. Cover the dev-engine URL and literal metacharacters with a shell argument-capture regression. Signed-off-by: Alex Suraci <[email protected]>
sipsma
approved these changes
Nov 18, 2026
eunomie
added a commit
to dagger/dagger
that referenced
this pull request
Nov 20, 2026
dagger/go#107 quotes -X values in the link step; without it ./hack/build fails on the RunnerHost URL, which contains "&". Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to dagger/dagger
that referenced
this pull request
Nov 25, 2026
dev deploy stamps a RunnerHost that contains "&" into the CLI. The pinned gobuild left -X values unquoted in its link script, so the build failed with "-X: not found". The new pin is the merge of dagger/go#107 (c40d1b4), whose tree is 8aba399b's. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
pushed a commit
to eunomie/go-sdk
that referenced
this pull request
Nov 25, 2026
Move daggerGo from dagger/go 79a92be to its release v0.5.0 (262b66d), the merge of dagger/go#110. Its gobuild is on otel-go and OpenTelemetry v1.47.0, out of the range of GHSA-q7gw-24fr-5p69, where 79a92be's required otel/sdk v1.43.0 and otel/trace v1.46.0, and pinned otel/sdk/log to v0.16.0. The engine image ships that gobuild for the built-in Go SDK, which moves to the same commit, since the image's build requires the two to match. v0.5.0 also quotes linker string values (dagger/go#107) and reads discovery JSON with File.asJson (dagger/go#108), which needs v1.0.0-beta.26, go-sdk's daggerGoFloor. The calls generated entrypoints make are unchanged. Signed-off-by: Erik Sipsma <[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.
./hack/devin dagger/dagger fails with/gobuild/build.sh: line 12: -X: not foundafter the switch to per-package builds in dagger/dagger#15143. The CLI stamps a RunnerHost URL containing&volume=...&cleanup=false;go build -nprints that linker argument without quotes, so replaying it as shell starts background commands and treats the following-Xas a command.Decode Go's display quoting for linker
-Xvalues and apply shell quoting before replay, supporting both-X valueand-X=value. This also preserves literal shell expansions and Go-escaped newlines/tabs while leaving the script's generated toolchain and build-ID expansions intact.The regression executes the generated linker command with an argument-capturing shell function. It reproduces the URL failure before the fix and checks that URLs, whitespace, quotes, shell metacharacters, and escapes arrive unchanged afterward.
Validation:
cd gobuild && go test . -count=1passes. Full Dagger integration builds were not run. dagger/dagger will need its dagger/go pin updated after this lands.