With the HIR-lowering blowup fixed (#10757 / PR #10801), ethers 6.17.0's full 153-module dependency tree now lowers and generates code in about a minute. It then fails at the link step on undefined references.
Found immediately after #10757's fix, on origin/main + PR #10801, Linux x64.
The shape
The undefined symbols come from ethers/src.ts/crypto/crypto.ts, which re-exports node builtins:
export { createHash, createHmac, pbkdf2Sync, randomBytes } from "crypto";
plus one WebSocket wrapper symbol.
So this is an export { … } from "<node builtin>" pass-through — the module re-exports names it never imports into its own scope — and those symbols are not emitted or resolved at link time.
Why it is filed separately
It is unrelated to #10757: that was an exponential blowup in class_mutates_capture's recursion, entirely within HIR lowering. This is a linker-visible symbol-emission problem that only became reachable because lowering now completes. The #10757 fix is correct and complete for what it claims; this is the next thing in the way.
That is also the expected pattern for this campaign — each blocker removed exposes the next. It is the removals doing their job, not evidence the previous fix was wrong.
Reproduction
mkdir ethers-probe && cd ethers-probe
npm install ethers@6.17.0
# package.json: { "perry": { "compilePackages": ["ethers"] } }
# fixture.ts: import { Wallet } from "ethers"; ...
perry compile fixture.ts -o fixture # lowers + codegens, then fails at link
Suggested first check
Whether a minimal export { createHash } from "crypto"; inside a compiled package reproduces it without ethers. If it does, the defect is in the re-export-from-builtin path generally, and is likely to affect any package wrapping node crypto — a common shape in anything that hashes or signs.
With the HIR-lowering blowup fixed (#10757 / PR #10801),
ethers6.17.0's full 153-module dependency tree now lowers and generates code in about a minute. It then fails at the link step on undefined references.Found immediately after #10757's fix, on
origin/main+ PR #10801, Linux x64.The shape
The undefined symbols come from
ethers/src.ts/crypto/crypto.ts, which re-exports node builtins:plus one WebSocket wrapper symbol.
So this is an
export { … } from "<node builtin>"pass-through — the module re-exports names it never imports into its own scope — and those symbols are not emitted or resolved at link time.Why it is filed separately
It is unrelated to #10757: that was an exponential blowup in
class_mutates_capture's recursion, entirely within HIR lowering. This is a linker-visible symbol-emission problem that only became reachable because lowering now completes. The #10757 fix is correct and complete for what it claims; this is the next thing in the way.That is also the expected pattern for this campaign — each blocker removed exposes the next. It is the removals doing their job, not evidence the previous fix was wrong.
Reproduction
Suggested first check
Whether a minimal
export { createHash } from "crypto";inside a compiled package reproduces it without ethers. If it does, the defect is in the re-export-from-builtin path generally, and is likely to affect any package wrapping node crypto — a common shape in anything that hashes or signs.