chore: bump minimum Go to 1.26 and adopt 1.26 features - #2920
Merged
Conversation
3 tasks
vmaerten
force-pushed
the
feat/adopt-go-1.26
branch
from
August 20, 2026 10:00
52ad138 to
9a187f6
Compare
vmaerten
marked this pull request as ready for review
August 20, 2026 10:02
Prepares the ground for when Go 1.27 ships and 1.25 is dropped from the two-latest support window. Not to be merged before 1.27 is released. - go.mod: go directive 1.25.10 -> 1.26.4; drop 1.25.x from the build, test and lint CI matrices. - Adopt errors.AsType[T]: add a wrapper in the internal errors package (kept there per the depguard rule) and migrate the errors.As call sites to the generic, type-safe form. - Finish the sort -> slices migration (SortFunc/Sort) and use slices.Collect(maps.Keys(...)), dropping the sort import. - go fix ./...: drop obsolete // +build lines from two stragglers.
1.27 shipped, so the two-latest support window is now 1.26 and 1.27.
It still pinned 1.25.10, so renovate would hold back any dependency requiring the 1.26 the module now asks for.
The release workflows kept building with 1.26 while CI moved to the 1.26/1.27 window. Pin the dev toolchain to 1.27 as well so local builds match what ships.
vmaerten
force-pushed
the
feat/adopt-go-1.26
branch
from
August 20, 2026 10:18
3185e28 to
1cf293a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the ground for adopting Go 1.26 features. Do not merge before Go 1.27 is released — this drops 1.25 from the two-latest support window, so it should only land once 1.27 ships.
Changes
go.moddirective1.25.10→1.26.4; drop1.25.10from thetest.yml/lint.ymlCI matrices.errors.AsType[T](Go 1.26): add anAsTypewrapper in the internalerrorspackage (kept there per thedepguardrule) and migrate theerrors.As(err, &x)call sites to the generic, type-safe form.sort→slices:slices.SortFunc/slices.Sortandslices.Collect(maps.Keys(...)), dropping thesortimport from the touched files.go fix ./...: drop obsolete// +buildlines from two straggler files.%qused on anintinexperiments/errors.go, which Go 1.26's strictergo vetnow reports.Test plan
go build ./...,go vet ./...(incl.-tags signals watch fsbench) — clean on Go 1.26.golangci-lint run ./...— 0 issues (depguard,modernize,gofumpt).go test ./...— all packages pass.Before merging (once 1.27 is out): rebase on
main, add aCHANGELOG.mdentry, and optionally extend the CI matrix to[1.26.x, 1.27.x].