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

question: what is the Go version support policy? #2045

Open
spencerschrock opened this issue Jan 21, 2025 · 0 comments · May be fixed by #2047
Open

question: what is the Go version support policy? #2045

spencerschrock opened this issue Jan 21, 2025 · 0 comments · May be fixed by #2047
Labels
question Further information is requested

Comments

@spencerschrock
Copy link

spencerschrock commented Jan 21, 2025

The newest release (v0.20.3) includes a change from #2025 which bumps the Go directive from 1.18 to 1.23.0. As far as I know, the reason wasn't due to a feature required in Go 1.23, but rather "update everything to latest so that things build in CI." This change propagates to dependent libraries, so we are also required to use Go 1.23.

Would you consider walking back the 1.23 requirement if you don't need the features? Or supporting the last two versions of Go (1.22 too in this case).

There are other ways to use the latest version of Go in your CI, without requiring it for the project:

Instead of

    - uses: actions/setup-go@v5
      with:
        go-version-file: go.mod

There is also an actions/setup-go stable alias for the latest Go release:

    - uses: actions/setup-go@v5
      with:
        go-version: stable

@imjasonh would this work for you?

edit: I see one of your dependencies requires at least 1.22.7, so the request would be to use that instead of 1.23.0 (although pkg/authn/k8schain/go.mod and pkg/authn/kubernetes/go.mod would require 1.23.0 for theirs)

@spencerschrock spencerschrock added the question Further information is requested label Jan 21, 2025
dnwe added a commit to dnwe/go-containerregistry that referenced this issue Jan 24, 2025
Setting the go directive to 1.23.0 requires all consumers of the module
to be building with 1.23.0 or newer release of Go 1.23 and to update
their own go.mod accordingly — this seems unnecessarily restrictive for
a library module, particularly as the code itself doesn't currently use
any modern language constructs and builds fine even with older Go
versions.

Instead set the go directive to 1.22.0 and use the toolchain directive
to recommend the latest 1.23.x when building locally.

Note: this also includes a run of `hack/bump-deps.sh` to ensure all deps
are compatible with go1.22.0 as well

Fixes google#2045

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
@dnwe dnwe linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant