Skip to content
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: do not attempt to fetch modules with missing checksums when -mod=readonly is set #41935

Closed
bcmills opened this issue Oct 12, 2020 · 1 comment
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Oct 12, 2020

(This is a secondary bug noticed in conjunction with #41934.)

example.com$ go version
go version devel +9449a125e Sun Oct 11 17:54:59 2020 +0000 linux/amd64

example.com$ go mod init example.com
go: creating new go.mod: module example.com

example.com$ go get -d golang.org/x/mod
go: downloading golang.org/x/mod v0.3.0
go: golang.org/x/mod upgrade => v0.3.0

example.com$ go list golang.org/x/tools/cmd/stringer
go: downloading golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
go: updates to go.sum needed, disabled by -mod=readonly

Note the downloading message in the last command. Since we already know that -mod=readonly is set and we already know that we are missing a checksum, we should not attempt to download the module in the first place.
(This is a consequence of #30667, but we appear to have missed it in CL 166237 and the associated tests.)

CC @jayconrod @matloob @marwan-at-work

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. modules labels Oct 12, 2020
@bcmills bcmills added this to the Backlog milestone Oct 12, 2020
@gopherbot
Copy link

Change https://golang.org/cl/262341 mentions this issue: cmd/go: don't fetch files missing sums in readonly mode

@golang golang locked and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants