-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: reduce includes of node_internals.h #25507
Conversation
@joyeecheung sadly an error occured when I tried to trigger a build :( |
#include <sstream> | ||
#include <string> | ||
#include "async_wrap.h" | ||
#include "env-inl.h" |
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.
Style: own headers before system headers.
(Well, style... it's to avoid accidental dependencies on system headers in our own headers)
#include <string> | ||
#include "util.h" |
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.
Ditto.
src/string_search.h
Outdated
#include <string.h> | ||
#include <algorithm> | ||
#include "util.h" |
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.
Ditto.
@joyeecheung You added the author-ready label but did you address the feedback? |
dcded4c
to
e1d0070
Compare
@bnoordhuis Looks like my push did not succeed (GFW hiccups). Addressed the reviews and rebased. |
f2c4aeb
to
fa6fd18
Compare
Added an additional hack for https://ci.nodejs.org/job/node-test-pull-request/20206/ (✔️) |
Landed in 1838d00. |
PR-URL: #25507 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #25507 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
At the moment
node_internals.h
serves as a header for declarationsof internal APIs that do not have their own headers, so it includes
many other headers for internal types and is subject to frequent
changes, which often trigger recompilations of files that
include
node_internals.h
and creates a lot of indirect dependencieson unnecessary headers.
This patch moves the utilities in
node_internals.h
thatonly depends on
v8.h
intoutil.h
, and reduce the number of includesof
node_internals.h
across the code base - most of them can bereplaced with
util.h
orenv-inl.h
instead.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes