Skip to content

Commit 80d6740

Browse files
authored
Minor cleanup of/fixes for ninja.js (#6269)
* ninja.js: remove leftovers * ninja.js: fix check for impure stdlib modules * Fix typo
1 parent fb79ac4 commit 80d6740

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

scripts/ninja.js

+6-18
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ var othersDir = path.join(jscompDir, "others");
1313
var testDir = path.join(jscompDir, "test");
1414

1515
var jsDir = path.join(__dirname, "..", "lib", "js");
16-
var duneBinDir = require("./dune").duneBinDir;
1716

1817
var runtimeFiles = fs.readdirSync(runtimeDir, "ascii");
1918
var runtimeMlFiles = runtimeFiles.filter(
@@ -434,7 +433,7 @@ function ninjaQuickBuild(
434433
* @param {BuildList[]} xs
435434
* @returns {string}
436435
*/
437-
function ninjaQuickBuidList(xs) {
436+
function ninjaQuickBuildList(xs) {
438437
return xs
439438
.map(x => ninjaQuickBuild(x[0], x[1], x[2], x[3], x[4], x[5], x[6]))
440439
.join("\n");
@@ -851,7 +850,7 @@ async function runtimeNinja(devmode = true) {
851850
bsc_no_open_flags = ${commonBsFlags} -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
852851
bsc_flags = $bsc_no_open_flags -open Bs_stdlib_mini
853852
${ruleCC(ninjaCwd)}
854-
${ninjaQuickBuidList([
853+
${ninjaQuickBuildList([
855854
[
856855
"bs_stdlib_mini.cmi",
857856
"bs_stdlib_mini.mli",
@@ -957,7 +956,7 @@ async function othersNinja(devmode = true) {
957956
bsc_primitive_flags = ${commonBsFlags} -bs-cross-module-opt -make-runtime -nopervasives -unsafe -w +50 -warn-error A
958957
bsc_flags = $bsc_primitive_flags -open Belt_internals
959958
${ruleCC(ninjaCwd)}
960-
${ninjaQuickBuidList([
959+
${ninjaQuickBuildList([
961960
[
962961
["belt.cmj", "belt.cmi"],
963962
"belt.ml",
@@ -1080,7 +1079,7 @@ async function stdlibNinja(devmode = true) {
10801079
var templateStdlibRules = `
10811080
${bsc_flags} = ${commonBsFlags} -bs-cross-module-opt -make-runtime ${warnings} -I others
10821081
${ruleCC(ninjaCwd)}
1083-
${ninjaQuickBuidList([
1082+
${ninjaQuickBuildList([
10841083
// we make it still depends on external
10851084
// to enjoy free ride on dev config for compiler-deps
10861085
@@ -1305,12 +1304,7 @@ function checkEffect() {
13051304
return { file: path.basename(file), effect };
13061305
});
13071306

1308-
var black_list = new Set([
1309-
"caml_int32.js",
1310-
"caml_int64.js",
1311-
"caml_lexer.js",
1312-
"caml_parser.js",
1313-
]);
1307+
var black_list = new Set(["caml_lexer.js", "caml_parser.js"]);
13141308

13151309
var assert = require("assert");
13161310
// @ts-ignore
@@ -1448,16 +1442,10 @@ rule copy
14481442
}
14491443

14501444
function main() {
1451-
var emptyCount = 2;
1452-
var isPlayground = false;
14531445
if (require.main === module) {
14541446
if (process.argv.includes("-check")) {
14551447
checkEffect();
14561448
}
1457-
if (process.argv.includes("-playground")) {
1458-
isPlayground = true;
1459-
emptyCount++;
1460-
}
14611449

14621450
var subcommand = process.argv[2];
14631451
switch (subcommand) {
@@ -1522,7 +1510,7 @@ function main() {
15221510
`);
15231511
break;
15241512
default:
1525-
if (process.argv.length === emptyCount) {
1513+
if (process.argv.length === 2) {
15261514
updateDev();
15271515
updateRelease();
15281516
} else {

0 commit comments

Comments
 (0)