Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: migrate from deprecated SnapshotCreator constructor #55337

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joyeecheung
Copy link
Member

Previously we have been using the variant of SnapshotCreator that only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated. Switch to using the new constructor that takes a fully CreateParams instead.

This also makes sure that the snapshot building script is using the Node.js array buffer allocator instead of a separate default one that was previously used by the old constructor. The zero fill toggle in the Node.js array buffer allocator would still be ignored during snapshot building, however, until we fixes the array buffer allocator and let V8 own the toggle backing store instead, because otherwise the snapshot would contain the external toggle address and become unreproducible.

Previously we have been using the variant of SnapshotCreator that
only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated.
Switch to using the new constructor that takes a fully CreateParams
instead.

This also makes sure that the snapshot building script is using
the Node.js array buffer allocator instead of a separate default
one that was previously used by the old constructor. The zero fill
toggle in the Node.js array buffer allocator would still be ignored
during snapshot building, however, until we fixes the array buffer
allocator and let V8 own the toggle backing store instead, because
otherwise the snapshot would contain the external toggle address
and become unreproducible.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Oct 9, 2024
@joyeecheung joyeecheung added request-ci Add this label to start a Jenkins CI on a PR. and removed c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Oct 9, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 9, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.39%. Comparing base (7178588) to head (4968db1).
Report is 122 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/buffer.js 81.25% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55337   +/-   ##
=======================================
  Coverage   88.38%   88.39%           
=======================================
  Files         652      652           
  Lines      186740   186762   +22     
  Branches    36036    36038    +2     
=======================================
+ Hits       165058   165079   +21     
  Misses      14934    14934           
- Partials     6748     6749    +1     
Files with missing lines Coverage Δ
lib/internal/process/pre_execution.js 90.11% <ø> (-0.92%) ⬇️
src/api/embed_helpers.cc 75.48% <100.00%> (+0.85%) ⬆️
src/node_buffer.cc 70.02% <100.00%> (+0.36%) ⬆️
src/node_snapshotable.cc 75.27% <100.00%> (+0.13%) ⬆️
lib/internal/buffer.js 98.14% <81.25%> (-0.34%) ⬇️

... and 24 files with indirect coverage changes

@legendecas legendecas added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Oct 10, 2024
@legendecas
Copy link
Member

I assume the labels were removed because of the awkward GitHub UI.

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 18, 2024
@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau mentioned this pull request Oct 18, 2024
7 tasks
@joyeecheung
Copy link
Member Author

It seems the checksum of the read only snapshots are mismatched after the changes. Need to look into a bit..

@joyeecheung joyeecheung added the blocked PRs that are blocked by other issues or PRs. label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants