Skip to content
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

Remove patch version in go.mod's #1192

Closed
johanbrandhorst opened this issue Feb 21, 2025 · 5 comments
Closed

Remove patch version in go.mod's #1192

johanbrandhorst opened this issue Feb 21, 2025 · 5 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@johanbrandhorst
Copy link

9fdb1ca updated the go stanza in the go.mod files in this repo to 1.23.0. In some cases, it was changed from go 1.22 to go 1.23.0. That might seem insignificant, but it turns out that this can cause all kinds of annoying problems for downstream problems (see discussion on grpc-go/grpc repo) and ideally libraries should (for now at least) not use the patch version at all. Please consider changing to go 1.23 consistently.

@johanbrandhorst johanbrandhorst added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 21, 2025
@liggitt
Copy link
Contributor

liggitt commented Feb 21, 2025

Given go tooling adds the patch version by default, it's really hard (almost impossible) to try to keep it out of individual modules. I'd suggest resolving that in go tooling before trying to chase the whole internet of dependencies to keep patch versions out

xref kubernetes/kubernetes#124385 (comment)

@johanbrandhorst
Copy link
Author

It is being discussed: golang/go#65847. If you don't want to make the change, I respect that.

@quartzmo
Copy link
Member

@johanbrandhorst Per commentary on golang/go#65847, it seems to me that declaring a 0 value patch version is acceptable for the moment (until the Go team addresses patch versions in the go directive, if ever). Is there any immediate problem for you if we keep our go.mod go versions at 1.2x.0?

@johanbrandhorst
Copy link
Author

I think staying at 1.x.0 is likely fine, if that's something you're happy to commit to we can close this issue.

@quartzmo
Copy link
Member

if that's something you're happy to commit to we can close this issue

We will try our best to maintain the 0 value patch versions. If one of our dependencies updates to a higher patch version, we'll ask them to restore the 0 patch version, and delay updating the dependency version until they do so. Only if absolutely necessary will we allow a dependency to force us to increase the patch version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants