commit | 0b37e81747b0e67da0724ea17de3da7ad998cce0 | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Thu Jun 07 16:25:39 2018 -0400 |
committer | Russ Cox <rsc@golang.org> | Tue Jun 12 18:27:07 2018 +0000 |
tree | 8d9502fa3eddabc09d719312398af9b30d45907e | |
parent | 1df2402a48a383df8548df09f9a1581d0a86f247 [diff] |
cmd/go/internal/vgo: process packages for all build tags in vendor Until now, "vgo vendor" has only considered the packages needed for a build with the current GOOS/GOARCH and build tags. If a module has both linux-specific and windows-specific requirements, then "vgo vendor" on windows will omit the linux code, and vice versa, making it impossible to prepare a full vendor set. This CL introduces a new (for now undocumented) package pattern "ALL" that is like "all" but follows imports in files requiring any plausible build tag, producing a set of files that does not vary from system to system. The only +build lines not satisfied when computing "ALL" packages are those listing only the tag "ignore" or those listing only syntactically invalid build tags. For example, a file containing any of these lines not be processed: // +build ignore // +build ! // +build @#$%^&*() (The first two are commonly used in practice to exclude a file from processing by the go command.) This CL then changes the "vgo vendor" command to process "ALL" packages, not "all" packages. It also changes the vendor/vgo.list output file to list only modules that had files copied out of them and to indicate which packages came from which modules. Fixes golang/go#25376. Fixes golang/go#25624. Change-Id: I6756286fa6bb697819279ef67b4bea68bc0b7f53 Reviewed-on: https://go-review.googlesource.com/117258 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> 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.