-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: use version suffix appropriate for tag #4183
Conversation
If your repo has a tag that Go modules parses as semver (like [v2.11.1](https://github.com/argoproj/argo/releases/tag/v2.11.1)) then the module name in the corresponding go.mod must meet Go modules' expectations, specifically if it is v2 or above it must include a `/vN` version suffix. If you don't do this, your project is essentially unusable by consumers. The fix I've made to go.mod here is simple, but this isn't the end: you also need to update all your import paths to use the `/v2` suffix as well. Fixes #2602
|
Can you please look at the failing jobs and fix? |
@peterbourgon doesn't this require a bump to v3? otherwise one would run into the problem where v2 resolves to different versions depending on the package manager |
Sorry, beyond my scope — my intent here is just to show you what needs to happen for the repo to be valid. — @CameronAckermanSEL
I don't think so — if you have a go.mod you're a Go module, and if you're a Go module you shouldn't be using anything other than Go modules to manage your dependencies. But maybe you're referring to something else? |
@peterbourgon, this is a fair point, but because this fundamentally changes how others should be consuming this library, it is a breaking change in that respect. It really impacts users importing this library indirectly because depending on the way a library imports this one, it may resolve to inconsistent versions. If I'm understanding the test failures correctly, that problem may already be happening. |
Hmm, that's not a breaking change in the semver sense, but sure, happy to bump to v3. I'm also making an attempt at the other necessary changes, commit(s) incoming... |
FWIW I agree with you that this is not traditionally a semver change. |
Replaced by #4197 |
If your repo has a tag that Go modules parses as semver (like v2.11.1) then the module name in the corresponding go.mod must meet Go modules' expectations, specifically if it is v2 or above it must include a
/vN
version suffix. If you don't do this, your project is essentially unusable by consumers.The fix I've made to go.mod here is simple, but this isn't the end: you also need to update all your import paths to use the
/v2
suffix as well.Fixes #2602
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.