Skip to content

go.mod: require 1.27.1, and add the gofmt check this lane never had - #38

Merged
tannevaled merged 1 commit into
mainfrom
go-1-27-and-the-gofmt-check-this-lane-never-had
Oct 4, 2026
Merged

tannevaled merged 1 commit into
mainfrom
go-1-27-and-the-gofmt-check-this-lane-never-had

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Two things, and the second is why the first was worth doing here.

The toolchain

.github/workflows/ci.yml has pinned go-version: "1.27.1" while go.mod asked for go 1.26.4. The directive now matches the pin, which matters because 1.27 counts statements more finely: a coverage figure measured with an older toolchain is an upper bound rather than a measurement, and this repository's gate is exact 100%. Measured with 1.27.1: still exactly 100%, every function, so the gate is unaffected.

The missing check

gofmt -l . reported two files on main — under 1.26's gofmt and 1.27's alike — and nothing said so, because this lane runs go vet and no gofmt check, while every sibling repository in the fleet runs both. An unformatted tree had been green for as long as it took to notice.

The lane has the check now, in the same shape the siblings use, and the two files are formatted. One needed a judgement call rather than a mechanical rewrite: font_test.go built name-table records as w.u16(3); w.u16(1); … — six calls on one line — which gofmt splits into six lines, losing the one thing that layout was for: a record is six numbers in a fixed order and reads as a row. A variadic u16s keeps the row and satisfies gofmt, which seemed better than making the file obey the tool at the cost of what it was showing.

Verified with 1.27.1 before committing

gofmt, vet, go test -race, the exact-100% coverage gate, and the six cross-build targets the lane lists — including loong64, which is built and never executed here, so golang/go#81147 (the loong64 code-generation backport, still open at the 1.27.2 milestone) cannot affect this repository.

A measurement note for whoever runs this next: the shared build cache on this machine was being pruned concurrently, which made go test fail twice with missing cache files and once with package internal/nettrace is not in std. Neither was real; a private GOCACHE made every run reproducible.

Tagged v0.13.0 on merge: raising the go directive is a build-requirement change.

🤖 Generated with Claude Code

Two things, and the second is why the first was worth doing here.

THE TOOLCHAIN. `.github/workflows/ci.yml` has pinned `go-version: "1.27.1"` while
`go.mod` asked for `go 1.26.4`. The directive now matches the pin, which matters
because 1.27 counts statements more finely: a coverage figure measured with an older
toolchain is an upper bound rather than a measurement, and this repository's gate is
EXACT 100%. Measured with 1.27.1: still exactly 100%, every function, so the gate is
unaffected.

THE MISSING CHECK. `gofmt -l .` reported TWO files on main -- under 1.26's gofmt and
1.27's alike -- and nothing said so, because this lane runs `go vet` and no gofmt
check while every sibling repository in the fleet runs both. An unformatted tree had
been green for as long as it took to notice.

The lane has the check now, in the same shape the siblings use, and the two files are
formatted. One of them needed a judgement call rather than a mechanical rewrite:
`font_test.go` built name-table records as "w.u16(3); w.u16(1); …", six calls on one
line, which gofmt splits into six lines and which loses the one thing that layout was
for -- a record is six numbers in a fixed order and reads as a row. A variadic `u16s`
keeps the row and satisfies gofmt, which seemed better than making the file obey the
tool at the cost of what it was showing.

Verified with 1.27.1 before committing: gofmt, vet, `go test -race`, the exact-100%
coverage gate, and the six cross-build targets the lane lists (including loong64,
which is BUILT and never executed here -- so `golang/go#81147`, the loong64
code-generation backport still open at the 1.27.2 milestone, cannot affect this
repository).

A measurement note for whoever runs this next: the shared build cache on this machine
was being pruned concurrently, which made `go test` fail twice with missing cache
files and once with "package internal/nettrace is not in std". Neither was real; a
private GOCACHE made every run reproducible.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 3574f51 into main Oct 4, 2026
1 check passed
@tannevaled
tannevaled deleted the go-1-27-and-the-gofmt-check-this-lane-never-had branch October 4, 2026 19:39
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 this pull request may close these issues.

1 participant