Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec7b69f

Browse filesBrowse files
alferpaltargos
authored andcommitted
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. Refs: #27531 PR-URL: #30133 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent ae81360 commit ec7b69f
Copy full SHA for ec7b69f
Expand file treeCollapse file tree

18 files changed

+30
-20
lines changed
Open diff view settings
Collapse file

‎src/connection_wrap.h‎

Copy file name to clipboardExpand all lines: src/connection_wrap.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

6-
#include "env.h"
76
#include "stream_wrap.h"
87
#include "v8.h"
98

109
namespace node {
1110

11+
class Environment;
12+
1213
template <typename WrapType, typename UVType>
1314
class ConnectionWrap : public LibuvStreamWrap {
1415
public:
Collapse file

‎src/diagnosticfilename-inl.h‎

Copy file name to clipboardExpand all lines: src/diagnosticfilename-inl.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

66
#include "node_internals.h"
7-
#include "env-inl.h"
8-
97
namespace node {
108

9+
class Environment;
10+
1111
inline DiagnosticFilename::DiagnosticFilename(
1212
Environment* env,
1313
const char* prefix,
Collapse file

‎src/inspector/main_thread_interface.h‎

Copy file name to clipboardExpand all lines: src/inspector/main_thread_interface.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#error("This header can only be used when inspector is enabled")
66
#endif
77

8-
#include "env.h"
98
#include "inspector_agent.h"
109
#include "node_mutex.h"
1110

Collapse file

‎src/inspector_profiler.h‎

Copy file name to clipboardExpand all lines: src/inspector_profiler.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#error("This header can only be used when inspector is enabled")
88
#endif
99

10-
#include "env.h"
1110
#include "inspector_agent.h"
1211

1312
namespace node {
Collapse file

‎src/js_stream.h‎

Copy file name to clipboardExpand all lines: src/js_stream.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

66
#include "async_wrap.h"
7-
#include "env.h"
87
#include "stream_base.h"
98
#include "v8.h"
109

1110
namespace node {
1211

12+
class Environment;
13+
1314
class JSStream : public AsyncWrap, public StreamBase {
1415
public:
1516
static void Initialize(v8::Local<v8::Object> target,
Collapse file

‎src/node_crypto_bio.h‎

Copy file name to clipboardExpand all lines: src/node_crypto_bio.h
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626

2727
#include "node_crypto.h"
2828
#include "openssl/bio.h"
29-
#include "env.h"
3029
#include "util.h"
3130
#include "v8.h"
3231

3332
namespace node {
33+
34+
class Environment;
35+
3436
namespace crypto {
3537

3638
// This class represents buffers for OpenSSL I/O, implemented as a singly-linked
Collapse file

‎src/node_dtrace.h‎

Copy file name to clipboardExpand all lines: src/node_dtrace.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
2626

27-
#include "env.h"
2827
#include "v8.h"
2928

3029
extern "C" {
@@ -76,6 +75,8 @@ typedef struct {
7675

7776
namespace node {
7877

78+
class Environment;
79+
7980
void InitDTrace(Environment* env);
8081

8182
} // namespace node
Collapse file

‎src/node_perf.h‎

Copy file name to clipboardExpand all lines: src/node_perf.h
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include "node.h"
77
#include "node_perf_common.h"
8-
#include "env.h"
98
#include "base_object-inl.h"
109
#include "histogram-inl.h"
1110

@@ -15,6 +14,9 @@
1514
#include <string>
1615

1716
namespace node {
17+
18+
class Environment;
19+
1820
namespace performance {
1921

2022
using v8::FunctionCallbackInfo;
Collapse file

‎src/node_stat_watcher.h‎

Copy file name to clipboardExpand all lines: src/node_stat_watcher.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626

2727
#include "node.h"
2828
#include "handle_wrap.h"
29-
#include "env.h"
3029
#include "uv.h"
3130
#include "v8.h"
3231

3332
namespace node {
3433

34+
class Environment;
35+
3536
class StatWatcher : public HandleWrap {
3637
public:
3738
static void Initialize(Environment* env, v8::Local<v8::Object> target);
Collapse file

‎src/node_url.h‎

Copy file name to clipboardExpand all lines: src/node_url.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

66
#include "node.h"
7-
#include "env.h"
87

98
#include <string>
109

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.