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

Compatibility Go release 1.22 toolchain go1.23.1 #312

Open
zucchinidev opened this issue Dec 19, 2024 · 2 comments · May be fixed by #315
Open

Compatibility Go release 1.22 toolchain go1.23.1 #312

zucchinidev opened this issue Dec 19, 2024 · 2 comments · May be fixed by #315

Comments

@zucchinidev
Copy link

When using this sentence in the go.mod file:

toolchain go1.23.1

That change was introduced in this commit: 7cd04d1

The project is set up to be built and tested with Go 1.23.1. It is recommended to use this version to ensure compatibility and avoid potential issues.

As the documentation says:

Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. We fix critical problems, including critical security problems, in supported releases as needed by issuing minor revisions (for example, Go 1.6.1, Go 1.6.2, and so on).

The Major Go release 1.22 must be supported because the 1.24 is still a release candidate.

Steps to reproduce it:

 ➜  brokerapi git:(main) ✗ gvm use go1.22.10
Now using version go1.22.10
➜  brokerapi git:(main) ✗ GOTOOLCHAIN=local                                                  
➜  brokerapi git:(main) ✗ go mod download
go: module github.com/maxbrunsfeld/counterfeiter/[email protected] requires go >= 1.23; switching to go1.23.4
@joefitzgerald
Copy link
Collaborator

It looks like this PR introduced code that will only work when using go 1.23. We could explore using a build tags to solve for this, however given the proximity to the go 1.24 release I am unlikely to spend the time to do this myself. PR welcome.

In the interim, please use v6.9.0, which should still work with 1.22.

dnwe added a commit to dnwe/counterfeiter that referenced this issue Jan 17, 2025
- relax go directive to 1.22.0 to match the N-1 and N support statement
  and permit run/build with go1.22.0 and newer
- update the test fixtures go.mod similarly to make them representative
- use the toolchain directive to _recommend_ the latest 1.23.x (Go
  treats this as advisory)
- fix the CI build so that oldstable and stable are actually being
  tested by telling setup-go to ignore the toolchain directive

Fixes maxbrunsfeld#312

Signed-off-by: Dominic Evans <[email protected]>
dnwe added a commit to dnwe/counterfeiter that referenced this issue Jan 17, 2025
- relax go directive to 1.22.0 to match the N-1 and N support statement
  and permit run/build with go1.22.0 and newer
- update the test fixtures go.mod similarly to make them representative
- use the toolchain directive to _recommend_ the latest 1.23.x (Go
  treats this as advisory)
- fix the CI build so that oldstable and stable are actually being
  tested by telling setup-go to ignore the toolchain directive
- use go build tags to add a stub for types.Alias on go1.22 and
  (somewhat ironically!) use a simple type Alias to the builtin on
  go1.23 and newer

Fixes maxbrunsfeld#312

Signed-off-by: Dominic Evans <[email protected]>
@dnwe dnwe linked a pull request Jan 17, 2025 that will close this issue
@chriscerk
Copy link

@joefitzgerald mind reviewing #315?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants