commit | 56d8e7cab446c164a8c765e6bf94c69e0aec7ebf | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Tue Jul 03 12:54:06 2018 -0400 |
committer | Russ Cox <rsc@golang.org> | Tue Jul 10 05:41:44 2018 +0000 |
tree | df034dc3ba61441acd726ea6ac71671aab3c8f37 | |
parent | 4798edcf501e7f001e1d25f07ad0bb523be43ea6 [diff] |
cmd/go/internal/modcmd: drop test sources and data from mod -vendor The module support redefines the package pattern "all" to mean all packages in the main module, plus their dependencies and test dependencies, recursively. The idea was to make "go test all" useful: it tests everything in the main module plus everything the main module depends on, and so on. A complex project is probably creating a combination of dependency versions that has never existed before, so it is only prudent to make it easy to test those dependencies in that configuration. The vendor operation also applies to that same "all" set of packages. But vendoring is freezing a combination that you're happy with and hopefully have already tested. At that point the rationale for including all the tests of dependencies is weakened, and there is a significant space savings to not copying them (and possibly-large associated test data) into the vendor directory. This CL changes vendor to apply to all packages in the main module, plus the (direct and indirect) dependencies of those packages and their tests. Vendor no longer copies *_test.go into the repo at all, nor the packages imported by those source files and not imported otherwise. Also copy legal files (LICENSE etc) when vendoring. Fixes golang/go#25672. Change-Id: I0713d4c751145df827460707e4085801fffa2a51 Reviewed-on: https://go-review.googlesource.com/122256 Reviewed-by: Bryan C. Mills <bcmills@google.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.
Use go get -u golang.org/x/vgo
.
You can also manually git clone the repository to $GOPATH/src/golang.org/x/vgo
.
See CONTRIBUTING.md.
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.
Thank you.