|author||Russ Cox <email@example.com>||Wed Jun 20 16:43:10 2018 -0400|
|committer||Russ Cox <firstname.lastname@example.org>||Fri Jun 29 03:41:33 2018 +0000|
cmd/go/internal/vgo: allow vgo get of module with no package in root Historically "go get" has meant both "download these packages" and "install these packages". For example "go get rsc.io/github/issue" downloads that package but also builds and installs it (into $GOBIN/issue). Similarly "go get golang.org/x/text/number" downloads, builds, and installs that package (not a package main). If one needs to just download a whole repo, it has always tripped up users that "go get golang.org/x/text" fails, because there are no Go source files in that directory (the root of that repo, it turns out). Go modules compound this problem, because it is quite natural to want to run "go get email@example.com" to add (or to upgrade or downgrade to) that specific version of golang.org/x/text. This CL changes "go get" to make this common usage not an error: if the path is successfully identified as a directory within a known module, then if there's no code there, "go get" just skips the "build and install" step, instead of reporting an error. This way, command installations like "go get rsc.io/github/issue" continue to work, but now module installations like "go get golang.org/x/text" or "go get firstname.lastname@example.org" also now succeed. Fixes golang/go#24008. Change-Id: I977ab448bc13a4391e85f63052b8373e30f77026 Reviewed-on: https://go-review.googlesource.com/120995 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.