-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Go module doesn't pick the latest version #903
Comments
I was an early adopter of Go modules for v6, but it has caused some pain (see #877). So I rolled it back and decided that v7 will be the first release to support Go modules. Regarding the version selection mechanism: Thanks for reporting. I'm not exactly sure why Go 1.11 does this, really. I'd be more than happy if you could dig into it because I'm quite busy with my day job these days. Forcing the version number works though, as you already found out. |
Thanks mate. I will see what I can find. |
Hi Oliver. I did a bit of investigation and I believe the issue is cause by 66b430c . Basically, you removed the SEMver from the import path but you probably forgot to remove the Given that I forked your repo and tested it out and it worked. Feel free to have a look plese: https://github.com/xitonix/elastic/releases Thanks @johnnyluo for helping me to find the issue :) |
Yeah, that makes sense. Thank you very much @xitonix and @johnnyluo for tracking this down! I will remove the |
Hi Oliver,
I am not actually sure if this is a bug in
go mod
or there is something specific to this repo's setup (or maybe this is the expected behaviour), but I thought maybe I consult it with you before I raise it with the Go team, if that's an issue. I'd appreciate it if you could shed some light on this please.Which version of Elastic are you using?
[X ] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
I expect go module to go with the latest released version, which is v6.2.5 at the time
Please describe the actual behaviour
For some reason go module picks
v6.1.25
instead and marks it asincompatible
.Here is the entry in my
go.mod
file:github.com/olivere/elastic v6.1.25+incompatible
Also, if I try to pin the dependency to the latest version by running
go get github.com/olivere/elastic@v6.2.5
this is how mygo.mod
gets updated:github.com/olivere/elastic v0.0.0-20180831175714-e6cae211ee80
Any steps to reproduce the behavior?
github.com/olivere/elastic
go mod init your_example_package
go build
The text was updated successfully, but these errors were encountered: