You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because of #30831. So then I was curious about why go get was trying to update so I did the following
jlorenzini@jlorenzini-mb example.com$ go mod why -m github.com/golang/lint
# github.com/golang/lint
(main module does not need module github.com/golang/lint)
Note it does not matter what go source code you have in the repo.
What did you expect to see?
Either go mod why says its not in use therefore go get -u shouldn't have been trying to upgrade it or go get -u does not try to update it because go mod why says its not in use.
What did you see instead?
go get -u tried to upgrade github.com/golang/lint but go mod why says my main module does not have a dependency on that module.
The text was updated successfully, but these errors were encountered:
I was able to narrow this down using go mod graph. Looks like the issue is related to grpc. Grpc is a transitive dependency. and if i do a go mod why on that it also says the main module does not depend on it.
jlorenzini@jlorenzini-mb operator$ go mod graph | grep lint
google.golang.org/[email protected] github.com/golang/[email protected]
google.golang.org/[email protected] golang.org/x/[email protected]
jlorenzini@jlorenzini-mb operator$ go mod why google.golang.org/[email protected]
go: finding github.com/golang/protobuf/proto/testdata latest
go: finding github.com/golang/protobuf/proto latest
# google.golang.org/[email protected]
(main module does not need package google.golang.org/[email protected])
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have the following go.mod:
If run
go get -u
, it fails with the following error:This is because of #30831. So then I was curious about why go get was trying to update so I did the following
Note it does not matter what go source code you have in the repo.
What did you expect to see?
Either go mod why says its not in use therefore go get -u shouldn't have been trying to upgrade it or go get -u does not try to update it because go mod why says its not in use.
What did you see instead?
go get -u
tried to upgradegithub.aaakk.us.kg/golang/lint
but go mod why says my main module does not have a dependency on that module.The text was updated successfully, but these errors were encountered: