]> Cypherpunks repositories - gostls13.git/commit
cmd/go: disallow go.sum updates in -mod=readonly
authorMarwan Sulaiman <marwan.sameer@gmail.com>
Fri, 8 Mar 2019 07:33:59 +0000 (02:33 -0500)
committerBryan C. Mills <bcmills@google.com>
Wed, 8 May 2019 19:40:38 +0000 (19:40 +0000)
commitd21c7b728263c917ad6b83fd36879831f70d1279
treef8755f990603b5ca276a86a33ba8f25b715c50c2
parent19966e9b533a85039458eabf08228e0b85f3bf4e
cmd/go: disallow go.sum updates in -mod=readonly

When running go build with the flag -mod=readonly, it fails the build if
go.sum files requires updating. This ensures that CI/CD systems get a
complete go.sum file so that they'd never hit a notary,
assuming the CI/CD system passes the above flag.
I am not familiar with the entire codebase but I assume goSum.dirty
will always be true if go.sum has any missing lines.

Fixes #30667

Change-Id: I767d3b594055d8c10048f4c68e6687c94bb0545c
Reviewed-on: https://go-review.googlesource.com/c/go/+/166237
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/mod_file_proxy.txt
src/cmd/go/testdata/script/sum_readonly.txt [new file with mode: 0644]