-
Notifications
You must be signed in to change notification settings - Fork 12
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
Bump go mod version back down to 1.20 #13
Comments
nathanperkins
added a commit
to nathanperkins/socket
that referenced
this issue
Mar 11, 2024
This avoids new 1.21 go mod management behavior which automatically upgrades a module's go mod version based on dependencies. See mdlayher#13 for discussion
mdlayher
pushed a commit
that referenced
this issue
Mar 11, 2024
This avoids new 1.21 go mod management behavior which automatically upgrades a module's go mod version based on dependencies. See #13 for discussion
@mdlayher will this automatically release as a new version or do we need to manually tag? |
Thank you for merging the fix! :) |
No problem, thank you for the pr! I will cut a tag tomorrow with a script but you can always pull at latest for gomod. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tl;dr - revert the go mod version from 1.21 back to 1.20 to avoid this module forcing downstream modules to upgrade
In 1.21, the go tooling introduced new go mod management behavior where a repo's go mod version, like
go 1.20
will automatically be upgraded if it is less than the minimum go mod version of any of its dependencies.For example, if I have a module using 1.20 and I import a module which uses 1.21, running
go mod tidy
will update my module to 1.21.Unfortunately, this makes it hard for us to maintain stable releases because bumping any dependency to resolve a CVE may force us to bump the go mod version, which introduces potentially undesirable changes to the runtime behavior. We are seeing that in our projects which import mdlayher/socket right now.
The go team is considering a proposal which can mitigate this issue, and we are waiting to see when it will be delivered. We are hoping for 1.23.
Until then, could we set this project's go.mod version back to 1.20 so that importing this repo doesn't force other projects to upgrade? If there is no 1.21+ feature used in the repo, then this should essentially be a no-op.
The text was updated successfully, but these errors were encountered: