Go Weekly #10: Go 1.28 Release Notes Finalized, net/http Proxy CVE Awaits 1.27 Backport, Build Cache Gets Its First Size-Based Auto-Cleanup

Go · Weekly #10

Go Weekly #10: Go 1.28 Release Notes Finalized, net/http Proxy CVE Awaits 1.27 Backport, Build Cache Gets Its First Size-Based Auto-Cleanup

goGoWeeklyGo 1.28Build Cache

Sources:GitHub Releases + 官方博客 + HN

📦 Release Watch

No new stable release this week. I cross-checked the JSON and page at go.dev/dl and the release history page:

BranchLatest stableRelease date
Go 1.27go1.27.42026-11-10
Go 1.26go1.26.112026-11-10

go1.27.4 includes security fixes for cgo, the go command, the compiler, the linker, and net/http (release history). It shipped 20 days ago; the three gaps between 1.27.1 and 1.27.4 were 37, 11, and 22 days respectively. The official blog has posted nothing in the last 14 days; the most recent article was November 10’s “Go Turns 17” (go.dev/blog). For the full Go 1.27 feature set, see Go 1.27 in Depth.

The real action this week is on Go 1.28:

  1. Release notes are finalized. On November 26, api/next was promoted to api/go1.28.txt (commit), and the documentation was merged into x/website’s go1.28.md (commit). The draft targets a February 2027 release; the SIMD section still reads TODO: Expand.
  2. 1.27 shipped with a CVE already fixed on tip. See deep dive #3 below. No new patch release has followed go1.27.4.
  3. Four changes will break compilation or alter behavior of existing code (full draft):
ChangeConsequenceSelf-check
Integer-to-string conversions are now limited to byte, rune, and untyped rune constants; string(97) is illegal (#3939)Compilation failureThis rule was previously a vet check — a clean go vet ./... is enough
Generic type aliases require go.mod of at least go 1.24 (#83032); the compiler previously checked against 1.23 by mistakeGeneric alias declarations in go 1.23 modules will be rejectedSearch go.mod files and alias declarations
ProxyFromEnvironment now prefers lowercase http_proxy, https_proxy, no_proxyWhen both cases are set with different values, the effective proxy changesCheck CI and container environment variables
Transport.CancelRequest becomes a no-opCode that relies on it to cancel requests no longer cancelsSwitch to NewRequestWithContext

Two more changes have landed on tip but are not yet in the draft (I searched go1.28.md for trimbuildcache and GORESTRICTEDBUILD — zero hits):

ChangeNumbersSource
Generic instantiation deduplicationgo build std cmd: object code 729.27 MB → 601.98 MB (-17.45%), total including export data 807.52 MB → 680.23 MB (-15.76%), roughly -25% SSA-compiled functionsCommit 030fabbc
GORESTRICTEDBUILD=1go build forbids direct VCS and C toolchain invocations: forces CGO_ENABLED=0 (explicit bindings exception), rejects -asan, -msan, and external linking; go test and go env are unaffectedCommit 7ea29d0d

📝 Deep Dives

1. Composite Literals Can Omit Their Type

What happened: Go 1.28 lets you omit the type of a composite literal when the type can be inferred from the assignment context. Previously only inner elements of array, slice, and map literals could. Example from the draft: var ptr *Point = {1, 2} is equivalent to &Point{1, 2} (#12854).

Why it matters: The proposal was filed in October 2015 and closed on November 10. That same day a maintainer noticed the release notes were missing it and filed release-blocker #82973; the draft now covers it this week. The proposal’s stated benefit cases are return {}, err, ch <- {value: "result"}, and single struct arguments.

Who it affects: Code that leans heavily on protobuf-generated types (deeply nested, long type names) and APIs built around FooArgs{...}-style argument structs. Teams will need to agree on style conventions themselves — the proposal author admits brevity can cut readability either way. Note the boundary: the proposal explicitly says {A: 1} will not be implicitly treated as map[string]int{"A": 1}; the literal’s type must still be uniquely determined by the left-hand side or parameter type.

2. Memory Profile and sync.Counter Finalized on the Same Day

What happened: On November 23, two proposal issues were closed the same day and both landed in the 1.28 draft. runtime/pprof gains a memory profile type, also served at the /debug/pprof/memory endpoint (#79179). sync gains a sharded counter, Counter, supporting int64, uint64, and float64, with a usable zero value (#80645).

Why it matters: The issue notes that under GOGC=100, inuse_space typically accounts for less than 50% of RSS, because it excludes dead objects already marked unreachable but not yet reclaimed. memory is a superset, splitting RSS into a Go portion (heap, stacks, runtime metadata) and a non-Go portion (further split into file-backed/shared vs. anonymous memory on Linux). Runtime overhead can be disabled with GODEBUG=memoryprofile=0; the draft gives no overhead figures. Counter shards per processor, so Add no longer contends on a single cache line; Value must aggregate all shards, with cost growing with GOMAXPROCS. The proposal includes benchmarks on an 88-core Xeon 8481C; I did not verify the benchstat numbers item by item.

Who it affects: SREs debugging container OOMs, and people writing metrics libraries. Read-heavy, write-light counters shouldn’t switch. The same draft carries one more runtime change: HTTP/2 servers now let the per-connection serve goroutine exit while the connection is idle and restart it when data arrives, to cut memory use from large numbers of idle connections or long-polling handlers (#80735) — again with no numbers in the draft.

3. CVE-2026-97053: HTTP/2 Connections to an HTTPS Proxy Can Be Pooled Under the Target Address

What happened: On November 24, the Go team disclosed #83349 under the PUBLIC track; the fix landed the next day: when handshaking with a proxy, the client no longer offers h2 via ALPN and no longer runs HTTP/2 on the proxy connection.

Why it matters: Four conditions must all hold: the Transport is configured with an https:// forward proxy; the proxy’s certificate is valid; HTTP/2 is enabled on the client (on by default); and the client issues an http:// request through the proxy — e.g., by following a redirect returned via the proxy. When they do, the proxy’s TLS connection gets pooled under target:443, so subsequent https://target requests reuse it directly, bypassing the CONNECT tunnel and certificate validation; request headers and cookies are sent to the proxy. The attacker must control the proxy — passive on-path listening is not enough. Go 1.27’s bundled net/http HTTP/2 path is affected; the commit message states it will be backported to 1.27.

Who it affects: Services that mix http:// and https:// outbound traffic behind an external HTTPS proxy. Self-hosted http:// proxies are unaffected.

4. Build Cache Gets Its First Size-Based Auto-Trim

What happened: Around November 25, a set of changes landed in cmd/go behind GOEXPERIMENT=trimbuildcache, currently enabled by default (commit 654fc417). It can be disabled with notrimbuildcache.

Why it matters: The old cache aged only by time and grew without bound under sustained writes. The new rules: below 5 GiB the cache behaves as in 1.27; the first trim triggers at 5 GiB, after which the target is the larger of 5 GiB and 1.5× the baseline, dropping to 1.25× above 20 GiB; trims are spaced at least 2 hours apart; files used within the last 60 minutes are never deleted. Example from the commit message: 10 GiB of one-off entries added per hour makes the cache sawtooth between 15 GiB and 35 GiB, versus +10 GiB per hour under the old behavior. In the same batch, commit 6d2915f5 forces a trim on Linux when free space on the filesystem holding GOCACHE falls below the smaller of 512 MiB and 5% of blocks, and stops writing archive files; low-disk trims delete files whose modification time is older than 90 minutes, and the trigger reason and remaining space are written to a rolling cache.log.

Who it affects: CI machines with GOCACHE persisted above 5 GiB will see lower hit rates; small-disk VMs and sandboxes are the main beneficiaries. I could not find this change in the draft, and the defaults may still change before release.

🔥 Community Buzz

r/golang was unreachable this week: requests were blocked by Reddit’s network policy, so this issue contains no Reddit content. The items below come from Hacker News and GitHub.

Marmot: A Go Compiler Built on MLIR and LLVM (HN 65 points / 15 comments)

Discussion thread, published November 27. The website describes it as experimental and unfit for production, keeping Go’s frontend and standard library while replacing code generation. Numbers from the site (Apple M3 Pro): a println-based hello world binary is 201 KB vs. 1.83 MB; across 45 programs, a geometric mean speedup of 1.54× — 37 faster, 8 slower; a cold build of cmd/marmot takes 4.40–4.57 s vs. 6.14–6.18 s.

The disagreement centers on two things. One is credibility: one commenter argued the code looks purely AI-generated, saying “three weeks ago there was nothing, then 1029 commits in a week and zero issues”; the counterargument is that compiler output is deterministic and testable, and what’s really missing is disclosure. The other is the bespoke runtime: a commenter pointed out that Marmot implements its own GC, channels, and scheduler, and that its benchmarks crater whenever allocation is involved — the hard part of a replacement compiler is feature coverage, not any single point. Others asked for comparisons against TinyGo and llgo.

Ant: A Scripting Language with Goroutines and Static Typing (HN 16 points / 5 comments)

Discussion thread, published November 24. The author is the creator of Go’s expression library Expr; it’s positioned as a scripting language embedded in Go applications, running on the Go runtime. It’s small, and the pushback focuses on the project being barely a month old with Claude as its top contributor; the author leaned on Expr’s nine years of maintenance as credibility.

GitHub #12854: The Numbers After a 10-Year Discussion Landed

#12854 has 296 comments and 789 reactions: 👍 570, 👎 35, ❤️ 84. In the most-upvoted comments, two core developers both framed “is readability better or worse” as a subjective call, and argued the payoff is larger for lightweight tuple-style usage. The reservations stem from a similar earlier proposal once judged “harder to read overall” (quoted in the comments), and the proposal author himself conceded that brevity cuts both ways.

What to Watch Next Week

  • A Go 1.27 patch release. The CVE-2026-97053 backport was promised in the commit message, but nothing has shipped since go1.27.4. Watch the version numbers at go.dev/dl.
  • Completion of the Go 1.28 draft. The SIMD section still says TODO; a comment in the go/analysis section notes it will be expanded into a full section once #82464 lands.
  • The fate of trimbuildcache. Watch whether it makes the release notes, and whether the defaults change.