Skip to content

Commit 13d48cb

Browse files
committed
docs: log the WASM/emscripten-guard lesson in MISTAKES.md
1 parent 5b1be52 commit 13d48cb

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

MISTAKES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
## 2026-06-27 — src/printable_binary.c is compiled by THREE toolchains; clang-clean ≠ all-clean
3+
Added container support to the standalone C (`src/printable_binary.c`) and the
4+
`test-container-c` check (clang `-O3 -Wall -Wextra`) passed — but I pushed without
5+
building the WASM/APE targets. The emscripten build broke: my container block
6+
called `buffer_free`, which is `#ifndef __EMSCRIPTEN__`-guarded (so it doesn't
7+
exist in WASM), failing `printableBinaryWasm` and the `default`/`nix`/`All Garnix`
8+
aggregates that depend on it.
9+
**Lesson:** `src/printable_binary.c` is built by clang (native), emscripten (WASM),
10+
AND cosmocc (APE) — each with different defines/guards. Before pushing changes to
11+
it, build `nix build .#printableBinaryWasm` (and `.#printableBinaryApe`) locally,
12+
not just the clang container check. A native-clang pass does NOT catch
13+
`__EMSCRIPTEN__`-guarded-symbol regressions.

0 commit comments

Comments
 (0)