-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
src: cleanup unused headers #30328
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: cleanup unused headers #30328
Changes from 1 commit
01d3211
a33c48d
4200839
f28b8c4
77d07ce
240ba7d
d7f2f40
db5d6f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Node codebase has evolved a lot in the more than 10 years of its existence. As more features (and code) have been added, changed, removed, it's sometimes hard to keep track of what gets used and what not. This commits attempts to clean some of those potentially left-over headers using suggestions from include-what-you-use Refs: #27531
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| #include "node.h" | ||
| #include "env-inl.h" | ||
| #include "string_bytes.h" | ||
| #include "util-inl.h" | ||
| #include "v8.h" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| #include "node.h" | ||
| #include "node_internals.h" | ||
| #include "util-inl.h" | ||
|
|
||
| #include <csignal> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,11 @@ | |
| #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | ||
|
|
||
| #include "stream_wrap.h" | ||
| #include "v8.h" | ||
|
|
||
| namespace v8 { | ||
| class Object; | ||
| template <class T> class Local; | ||
| } // namespace v8 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| namespace node { | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| #include "debug_utils.h" | ||
| #include "env-inl.h" | ||
| #include "util-inl.h" | ||
|
|
||
| #ifdef __POSIX__ | ||
| #if defined(__linux__) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,10 +6,12 @@ | |
| #include <unordered_map> | ||
| #include <string> | ||
| #include <vector> | ||
| #include "node_url.h" | ||
| #include "base_object-inl.h" | ||
|
|
||
| namespace node { | ||
|
|
||
| class Environment; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| namespace loader { | ||
|
|
||
| enum ScriptType : int { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,13 +24,13 @@ | |
|
|
||
| #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | ||
|
|
||
| #include "async_wrap.h" | ||
| #include "handle_wrap.h" | ||
| #include "uv.h" | ||
| #include "v8.h" | ||
|
|
||
| namespace node { | ||
|
|
||
| class AsyncWrap; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| class Environment; | ||
|
|
||
| class UDPWrap: public HandleWrap { | ||
|
|
||
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.
This file includes v8.h indirectly anyway, should we add this here? (ditto below?)
Like, any file that actively uses V8 APIs will have it included anyway, through
node.hor otherwise…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'll take a look, remove the declarations and let you know of the result (sometime tomorrow afternoon / evening)
Uh oh!
There was an error while loading. Please reload this page.
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 think I've removed the declarations you pointed, and they were as you said not needed.
Were the ones removed by my last commit all the ones you were referring to?