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 behavior change in 1.16 #44615
Comments
However |
That does not appear to be the case:
|
Duplicate of #33526 |
@bcmills That error message has been there true, but it is the behavior that changed: root@f16365c890d8:/go# go version
go version go1.15 linux/amd64
root@f16365c890d8:/go# mkdir /workspace
root@f16365c890d8:/go# cd /workspace/
root@f16365c890d8:/workspace# go mod init example.com/workspace
go: creating new go.mod: module example.com/workspace
root@f16365c890d8:/workspace# go get google.golang.org/genproto
go: downloading google.golang.org/genproto v0.0.0-20210224155714-063164c882e6
go: google.golang.org/genproto upgrade => v0.0.0-20210224155714-063164c882e6
go: downloading golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3
go: downloading github.com/golang/protobuf v1.4.1
go: downloading golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135
go: downloading google.golang.org/protobuf v1.24.0
package google.golang.org/genproto: build constraints exclude all Go files in /go/pkg/mod/google.golang.org/genproto@v0.0.0-20210224155714-063164c882e6
root@f16365c890d8:/workspace# cat go.mod
module example.com/workspace
go 1.15
require google.golang.org/genproto v0.0.0-20210224155714-063164c882e6 // indirect That error message appeared but the command used to update the dependency still. Now it does not. I noticed this because we have a script that updates our genproto version daily for google-cloud-go but after switching to go1.16 it no longer bumped up the version when runnning |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
A
go.mod
file with the dependency declaredWhat did you see instead?
An empty go.mod
Extra
go get -d
:root@e229e72fbc21:/workspace# go get -d google.golang.org/genproto google.golang.org/genproto: no Go source files go get: added google.golang.org/genproto v0.0.0-20210224155714-063164c882e6 root@e229e72fbc21:/workspace# cat go.mod module example.com/workspace go 1.16 require google.golang.org/genproto v0.0.0-20210224155714-063164c882e6 // indirect
The text was updated successfully, but these errors were encountered: