-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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 list all breaks in //go:build-only repos #49198
Comments
@gopherbot please backport 1.17 |
Change https://golang.org/cl/359355 mentions this issue: |
Backport issue(s) opened: #49199 (for 1.17). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/359404 mentions this issue: |
Change https://golang.org/cl/359404 mentions this issue: |
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
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. It doesn't know about //go:build.
This means that //go:build-only repos will not work with 'go list all'
under certain conditions.
Specifically:
Note that r and s are fine, just not p and q.
This will need to be backported to Go 1.17.
Go 1.16 did not support //go:build lines, so it doesn't need the backport.
The text was updated successfully, but these errors were encountered: