]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] cmd/go: update for //go:build lines
authorRuss Cox <rsc@golang.org>
Thu, 28 Oct 2021 02:59:55 +0000 (22:59 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 28 Oct 2021 21:17:17 +0000 (21:17 +0000)
commitf6f024f1209d99dec79ae2aeb9d50677d627ffd6
treeadebc29b3827a35db840cb1900900ac72d4bf441
parent18b970277e8516abcdfd18be76f02d3bd74919dc
[release-branch.go1.17] cmd/go: update for //go:build lines

cmd/go has its own //go:build evaluator, which is needed for
patterns like 'all'. The code is a modified copy of some unexported
routines from the go/build package. Update it by copying those
again and re-modifying them. The modifications are primarily the new
func eval and also ignoring errors.

This CL will need to be backported to Go 1.17, or else Go 1.17
will break when faced with certain //go:build-only repos during
'go list all' or 'go mod tidy'.

For #41184.
Fixes #49198.

Change-Id: Ie0fe3caa8d49004935ecd76d7977f767fe50e317
Reviewed-on: https://go-review.googlesource.com/c/go/+/359355
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/359404
src/cmd/go/internal/imports/build.go
src/cmd/go/testdata/script/list_all_gobuild.txt [new file with mode: 0644]