Perry: origin/main @ a674b6e (v0.5.1167) · macOS arm64
Setup: package compiled natively via perry.compilePackages (perry.allow.compilePackages: ["*"])
Build/run: perry repro.ts -o out && ./out
(Found via an internal real-package stress run — importing the real package and exercising it.)
Bug
Compiling a program that imports eventemitter3 fails at link time. Codegen emits calls to runtime helpers that aren't in the runtime archive:
Undefined symbols for architecture arm64:
"_js_event_emitter_emit"
"_js_event_emitter_new_with_options"
"_js_event_emitter_on"
"_js_event_emitter_remove_all_listeners"
Looks like eventemitter3 is being routed to a native-EventEmitter codepath whose helper symbols aren't linked into this build.
Repro
import EventEmitter from 'eventemitter3';
const ee = new EventEmitter();
let hits = 0; ee.on('x', (n) => (hits += n));
ee.emit('x', 2); ee.emit('x', 3); ee.removeAllListeners();
ee.emit('x', 100);
console.log(hits);
Expected (Node)
Actual (Perry)
Linking failed — undefined `_js_event_emitter_*` symbols
Perry:
origin/main@ a674b6e (v0.5.1167) · macOS arm64Setup: package compiled natively via
perry.compilePackages(perry.allow.compilePackages: ["*"])Build/run:
perry repro.ts -o out && ./out(Found via an internal real-package stress run — importing the real package and exercising it.)
Bug
Compiling a program that imports
eventemitter3fails at link time. Codegen emits calls to runtime helpers that aren't in the runtime archive:Looks like eventemitter3 is being routed to a native-EventEmitter codepath whose helper symbols aren't linked into this build.
Repro
Expected (Node)
Actual (Perry)