]> Cypherpunks repositories - gostls13.git/commit
cmd/go: ignore build tags when 'go get' modifies build list
authorJay Conrod <jayconrod@google.com>
Fri, 31 May 2019 18:14:00 +0000 (14:14 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 31 May 2019 23:00:43 +0000 (23:00 +0000)
commit6f7542e4cb6914e8b8d888f16d440feeb8e631d2
treeedb490d9208d53c74270f2371e563353c76f168d
parent64c134f90f0cf6d0e55fca93c433b68810d12f12
cmd/go: ignore build tags when 'go get' modifies build list

In module mode, 'go get' should not consider build constraints when
loading packages in order to modify the module graph. With this
change, 'go get' considers all build tags to be true except for
"ignore" and malformed build constraint expressions.

When 'go get' builds packages, it still applies build constraints for
the target platform.

Fixes #32345

Change-Id: I6dceae6f10a5185870537de730b36292271ad124
Reviewed-on: https://go-review.googlesource.com/c/go/+/179898
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/imports/tags.go
src/cmd/go/internal/modcmd/vendor.go
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/modload/query.go
src/cmd/go/testdata/script/mod_get_tags.txt [new file with mode: 0644]