-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
tools: fix js2c regression #27980
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
tools: fix js2c regression #27980
Conversation
This comment has been minimized.
This comment has been minimized.
f473fa2 to
e302589
Compare
This comment has been minimized.
This comment has been minimized.
e302589 to
84aca5c
Compare
This comment has been minimized.
This comment has been minimized.
test/cctest/test_per_process.cc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The builds are failing because this is private. I guess it would also make sense to add a public method to just return the source in a copy, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it a friend
https://github.com/nodejs/node/blob/84aca5ca594f86ce9b6b86e6af039e78f90deaef/src/node_native_module.h#L89
and it compiles & passes with MSVC, now I need to figure out gcc & clang 🤷♂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it was a namespace issue
https://github.com/nodejs/node/blob/c178598d309319e9a9e9692d6560a9205cd1b307/src/node_native_module.h#L89
This comment has been minimized.
This comment has been minimized.
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice work.
tools/js2c.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you wrap this, e.g. by putting the for i in ... on its own line, lining it up with the e in [encoded_source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
8494bba to
6b0295c
Compare
|
Landed in cb92d24 |
PR-URL: nodejs#27980 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #27980 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Fix a regression that was introduced in #25518 and causes the binary to bloat by ~10%.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes