-
Notifications
You must be signed in to change notification settings - Fork 89
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 mod incompatibility #170
Comments
Almost one year and still not fixed :( @tj @f2prateek |
Hi @mimol91 & @AndrewBurian. This fix is high on our priority list. I will circle back once its complete. Apologies for the delay :) |
still having issue: go get gopkg.in/segmentio/analytics-go.v3
go: gopkg.in/segmentio/[email protected]: parsing go.mod:
module declares its path as: github.com/segmentio/analytics-go/v3
but was required as: gopkg.in/segmentio/analytics-go.v3 go version go1.18.2 darwin/arm64 |
problem is But kind of chicken-egg, gopkg.io needs be fixed up to new form but I guess that won't happen until it is fixed up here. |
still not working :( |
Any update on this? I'd like to start using Segment but this is a blocker 😢 |
Our workaround is to switch to github repo directly by using
instead of gopkg.in since that just doesn't work. |
There is a small issue in the versioning of this repo causing go mod to think it incompatible with versioning.
If you look here in the godocs you can see go only officially recognizes the default v1 on the master branch, and a
v3.1.0+incompatible
.Go mod supports two versioning strategies, either subdirectories or branches. This repo uses branches just fine, but on the v3 branch you need to have the mod file mark the project as v3 by adding
/v3
suffix to the module name. Then imports will import the project asimport github.com/segmentio/analytics-go/v3
.Obviously this dates back to before Go really had modules sorted out, so this is more a modernization than a bug.
Fix: change to go.mod to be
module github.com/segmentio/analytics-go/v3
. It's annoying but that is how the gomod doI don't believe this will break anyone using the gopkg.in import recommended currently in the docs, and will enable people to use the direct import with full proper versions.
The text was updated successfully, but these errors were encountered: