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.rs getBuiltinModule 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.
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/--versiondie with:Sites:
__require("node:v8")at pi-bundle.mjs lines 179836 and 209270 (+ arequire("v8")CJS shim at 182772). Node prints full usage /0.0.0, rc=0.This is the same gap family as #6644:
v8is missing fromsupported_require_builtinincrates/perry-runtime/src/module_require.rs, even though perry ships a realnode_v8.rsmodule andprocess.rsgetBuiltinModulealready lists"v8".Beyond adding
v8: audit the whole family once — diff the createRequire allowlist against thegetBuiltinModulelist (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.pre6649reproduces wall #4 for contrast); or minimal: ESMcreateRequire+require('node:v8').serializefixture.