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
{{ message }}
Repository navigation
runtime: createRequire allowlist missing v8 (and audit the whole allowlist-vs-getBuiltinModule family) — pi wall #5 #6651
Wall #5 of the pi coding-agent bring-up (tracker #6564; prior: #6593, #6604, #6644, #6649 all fixed). With the four fixes applied, pi-native --help/--version die with:
Error: Perry createRequire() currently supports built-in modules only; package/file require('node:v8') is not supported under perry compile
Sites: __require("node:v8") at pi-bundle.mjs lines 179836 and 209270 (+ a require("v8") CJS shim at 182772). Node prints full usage / 0.0.0, rc=0.
This is the same gap family as #6644: v8 is missing from supported_require_builtin in crates/perry-runtime/src/module_require.rs, even though perry ships a real node_v8.rs module and process.rsgetBuiltinModule already lists "v8".
Beyond adding v8: audit the whole family once — diff the createRequire allowlist against the getBuiltinModule list (and against the static-import module tables). Every builtin resolvable one way but not the others is a future wall of exactly this shape for some bundle; ESM bundles of CJS deps (the esbuild createRequire-banner pattern) funnel ALL builtin requires through createRequire, so its allowlist needs to be the superset. Walls #3 and #5 were both this bug with different module names.
Repro: HOME=$(mktemp -d) /Users/amlug/projects/perry/secret-tests/pi-target/dist/pi-native --help (binary has #6603+#6633+#6647+#6650 fixes; pi-native.pre6649 reproduces wall #4 for contrast); or minimal: ESM createRequire + require('node:v8').serialize fixture.
Activity
runtime: unify createRequire builtin allowlist with getBuiltinModule …