-
Notifications
You must be signed in to change notification settings - Fork 2.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
Golang modules does not like short version tags #5019
Comments
The Vitess 4.0 release was tagged as v4.0.0, which should address this. I am going to close this issue for now, but please let me know if it doesn't fix it. |
I think this is still an issue.
There's no 4.0.0 or 4.0.0 in that list. |
Yes, It looks like the modules are a bit stricter with major versions than I understood. With the major version the import path needs updating for all the clients. e.g. - import "vitess.io/vitess/go/vt/vitessdriver"
+ import "vitess.io/vitess/v4/go/vt/vitessdriver" I think this needs an update of - module vitess.io/vitess
+ module vitess.io/vitess/v4
go 1.12
require ( But I've not been able to test this yet. This will explain the current errors I see: $ go list -m -versions vitess.io/vitess/v4
go list -m: module vitess.io/vitess/v4: reading https://proxy.golang.org/vitess.io/vitess/v4/@v/list: 410 Gone
$ export GOPROXY=
$ go list -m -versions vitess.io/vitess/v4
go: finding vitess.io/vitess/v4 v4.0.1
go list -m: vitess.io/vitess/v4@v4.0.1: invalid version: go.mod has non-.../v4 module path "vitess.io/vitess" (and .../v4/go.mod does not exist) at revision v4.0.1 |
Can someone please reopen this issue ? IMO this issue is not fixed whether you taged v4.0 or v4.0.0 , as @physcat said , module name Refers to https://blog.golang.org/v2-go-modules |
Reopening as requested. |
Ran into this issue. For anyone else who's looking, note that you can get packages by commit hash:
|
The golang modules approach will not work for the vitess versioning scheme. The work around I tried works fine, which is to stay under v1.0. I tagged the v7 release as https://github.com/vitessio/vitess/releases/tag/v0.7.0 and that worked. So, we should do the same for v8 and tag it as v0.8.0. Tagging @askdba. |
Since we have the workaround in place, and we're consistently generating the v0.xx.x == Vitess vxx.x tags now when we do releases, I'm going to close this.
|
Please add the patch version number to the Major releases tags in git. i.e.
for v3.0 add v3.0.0
Golang modules uses Semantic Versioning (https://semver.org/) to find versions.
When a developer does build or a get, they will get v2.1.1 as go does not recognise v3.0
This will result in errors such as:
./main.go:222:30: not enough arguments in call to vitessdriver.Open have (string, string) want (string, string, string, time.Duration)
The full list of tags that go modules recognises are:
Go will not install pre-release version by default, but since v3.0 and v3.0.0-rc3 are the same, the developer can do either:
$ go get vitess.io/vitess@v3.0
or
$ go get -u vitess.io/vitess@4f192d1
both will work, but resulting in the apparent dependency on a pre-release package:
The text was updated successfully, but these errors were encountered: