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: errors emitted multiple times for packages with missing checksums #46160

Closed
bcmills opened this issue May 13, 2021 · 10 comments
Closed
Labels
help wanted modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 13, 2021

$ go mod edit -go=1.17

$ go list all
m.go:3:8: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by example.com); to add:
        go get example.com

$ go mod edit -go=1.16

$ go list all
go: golang.org/x/tools@v0.1.1: missing go.sum entry; to add it:
        go mod download golang.org/x/tools
go: golang.org/x/tools@v0.1.1: missing go.sum entry; to add it:
        go mod download golang.org/x/tools

$ go1.16.4 list all
go: golang.org/x/tools@v0.1.1: missing go.sum entry; to add it:
        go mod download golang.org/x/tools

-- go.mod --
module example.com

go 1.17

require golang.org/x/tools v0.1.1
-- m.go --
package example

import _ "golang.org/x/tools/go/packages"

This is a regression introduced in Go 1.17, probably by one of my changes for #36460.

CC @jayconrod @matloob

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 labels May 13, 2021
@bcmills bcmills added this to the Go1.17 milestone May 13, 2021
@bcmills bcmills self-assigned this May 13, 2021
@bcmills
Copy link
Contributor Author

bcmills commented May 13, 2021

(Found while writing a regression test for #46141.)

@gopherbot
Copy link

Change https://golang.org/cl/320172 mentions this issue: cmd/go: add tests illustrating what happens when Go 1.16 is used in a Go 1.17 main module

gopherbot pushed a commit that referenced this issue May 24, 2021
… Go 1.17 main module

For #46141
Updates #46160

Change-Id: Ib22435b8051aaf3fa74d43d3b7f2d091e67f05e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/320172
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
@heschi heschi removed the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label Jun 10, 2021
@bcmills
Copy link
Contributor Author

bcmills commented Jun 11, 2021

(Unmarking as release-blocker. Realistically, nobody is going to be confused by a duplicated message, and if this were the last bug remaining in the release we wouldn't want to hold it up.)

@bcmills bcmills modified the milestones: Go1.17, Go1.18 Jul 15, 2021
@ianlancetaylor
Copy link
Contributor

@bcmills This is in the 1.18 milestone; time to move to 1.19? Thanks.

@bcmills bcmills modified the milestones: Go1.18, Go1.19 Feb 1, 2022
@bcmills bcmills added modules okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 labels Jun 1, 2022
@gopherbot gopherbot removed the okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 label Jun 10, 2022
@ianlancetaylor
Copy link
Contributor

@bcmills @matloob This issue is marked for 1.19. It's just been rolling forward in milestones. Should it move to Backlog?

@bcmills bcmills modified the milestones: Go1.19, Backlog Jun 24, 2022
@bcmills bcmills removed their assignment Jun 24, 2022
@jeanbza
Copy link
Member

jeanbza commented Sep 22, 2022

I'm unable to reproduce this FWIW:

$ go version
go version go1.19
$ cat go.mod
module github.com/example/example

go 1.17

require golang.org/x/tools v0.1.12 // indirect
deklerk at legate in ~/workspace/mult_errors
$ cat go.sum
deklerk at legate in ~/workspace/mult_errors
$ go list -m all
go: golang.org/x/tools@v0.1.12: missing go.sum entry; to add it:
	go mod download golang.org/x/tools
deklerk at legate in ~/workspace/mult_errors
$ go mod edit -go=1.16
deklerk at legate in ~/workspace/mult_errors
$ go list -m all
go: golang.org/x/tools@v0.1.12: missing go.sum entry; to add it:
	go mod download golang.org/x/tools

@bcmills
Copy link
Contributor Author

bcmills commented Sep 22, 2022

@jadekler, try go list all without setting -m?

@jeanbza
Copy link
Member

jeanbza commented Sep 22, 2022

Aha, yes, that does it. I somehow thought all was not a valid command line argument anymore. That doesn't make sense from a backwards compatibility perspective. Thanks. =)

I'll poke around and see if I can find a solution.

@gopherbot
Copy link

Change https://go.dev/cl/433576 mentions this issue: cmd/go: prevent duplicate missing checksum error message

@gopherbot
Copy link

Change https://go.dev/cl/498122 mentions this issue: cmd/go: avoid duplicate errors in module load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Development

No branches or pull requests

5 participants