#26 Pin Go 1.25 + TinyGo 0.41.1 so the Wasm build compiles

TinyGo 0.41.1's bundled net/http override (roundtrip_js.go) fails to
compile against the Go 1.26 stdlib:

  net/http/roundtrip_js.go:73:12: t.roundTrip undefined (type *Transport
  has no field or method roundTrip, but does have method RoundTrip)

This is tinygo-org/tinygo#5467 (closed 2026-06-20, but not in any tagged
TinyGo release as of 0.41.1, released 2026-04-22). Go 1.25.x is the
newest line TinyGo 0.41.1 fully supports; syumai/workers v0.33.0 needs
only go 1.21.3 and the handler uses only net/http + encoding/json, so
downgrading is safe:

- go.mod: go 1.26.2 -> go 1.25.0 (so GOTOOLCHAIN won't auto-upgrade past
  what TinyGo supports)
- ci.yml: setup-go go-version 1.26 -> 1.25 (TinyGo pin stays 0.41.1)
- README: document the pinned TinyGo/Go matrix and the #5467 rationale

go vet ./..., go test ./..., and actionlint stay green locally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 13:42:17 -05:00
co-authored by Claude Opus 4.8
parent 610b02ba83
commit f27ad42c24
3 changed files with 16 additions and 6 deletions
+11 -4
View File
@@ -33,14 +33,21 @@ jobs:
- name: Check out repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# Pinned to Go 1.25 (not 1.26) to match TinyGo. TinyGo 0.41.1's bundled
# net/http override (roundtrip_js.go) fails to compile against the Go 1.26
# stdlib -- "t.roundTrip undefined ... has method RoundTrip"
# (tinygo-org/tinygo#5467, unfixed in any tagged TinyGo release as of
# 0.41.1). Go 1.25.x is the newest line TinyGo 0.41.1 fully supports. The
# go.mod `go` directive is pinned to 1.25 too, so GOTOOLCHAIN won't
# auto-upgrade. go vet/test also run on this version.
- name: Set up Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: '1.26'
go-version: '1.25'
# TinyGo is needed only for the Wasm Worker build (pnpm run build). The
# 0.41.x line is the first with Go 1.26 support; install-binaryen (default
# true) provides wasm-opt, which TinyGo invokes for the -target wasm build.
# TinyGo is needed only for the Wasm Worker build (pnpm run build).
# install-binaryen (default true) provides wasm-opt, which TinyGo invokes
# for the -target wasm build.
- name: Set up TinyGo
uses: acifani/setup-tinygo@dd8a7075d951a7595b2ef2123ed0ab1af0c13e56 # v3.0.0
with:
+4 -1
View File
@@ -64,7 +64,10 @@ This runs the exact handler the deployed Worker uses, minus the Workers runtime.
### Build & run the real Worker (requires TinyGo)
Node tooling is managed with **pnpm**; wrangler is a dev dependency. The Wasm
build uses [TinyGo](https://tinygo.org) 0.35.0+.
build uses [TinyGo](https://tinygo.org) 0.41.1 on the Go 1.25.x toolchain.
(TinyGo 0.41.1 cannot compile `net/http` against Go 1.26 — see
[tinygo-org/tinygo#5467](https://github.com/tinygo-org/tinygo/issues/5467) —
so the module pins `go 1.25` in `go.mod`; CI installs and enforces this.)
```console
pnpm install # install wrangler
+1 -1
View File
@@ -1,5 +1,5 @@
module github.com/JMR-dev/LibreMail-Bug-Report-Ingest
go 1.26.2
go 1.25.0
require github.com/syumai/workers v0.33.0