Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/build-tools/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function getCliArgs(): CliArgs {
type: 'boolean',
})
.option('initLocation', {
describe: 'Location during top level initialization',
describe: 'URL used for the "Location" builtin during top level initialization',
type: 'string',
})
.argv as CliArgs;
Expand Down
13 changes: 6 additions & 7 deletions packages/build-tools/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ async function main() {
let CliArgs = getCliArgs();
let src = CliArgs.input;
let outputPath = CliArgs.output;
let runtimeArgs = [
CliArgs.debug && '--enable-script-debugging',
CliArgs.initLocation && `--init-location ${CliArgs.initLocation}`
].filter(Boolean).join(' ');
let runtimeArgs = []
CliArgs.debug && runtimeArgs.push('--enable-script-debugging');
CliArgs.initLocation && runtimeArgs.push(`--init-location ${CliArgs.initLocation}`);

// generate wit world string
let wasiDeps = getPackagesWithWasiDeps(process.cwd(), new Set(), true);
Expand Down Expand Up @@ -64,7 +63,7 @@ async function main() {

let inlineWitChecksum = await calculateChecksum(inlineWit);
// Small optimization to skip componentization if the source file hasn't changed
if (!(await ShouldComponentize(src, outputPath, componentizeVersion, runtimeArgs, inlineWitChecksum))) {
if (!(await ShouldComponentize(src, outputPath, componentizeVersion, runtimeArgs.join(" "), inlineWitChecksum))) {
console.log(
'No changes detected in source file and target World. Skipping componentization.',
);
Expand Down Expand Up @@ -99,7 +98,7 @@ async function main() {
sourcePath: precompiledSourcePath,
// @ts-ignore
witWorld: inlineWit,
runtimeArgs,
runtimeArgs: runtimeArgs.join(" "),
enableAot: CliArgs.aot,
});

Expand All @@ -110,7 +109,7 @@ async function main() {
getBuildDataPath(src),
await calculateChecksum(await readFile(src)),
componentizeVersion,
runtimeArgs,
runtimeArgs.join(" "),
inlineWitChecksum,
);

Expand Down