-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
[v22.x backport] src: backport fast API changes #59065
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
Merged
aduh95
merged 3 commits into
nodejs:v22.x-staging
from
Renegade334:v22.x-backport-fast-api-changes
Jul 28, 2025
Merged
[v22.x backport] src: backport fast API changes #59065
aduh95
merged 3 commits into
nodejs:v22.x-staging
from
Renegade334:v22.x-backport-fast-api-changes
Jul 28, 2025
Conversation
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
Review requested:
|
b42761a
to
48174f1
Compare
Renegade334
pushed a commit
to Renegade334/node
that referenced
this pull request
Jul 16, 2025
PR-URL: nodejs#58054 Backport-PR-URL: nodejs#59065 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
Renegade334
pushed a commit
to Renegade334/node
that referenced
this pull request
Jul 16, 2025
There are several motivation for removing this: 1. The implementation does not align with InternalModuleStat, most noticably it does not namespace the path or convert it to UTF-16 before using it with std::filesystem::path on Windows which could crash on non-English locale. 2. It needs the Environment - if not for decoding the string, at least for env->exec_path() to resolve the path for namespacing - and therefore needs a handle to the Context which requires a handle scope which actually makes the fast API version slower than the normal binding. For simplicity this just removes the fast API to fix the bug and improve the performance. PR-URL: nodejs#58489 Backport-PR-URL: nodejs#59065 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Renegade334
added a commit
to Renegade334/node
that referenced
this pull request
Jul 16, 2025
PR-URL: nodejs#58896 Backport-PR-URL: nodejs#59065 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
aduh95
approved these changes
Jul 28, 2025
PR-URL: nodejs#58054 Backport-PR-URL: nodejs#59065 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
There are several motivation for removing this: 1. The implementation does not align with InternalModuleStat, most noticably it does not namespace the path or convert it to UTF-16 before using it with std::filesystem::path on Windows which could crash on non-English locale. 2. It needs the Environment - if not for decoding the string, at least for env->exec_path() to resolve the path for namespacing - and therefore needs a handle to the Context which requires a handle scope which actually makes the fast API version slower than the normal binding. For simplicity this just removes the fast API to fix the bug and improve the performance. PR-URL: nodejs#58489 Backport-PR-URL: nodejs#59065 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#58896 Backport-PR-URL: nodejs#59065 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
48174f1
to
6905258
Compare
Landed in 2fc8989...6905258 |
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.
Manual backport for #58896, which doesn't land cleanly on v22.x, and is needed to ensure that future PRs that touch the fast API will backport cleanly where possible.
Requires #58054 and #58489, both of which also need manual backporting.