Skip to content

Commit

Permalink
src: remove env-inl.h from header files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sam-github authored and targos committed May 28, 2019
1 parent 02f794a commit d774ea5
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/api/environment.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "env.h"
#include "env-inl.h"
#include "node.h"
#include "node_context_data.h"
#include "node_errors.h"
Expand Down
1 change: 1 addition & 0 deletions src/api/utils.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "env-inl.h"
#include "node.h"
#include "node_internals.h"
#include "util-inl.h"
Expand Down
1 change: 1 addition & 0 deletions src/debug_utils.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "debug_utils.h"
#include "env-inl.h"
#include "util-inl.h"

#ifdef __POSIX__
Expand Down
2 changes: 1 addition & 1 deletion src/debug_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "async_wrap.h"
#include "env-inl.h"
#include "env.h"

#include <sstream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "inspector_agent.h"

#include "env-inl.h"
#include "inspector/main_thread_interface.h"
#include "inspector/node_string.h"
#include "inspector/runtime_agent.h"
Expand Down
1 change: 1 addition & 0 deletions src/js_native_api_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <cmath>
#include <algorithm>
#define NAPI_EXPERIMENTAL
#include "env-inl.h"
#include "js_native_api_v8.h"
#include "js_native_api.h"
#include "util-inl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/node_api.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <node_buffer.h>
#include "env.h"
#include "env-inl.h"
#define NAPI_EXPERIMENTAL
#include "js_native_api_v8.h"
#include "node_api.h"
Expand Down
1 change: 1 addition & 0 deletions src/node_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "env-inl.h"
#include "node_constants.h"
#include "node_internals.h"
#include "util-inl.h"
Expand Down
1 change: 1 addition & 0 deletions src/node_credentials.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "env-inl.h"
#include "node_internals.h"
#include "util-inl.h"

Expand Down
2 changes: 1 addition & 1 deletion src/node_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "env-inl.h"
#include "env.h"
#include "node.h"
#include "node_binding.h"
#include "node_mutex.h"
Expand Down
1 change: 1 addition & 0 deletions src/node_report.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "env-inl.h"
#include "node_report.h"
#include "debug_utils.h"
#include "node_internals.h"
Expand Down
1 change: 1 addition & 0 deletions src/node_report_utils.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "env-inl.h"
#include "node_internals.h"
#include "node_report.h"
#include "util-inl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/node_url.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "env-inl.h"
#include "env.h"

#include <string>

Expand Down
4 changes: 3 additions & 1 deletion src/node_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "node_watchdog.h"
#include <algorithm>

#include "debug_utils.h"
#include "env-inl.h"
#include "node_errors.h"
#include "node_internals.h"
#include "node_watchdog.h"
#include "util-inl.h"

namespace node {
Expand Down
1 change: 1 addition & 0 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "util.h" // NOLINT(build/include_inline)
#include "util-inl.h"

#include "env-inl.h"
#include "node_buffer.h"
#include "node_errors.h"
#include "node_internals.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cctest/node_test_fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "node.h"
#include "node_platform.h"
#include "node_internals.h"
#include "env.h"
#include "env-inl.h"
#include "util-inl.h"
#include "v8.h"
#include "libplatform/libplatform.h"
Expand Down
1 change: 0 additions & 1 deletion test/cctest/test_aliased_buffer.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#include "v8.h"
#include "aliased_buffer.h"
#include "node_test_fixture.h"
Expand Down
1 change: 1 addition & 0 deletions test/cctest/test_url.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "node_url.h"
#include "node_i18n.h"
#include "util-inl.h"

#include "gtest/gtest.h"

Expand Down
1 change: 1 addition & 0 deletions tools/js2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def ReadMacros(macro_files):


TEMPLATE = """
#include "env-inl.h"
#include "node_native_module.h"
#include "node_internals.h"
Expand Down
2 changes: 2 additions & 0 deletions tools/snapshot/node_mksnapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
#include <string>
#include <vector>

#include "env-inl.h"
#include "libplatform/libplatform.h"
#include "node_internals.h"
#include "snapshot_builder.h"
#include "util-inl.h"
#include "v8.h"

#ifdef _WIN32
Expand Down

0 comments on commit d774ea5

Please sign in to comment.