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 cd388b2

Browse filesBrowse files
cjihrigMylesBorins
authored andcommitted
doc,lib,src,test: make --experimental-report a nop
This commit makes the --experimental-report CLI flag a no-op. PR-URL: #32242 Fixes: #26293 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 76781bd commit cd388b2
Copy full SHA for cd388b2
Expand file treeCollapse file tree

17 files changed

+35
-134
lines changed
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+8-16Lines changed: 8 additions & 16 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,6 @@ added: v10.0.0
199199

200200
Enable experimental top-level `await` keyword support in REPL.
201201

202-
### `--experimental-report`
203-
<!-- YAML
204-
added: v11.8.0
205-
-->
206-
207-
Enable experimental diagnostic report feature.
208-
209202
### `--experimental-specifier-resolution=mode`
210203
<!-- YAML
211204
added: v13.4.0
@@ -635,9 +628,9 @@ changes:
635628

636629
Enables the report to be triggered on fatal errors (internal errors within
637630
the Node.js runtime such as out of memory) that lead to termination of the
638-
application, if `--experimental-report` is enabled. Useful to inspect various
639-
diagnostic data elements such as heap, stack, event loop state, resource
640-
consumption etc. to reason about the fatal error.
631+
application. Useful to inspect various diagnostic data elements such as heap,
632+
stack, event loop state, resource consumption etc. to reason about the fatal
633+
error.
641634

642635
### `--report-on-signal`
643636
<!-- YAML
@@ -650,8 +643,8 @@ changes:
650643
-->
651644

652645
Enables report to be generated upon receiving the specified (or predefined)
653-
signal to the running Node.js process, if `--experimental-report` is enabled.
654-
The signal to trigger the report is specified through `--report-signal`.
646+
signal to the running Node.js process. The signal to trigger the report is
647+
specified through `--report-signal`.
655648

656649
### `--report-signal=signal`
657650
<!-- YAML
@@ -676,9 +669,9 @@ changes:
676669
`--report-uncaught-exception`
677670
-->
678671

679-
Enables report to be generated on un-caught exceptions, if
680-
`--experimental-report` is enabled. Useful when inspecting JavaScript stack in
681-
conjunction with native stack and other runtime environment data.
672+
Enables report to be generated on uncaught exceptions. Useful when inspecting
673+
the JavaScript stack in conjunction with native stack and other runtime
674+
environment data.
682675

683676
### `--throw-deprecation`
684677
<!-- YAML
@@ -1098,7 +1091,6 @@ Node.js options that are allowed are:
10981091
* `--experimental-modules`
10991092
* `--experimental-policy`
11001093
* `--experimental-repl-await`
1101-
* `--experimental-report`
11021094
* `--experimental-specifier-resolution`
11031095
* `--experimental-vm-modules`
11041096
* `--experimental-wasi-unstable-preview1`
Collapse file

‎doc/api/report.md‎

Copy file name to clipboardExpand all lines: doc/api/report.md
+3-8Lines changed: 3 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ is provided below for reference.
3232
"cwd": "/home/nodeuser/project/node",
3333
"commandLine": [
3434
"/home/nodeuser/project/node/out/Release/node",
35-
"--experimental-report",
3635
"--report-uncaught-exception",
3736
"/home/nodeuser/project/node/test/report/test-exception.js",
3837
"child"
@@ -392,14 +391,10 @@ is provided below for reference.
392391
## Usage
393392

394393
```bash
395-
node --experimental-report --report-uncaught-exception \
396-
--report-on-signal --report-on-fatalerror app.js
394+
node --report-uncaught-exception --report-on-signal \
395+
--report-on-fatalerror app.js
397396
```
398397

399-
* `--experimental-report` Enables the diagnostic report feature.
400-
In the absence of this flag, use of all other related options will result in
401-
an error.
402-
403398
* `--report-uncaught-exception` Enables report to be generated on
404399
un-caught exceptions. Useful when inspecting JavaScript stack in conjunction
405400
with native stack and other runtime environment data.
@@ -569,7 +564,7 @@ Configuration on module initialization is also available via
569564
environment variables:
570565

571566
```bash
572-
NODE_OPTIONS="--experimental-report --report-uncaught-exception \
567+
NODE_OPTIONS="--report-uncaught-exception \
573568
--report-on-fatalerror --report-on-signal \
574569
--report-signal=SIGUSR2 --report-filename=./report.json \
575570
--report-directory=/home/nodeuser"
Collapse file

‎doc/node.1‎

Copy file name to clipboardExpand all lines: doc/node.1
+8-14Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@ keyword support in REPL.
138138
.It Fl -experimental-specifier-resolution
139139
Select extension resolution algorithm for ES Modules; either 'explicit' (default) or 'node'
140140
.
141-
.It Fl -experimental-report
142-
Enable experimental
143-
.Sy diagnostic report
144-
feature.
145-
.
146141
.It Fl -experimental-vm-modules
147142
Enable experimental ES module support in VM module.
148143
.
@@ -299,16 +294,16 @@ will be written.
299294
.It Fl -report-on-fatalerror
300295
Enables the
301296
.Sy diagnostic report
302-
to be triggered on fatal errors (internal errors within the Node.js runtime such as out of memory) that leads to termination of the application, if
303-
.Sy --experimental-report
304-
is enabled. Useful to inspect various diagnostic data elements such as heap, stack, event loop state, resource consumption etc. to reason about the fatal error.
297+
to be triggered on fatal errors (internal errors within the Node.js runtime such
298+
as out of memory) that leads to termination of the application. Useful to
299+
inspect various diagnostic data elements such as heap, stack, event loop state,
300+
resource consumption etc. to reason about the fatal error.
305301
.
306302
.It Fl -report-on-signal
307303
Enables
308304
.Sy diagnostic report
309-
to be generated upon receiving the specified (or predefined) signal to the running Node.js process, if
310-
.Sy --experimental-report
311-
is enabled. Default signal is SIGUSR2.
305+
to be generated upon receiving the specified (or predefined) signal to the
306+
running Node.js process. Default signal is SIGUSR2.
312307
.
313308
.It Fl -report-signal
314309
Sets or resets the signal for
@@ -318,9 +313,8 @@ generation (not supported on Windows). Default signal is SIGUSR2.
318313
.It Fl -report-uncaught-exception
319314
Enables
320315
.Sy diagnostic report
321-
to be generated on un-caught exceptions, if
322-
.Sy --experimental-report
323-
is enabled. Useful when inspecting JavaScript stack in conjunction with native stack and other runtime environment data.
316+
to be generated on un-caught exceptions. Useful when inspecting JavaScript
317+
stack in conjunction with native stack and other runtime environment data.
324318
.
325319
.It Fl -throw-deprecation
326320
Throw errors for deprecations.
Collapse file

‎lib/internal/bootstrap/pre_execution.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/pre_execution.js
-9Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,11 @@ function setupStacktracePrinterOnSigint() {
163163
}
164164

165165
function initializeReport() {
166-
if (!getOptionValue('--experimental-report')) {
167-
return;
168-
}
169166
const { report } = require('internal/process/report');
170-
const { emitExperimentalWarning } = require('internal/util');
171167
ObjectDefineProperty(process, 'report', {
172168
enumerable: false,
173169
configurable: true,
174170
get() {
175-
emitExperimentalWarning('report');
176171
return report;
177172
}
178173
});
@@ -187,10 +182,6 @@ function setupDebugEnv() {
187182

188183
// This has to be called after initializeReport() is called
189184
function initializeReportSignalHandlers() {
190-
if (!getOptionValue('--experimental-report')) {
191-
return;
192-
}
193-
194185
const { addSignalHandler } = require('internal/process/report');
195186

196187
addSignalHandler();
Collapse file

‎src/node_options.cc‎

Copy file name to clipboardExpand all lines: src/node_options.cc
+1-45Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -76,47 +76,6 @@ void PerProcessOptions::CheckOptions(std::vector<std::string>* errors) {
7676

7777
void PerIsolateOptions::CheckOptions(std::vector<std::string>* errors) {
7878
per_env->CheckOptions(errors);
79-
80-
if (per_env->experimental_report) {
81-
// Assign the report_signal default value here. Once the
82-
// --experimental-report flag is dropped, move this initialization to
83-
// node_options.h, where report_signal is declared.
84-
if (report_signal.empty())
85-
report_signal = "SIGUSR2";
86-
return;
87-
}
88-
89-
if (!report_directory.empty()) {
90-
errors->push_back("--report-directory option is valid only when "
91-
"--experimental-report is set");
92-
}
93-
94-
if (!report_filename.empty()) {
95-
errors->push_back("--report-filename option is valid only when "
96-
"--experimental-report is set");
97-
}
98-
99-
if (!report_signal.empty()) {
100-
errors->push_back("--report-signal option is valid only when "
101-
"--experimental-report is set");
102-
}
103-
104-
if (report_on_fatalerror) {
105-
errors->push_back(
106-
"--report-on-fatalerror option is valid only when "
107-
"--experimental-report is set");
108-
}
109-
110-
if (report_on_signal) {
111-
errors->push_back("--report-on-signal option is valid only when "
112-
"--experimental-report is set");
113-
}
114-
115-
if (report_uncaught_exception) {
116-
errors->push_back(
117-
"--report-uncaught-exception option is valid only when "
118-
"--experimental-report is set");
119-
}
12079
}
12180

12281
void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) {
@@ -360,10 +319,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
360319
&EnvironmentOptions::experimental_vm_modules,
361320
kAllowedInEnvironment);
362321
AddOption("--experimental-worker", "", NoOp{}, kAllowedInEnvironment);
363-
AddOption("--experimental-report",
364-
"enable report generation",
365-
&EnvironmentOptions::experimental_report,
366-
kAllowedInEnvironment);
322+
AddOption("--experimental-report", "", NoOp{}, kAllowedInEnvironment);
367323
AddOption("--experimental-wasi-unstable-preview1",
368324
"experimental WASI support",
369325
&EnvironmentOptions::experimental_wasi,
Collapse file

‎src/node_options.h‎

Copy file name to clipboardExpand all lines: src/node_options.h
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ class EnvironmentOptions : public Options {
151151

152152
bool syntax_check_only = false;
153153
bool has_eval_string = false;
154-
bool experimental_report = false;
155154
bool experimental_wasi = false;
156155
std::string eval_string;
157156
bool print_eval = false;
@@ -188,7 +187,7 @@ class PerIsolateOptions : public Options {
188187
bool report_uncaught_exception = false;
189188
bool report_on_signal = false;
190189
bool report_on_fatalerror = false;
191-
std::string report_signal;
190+
std::string report_signal = "SIGUSR2";
192191
std::string report_filename;
193192
std::string report_directory;
194193
inline EnvironmentOptions* get_per_env_options();
Collapse file

‎test/addons/worker-addon/test.js‎

Copy file name to clipboardExpand all lines: test/addons/worker-addon/test.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --experimental-report
21
'use strict';
32
const common = require('../../common');
43
const assert = require('assert');
Collapse file

‎test/parallel/test-bootstrap-modules.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-bootstrap-modules.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const expectedModules = new Set([
2222
'Internal Binding native_module',
2323
'Internal Binding options',
2424
'Internal Binding process_methods',
25+
'Internal Binding report',
2526
'Internal Binding string_decoder',
2627
'Internal Binding task_queue',
2728
'Internal Binding timers',
@@ -64,6 +65,7 @@ const expectedModules = new Set([
6465
'NativeModule internal/process/execution',
6566
'NativeModule internal/process/per_thread',
6667
'NativeModule internal/process/promises',
68+
'NativeModule internal/process/report',
6769
'NativeModule internal/process/signal',
6870
'NativeModule internal/process/task_queues',
6971
'NativeModule internal/process/warning',
Collapse file

‎test/parallel/test-process-env-allowed-flags-are-documented.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-env-allowed-flags-are-documented.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const undocumented = difference(process.allowedNodeEnvironmentFlags,
8484
// Remove intentionally undocumented options.
8585
assert(undocumented.delete('--debug-arraybuffer-allocations'));
8686
assert(undocumented.delete('--es-module-specifier-resolution'));
87+
assert(undocumented.delete('--experimental-report'));
8788
assert(undocumented.delete('--experimental-worker'));
8889
assert(undocumented.delete('--no-node-snapshot'));
8990
assert(undocumented.delete('--loader'));
Collapse file

‎test/report/test-report-config.js‎

Copy file name to clipboardExpand all lines: test/report/test-report-config.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
// Flags: --experimental-report --report-on-fatalerror --report-on-signal --report-uncaught-exception
1+
// Flags: --report-on-fatalerror --report-on-signal --report-uncaught-exception
22
'use strict';
33
const common = require('../common');
44
const assert = require('assert');
55

6-
common.expectWarning('ExperimentalWarning',
7-
'report is an experimental feature. This feature could ' +
8-
'change at any time');
9-
106
// Verify that process.report.directory behaves properly.
117
assert.strictEqual(process.report.directory, '');
128
process.report.directory = __dirname;

0 commit comments

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