Skip to content

src: reset process.versions during pre-execution#53444

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
richardlau:resetprocessversions
Jun 20, 2024
Merged

src: reset process.versions during pre-execution#53444
nodejs-github-bot merged 1 commit intonodejs:mainfrom
richardlau:resetprocessversions

Conversation

@richardlau
Copy link
Copy Markdown
Member

Reset process.versions during pre-execution so that it reflects the versions at run-time rather than when the snapshot was taken.

Fixes: #51007 (comment)


I'm not sure there's an easy way to test this currently in the CI -- it requires Node.js to be built against a dynamically linked library (e.g. zlib[1]) at one version and then run against a different, ABI-compatible version so that the snapshot has one version of the dependency recorded but Node.js is actually running with a different one.

cc @joyeecheung -- re. #51007 (comment) -- it seemed easier to reset the entire process.versions object rather than checking each individual entry (and also meant I could extract and reuse the setting code).

[1]: OpenSSL would be another, but there's a separate bug with obtaining the version of OpenSSL that I'll open another PR for.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants