-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: Fix extra includes of "env.h" and "env-inl.h" in this directory. #32293
Conversation
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.
Commit message should be like 3bb085d Or 902f5d9
src: change env.h includes for forward declarations
Due to how the Environment class is used through the codebase,
there are a lot of includes referencing either env.h or env-inl.h.
This can cause that when any development touches those libraries,
a lot of files have to be recompiled.
This commit attempts to change those includes by forward declarations
when possible to mitigate the issue.
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: nodejs#32293 Refs: nodejs#27531
8735d88
to
3e26be9
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.
👍
src/node_http_common-inl.h
Outdated
@@ -4,7 +4,6 @@ | |||
#include "node_http_common.h" | |||
#include "node.h" | |||
#include "node_mem-inl.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.
If removing this works, then it’s by accident – this file does require env-inl.h
in order to work. Please leave the include here.
(You can test this by including only node_http_common-inl.h
from a .cc
file – compiling that file will fail without this line.)
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 can guarantee that removing this would break on some of the platforms as I had omitted this originally and had to fix it.
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.
Great thanks - any tips on better build testing? I git grep'ing for these items in header files and running make -j8 test
as a blanket test. I see the x-platform integration tests pass...
@jasnell Please let me know if I'm stomping on anything you're doing. Just looking for some fun side-hacking :-)
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.
Nope you're good :-) ... I'll adjust on my end if there are any merge conflicts.
Friendly ping on this - any other reviewers I should include? |
@nkreeger Thanks for the ping! I’ll kick off a fresh CI run and we can land this quite soon, probably. |
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: #32293 Refs: #27531 Fixes: #27531 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 12a2997, and thank you for your patience! 🎉 |
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: #32293 Refs: #27531 Fixes: #27531 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: #32293 Refs: #27531 Fixes: #27531 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: nodejs#32293 Refs: nodejs#27531 Fixes: nodejs#27531 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Due to how the Environment class is used throughout the codebase, there are a log of includes referencing eitehr env.h or env-inl.h. This commit cleans up the remaining extra includes of 'env.h' or 'env-inl.h' and adds forward declarations of the Environment class. PR-URL: #32293 Refs: #27531 Fixes: #27531 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
This commit should cleanup the remaining open extra includes of "env.h"
and "env-inl.h" and forward declarations of |Environment|.
Fixes: #27531
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes