]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix 'go get' compatibility for direct download of vgo-aware module
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 14:18:39 +0000 (14:18 +0000)
commit446d76e62df3bcd84443a4d7319c963a214f7670
tree4cade11caa36295cc7d1dbd2e02d7b1e08910a70
parent41dd2ebcee5652571f8cfa924597e67f3ddb6111
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.

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>
src/cmd/go/internal/get/get.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/vendor_test.go