| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 76781bd commit cd388b2
17 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -199,13 +199,6 @@ added: v10.0.0 | |||
| 199 | 199 | ||
| 200 | 200 | Enable experimental top-level `await` keyword support in REPL. | |
| 201 | 201 | ||
| 202 | - ### `--experimental-report` | ||
| 203 | - <!-- YAML | ||
| 204 | - added: v11.8.0 | ||
| 205 | - --> | ||
| 206 | - | ||
| 207 | - Enable experimental diagnostic report feature. | ||
| 208 | - | ||
| 209 | 202 | ### `--experimental-specifier-resolution=mode` | |
| 210 | 203 | <!-- YAML | |
| 211 | 204 | added: v13.4.0 | |
@@ -635,9 +628,9 @@ changes: | |||
| 635 | 628 | ||
| 636 | 629 | Enables the report to be triggered on fatal errors (internal errors within | |
| 637 | 630 | 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. | ||
| 641 | 634 | ||
| 642 | 635 | ### `--report-on-signal` | |
| 643 | 636 | <!-- YAML | |
@@ -650,8 +643,8 @@ changes: | |||
| 650 | 643 | --> | |
| 651 | 644 | ||
| 652 | 645 | 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`. | ||
| 655 | 648 | ||
| 656 | 649 | ### `--report-signal=signal` | |
| 657 | 650 | <!-- YAML | |
@@ -676,9 +669,9 @@ changes: | |||
| 676 | 669 | `--report-uncaught-exception` | |
| 677 | 670 | --> | |
| 678 | 671 | ||
| 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. | ||
| 682 | 675 | ||
| 683 | 676 | ### `--throw-deprecation` | |
| 684 | 677 | <!-- YAML | |
@@ -1098,7 +1091,6 @@ Node.js options that are allowed are: | |||
| 1098 | 1091 | * `--experimental-modules` | |
| 1099 | 1092 | * `--experimental-policy` | |
| 1100 | 1093 | * `--experimental-repl-await` | |
| 1101 | - * `--experimental-report` | ||
| 1102 | 1094 | * `--experimental-specifier-resolution` | |
| 1103 | 1095 | * `--experimental-vm-modules` | |
| 1104 | 1096 | * `--experimental-wasi-unstable-preview1` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,6 @@ is provided below for reference. | |||
| 32 | 32 | "cwd": "/home/nodeuser/project/node", | |
| 33 | 33 | "commandLine": [ | |
| 34 | 34 | "/home/nodeuser/project/node/out/Release/node", | |
| 35 | - "--experimental-report", | ||
| 36 | 35 | "--report-uncaught-exception", | |
| 37 | 36 | "/home/nodeuser/project/node/test/report/test-exception.js", | |
| 38 | 37 | "child" | |
@@ -392,14 +391,10 @@ is provided below for reference. | |||
| 392 | 391 | ## Usage | |
| 393 | 392 | ||
| 394 | 393 | ```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 | ||
| 397 | 396 | ``` | |
| 398 | 397 | ||
| 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 | - | ||
| 403 | 398 | * `--report-uncaught-exception` Enables report to be generated on | |
| 404 | 399 | un-caught exceptions. Useful when inspecting JavaScript stack in conjunction | |
| 405 | 400 | with native stack and other runtime environment data. | |
@@ -569,7 +564,7 @@ Configuration on module initialization is also available via | |||
| 569 | 564 | environment variables: | |
| 570 | 565 | ||
| 571 | 566 | ```bash | |
| 572 | - NODE_OPTIONS="--experimental-report --report-uncaught-exception \ | ||
| 567 | + NODE_OPTIONS="--report-uncaught-exception \ | ||
| 573 | 568 | --report-on-fatalerror --report-on-signal \ | |
| 574 | 569 | --report-signal=SIGUSR2 --report-filename=./report.json \ | |
| 575 | 570 | --report-directory=/home/nodeuser" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,11 +138,6 @@ keyword support in REPL. | |||
| 138 | 138 | .It Fl -experimental-specifier-resolution | |
| 139 | 139 | Select extension resolution algorithm for ES Modules; either 'explicit' (default) or 'node' | |
| 140 | 140 | . | |
| 141 | - .It Fl -experimental-report | ||
| 142 | - Enable experimental | ||
| 143 | - .Sy diagnostic report | ||
| 144 | - feature. | ||
| 145 | - . | ||
| 146 | 141 | .It Fl -experimental-vm-modules | |
| 147 | 142 | Enable experimental ES module support in VM module. | |
| 148 | 143 | . | |
@@ -299,16 +294,16 @@ will be written. | |||
| 299 | 294 | .It Fl -report-on-fatalerror | |
| 300 | 295 | Enables the | |
| 301 | 296 | .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. | ||
| 305 | 301 | . | |
| 306 | 302 | .It Fl -report-on-signal | |
| 307 | 303 | Enables | |
| 308 | 304 | .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. | ||
| 312 | 307 | . | |
| 313 | 308 | .It Fl -report-signal | |
| 314 | 309 | Sets or resets the signal for | |
@@ -318,9 +313,8 @@ generation (not supported on Windows). Default signal is SIGUSR2. | |||
| 318 | 313 | .It Fl -report-uncaught-exception | |
| 319 | 314 | Enables | |
| 320 | 315 | .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. | ||
| 324 | 318 | . | |
| 325 | 319 | .It Fl -throw-deprecation | |
| 326 | 320 | Throw errors for deprecations. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -163,16 +163,11 @@ function setupStacktracePrinterOnSigint() { | |||
| 163 | 163 | } | |
| 164 | 164 | ||
| 165 | 165 | function initializeReport() { | |
| 166 | - if (!getOptionValue('--experimental-report')) { | ||
| 167 | - return; | ||
| 168 | - } | ||
| 169 | 166 | const { report } = require('internal/process/report'); | |
| 170 | - const { emitExperimentalWarning } = require('internal/util'); | ||
| 171 | 167 | ObjectDefineProperty(process, 'report', { | |
| 172 | 168 | enumerable: false, | |
| 173 | 169 | configurable: true, | |
| 174 | 170 | get() { | |
| 175 | - emitExperimentalWarning('report'); | ||
| 176 | 171 | return report; | |
| 177 | 172 | } | |
| 178 | 173 | }); | |
@@ -187,10 +182,6 @@ function setupDebugEnv() { | |||
| 187 | 182 | ||
| 188 | 183 | // This has to be called after initializeReport() is called | |
| 189 | 184 | function initializeReportSignalHandlers() { | |
| 190 | - if (!getOptionValue('--experimental-report')) { | ||
| 191 | - return; | ||
| 192 | - } | ||
| 193 | - | ||
| 194 | 185 | const { addSignalHandler } = require('internal/process/report'); | |
| 195 | 186 | ||
| 196 | 187 | addSignalHandler(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,47 +76,6 @@ void PerProcessOptions::CheckOptions(std::vector<std::string>* errors) { | |||
| 76 | 76 | ||
| 77 | 77 | void PerIsolateOptions::CheckOptions(std::vector<std::string>* errors) { | |
| 78 | 78 | 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 | - } | ||
| 120 | 79 | } | |
| 121 | 80 | ||
| 122 | 81 | void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) { | |
@@ -360,10 +319,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
| 360 | 319 | &EnvironmentOptions::experimental_vm_modules, | |
| 361 | 320 | kAllowedInEnvironment); | |
| 362 | 321 | 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); | ||
| 367 | 323 | AddOption("--experimental-wasi-unstable-preview1", | |
| 368 | 324 | "experimental WASI support", | |
| 369 | 325 | &EnvironmentOptions::experimental_wasi, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -151,7 +151,6 @@ class EnvironmentOptions : public Options { | |||
| 151 | 151 | ||
| 152 | 152 | bool syntax_check_only = false; | |
| 153 | 153 | bool has_eval_string = false; | |
| 154 | - bool experimental_report = false; | ||
| 155 | 154 | bool experimental_wasi = false; | |
| 156 | 155 | std::string eval_string; | |
| 157 | 156 | bool print_eval = false; | |
@@ -188,7 +187,7 @@ class PerIsolateOptions : public Options { | |||
| 188 | 187 | bool report_uncaught_exception = false; | |
| 189 | 188 | bool report_on_signal = false; | |
| 190 | 189 | bool report_on_fatalerror = false; | |
| 191 | - std::string report_signal; | ||
| 190 | + std::string report_signal = "SIGUSR2"; | ||
| 192 | 191 | std::string report_filename; | |
| 193 | 192 | std::string report_directory; | |
| 194 | 193 | inline EnvironmentOptions* get_per_env_options(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - // Flags: --experimental-report | ||
| 2 | 1 | 'use strict'; | |
| 3 | 2 | const common = require('../../common'); | |
| 4 | 3 | const assert = require('assert'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,6 +22,7 @@ const expectedModules = new Set([ | |||
| 22 | 22 | 'Internal Binding native_module', | |
| 23 | 23 | 'Internal Binding options', | |
| 24 | 24 | 'Internal Binding process_methods', | |
| 25 | + 'Internal Binding report', | ||
| 25 | 26 | 'Internal Binding string_decoder', | |
| 26 | 27 | 'Internal Binding task_queue', | |
| 27 | 28 | 'Internal Binding timers', | |
@@ -64,6 +65,7 @@ const expectedModules = new Set([ | |||
| 64 | 65 | 'NativeModule internal/process/execution', | |
| 65 | 66 | 'NativeModule internal/process/per_thread', | |
| 66 | 67 | 'NativeModule internal/process/promises', | |
| 68 | + 'NativeModule internal/process/report', | ||
| 67 | 69 | 'NativeModule internal/process/signal', | |
| 68 | 70 | 'NativeModule internal/process/task_queues', | |
| 69 | 71 | 'NativeModule internal/process/warning', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,6 +84,7 @@ const undocumented = difference(process.allowedNodeEnvironmentFlags, | |||
| 84 | 84 | // Remove intentionally undocumented options. | |
| 85 | 85 | assert(undocumented.delete('--debug-arraybuffer-allocations')); | |
| 86 | 86 | assert(undocumented.delete('--es-module-specifier-resolution')); | |
| 87 | + assert(undocumented.delete('--experimental-report')); | ||
| 87 | 88 | assert(undocumented.delete('--experimental-worker')); | |
| 88 | 89 | assert(undocumented.delete('--no-node-snapshot')); | |
| 89 | 90 | assert(undocumented.delete('--loader')); | |
| Original file line number | Diff line number | Diff 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 | ||
| 2 | 2 | 'use strict'; | |
| 3 | 3 | const common = require('../common'); | |
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | - common.expectWarning('ExperimentalWarning', | ||
| 7 | - 'report is an experimental feature. This feature could ' + | ||
| 8 | - 'change at any time'); | ||
| 9 | - | ||
| 10 | 6 | // Verify that process.report.directory behaves properly. | |
| 11 | 7 | assert.strictEqual(process.report.directory, ''); | |
| 12 | 8 | process.report.directory = __dirname; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments