-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: "go build" fails if go.sum is not writable #30185
Comments
/cc @bcmills |
This was biting me just now. I believe the source of the difference is that my local dev machine has a newer version of Go than the continuous build I'm using, so when it runs I don't think failing to write |
It is also made worse in my situation by the |
That part is necessary in general:
|
I'm not sure I see why the |
Related to #34860? |
Somewhat? They're mostly orthogonal, I think, but this issue can make the failure mode for #34860 worse (or less explicable). |
This makes guru fail on (some) projects fetched from Github. Reproduction & error message pasted below to make discovery easier. go get github.com/GoogleCloudPlatform/osconfig
guru "-scope" "github.com/GoogleCloudPlatform/osconfig" "-tags=" "callstack" "$GOPATH/src/github.com/GoogleCloudPlatform/osconfig/inventory/inventory.go:#1629" Result (snippet):
|
Change https://golang.org/cl/204521 mentions this issue: |
Updates #30185 Updates #33326 Updates #34822 Change-Id: Ie13651585898d1bbbf4f779b97ee50b6c7e7ad50 Reviewed-on: https://go-review.googlesource.com/c/go/+/204521 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Duplicate of #34054 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a
Dockerfile
that runsgo mod download
followed bygo build
. Both the download and the build are run as an unprivileged user against a read-only codebase whose files are owned byroot
and not writable by anyone else.A rudimentary dockerfile:
Possibly related to #29452?
What did you expect to see?
I expect
go build
to not attempt to writego.sum
, especially if-mod=readonly
is provided. I can obviouslychmod
the files to be writable, but this still shouldn't fail.What did you see instead?
The text was updated successfully, but these errors were encountered: