You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-reconciler 0.33 init crashes under Perry — SIGBUS on import (standalone) / 'undefined is not iterable' in createReconciler (in-ink); blocks all custom React renderers #4898
Importing react-reconciler crashes at module load under Perry. The next ink wall after the regex fixes (#4889): with MessageChannel/Segmenter/\p{Surrogate}/\p{RGI_Emoji} all fixed, every leaf dep and react itself now initialize cleanly — but the React reconciler does not.
Two symptoms, same area (react-reconciler 0.33.0 + react 19.2.7):
Standalone — native crash (SIGBUS, exit 138) at import, before any user statement runs:
// rr.tsimportcreateReconcilerfrom'react-reconciler';console.log('reached');// never prints
$ perry compile rr.ts -o rr && ./rr ; echo $?
138 # 128 + SIGBUS(10), no stdout/stderr
(perry.define NODE_ENV=production; both react-reconciler.{production,development}.js get compiled in, but the dev build is runtime-guarded by "production" !== process.env.NODE_ENV && (…), so the prod path is what loads. The prod file's top level is only module.exports = function($$$config){…} — so the crash is in how Perry loads/links that cjs module, not in JS logic.)
Inside ink — TypeError: undefined is not iterable at init: ink/build/reconciler.js:85 runs createReconciler(hostConfig) at module top level, and that throws (clean JS error, not SIGBUS) when ink is compiled with tree-shaking. So in the fuller graph react-reconciler loads far enough to call the factory, then dies iterating something undefined during reconciler construction.
The differing symptom (native SIGBUS standalone vs. JS undefined is not iterable in-ink) suggests build/graph-dependent codegen — possibly more than one bug — but both block any react-reconciler-based renderer.
After this, ink's next gate is yoga-layout's WASM runtime (the documented out-of-scope rock).
Asks / triage pointers
A native SIGBUS at cjs-module load with a trivial module.exports = function(){} body points at the cjs require/interop or module-init codegen for this specific large minified file — worth a --trace llvm on the react-reconciler.production module init.
Summary
Importing
react-reconcilercrashes at module load under Perry. The next ink wall after the regex fixes (#4889): withMessageChannel/Segmenter/\p{Surrogate}/\p{RGI_Emoji}all fixed, every leaf dep andreactitself now initialize cleanly — but the React reconciler does not.Two symptoms, same area (react-reconciler 0.33.0 + react 19.2.7):
Standalone — native crash (SIGBUS, exit 138) at import, before any user statement runs:
(
perry.defineNODE_ENV=production; bothreact-reconciler.{production,development}.jsget compiled in, but the dev build is runtime-guarded by"production" !== process.env.NODE_ENV && (…), so the prod path is what loads. The prod file's top level is onlymodule.exports = function($$$config){…}— so the crash is in how Perry loads/links that cjs module, not in JS logic.)Inside ink —
TypeError: undefined is not iterableat init:ink/build/reconciler.js:85runscreateReconciler(hostConfig)at module top level, and that throws (clean JS error, not SIGBUS) when ink is compiled with tree-shaking. So in the fuller graph react-reconciler loads far enough to call the factory, then dies iterating something undefined during reconciler construction.The differing symptom (native SIGBUS standalone vs. JS
undefined is not iterablein-ink) suggests build/graph-dependent codegen — possibly more than one bug — but both block anyreact-reconciler-based renderer.Repro environment
react-reconciler@0.33.0,react@19.2.7, peerDepreact: ^19.2.0.\p{RGI_Emoji}(property of strings, /v flag) rejected — Rust regex crate has no string-properties; blocks string-width/ink #4889 / fix(runtime): for-of over a dynamically-typed string drives the String iterator (#4892) #4893).PERRY_TREE_SHAKE=1,allow.compilePackages: ["*"],perry.defineNODE_ENV=production/DEV=false. No correctness escape hatches.Why it matters
ink(React-based TUI framework) end-to-end viaperry.compilePackages#348).ink(React-based TUI framework) end-to-end viaperry.compilePackages#348's own deprioritization comment predicted: "React 18's CJS + reconciler + scheduler surface keeps surfacing compiler edges."Asks / triage pointers
module.exports = function(){}body points at the cjs require/interop or module-init codegen for this specific large minified file — worth a--trace llvmon thereact-reconciler.productionmodule init.Object.assignalias → react-reconciler HostRoot render hang) — same package, possibly same alias/codegen family.Related
ink(React-based TUI framework) end-to-end viaperry.compilePackages#348 (ink end-to-end smoke test — where this surfaced)\p{RGI_Emoji}(property of strings, /v flag) rejected — Rust regex crate has no string-properties; blocks string-width/ink #4889/regex:\p{Surrogate}Unicode property rejected ('invalid pattern') — Rust regex crate has no surrogate scalar values; blocks string-width/ink #4884/globals/Intl: implementIntl.Segmenter(grapheme segmentation) —new Intl.Segmenter()throws, blocks string-width/wrap-ansi/ink #4877/Codegen:new MessageChannel()global constructor unlinked/non-constructible — routes to stdlib symbol, breaks React scheduler init #4873 (the four walls cleared to reach this one)