Repository navigation
fix(v8): expose modern diagnostics/profiler named exports (#3904) - #4012
Merged
Merged
Conversation
Node's node:v8 ESM namespace exposes several function-valued exports that
Perry's manifest omitted, so importing them failed perry check before
runtime. Added getCppHeapStatistics, getHeapSnapshot,
isStringOneByteRepresentation, queryObjects, startCpuProfile, and
writeHeapSnapshot (Node .length values preserved).
- entries.rs: six method("v8", ...) rows
- native_module.rs: added to is_native_module_callable_export (function-
valued reads) + native_callable_export_arity (Node .length)
- new fixture test-parity/node-suite/v8/exports/diagnostics-surface.ts
(byte-identical to node --experimental-strip-types) + regenerated api docs
Export-surface parity; deeper getHeapSnapshot/writeHeapSnapshot behavior
stays tracked by #3140. Closes #3904.
proggeramlug
force-pushed
the
fix-3904-v8-exports
branch
from
June 1, 2026 22:16
bacc550 to
39d3cdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3904. Adds the modern
node:v8diagnostics/profiler named exports Node ships in its ESM namespace but Perry's manifest omitted (soimport { queryObjects, getCppHeapStatistics, ... } from "node:v8"failedperry check):getCppHeapStatistics,getHeapSnapshot,isStringOneByteRepresentation,queryObjects,startCpuProfile,writeHeapSnapshot.Implementation
crates/perry-api-manifest/src/entries.rs— sixmethod("v8", …)rows.crates/perry-runtime/src/object/native_module.rs— the six added tois_native_module_callable_export(named/namespace reads are function-valued) +native_callable_export_arity(Node.length:getCppHeapStatistics/startCpuProfile0,getHeapSnapshot/isStringOneByteRepresentation/queryObjects1,writeHeapSnapshot2).test-parity/node-suite/v8/exports/diagnostics-surface.ts+ regenerateddocs/api/perry.d.ts/reference.md.Validation
node --experimental-strip-typesin both no-opt and auto-optimize builds (typeof +.length+ namespace identity).manifest_consistency5/5,cargo fmt --all -- --checkclean.Scope
Export-surface/manifest parity. Deeper behavior of
getHeapSnapshot/writeHeapSnapshotremains tracked by #3140.