-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 get' does not add missing hash to go.sum when ziphash file missing from cache [1.16 backport] #44812
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
release-blocker
Milestone
Comments
gopherbot
added
the
CherryPickCandidate
Used during the release process for point releases
label
Mar 5, 2021
Change https://golang.org/cl/298851 mentions this issue: |
Approving per discussion in a release meeting. This backport applies to both 1.16 (this issue) and 1.15 (#44872). |
dmitshur
added
CherryPickApproved
Used during the release process for point releases
and removed
CherryPickCandidate
Used during the release process for point releases
labels
Mar 12, 2021
Closed by merging 33fb479 to release-branch.go1.16. |
gopherbot
pushed a commit
that referenced
this issue
Mar 25, 2021
…from missing ziphash file Previously, if an extracted module directory existed in the module cache, but the corresponding ziphash file did not, if the sum was missing from go.sum, we would not verify the sum. This caused 'go get' not to write missing sums. 'go build' in readonly mode (now the default) checks for missing sums and doesn't attempt to fetch modules that can't be verified against go.sum. With this change, when requesting the module directory with modfetch.DownloadDir, if the ziphash file is missing, the go command will re-hash the zip without downloading or re-extracting it again. Note that the go command creates the ziphash file before the module directory, but another program could remove it separately, and it might not be present after a crash. Fixes #44812 Change-Id: I64551e048a3ba17d069de1ec123d5b8b2757543c Reviewed-on: https://go-review.googlesource.com/c/go/+/298352 Trust: Jay Conrod <[email protected]> Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> (cherry picked from commit 302a400) Reviewed-on: https://go-review.googlesource.com/c/go/+/298851
nikhita
added a commit
to nikhita/publishing-bot
that referenced
this issue
Apr 26, 2021
gomod-zip copied go's zip creation code but they had diverged. due to this, gomod-zip created different zip files in the cache compared to what go mod download would create. From Go 1.15.11 and Go 1.16.3, go automatically derives the ziphash from the zip file in the cache - golang/go#44812. This meant that go added incorrect hash values to go.sum because these were derived from the zip files produced by the diverged gomod-zip code. So remove go.sum here and regenerate again using go mod download and go mod tidy.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
release-blocker
@jayconrod requested issue #44749 to be considered for backport to the next 1.16 minor release.
The text was updated successfully, but these errors were encountered: