src: remove memory_tracker-inl.h from header files#27755
Closed
sam-github wants to merge 3 commits intonodejs:masterfrom
Closed
src: remove memory_tracker-inl.h from header files#27755sam-github wants to merge 3 commits intonodejs:masterfrom
sam-github wants to merge 3 commits intonodejs:masterfrom
Conversation
Collaborator
lpinca
approved these changes
May 17, 2019
Collaborator
Trott
approved these changes
May 17, 2019
cjihrig
approved these changes
May 17, 2019
1dee3ab to
f79a88c
Compare
Trott
requested changes
May 17, 2019
Member
Trott
left a comment
There was a problem hiding this comment.
Looks like this doesn't build as-is?
Trott
approved these changes
May 17, 2019
Member
Trott
left a comment
There was a problem hiding this comment.
Oh, that's probably what the force-push was all about....
Contributor
Author
|
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.
Collaborator
addaleax
approved these changes
May 19, 2019
Member
|
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); |
jasnell
approved these changes
May 19, 2019
63762f0 to
ea6ff98
Compare
Collaborator
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
Collaborator
Contributor
Author
|
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. |
Contributor
Author
|
Landed in cb16872...60b315c |
sam-github
added a commit
that referenced
this pull request
May 23, 2019
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 <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
sam-github
added a commit
that referenced
this pull request
May 23, 2019
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
sam-github
added a commit
that referenced
this pull request
May 23, 2019
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 28, 2019
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 <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 28, 2019
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 28, 2019
Inline headers should only be included into the .cc files that use them. PR-URL: #27755 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
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
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.
Inline headers should only be included into the .cc files that use them.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes