Skip to content

Commit

Permalink
deprecate: remove experimental --enable-pbl flag (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Aug 26, 2024
1 parent 2728141 commit 25293df
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion integration-tests/js-compute/fixtures/app/fastly.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "js-test-app"
service_id = ""

[scripts]
build = "node ../../../../js-compute-runtime-cli.js --enable-pbl --enable-experimental-high-resolution-time-methods src/index.js"
build = "node ../../../../js-compute-runtime-cli.js --enable-experimental-high-resolution-time-methods src/index.js"

[local_server]

Expand Down
4 changes: 1 addition & 3 deletions js-compute-runtime-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { printHelp } from "./src/printHelp.js";
import { addSdkMetadataField } from "./src/addSdkMetadataField.js";

const {
enablePBL,
enableAOT,
aotCache,
enableExperimentalHighResolutionTimeMethods,
Expand Down Expand Up @@ -37,10 +36,9 @@ if (version) {
output,
wasmEngine,
enableExperimentalHighResolutionTimeMethods,
enablePBL,
enableExperimentalTopLevelAwait,
enableAOT,
aotCache,
);
await addSdkMetadataField(output, enablePBL);
await addSdkMetadataField(output, enableAOT);
}
6 changes: 3 additions & 3 deletions src/addSdkMetadataField.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function addSdkMetadataField(wasmPath, usingPBL) {
export async function addSdkMetadataField(wasmPath, usingAOT) {
const packageJson = await readFile(join(__dirname, "../package.json"), {
encoding: "utf-8",
});

let { name, version } = JSON.parse(packageJson);

if (usingPBL) {
name += ' (StarlingMonkey with PBL)'
if (usingAOT) {
name += ' (StarlingMonkey with Weval)'
} else {
name += ' (StarlingMonkey)'
}
Expand Down
3 changes: 0 additions & 3 deletions src/compileApplicationToWasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export async function compileApplicationToWasm(
output,
wasmEngine,
enableExperimentalHighResolutionTimeMethods = false,
enablePBL = false,
enableExperimentalTopLevelAwait = false,
enableAOT = false,
aotCache = '',
Expand Down Expand Up @@ -139,7 +138,6 @@ export async function compileApplicationToWasm(
env: {
ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS:
enableExperimentalHighResolutionTimeMethods ? "1" : "0",
ENABLE_PBL: enablePBL ? "1" : "0",
...process.env,
},
}
Expand Down Expand Up @@ -169,7 +167,6 @@ export async function compileApplicationToWasm(
env: {
ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS:
enableExperimentalHighResolutionTimeMethods ? "1" : "0",
ENABLE_PBL: enablePBL ? "1" : "0",
...process.env,
},
}
Expand Down
6 changes: 0 additions & 6 deletions src/parseInputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export async function parseInputs(cliInputs) {

let enableExperimentalHighResolutionTimeMethods = false;
let enableExperimentalTopLevelAwait = false;
let enablePBL = false;
let enableAOT = false;
let customEngineSet = false;
let wasmEngine = join(__dirname, "../fastly.wasm");
Expand All @@ -33,10 +32,6 @@ export async function parseInputs(cliInputs) {
enableExperimentalTopLevelAwait = true;
break;
}
case "--enable-pbl": {
enablePBL = true;
break;
}
case "--enable-experimental-aot": {
enableAOT = true;
break;
Expand Down Expand Up @@ -132,7 +127,6 @@ export async function parseInputs(cliInputs) {
return {
enableExperimentalHighResolutionTimeMethods,
enableExperimentalTopLevelAwait,
enablePBL,
enableAOT,
aotCache,
input,
Expand Down

0 comments on commit 25293df

Please sign in to comment.