From 96814f7f2da200faf24ccf7dd903cbf4ca0bac6b Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 17 Feb 2026 20:20:15 -0800 Subject: [PATCH 1/2] support Go 1.26, release v0.9.0 --- .changes/v0.9.0.md | 3 +++ CHANGELOG.md | 4 ++++ go.mod | 8 ++++---- go.sum | 12 ++++++------ mise.lock | 28 +++++++++++++--------------- mise.oldstable.toml | 2 +- 6 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 .changes/v0.9.0.md diff --git a/.changes/v0.9.0.md b/.changes/v0.9.0.md new file mode 100644 index 0000000..ca04f0a --- /dev/null +++ b/.changes/v0.9.0.md @@ -0,0 +1,3 @@ +## v0.9.0 - 2026-02-17 +### Added +- Support Go 1.26 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6581a00..b1a6b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## v0.9.0 - 2026-02-17 +### Added +- Support Go 1.26 + ## v0.8.0 - 2025-11-30 ### Added - Add -required flag to mark fields in third-party packages as required without modifying source code. diff --git a/go.mod b/go.mod index 57d361d..5990a07 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module go.abhg.dev/requiredfield -go 1.23 +go 1.25.0 -require golang.org/x/tools v0.30.0 +require golang.org/x/tools v0.42.0 require ( - golang.org/x/mod v0.23.0 // indirect - golang.org/x/sync v0.11.0 // indirect + golang.org/x/mod v0.33.0 // indirect + golang.org/x/sync v0.19.0 // indirect ) diff --git a/go.sum b/go.sum index 68d0914..5e2a226 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= -golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= diff --git a/mise.lock b/mise.lock index 9695b13..22d4b3b 100644 --- a/mise.lock +++ b/mise.lock @@ -1,20 +1,20 @@ [[tools."aqua:golangci/golangci-lint"]] -version = "2.6.2" +version = "2.10.1" backend = "aqua:golangci/golangci-lint" - -[tools."aqua:golangci/golangci-lint".platforms.macos-arm64] -checksum = "sha256:6164de2b9a9e6b4b8deea57c5072ada5d6d41bf5cca0b2f744e7b3d6e818fe0d" -size = 13801291 -url = "https://github.com/golangci/golangci-lint/releases/download/v2.6.2/golangci-lint-2.6.2-darwin-arm64.tar.gz" +"platforms.linux-arm64" = { checksum = "sha256:6652b42ae02915eb2f9cb2a2e0cac99514c8eded8388d88ae3e06e1a52c00de8", url = "https://github.com/golangci/golangci-lint/releases/download/v2.10.1/golangci-lint-2.10.1-linux-arm64.tar.gz"} +"platforms.linux-x64" = { checksum = "sha256:dfa775874cf0561b404a02a8f4481fc69b28091da95aa697259820d429b09c99", url = "https://github.com/golangci/golangci-lint/releases/download/v2.10.1/golangci-lint-2.10.1-linux-amd64.tar.gz"} +"platforms.macos-arm64" = { checksum = "sha256:03bfadf67e52b441b7ec21305e501c717df93c959836d66c7f97312654acb297", url = "https://github.com/golangci/golangci-lint/releases/download/v2.10.1/golangci-lint-2.10.1-darwin-arm64.tar.gz"} +"platforms.macos-x64" = { checksum = "sha256:66fb0da81b8033b477f97eea420d4b46b230ca172b8bb87c6610109f3772b6b6", url = "https://github.com/golangci/golangci-lint/releases/download/v2.10.1/golangci-lint-2.10.1-darwin-amd64.tar.gz"} +"platforms.windows-x64" = { checksum = "sha256:c60c87695e79db8e320f0e5be885059859de52bb5ee5f11be5577828570bc2a3", url = "https://github.com/golangci/golangci-lint/releases/download/v2.10.1/golangci-lint-2.10.1-windows-amd64.zip"} [[tools.go]] -version = "1.25.4" +version = "1.26.0" backend = "core:go" - -[tools.go.platforms.macos-arm64] -checksum = "sha256:c1b04e74251fe1dfbc5382e73d0c6d96f49642d8aebb7ee10a7ecd4cae36ebd2" -size = 58026727 -url = "https://dl.google.com/go/go1.25.4.darwin-arm64.tar.gz" +"platforms.linux-arm64" = { checksum = "sha256:bd03b743eb6eb4193ea3c3fd3956546bf0e3ca5b7076c8226334afe6b75704cd", url = "https://dl.google.com/go/go1.26.0.linux-arm64.tar.gz"} +"platforms.linux-x64" = { checksum = "sha256:aac1b08a0fb0c4e0a7c1555beb7b59180b05dfc5a3d62e40e9de90cd42f88235", url = "https://dl.google.com/go/go1.26.0.linux-amd64.tar.gz"} +"platforms.macos-arm64" = { checksum = "sha256:b1640525dfe68f066d56f200bef7bf4dce955a1a893bd061de6754c211431023", url = "https://dl.google.com/go/go1.26.0.darwin-arm64.tar.gz"} +"platforms.macos-x64" = { checksum = "sha256:1ca28b7703cbea05a65b2a1d92d6b308610ef92f8824578a0874f2e60c9d5a22", url = "https://dl.google.com/go/go1.26.0.darwin-amd64.tar.gz"} +"platforms.windows-x64" = { checksum = "sha256:9bbe0fc64236b2b51f6255c05c4232532b8ecc0e6d2e00950bd3021d8a4d07d4", url = "https://dl.google.com/go/go1.26.0.windows-amd64.zip"} [[tools."ubi:abhinav/stitchmd"]] version = "0.9.0" @@ -23,6 +23,4 @@ backend = "ubi:abhinav/stitchmd" [[tools."ubi:miniscruff/changie"]] version = "1.24.0" backend = "ubi:miniscruff/changie" - -[tools."ubi:miniscruff/changie".platforms.macos-arm64-changie] -checksum = "blake3:1c0f9659a327367bcc9a82ca3feeb610feb1378617fe815c780dc7bdb2a847b3" +"platforms.macos-arm64-changie" = { checksum = "blake3:1c0f9659a327367bcc9a82ca3feeb610feb1378617fe815c780dc7bdb2a847b3"} diff --git a/mise.oldstable.toml b/mise.oldstable.toml index 3c6a218..16cba4f 100644 --- a/mise.oldstable.toml +++ b/mise.oldstable.toml @@ -1,3 +1,3 @@ # Run with 'MISE_ENV=oldstable' to run with the oldstable environment. [tools] -go = "1.24" +go = "1.25" From 1ad6341216c17186a6db0a64b7403ab1fa239dac Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 17 Feb 2026 20:30:05 -0800 Subject: [PATCH 2/2] test(e): remove invalid generic alias test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `e_go1.24.go` tested the analyzer against `type genericAlias[T any] = T`. This construct has always been illegal per the Go spec: a type alias cannot use its own type parameter as its RHS. Go 1.18–1.25 silently accepted it due to a gap in type-checker enforcement. Go 1.26 closes that gap, causing `go/types` to reject the file, which in turn caused the analysis test to fail with "analysis skipped due to errors in package". There is no valid Go generic alias form that produces a composite literal of the aliased struct type, so the scenario cannot be rewritten with an equivalent valid construct. The non-generic alias code path in `enforce.go` is already exercised by `testdata/src/a/a.go` and `testdata/src/c/c.go`, so test coverage is not lost. ## LLM Assistance Claude Code diagnosed the root cause (Go 1.26 type-checker now enforcing a long-standing spec rule), determined that no valid replacement test could cover the same scenario, and removed the file. Co-Authored-By: Claude --- testdata/src/e/e_go1.24.go | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 testdata/src/e/e_go1.24.go diff --git a/testdata/src/e/e_go1.24.go b/testdata/src/e/e_go1.24.go deleted file mode 100644 index fe81024..0000000 --- a/testdata/src/e/e_go1.24.go +++ /dev/null @@ -1,23 +0,0 @@ -//go:build go1.24 - -package e - -import "fmt" - -type AllOptional struct { - X string - Y int -} - -type OneRequired struct { // want OneRequired:"required" - A string - B int // required -} - -type genericAlias[T any] = T - -func _() { - fmt.Println(genericAlias[AllOptional]{}) - fmt.Println(genericAlias[OneRequired]{}) // want "missing required fields: B" - fmt.Println(genericAlias[OneRequired]{B: 42}) -}