-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: "found, but does not contain package" error refers to replaced version instead of its replacement #34085
Comments
For this you'll have to check out your Athens instance, no idea what the problem is there. For the second part, I can reproduce with
Let me see what I can figure out... |
It's clearly true that @bcmills to confirm that this is all WAI. |
@rajathagasthya, starting without your
When I add in the
As far as I can tell this is all working as intended, except that the failure message refers to the replaced version instead of its replacement. That is a bug. |
@heschik Thanks for checking it out. It does look like 1.12 was ignoring this because @bcmills Thanks for confirming the bug. If the fix is simple, I'm happy to help. |
Change https://golang.org/cl/193519 mentions this issue: |
Change https://golang.org/cl/193617 mentions this issue: |
Change https://golang.org/cl/193618 mentions this issue: |
@gopherbot, please backport to 1.13: this produces very confusing error messages, and the fix is small. |
Backport issue(s) opened: #34118 (for 1.13). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
…ments Updates #34085 Change-Id: I57250d0c51a27f0bd3e223588dde9d6d955e0fcf Reviewed-on: https://go-review.googlesource.com/c/go/+/193618 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Change https://golang.org/cl/197317 mentions this issue: |
…s in PackageNotInModuleError Updates #34085 Fixes #34118 Change-Id: I3111f5997466ad33f51e80c71f5fb2ccebdcc6e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/193617 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> (cherry picked from commit 8189a06) Reviewed-on: https://go-review.googlesource.com/c/go/+/197317
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have
k8s.io/code-generator
as a tools dependency i.e. I have a top-leveltools.go
file with these contents:I also have one private dependency, so according to go1.13 I'm setting appropriate env variables.
When I do
go mod tidy
, I get the following failure which is very vague:The interesting thing is when I turn off
GOPROXY
withgo env -w "GOPROXY="
, it shows a different error:The error
k8s.io/code-generator/cmd/openapi-gen: module k8s.io/code-generator@latest (v0.0.0-20190831074504-732c9ca86353) found, but does not contain package k8s.io/code-generator/cmd/openapi-gen
is strange because latest code in that repo does contain that package.Fwiw, this used to work perfectly fine with go1.12.9 yesterday.
This is my
go.mod
:What did you expect to see?
go mod tidy
resolve dependencies correctly without error, as it did with go1.12.9.What did you see instead?
Two issues:
go mod tidy
says packages do not exist when they are indeed present.GOPROXY
is set, it errors out without any meaningful message.The text was updated successfully, but these errors were encountered: