Repository navigation
go.mod: require 1.27.1, and add the gofmt check this lane never had - #38
Merged
Merged
Conversation
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>
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.
Two things, and the second is why the first was worth doing here.
The toolchain
.github/workflows/ci.ymlhas pinnedgo-version: "1.27.1"whilego.modasked forgo 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 runsgo vetand 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.gobuilt name-table records asw.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 variadicu16skeeps 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, sogolang/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 testfail twice with missing cache files and once withpackage internal/nettrace is not in std. Neither was real; a privateGOCACHEmade every run reproducible.Tagged
v0.13.0on merge: raising thegodirective is a build-requirement change.🤖 Generated with Claude Code