Skip to content

Commit 3bbd3e5

Browse files
committed
fixup
Signed-off-by: Paolo Insogna <paolo@cowtech.it>
1 parent 31ba820 commit 3bbd3e5

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

configure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,9 @@
797797
default=None,
798798
help='Enable the --trace-maps flag in V8 (use at your own risk)')
799799

800-
parser.add_argument('--experimental',
800+
parser.add_argument('--enable-all-experimentals',
801801
action='store_true',
802-
dest='experimental',
802+
dest='enable_all_experimentals',
803803
default=None,
804804
help='Enable all experimental features by default')
805805

@@ -1809,7 +1809,7 @@ def configure_node_cctest_sources(o):
18091809
def configure_node(o):
18101810
if options.dest_os == 'android':
18111811
o['variables']['OS'] = 'android'
1812-
o['variables']['node_enable_experimentals'] = B(options.experimental)
1812+
o['variables']['node_enable_experimentals'] = B(options.enable_all_experimentals)
18131813
o['variables']['node_prefix'] = options.prefix
18141814
o['variables']['node_install_npm'] = b(not options.without_npm)
18151815
o['variables']['node_install_corepack'] = b(options.with_corepack)

src/node_options.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ class DebugOptions : public Options {
113113
};
114114

115115
#ifdef NODE_ENABLE_EXPERIMENTALS
116-
#define EXPERIMENTAL_OPTION(name, default_value) bool name = true;
116+
#define EXPERIMENTALS_DEFAULT_VALUE true
117117
#else
118-
#define EXPERIMENTAL_OPTION(name, default_value) bool name = default_value;
118+
#define EXPERIMENTALS_DEFAULT_VALUE false
119119
#endif
120120

121121
class EnvironmentOptions : public Options {
@@ -128,19 +128,19 @@ class EnvironmentOptions : public Options {
128128
bool require_module = true;
129129
std::string dns_result_order;
130130
bool enable_source_maps = false;
131-
EXPERIMENTAL_OPTION(experimental_addon_modules, false)
132-
EXPERIMENTAL_OPTION(experimental_eventsource, false)
133-
EXPERIMENTAL_OPTION(experimental_fetch, true)
134-
EXPERIMENTAL_OPTION(experimental_ffi, false)
135-
EXPERIMENTAL_OPTION(experimental_websocket, true)
136-
EXPERIMENTAL_OPTION(experimental_sqlite, true)
137-
EXPERIMENTAL_OPTION(experimental_stream_iter, false)
131+
bool experimental_addon_modules = EXPERIMENTALS_DEFAULT_VALUE;
132+
bool experimental_eventsource = EXPERIMENTALS_DEFAULT_VALUE;
133+
bool experimental_fetch = true;
134+
bool experimental_ffi = EXPERIMENTALS_DEFAULT_VALUE;
135+
bool experimental_websocket = true;
136+
bool experimental_sqlite = true;
137+
bool experimental_stream_iter = EXPERIMENTALS_DEFAULT_VALUE;
138138
bool webstorage = HAVE_SQLITE;
139-
EXPERIMENTAL_OPTION(experimental_quic, false)
139+
bool experimental_quic = EXPERIMENTALS_DEFAULT_VALUE;
140140
std::string localstorage_file;
141-
EXPERIMENTAL_OPTION(experimental_global_navigator, true)
142-
EXPERIMENTAL_OPTION(experimental_global_web_crypto, true)
143-
EXPERIMENTAL_OPTION(experimental_import_meta_resolve, false)
141+
bool experimental_global_navigator = true;
142+
bool experimental_global_web_crypto = true;
143+
bool experimental_import_meta_resolve = EXPERIMENTALS_DEFAULT_VALUE;
144144
std::string input_type; // Value of --input-type
145145
bool entry_is_url = false;
146146
bool permission = false;
@@ -154,8 +154,8 @@ class EnvironmentOptions : public Options {
154154
bool allow_wasi = false;
155155
bool allow_ffi = false;
156156
bool allow_worker_threads = false;
157-
EXPERIMENTAL_OPTION(experimental_repl_await, true)
158-
EXPERIMENTAL_OPTION(experimental_vm_modules, false)
157+
bool experimental_repl_await = true;
158+
bool experimental_vm_modules = EXPERIMENTALS_DEFAULT_VALUE;
159159
bool async_context_frame = true;
160160
bool expose_internals = false;
161161
bool force_node_api_uncaught_exceptions_policy = false;
@@ -182,10 +182,11 @@ class EnvironmentOptions : public Options {
182182
uint64_t cpu_prof_interval = kDefaultCpuProfInterval;
183183
std::string cpu_prof_name;
184184
bool cpu_prof = false;
185-
EXPERIMENTAL_OPTION(experimental_network_inspection, false)
186-
EXPERIMENTAL_OPTION(experimental_worker_inspection, false)
187-
EXPERIMENTAL_OPTION(experimental_storage_inspection, false)
188-
EXPERIMENTAL_OPTION(experimental_inspector_network_resource, false)
185+
bool experimental_network_inspection = EXPERIMENTALS_DEFAULT_VALUE;
186+
bool experimental_worker_inspection = EXPERIMENTALS_DEFAULT_VALUE;
187+
bool experimental_storage_inspection = EXPERIMENTALS_DEFAULT_VALUE;
188+
bool experimental_inspector_network_resource =
189+
EXPERIMENTALS_DEFAULT_VALUE;
189190
std::string heap_prof_dir;
190191
std::string heap_prof_name;
191192
static const uint64_t kDefaultHeapProfInterval = 512 * 1024;
@@ -279,7 +280,7 @@ class EnvironmentOptions : public Options {
279280
bool report_exclude_env = false;
280281
bool report_exclude_network = false;
281282
std::string experimental_config_file_path;
282-
EXPERIMENTAL_OPTION(experimental_default_config_file, false)
283+
bool experimental_default_config_file = EXPERIMENTALS_DEFAULT_VALUE;
283284

284285
inline DebugOptions* get_debug_options() { return &debug_options_; }
285286
inline const DebugOptions& debug_options() const { return debug_options_; }

0 commit comments

Comments
 (0)