-
Notifications
You must be signed in to change notification settings - Fork 187
Update go version #154
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
Comments
Do we want it to be the version the code still works with, or a reasonably current version? (e.g. we use |
I assume we want to stay on the lowest version possible (so not 1.24) to not force our clients to upgrade unnecessarily. Options (with associated principles):
@flwyd do you have an opinion? |
The Go version in the go.mod file specifies the minimum version of Go which can be used to build the module. It also determines which compiler features are enabled when building. Regardless of the version declared, Go uses the active toolchain to build it: if someone compiles with Go 1.24, they'll get all the compiler benefits, standard library performance improvements, etc. even if our module only declares 1.21. I tend to think the third principle (only update when we want to use new features of a Go version) is a good idea. We don't get any benefit by declaring a higher version than we need, and it doesn't require someone to upgrade their module's Go version to pick up a new version of the geo package, until we start using a new feature. (This approach is advocated by mingo, for example.) We also don't need to be too conservative about this: if there's a good reason to use a new feature, we shouldn't cling to an old Go version. Go 1.22 improves the semantics of variables declared in for loops, and allows range over an integer. |
That sounds reasonable to me. So let's not update go.mod. However, our go.yml currently builds / tests pull requests with I'll also file a help-wanted issue to enable matrix testing on both stable and the version in go.mod since that'd be a bit better but requires more thought than I have time for at the moment. |
Previously we were using the version in go.mod. We're thinking we shouldn't update that unless we want to use new features of the latest go release. However, for the build / test actions, it seems important to test using a version we'd recommend for our clients. Fix #154
We're on 1.21. As of Feb, 2025 only 1.24 and 1.23 are supported.
The text was updated successfully, but these errors were encountered: