Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: synchronize and remove packages duplicated in x/mod #34801

jayconrod opened this issue Oct 9, 2019 · 2 comments


Copy link

commented Oct 9, 2019

There are several module-related packages that appear in both cmd/go and They are:

cmd/go/internal/module =>
cmd/go/internal/semver =>
cmd/go/internal/sumweb =>
cmd/go/internal/dirhash =>
cmd/go/internal/note =>
cmd/go/internal/tlog =>

When Russ copied these packages to x/mod, he added documentation and renamed some definitions. We should not undo that. At the same time, we should be careful to copy any changes and fixes to these packages from cmd/go to x/mod in a way that doesn't break compatibility.

@jayconrod jayconrod added this to the Go1.14 milestone Oct 9, 2019
@jayconrod jayconrod self-assigned this Oct 9, 2019

This comment has been minimized.

Copy link

commented Oct 9, 2019

Change mentions this issue: cmd/go: integrate changes made in x/mod packages into internal packages

gopherbot pushed a commit that referenced this issue Oct 11, 2019
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
* 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
* sumdb.TestServer doesn't implement sumdb.ServerOps after changes
  were were made to 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
Run-TryBot: Jay Conrod <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Bryan C. Mills <>

This comment has been minimized.

Copy link

commented Oct 11, 2019

Change mentions this issue: all: integrate changes made in cmd/go packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.