commit | 63dca245994429bd8e9d5128655445e9a58d659f | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Tue Jun 19 12:50:43 2018 -0400 |
committer | Russ Cox <rsc@golang.org> | Fri Jun 22 16:45:26 2018 +0000 |
tree | 14b40063f28acc1d9c8646c51dbdebebec511314 | |
parent | 984ae49b1d037f4aeb9a4d896e6332dd3686cfff [diff] |
cmd/go/internal/modfetch: push codehost.Repo locking down one level The modfetch.Repo needs to be safe for use by multiple goroutines, but the codehost.Repo (a source code repository) was not, so we added locking around the codehost.Repo methods. But we might reasonably have multiple modfetch.Repos (modules) drawing from a single codehost.Repo, especially if we cache codehost.Repo construction. So push the locking further down. After this CL, it would still be nice to add locking in package codehost on a per-directory basis, so that codehost.Run calls on a given directory are, or at least can be, serialized, even when they are being invoked from different processes. To do that we need to work out the right file locking on each system, which we'll put off for now. (TODO added.) (Git is already doing file locking to make access from multiple processes safe at the level of individual commands.) Change-Id: I9ce4ecf8f8b49cabea50b8663e3cee60ff95e7c9 Reviewed-on: https://go-review.googlesource.com/119775 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.