]> Cypherpunks repositories - gostls13.git/commit
cmd/go: integrate changes made in x/mod packages into internal packages
authorJay Conrod <jayconrod@google.com>
Wed, 9 Oct 2019 21:49:17 +0000 (17:49 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 11 Oct 2019 18:16:37 +0000 (18:16 +0000)
commit78d67164bb6bd95031d109d959900c196cfa3029
treef710b6b0e9b482ca90ec583ab6b98daf22839f69
parent2686e7494845dae877e0efb4ff786c672b2cd2ef
cmd/go: integrate changes made in x/mod packages into internal packages

This change integrates changes made to x/mod packages into our internal
copies of those packages.

This is the first step of a bidirectional synchronization. A follow-up
change will copy changes made to the internal packages after x/mod was
forked. After that, we can vendor x/mod, update imports, and delete
the internal copies.

The following packages are affected:

* internal/module
* internal/semver (no change)
* internal/sumweb (renamed to internal/sumdb)
* internal/dirhash
* internal/note
* internal/tlog

Several integrated changes affect other packages:

* cmd/go/internal/module.MatchPathMajor now wraps a new function,
  CheckPathMajor, which returns error. MatchPathMajor returns
  bool. This will avoid an incompatible change in the next step.
* module.EncodePath renamed to EscapePath, EncodeVersion to
  EscapeVersion, DecodePath to UnescapePath, DecodeVersion to
  UnescapeVersion.
* cmd/go/internal/sumweb moved to cmd/go/internal/sumdb and package
  renamed to sumdb.
* sumdb.Client renamed to ClientOps, Conn to Client, Server to
  ServerOps, Paths to ServerPaths.
* sumdb/encode.go and encode_test.go are not present in x/mod since
  they are redundant with functionality in module. Both files are
  deleted.
* sumdb.TestServer doesn't implement sumdb.ServerOps after changes
  were were made to golang.org/x/mod/sumdb.ServerOps during the fork.
  Local changes made so tests will pass. These will be copied to x/mod
  in the next step.

Updates #34801

Change-Id: I7e820f10ae0cdbec238e59d039e978fd1cdc7201
Reviewed-on: https://go-review.googlesource.com/c/go/+/200138
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
21 files changed:
src/cmd/go/internal/dirhash/hash.go
src/cmd/go/internal/modfetch/cache.go
src/cmd/go/internal/modfetch/coderepo.go
src/cmd/go/internal/modfetch/proxy.go
src/cmd/go/internal/modfetch/sumdb.go
src/cmd/go/internal/modfile/rule.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/module/module.go
src/cmd/go/internal/module/module_test.go
src/cmd/go/internal/note/note.go
src/cmd/go/internal/sumdb/cache.go [moved from src/cmd/go/internal/sumweb/cache.go with 98% similarity]
src/cmd/go/internal/sumdb/client.go [moved from src/cmd/go/internal/sumweb/client.go with 78% similarity]
src/cmd/go/internal/sumdb/client_test.go [moved from src/cmd/go/internal/sumweb/client_test.go with 90% similarity]
src/cmd/go/internal/sumdb/server.go [moved from src/cmd/go/internal/sumweb/server.go with 70% similarity]
src/cmd/go/internal/sumdb/test.go [moved from src/cmd/go/internal/sumweb/test.go with 86% similarity]
src/cmd/go/internal/sumweb/encode.go [deleted file]
src/cmd/go/internal/sumweb/encode_test.go [deleted file]
src/cmd/go/internal/tlog/note.go
src/cmd/go/internal/tlog/tile.go
src/cmd/go/internal/tlog/tlog.go
src/cmd/go/proxy_test.go