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: 'go get […]/v2@v2.X.Y' fails when the repo root contains the go.mod file for […]/v2 but no .go source files [1.13 backport] #34747

Closed
gopherbot opened this issue Oct 7, 2019 · 2 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 7, 2019

@bcmills requested issue #34746 to be considered for backport to the next 1.13 minor release.

@gopherbot, please backport to 1.13. This was a regression, and the fix goes with #34497 (already backported).

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Oct 9, 2019

Change https://golang.org/cl/199997 mentions this issue: [release-branch.go1.13] cmd/go: suppress more errors in package-to-module loading

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Oct 9, 2019

Closed by merging 842a1e7 to release-branch.go1.13.

@gopherbot gopherbot closed this Oct 9, 2019
gopherbot pushed a commit that referenced this issue Oct 9, 2019
…dule loading

In CL 197059, I suppressed errors if the target package was already found.
However, that does not cover the case of passing a '/v2' module path to
'go get' when the module does not contain a package at its root.

This CL is a minimal fix for that case, intended to be backportable to 1.13.

(Longer term, I intend to rework the version-validation check to treat
all mismatched paths as ErrNotExist.)

Updates #34746
Fixes #34747

Change-Id: Ia963c2ea00fae424812b8f46a4d6c2c668252147
Reviewed-on: https://go-review.googlesource.com/c/go/+/199839
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit 421d35c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/199997
@katiehockman katiehockman modified the milestones: Go1.13.2, Go1.13.3 Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.