commit | 00c6f9603cb3c184782339aab1cfdeb6bdff1e8d | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Fri Jun 15 14:20:05 2018 -0400 |
committer | Russ Cox <rsc@golang.org> | Mon Jun 18 17:44:05 2018 +0000 |
tree | c5c9ddfca9b9376dd630892545e83a61f2e18ca9 | |
parent | 22e23900224f03be49670113d5781e4d89090f45 [diff] |
cmd/go/internal/modfetch: cache info and gomod on disk This on-disk caching was previously done inside package vgo, but that means that other code calling modfetch directly does not benefit from the cache entries and does unnecessary network operations. Fix that. This CL also renames the local cache directory root from $GOPATH/src/v to $GOPATH/src/mod. The "v" stood for versioned, but "mod" seems clearer (it's the downloaded modules). This CL also fixes a deadlock in the caching code: one Repo's GoMod may need to call another repo's Stat and vice versa, so it can't be that a Repo must only be used from one goroutine at a time, or else we'll end up with a deadlock. Redefine that any Repo must be allowed to be used from multiple goroutines simultaneously and update the code accordingly. This eliminates the potential deadlock. This CL also makes the gitrepo implementation work a bit harder to use its local information before doing any network operations. In particular, locally-cached tags or commits are now resolved without consulting the remote repo. Fixes golang/go#25919. Change-Id: I3443ffc97a1e3e465c8780fb81f263be3b6d77ae Reviewed-on: https://go-review.googlesource.com/119475 Run-TryBot: Russ Cox <rsc@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.