PR #1677 added a WASM fix (commit 066d7d0) that detects const { X } = require('…') CJS destructured bindings and feeds them into importArtifactNames so resolveReceiverEdge can correctly emit receiver edges for CJS-imported classes (e.g. calc.compute() where Calculator was CJS-imported).
The native Rust engine does not have the equivalent fix, causing a build-parity test failure: WASM produces 39 edges on sample-project (JS) while native produces 38.
Root cause: buildImportArtifactNames in the native build-edges path does not include CJS require bindings in the import artifact name set passed to resolveReceiverEdge.
Fix needed:
- Detect const { X } = require('…') in the Rust JavaScript extractor (mirrors WASM extractDestructuredBindingsWalk changes)
- Pass CJS bindings into the Rust equivalent of buildImportArtifactNames / resolveReceiverEdge
Introduced in PR #1677.
Reactions are currently unavailable
PR #1677 added a WASM fix (commit 066d7d0) that detects const { X } = require('…') CJS destructured bindings and feeds them into importArtifactNames so resolveReceiverEdge can correctly emit receiver edges for CJS-imported classes (e.g. calc.compute() where Calculator was CJS-imported).
The native Rust engine does not have the equivalent fix, causing a build-parity test failure: WASM produces 39 edges on sample-project (JS) while native produces 38.
Root cause: buildImportArtifactNames in the native build-edges path does not include CJS require bindings in the import artifact name set passed to resolveReceiverEdge.
Fix needed:
Introduced in PR #1677.