From f27ad42c244ac59bc886d7a79cfc86cf6e8c1c56 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Thu, 2 Jul 2026 13:42:17 -0500 Subject: [PATCH] #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 --- .github/workflows/ci.yml | 15 +++++++++++---- README.md | 5 ++++- go.mod | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6dbab4c..78e055a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/README.md b/README.md index e953552..5c69968 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/go.mod b/go.mod index 51c962f..17ed853 100644 --- a/go.mod +++ b/go.mod @@ -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