-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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 list -m' fails to follow dependencies through older versions of the main module #29773
Comments
This comment has been minimized.
This comment has been minimized.
And
|
This comment has been minimized.
This comment has been minimized.
I think that the problem here is a circular dependency via an older version of the main module. Probably has something to do with a hard-coded bypass for loading the target module. Minimal example forthcoming. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Found a simpler repro. |
|
Because of golang/go#29773, circular module requirements create a problem with Go 1.11 and 1.12beta2 (at least). The fix for this is scheduled for Go 1.13, but we need to add a dependency from myitcv.io -> github.com/myitcv/gobin now. Given that the dependency on myitcv.io is only a development-time tool dependency, the easiest thing to do for now is to drop that requirement, thereby breaking the cycle.
@bcmills - thanks very much for taking a look at this. Just an FYI - it looks from the above like you have a standalone repro, correct? Also that this is going to be fixed in the 1.13 cycle? If so, I'm going to break the cycle in this instance. The requirement Just wanted to flag that I'll be doing that in case you're attempting any repros against |
Because of golang/go#29773, circular module requirements create a problem with Go 1.11 and 1.12beta2 (at least). The fix for this is scheduled for Go 1.13, but we need to add a dependency from myitcv.io -> github.com/myitcv/gobin now. Given that the dependency on myitcv.io is only a development-time tool dependency, the easiest thing to do for now is to drop that requirement, thereby breaking the cycle.
Yes, I have a standalone repro and I plan to have it fixed in 1.13. (I'm hoping that the fix will be straightforward, but as the Google SREs say, “hope is not a strategy”.) Took me a while to distill it out, but the steps you gave did reproduce the problem exactly as described. Thanks for the detailed report! |
Change https://golang.org/cl/186537 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Testing with 1.12 pre the release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This gives the output:
as expected.
However if we then:
followed by:
any number of times, the output is always:
This despite the requirement being part of the requirements graph.
What did you expect to see?
Not to see see the "finding" message.
What did you see instead?
The "finding" message as part of each
go list
.Could this be something to do with the now circular module requirement
myitcv.io -> github.com/myitcv/gobin -> myitcv.io
? And the fact:where both the
honnef.co
requirements are not actual modules?The addition of the the requirement on
github.com/myitcv/gobin
has removed the indirecthonnef.co/go/js/util
frommyitcv.io
'sgo.mod
, but I think this is expected.cc @bcmills. I note #27123 which links to #27102 and #27063; I don't think this is precisely an instance of any of those.
Apologies; I don't think this can be reproduced in a
testscript
test because this appears to rely on the remote import path resolution code path.cc @rogpeppe as an FYI given his report in #27123
The text was updated successfully, but these errors were encountered: