-
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: remove memory_tracker-inl.h from header files #27755
Conversation
1dee3ab
to
f79a88c
Compare
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.
Looks like this doesn't build as-is?
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.
Oh, that's probably what the force-push was all about....
yeah, forgot to build test/cctest locally. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think the OS X failure is real: In file included from ../src/api/environment.cc:1:
In file included from ../src/env.h:27:
In file included from ../src/aliased_buffer.h:7:
../src/util.h:253:43: error: inline function 'node::ContainerOf<uv_work_s, node::ThreadPoolWork>' is not defined [-Werror,-Wundefined-inline]
constexpr ContainerOfHelper<Inner, Outer> ContainerOf(Inner Outer::*field,
^
../src/node_internals.h:261:32: note: used here
ThreadPoolWork* self = ContainerOf(&ThreadPoolWork::work_req_, req); |
63762f0
to
ea6ff98
Compare
The presence of the inline definitions in node_internals.h can cause all files that include node_internals.h to depend on util-inl.h, even if they never use ThreadPoolWork. Whether this happens depends on the toolchain, gcc will strip unused definitions, clang won't.
Inline headers should only be included into the .cc files that use them.
ea6ff98
to
a1053e2
Compare
Inline headers should only be included into the .cc files that use them.
a1053e2
to
0af62cc
Compare
OK, I sorted out the clang vs gcc disagreement on whether unused inlines need to be defined, and finally have a green CI. Because I force-pushed since last review, I need one reviewer to reaffirm their approval, please, before I can land this. |
Landed in cb16872...60b315c |
The presence of the inline definitions in node_internals.h can cause all files that include node_internals.h to depend on util-inl.h, even if they never use ThreadPoolWork. Whether this happens depends on the toolchain, gcc will strip unused definitions, clang won't. PR-URL: #27755 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The presence of the inline definitions in node_internals.h can cause all files that include node_internals.h to depend on util-inl.h, even if they never use ThreadPoolWork. Whether this happens depends on the toolchain, gcc will strip unused definitions, clang won't. PR-URL: #27755 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Inline headers should only be included into the .cc files that use them.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes