Skip to content

Update all dependencies to Go 1.24#2264

Merged
mromaszewicz merged 7 commits into
oapi-codegen:mainfrom
mromaszewicz:maintenance/go124
Mar 2, 2026
Merged

Update all dependencies to Go 1.24#2264
mromaszewicz merged 7 commits into
oapi-codegen:mainfrom
mromaszewicz:maintenance/go124

Conversation

@mromaszewicz

Copy link
Copy Markdown
Member

This change makes our minimum required Go version 1.24 (the last supported) and updates module structure to reflect that, because we had lots of nested modules which were there to test code that was 1.24 only.

mromaszewicz and others added 6 commits February 28, 2026 08:21
Bump all go.mod files from go 1.22.5 to go 1.24 and normalize any
go 1.24.0 to go 1.24 for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ement

Now that all modules require go 1.24, these inner modules are no longer
needed as separate modules. Their packages are absorbed by the parent
modules (internal/test and examples), which now include the fiber
dependencies directly.

Removed inner modules:
- internal/test/strict-server/fiber/
- internal/test/issues/issue1469/
- internal/test/issues/issue-1529/strict-fiber/
- examples/minimal-server/stdhttp-go-tool/
- examples/minimal-server/fiber/
- examples/extensions/xomitzero/
- examples/petstore-expanded/fiber/
- examples/output-options/preferskipoptionalpointerwithomitzero/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run go get for all direct dependencies across all modules, constrained
to go 1.24 via GOTOOLCHAIN=go1.24.4 to avoid pulling in deps that
require go 1.25.

Notable updates:
- gin v1.10.1 -> v1.11.0 (v1.12.0 requires go 1.25)
- iris v12.2.6 -> v12.2.11
- echo v4.11.4/v4.12.0 -> v4.15.1
- chi v5.0.10 -> v5.2.5
- golang.org/x/tools v0.30.0 -> v0.42.0
- golang.org/x/mod v0.23.0 -> v0.33.0
- golang.org/x/text v0.20.0 -> v0.34.0

Pinned speakeasy-api/jsonpath at v0.6.0 across all modules due to
v0.6.1+ removing the pkg/overlay package that openapi-overlay tests
depend on. Pinned dprotaso/go-yit at the pre-yaml/v4 version as the
newer version switches to go.yaml.in/yaml/v4 which is incompatible
with vmware-labs/yaml-jsonpath.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Now that all modules require go 1.24, exclude older versions from the
CI build/test/tidy/generate matrix via the excluding_versions input
on the reusable workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Now that go 1.24 is the minimum version, the execute-if-go-122/124
guards are always true. Simplify the Makefiles to run commands directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mromaszewicz mromaszewicz requested a review from a team as a code owner February 28, 2026 17:03
Remove usage of deprecated middleware.Logger() from Echo examples and
tests. This was deprecated in Echo v4.15.1 in favor of
middleware.RequestLogger or middleware.RequestLoggerWithConfig. Since
these calls only added request logging for debugging convenience, they
are removed rather than replaced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread .github/workflows/ci.yml
build:
uses: oapi-codegen/actions/.github/workflows/ci.yml@75566d848d25021f137594c947f26171094fb511 # v0.5.0
with:
excluding_versions: '["1.22", "1.23"]'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do this upstream in the actions repo (after this change) and then that'll mean we can roll out minimum Go 1.24 across all our repos

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we have to update all the others first. I'll do that next.

Comment thread README.md
//go:generate go tool oapi-codegen -config cfg.yaml ../../api.yaml
```

### Prior to Go 1.24

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this pattern may still be used by folks - especially with a separate tools/go.mod, it can be better for the overall dependency tree - but not blocking this review

@jamietanna jamietanna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Good stuff

@jamietanna jamietanna added the notable changes Used for release notes to highlight these more highly label Mar 2, 2026
@mromaszewicz mromaszewicz merged commit 863c6ea into oapi-codegen:main Mar 2, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notable changes Used for release notes to highlight these more highly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants