-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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.15 backport] #44872
Labels
Milestone
Comments
Change https://golang.org/cl/299830 mentions this issue: |
Approving per discussion in a release meeting. This backport applies to both 1.16 (#44812) and 1.15 (this issue). |
Closed by merging 7038a38 to release-branch.go1.15. |
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 #44872 Change-Id: I64551e048a3ba17d069de1ec123d5b8b2757543c Reviewed-on: https://go-review.googlesource.com/c/go/+/298352 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit 302a400) Reviewed-on: https://go-review.googlesource.com/c/go/+/299830
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
I'm requesting that the fix for #44749 be backported to Go 1.15.
The problem affects both 1.15 and 1.16, though it is less noticeable on 1.15. I expect the fix to apply cleanly to 1.15, perhaps with a small change to the regression test.
(Manually created this issue due to #25574).
The text was updated successfully, but these errors were encountered: