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

Open
jayconrod opened this issue Oct 9, 2019 · 2 comments

Comments

@jayconrod
Copy link
Contributor

commented Oct 9, 2019

There are several module-related packages that appear in both cmd/go and golang.org/x/mod. They are:

cmd/go/internal/module => golang.org/x/mod/module
cmd/go/internal/semver => golang.org/x/mod/semver
cmd/go/internal/sumweb => golang.org/x/mod/sumdb
cmd/go/internal/dirhash => golang.org/x/mod/sumdb/dirhash
cmd/go/internal/note => golang.org/x/mod/sumdb/note
cmd/go/internal/tlog => golang.org/x/mod/sumdb/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
@gopherbot

This comment has been minimized.

Copy link

commented Oct 9, 2019

Change https://golang.org/cl/200138 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
  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>
@gopherbot

This comment has been minimized.

Copy link

commented Oct 11, 2019

Change https://golang.org/cl/200767 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
Projects
None yet
2 participants
You can’t perform that action at this time.