Skip to content

Commit 81e13b0

Browse files
committed
tinygo-gate: also build the Pico firmware, not just the amd64 core shim
cmd/cs-tinygo (the amd64 gate target) never imports client/link, so it missed the localtalk.go/localtalk_tinygo.go signature drift that broke PR #20's separate "Build Embedded (TinyGo)" job. hardware/pico does pull in client/link, so building it here closes that gap for `make tinygo-gate`.
1 parent 5032cc5 commit 81e13b0

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,12 @@ harness:
145145
archtest:
146146
go test -count=1 ./core/internal/archtest/...
147147

148-
# tinygo-gate runs the TinyGo amd64 build gates (linux + windows). Requires
149-
# tinygo on PATH; CI installs it. This is how the no-reflection /
150-
# no-forbidden-import discipline is verified without ESP32 hardware.
148+
# tinygo-gate runs the TinyGo amd64 build gates (linux + windows) plus the
149+
# Pico firmware build (hardware/pico, which — unlike the amd64 cmd/cs-tinygo
150+
# shim — imports client/link, so this also catches a localtalk.go /
151+
# localtalk_tinygo.go signature drift locally). Requires tinygo on PATH; CI
152+
# installs it. This is how the no-reflection / no-forbidden-import discipline
153+
# is verified without ESP32 hardware.
151154
tinygo-gate:
152155
bash scripts/ci/tinygo-gate.sh
153156

scripts/ci/tinygo-gate.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,16 @@ set -euo pipefail
1414
# embedded-compilability. Do not assume one substitutes for the other. See
1515
# .refactor/00-DESIGN.md errata note for A4.
1616
#
17-
# The compiled package is cmd/cs-tinygo, a minimal main that imports only the
17+
# The amd64 build is cmd/cs-tinygo, a minimal main that imports only the
1818
# TinyGo-safe core subset. Its import surface grows as more of core becomes
1919
# TinyGo-clean. See .refactor/01-PHASE-harness.md step A4.
20+
#
21+
# cmd/cs-tinygo does NOT import client/link (LToUDP/TashTalk openers), so a
22+
# signature drift between localtalk.go and its localtalk_tinygo.go stub can
23+
# pass this gate and only fail the separate "Build Embedded (TinyGo)" CI job
24+
# (hardware/pico, which does import client/link). To catch that class of break
25+
# locally, this gate also does the real -target=pico firmware build below —
26+
# the same one PR CI runs — rather than relying on the amd64 shim alone.
2027

2128
TARGET_PKG="./cmd/cs-tinygo"
2229

@@ -36,4 +43,8 @@ echo "=== build-tinygo-windows-amd64 ==="
3643
GOOS=windows GOARCH=amd64 tinygo build -o cs-tinygo.exe "${TARGET_PKG}"
3744
rm -f cs-tinygo.exe
3845

39-
echo "tinygo-gate.sh: OK (both amd64 gates green)"
46+
echo "=== build-pico: hardware/pico full firmware (RP2040) ==="
47+
bash scripts/build_pico.sh pico
48+
rm -f bin/classicstack-pico.uf2
49+
50+
echo "tinygo-gate.sh: OK (amd64 gates + Pico firmware build green)"

0 commit comments

Comments
 (0)