From f71b63053cf1499b5dab3e0815b485e6a0713c1f Mon Sep 17 00:00:00 2001 From: Moses Narrow <36607567+0pcom@users.noreply.github.com> Date: Wed, 19 Aug 2026 21:02:31 -0500 Subject: [PATCH] reflect: skip the MakeChan panic cases on every wasm target, not just wasip1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The guard was on runtime.GOOS == "wasip1", so under wasip2 the three cases that rely on recover ran anyway. recover does not work on wasm yet, so the panic escaped and trapped the test binary — which is the tinygo-test-wasip2-fast failure on this PR. Checked on runtime.GOARCH instead, since the limitation is wasm's rather than any one platform's. wasip1, wasip2 and js/wasm all set the tinygo.wasm build tag, and arch_tinygowasm.go defines GOARCH as wasm for it, so one condition covers all three of the wasm test targets. Worth noting for anyone reading targets/wasip2.json: the goarch there is arm, but that is what is handed to the Go toolchain for package selection — runtime.GOARCH is the one above. --- src/reflect/value_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/reflect/value_test.go b/src/reflect/value_test.go index a0e48cace..b31f1e48e 100644 --- a/src/reflect/value_test.go +++ b/src/reflect/value_test.go @@ -1045,8 +1045,11 @@ func TestTinyMakeChan(t *testing.T) { // The three cases below rely on recovering from a panic, which wasm // cannot do yet without exceptions. Log and return rather than Skip: // t.Skip needs the same machinery it is standing in for. + // + // Checked on GOARCH rather than GOOS because the limitation is wasm's, not + // any one platform's: this covers wasip1, wasip2 and js/wasm alike. // TODO: drop this once tinygo-org/tinygo#5550 lands. - if runtime.GOOS == "wasip1" { + if runtime.GOARCH == "wasm" { t.Log("not running the panic cases: panic/recover on wasm needs #5550") return }