Wasm build broken: TinyGo net/http incompatibility with Go 1.26 (blocks CI build + all merges) #26

Closed
opened 2026-07-02 18:36:53 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-02 18:36:53 +00:00 (Migrated from github.com)

Context

The CI Build Wasm Worker step (pnpm run build → tinygo build -target wasm ./worker) fails on main's Worker with:

/opt/hostedtoolcache/tinygo/0.41.1/amd64/tinygo/src/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 a TinyGo-vendored net/http (wasm/js target) incompatibility with the Go 1.26 stdlib. syumai/workers pulls in net/http, so the worker entrypoint cannot currently be compiled to Wasm.

Impact: the production Worker build path is broken, AND because CI runs pnpm run build on every PR, every PR's ci check fails on this step — blocking clean merges across the board. High priority.

Scope

  • Find a working toolchain combination for the Wasm Worker build. Likely levers: TinyGo version (try >0.41.1 or a version whose net/http matches), the go.mod Go version (may need pinning to an older minor, e.g. 1.25/1.24, that TinyGo fully supports), the syumai/workers version, and/or the tinygo -target/build flags.
  • Apply the fix consistently across: .github/workflows/ci.yml (TinyGo version), the package.json build script if needed, go.mod if the Go version changes, and worker/ code if needed.
  • Update the README build docs (currently says TinyGo 0.35.0+) to the verified version.
  • Document the chosen matrix + why in the PR.

Acceptance criteria

  • CI Build Wasm Worker step succeeds (produces ./build/app.wasm), i.e. the ci check goes green.

Notes

  • TinyGo is NOT installed on the dev machine and must not be installed there; verification is via CI (push branch, observe the ci run). Iterate against CI.
  • Related: #5's ADR already noted TinyGo crypto/aes/crypto/cipher gaps → the encryption impl (#9) plans to use the host SubtleCrypto API instead of pure-Go crypto. Same theme: TinyGo stdlib gaps.
## Context The CI `Build Wasm Worker` step (`pnpm run build` → `tinygo build -target wasm ./worker`) fails on `main`'s Worker with: ``` /opt/hostedtoolcache/tinygo/0.41.1/amd64/tinygo/src/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 a TinyGo-vendored `net/http` (wasm/js target) incompatibility with the Go 1.26 stdlib. `syumai/workers` pulls in `net/http`, so the worker entrypoint cannot currently be compiled to Wasm. **Impact:** the production Worker build path is broken, AND because CI runs `pnpm run build` on every PR, **every PR's `ci` check fails on this step** — blocking clean merges across the board. High priority. ## Scope - [ ] Find a working toolchain combination for the Wasm Worker build. Likely levers: TinyGo version (try >0.41.1 or a version whose net/http matches), the `go.mod` Go version (may need pinning to an older minor, e.g. 1.25/1.24, that TinyGo fully supports), the `syumai/workers` version, and/or the tinygo `-target`/build flags. - [ ] Apply the fix consistently across: `.github/workflows/ci.yml` (TinyGo version), the `package.json` build script if needed, `go.mod` if the Go version changes, and `worker/` code if needed. - [ ] Update the README build docs (currently says TinyGo 0.35.0+) to the verified version. - [ ] Document the chosen matrix + why in the PR. ## Acceptance criteria - CI `Build Wasm Worker` step succeeds (produces `./build/app.wasm`), i.e. the `ci` check goes green. ## Notes - TinyGo is NOT installed on the dev machine and must not be installed there; **verification is via CI** (push branch, observe the `ci` run). Iterate against CI. - Related: #5's ADR already noted TinyGo `crypto/aes`/`crypto/cipher` gaps → the encryption impl (#9) plans to use the host SubtleCrypto API instead of pure-Go crypto. Same theme: TinyGo stdlib gaps.
Sign in to join this conversation.