|author||Russ Cox <email@example.com>||Tue Jun 26 21:04:59 2018 -0400|
|committer||Russ Cox <firstname.lastname@example.org>||Fri Jun 29 03:42:06 2018 +0000|
cmd/go: ignore wildcard-matched test-only packages in go build It makes sense to be able to cd into the top of a directory tree and run commands like: go list ./... go test ./... go build ./... go install ./... Some packages have no tests. Some packages have only tests (no code). While go list applies to both kinds of packages, and go test correctly handles packages without tests, go build and go install reject packages with only tests. If you run go install testonlypkg then it does seem reasonable to fail with an error, since testonlypkg cannot actually be installed. But if testonlypkg was only picked up by wildcard expansion, then to keep the examples above working, we should just silently skip over it during go build and go install. CL 23314 fixed this same problem for "go get golang.org/x/tour/..." but special-cased "go get", leaving "go build" and "go install" failing. This CL fixes the general case and removes the "go get" special case. Picked this up in module work because I'm using "go build ./..." as part of evaluating whether repos are compatible with Go modules. Fixes golang/go#20760. Fixes golang/go#22409. Change-Id: I5caaa6a346a5d07a7ad9e2669e89da76b397dc42 Reviewed-on: https://go-review.googlesource.com/121196 Reviewed-by: Bryan C. Mills <email@example.com>
This repository holds a prototype of what the go command might look like with integrated support for package versioning.
See research.swtch.com/vgo for documents about the design.
go get -u golang.org/x/vgo.
You can also manually git clone the repository to
This is still a very early prototype. You are likely to run into bugs. Please file bugs in the main Go issue tracker, golang.org/issue, and put the prefix
x/vgo: in the issue title.