Go 1.27 lets go build pass code that go test rejects under a new stdversion check
DEV Community's Go 1.27 guide says most modules need one go.mod line and a go fix pass, plus a handful of changes that bite silently. Some fail the build outright and others pass it, so the order is build, test, then fix.
The Engineer · Build desk
An old GODEBUG value, //go:debug asynctimerchan=0, is a build error. strings.CutLast with go.mod at go 1.26 builds on a 1.27 toolchain but fails go test's vet step. fmt.Errorf with %w on a *E draws a vet warning. compress/flate produces different bytes.
- What it limits constraint Old value of a removed GODEBUG //go:debug asynctimerchan=0 is marked as a build error; the guide says to delete the line, claim 7
- What doesn't add up contradiction Code calling strings.CutLast With go.mod at go 1.26 and a 1.27 toolchain, go build succeeds but go test fails the vet step, claim 11
- Who's exposed exposure fmt.Errorf with %w on a *E Vet now warns when E implements error: wrapping a pointer makes type assertions and errors.Is checks fail, claim 13
- Who's exposed exposure compress/flate output The guide says compress/flate produces different bytes, claim 3
| Who | How | Kind | Claim |
|---|---|---|---|
| Old value of a removed GODEBUG | //go:debug asynctimerchan=0 is marked as a build error; the guide says to delete the line | constraint | 7 |
| Code calling strings.CutLast | With go.mod at go 1.26 and a 1.27 toolchain, go build succeeds but go test fails the vet step | contradiction | 11 |
| fmt.Errorf with %w on a *E | Vet now warns when E implements error: wrapping a pointer makes type assertions and errors.Is checks fail | exposure | 13 |
| compress/flate output | The guide says compress/flate produces different bytes | exposure | 3 |
What happened
- The guide lists asynctimerchan, gotypesalias, tlsunsafeekm, tlsrsakex, tls3des, tls10server and x509keypairleaf among the GODEBUG settings Go 1.27 removed permanently.
- go test now runs the stdversion vet check by default, flagging standard-library symbols too new for the go version in force in the referring file.
- The vet suite also gained a printf finding for fmt.Errorf with %w when the operand is a pointer to a type that implements error.
- The guide names encoding/json on json/v2, uuid in the standard library and per-method type parameters as the headline changes, and says none force a rewrite.
Why it matters
- What it limits constraint A CI job that stops at go build goes green on code that go test would reject, so the test stage has to run before the go line is bumped.
- What doesn't add up contradiction The guide's command block raises the go line before the first build, but its lesson says to bump it after the tests pass. The GODEBUG strictness arrives with the bump, so the order decides which failure a team meets first.
- Who's exposed exposure Code that hashes, signs or caches compressed output, or matches compiler-generated symbol names as strings, can change behaviour with no compile error.
Only some of these changes are silent. The removed GODEBUG settings are loud. The guide says the go command still accepts a removed setting only when it carries the final default value that existed before removal, and that an old value, the one that disabled a behaviour change, fails the build [6]. In its example, //go:debug asynctimerchan=0 is a build error and asynctimerchan=1 is accepted, though the guide says to delete that line anyway [7]. A failure means the code depended on buffered timer channels from before Go 1.23. The guide says the fix is in the code: check Timer.Stop and Timer.Reset usage in context, cancellation and timeout paths [8].
stdversion is the quiet one. The guide's example keeps go 1.26 in go.mod and calls strings.CutLast, which was added in Go 1.27. On a 1.27 toolchain, go build succeeds and go test fails at the vet step. On a real 1.26 toolchain the file would not build at all [11].
The guide also says the Go team recommends build first and fix second, and that only a clean build shows whether the runtime-level changes hit you [4]. We think the second half overreaches. A compiler does not run the program. A changed byte stream from compress/flate, or a renamed compiler-generated symbol, shows up only where something downstream compares it [3]. The guide's own flowchart goes on to go test, go mod tidy and go fix, and ends on a review of JSON golden tests and diffs [14].
The text breaks off partway through the encoding/json section, before any detail on flate output or renamed symbols. It also does not say which numeric asynctimerchan value selects buffered channels.
What to watch
- The Go 1.27 release notes: whether they confirm the removed GODEBUG list and which asynctimerchan value fails the build.
- Detail on how compress/flate output differs and which symbol names changed, since a build cannot show either.
- The rest of the guide's encoding/json section, where its flowchart ends on reviewing JSON golden tests and diffs.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence45
- Adoption
- Not scored
- Hype gap−5
- Incentives
- Not scored
- Confidence50
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
The DEV Community guide says Go 1.27 shipped in August 2026 and that for most modules the upgrade is a single go.mod line followed by a go fix pass, but a handful of changes bite silently.
- [2]
The guide lists encoding/json now being backed by the json/v2 implementation, the uuid package joining the standard library, and methods declaring their own type parameters as the headline changes, and says none of them force a rewrite.
- [3]
Several GODEBUG settings now fail the build at their old values, compress/flate produces different bytes, go test enforces a new stdversion check, and compiler-generated symbol names changed.
- [4]
The guide says the Go team recommends a build-first, fix-second order: go fix rewrites code to new APIs and idioms, but only a clean build tells you whether any of the runtime-level changes hit you.
- [5]
The guide lists asynctimerchan, gotypesalias, tlsunsafeekm, tlsrsakex, tls3des, tls10server and x509keypairleaf as GODEBUG settings Go 1.27 removed permanently.
- [6]
The go command still accepts the removed settings in go.mod godebug entries or //go:debug comments if they are set to the final default value that existed before removal; an old value, the one that disabled a behaviour change, fails the build.
- [7]
In the guide's example, //go:debug asynctimerchan=0 is marked as a build error for an old value of a removed setting, and //go:debug asynctimerchan=1 is accepted, but the guide says to delete the line instead.
- [8]
The guide says a build failure on those settings means the code depended on pre-Go-1.23 buffered timer channels, and that the fix is in the code: check Timer.Stop and Timer.Reset usage against context, cancellation and timeout patterns.
- [9]
Raising the go directive turns on the new language features (generic methods, promoted-field keys in struct literals, wider function type inference) and makes the go command strict about GODEBUG settings whose support has been removed.
- [10]
Go 1.27's go test runs the stdversion vet check by default, which reports standard-library symbols that are too new for the go version in force in the referring file.
- [11]
In the guide's example, go.mod still says go 1.26 and the code calls strings.CutLast, added in Go 1.27. With a 1.27 toolchain go build succeeds but go test fails the vet step; with a real 1.26 toolchain the file would not build at all.
- [12]
The guide's stated lesson is to never validate an upgrade with go build alone: run the full test suite, then bump the go line.
- [13]
The vet suite in go test also gained a printf finding: fmt.Errorf with %w where the operand is a *E and E implements error now warns, because wrapping a pointer produces type assertions and errors.Is checks that fail.
- [14]
The guide's flowchart runs install toolchain, go build ./..., go test ./..., go mod tidy, go fix ./..., and ends on reviewing JSON golden tests and diffs.
- [15]
In the guide's single-module command block, go mod edit -go=1.27 comes before go mod tidy and go build ./...
Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.
Sources
1 independent publisher whose own reporting we read for this story.
- dev.toUpgrading to Go 1.27: What Breaks, What to Adopt First
1 article · October 16, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.