-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go mod init does not correctly resolve pseudo-versions #32161
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
Comments
Seems duplicated of #29262 |
@cuonglm I don't think it's a duplicate of that #29262. With that bug, I can do |
Neat example. I can confirm the observed behavior: |
Change https://golang.org/cl/178497 mentions this issue: |
https://golang.org/cl/178497 I think is trying to get If that turns out to be tricky to get right or a bigger change than would work for 1.13, I wonder if an alternative approach might be to simplify what Instead of That should then be automatically converted to the right pseudoversion by the first However, perhaps that is no simpler than the current https://golang.org/cl/178497 approach. |
@thepudds I don't know why that change is not sure or hard to understand. When the
we passed |
Change https://golang.org/cl/179857 mentions this issue: |
It is not correct for |
… in (*codeRepo).convert Previously, we used the passed-in statVers as the basis for tag search, but it is not always valid. Instead, use info.Name, which (by precondition) must be valid. Updates #32161 Updates #27171 Change-Id: Iaecb5043bdf2fefd26fbe3f8e3714b07d22f580f Reviewed-on: https://go-review.googlesource.com/c/go/+/179857 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
What version of Go are you using (
go version
)?What did you do?
Extract the following files:
Run
go mod init example
.What did you expect to see?
I would expect to see the
go.mod
file reflect the requirements listed in theglide.lock
file. Specifically, I'd expect to see thisgo.mod
file:which is what you get if you start with this
go.mod
file, which exactly reflects theglide.lock
file:What did you see instead?
I see this
go.mod
file:The
github.com/eapache/queue
dependency has the wrong pseudo-version, which means that when dependencies are later resolved, the dependency in sarama (which depends on epache/queue v1.1.0) supercedes the dependency in thego.mod
file, which leads to a version regression.The text was updated successfully, but these errors were encountered: