]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] cmd/go: fix 'go get' compatibility for direct download of...
authorRuss Cox <rsc@golang.org>
Fri, 1 Jun 2018 19:47:29 +0000 (15:47 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 4 Jun 2018 16:21:02 +0000 (16:21 +0000)
commitfce993d1a27153271919db00d2f80b6839fcb326
tree3a9a47b333b2c58843bc0cf1767678eeccea118f
parent8558db9a3887cf904cb7c10c2035610b0d3a97bb
[release-branch.go1.10] cmd/go: fix 'go get' compatibility for direct download of vgo-aware module

CL 109340 added “minimal module-awareness for legacy operation.”
One part of that is reinterpreting imports inside code trees with go.mod files
as using semantic import versioning, and converting them back to
legacy import paths by stripping the major version element
(for example, interpreting import "x.com/foo/v2/bar" as import "x.com/foo/bar").
This rewrite was not being applied during "go get", with the effect that once
you had the target code downloaded already, everything was fine,
but it didn't download and build successfully the first time.

Fixes #25687.
Cherry-pick fixes #25690.

Change-Id: I3e122efdc8fd9a0a4e66f5aa3e6a99f90c7df779
Reviewed-on: https://go-review.googlesource.com/115797
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-on: https://go-review.googlesource.com/116176
src/cmd/go/internal/get/get.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/vendor_test.go