From 3346191c92754f95041fb5ac6d0f02b67783c1e3 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Mon, 4 Nov 2024 15:35:48 -0800 Subject: [PATCH 1/2] AOT compilation: rename flag; no longer experimental. The AOT compilation option is now no longer advertised as experimental; it is ready for general use for anyone who wishes to try it. It is still off by default, i.e., an opt-in feature. This PR renames the flag to `--enable-aot`, and continues to accept the old flag spelling (`--enable-experimental-aot`) while printing a warning that it has been renamed. --- integration-tests/cli/help.test.js | 4 ++-- integration-tests/js-compute/test.js | 2 +- src/parseInputs.js | 8 ++++++++ src/printHelp.js | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/integration-tests/cli/help.test.js b/integration-tests/cli/help.test.js index 8219516316..001c379ade 100644 --- a/integration-tests/cli/help.test.js +++ b/integration-tests/cli/help.test.js @@ -32,7 +32,7 @@ test('--help should return help on stdout and zero exit code', async function (t '--engine-wasm The JS engine Wasm file path', '--module-mode [experimental] Run all sources as native modules,', 'with full error stack support.', - '--enable-experimental-aot Enable experimental AOT compilation for performance', + '--enable-aot Enable AOT compilation for performance', '--enable-experimental-high-resolution-time-methods Enable experimental high-resolution fastly.now() method', '--enable-experimental-top-level-await Enable experimental top level await', 'ARGS:', @@ -61,7 +61,7 @@ test('-h should return help on stdout and zero exit code', async function (t) { '--engine-wasm The JS engine Wasm file path', '--module-mode [experimental] Run all sources as native modules,', 'with full error stack support.', - '--enable-experimental-aot Enable experimental AOT compilation for performance', + '--enable-aot Enable AOT compilation for performance', '--enable-experimental-high-resolution-time-methods Enable experimental high-resolution fastly.now() method', '--enable-experimental-top-level-await Enable experimental top level await', 'ARGS:', diff --git a/integration-tests/js-compute/test.js b/integration-tests/js-compute/test.js index b4c5e8f3ed..a2b1516ec2 100755 --- a/integration-tests/js-compute/test.js +++ b/integration-tests/js-compute/test.js @@ -85,7 +85,7 @@ const config = TOML.parse( config.name = serviceName; if (aot) { const buildArgs = config.scripts.build.split(' '); - buildArgs.splice(-1, null, '--enable-experimental-aot'); + buildArgs.splice(-1, null, '--enable-aot'); config.scripts.build = buildArgs.join(' '); } if (debugBuild) { diff --git a/src/parseInputs.js b/src/parseInputs.js index 609a10d547..9efbddffd0 100644 --- a/src/parseInputs.js +++ b/src/parseInputs.js @@ -39,7 +39,15 @@ export async function parseInputs(cliInputs) { bundle = true; break; } + case '--enable-aot': { + enableAOT = true; + break; + } case '--enable-experimental-aot': { + console.error( + 'Warning: --enable-experimental-aot flag is now --enable-aot. The old flag continues\n' + + 'to work for now, but please update your build invocation!' + ); enableAOT = true; break; } diff --git a/src/printHelp.js b/src/printHelp.js index 0ee51b0495..3e35cb6b3b 100644 --- a/src/printHelp.js +++ b/src/printHelp.js @@ -16,7 +16,7 @@ OPTIONS: --engine-wasm The JS engine Wasm file path --module-mode [experimental] Run all sources as native modules, with full error stack support. - --enable-experimental-aot Enable experimental AOT compilation for performance + --enable-aot Enable AOT compilation for performance --enable-experimental-high-resolution-time-methods Enable experimental high-resolution fastly.now() method --enable-experimental-top-level-await Enable experimental top level await From 5867e25511eb0192db6256c370692c1b16ca3edb Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Mon, 4 Nov 2024 15:56:18 -0800 Subject: [PATCH 2/2] run formatter. --- src/parseInputs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parseInputs.js b/src/parseInputs.js index 9efbddffd0..c5e674196d 100644 --- a/src/parseInputs.js +++ b/src/parseInputs.js @@ -45,8 +45,8 @@ export async function parseInputs(cliInputs) { } case '--enable-experimental-aot': { console.error( - 'Warning: --enable-experimental-aot flag is now --enable-aot. The old flag continues\n' + - 'to work for now, but please update your build invocation!' + 'Warning: --enable-experimental-aot flag is now --enable-aot. The old flag continues\n' + + 'to work for now, but please update your build invocation!', ); enableAOT = true; break;