Skip to content

Commit 8fade7b

Browse files
authored
Merge pull request #4285 from BuckleScript/fix_4268
avoid a regression of dumping cmi files, #4268
2 parents a0c322e + 321b19d commit 8fade7b

File tree

7 files changed

+28
-29
lines changed

7 files changed

+28
-29
lines changed

jscomp/ext/bsc_warnings.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272
7373
- 102 Bs_polymorphic_comparison
7474
*)
75-
let defaults_w = "+a-4-9-40-41-42-50-61-102"
75+
let defaults_w = "+a-4-9-20-40-41-42-50-61-102"
7676
let defaults_warn_error = "-a+5+6+101";;
7777
(*TODO: add +10*)

lib/4.06.1/bsb.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6983,7 +6983,7 @@ module Bsc_warnings
69836983

69846984
- 102 Bs_polymorphic_comparison
69856985
*)
6986-
let defaults_w = "+a-4-9-40-41-42-50-61-102"
6986+
let defaults_w = "+a-4-9-20-40-41-42-50-61-102"
69876987
let defaults_warn_error = "-a+5+6+101";;
69886988
(*TODO: add +10*)
69896989

lib/4.06.1/unstable/bsb_native.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6989,7 +6989,7 @@ module Bsc_warnings
69896989

69906990
- 102 Bs_polymorphic_comparison
69916991
*)
6992-
let defaults_w = "+a-4-9-40-41-42-50-61-102"
6992+
let defaults_w = "+a-4-9-20-40-41-42-50-61-102"
69936993
let defaults_warn_error = "-a+5+6+101";;
69946994
(*TODO: add +10*)
69956995

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316280,7 +316280,7 @@ module Bsc_warnings
316280316280

316281316281
- 102 Bs_polymorphic_comparison
316282316282
*)
316283-
let defaults_w = "+a-4-9-40-41-42-50-61-102"
316283+
let defaults_w = "+a-4-9-20-40-41-42-50-61-102"
316284316284
let defaults_warn_error = "-a+5+6+101";;
316285316285
(*TODO: add +10*)
316286316286

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316280,7 +316280,7 @@ module Bsc_warnings
316280316280

316281316281
- 102 Bs_polymorphic_comparison
316282316282
*)
316283-
let defaults_w = "+a-4-9-40-41-42-50-61-102"
316283+
let defaults_w = "+a-4-9-20-40-41-42-50-61-102"
316284316284
let defaults_warn_error = "-a+5+6+101";;
316285316285
(*TODO: add +10*)
316286316286

lib/4.06.1/whole_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304042,7 +304042,7 @@ module Bsc_warnings
304042304042

304043304043
- 102 Bs_polymorphic_comparison
304044304044
*)
304045-
let defaults_w = "+a-4-9-40-41-42-50-61-102"
304045+
let defaults_w = "+a-4-9-20-40-41-42-50-61-102"
304046304046
let defaults_warn_error = "-a+5+6+101";;
304047304047
(*TODO: add +10*)
304048304048

scripts/ciTest.js

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ if (all) {
4141
bsbTest = true;
4242
}
4343

44-
4544
var fs = require("fs");
4645

47-
4846
function init() {
4947
var vendorOCamlPath = path.join(
5048
__dirname,
@@ -72,14 +70,13 @@ function main() {
7270
// console.log('OCaml:', output)
7371
var binDir = path.join(__dirname, "..", "jscomp", "bin");
7472
if (ounitTest) {
75-
7673
// running tests for native code
7774
fs.copyFileSync(
7875
path.join(
7976
__dirname,
8077
"..",
8178
"lib",
82-
'4.06.1',
79+
"4.06.1",
8380
"unstable",
8481
"all_ounit_tests.ml"
8582
),
@@ -95,15 +92,15 @@ function main() {
9592
cp.execSync(`./test.exe`, { cwd: binDir, stdio: [0, 1, 2] });
9693
}
9794

98-
// running generated js tests
95+
// running generated js tests
9996
if (mochaTest) {
10097
cp.execSync(`mocha jscomp/test/**/*test.js`, {
10198
cwd: path.join(__dirname, ".."),
10299
stdio: [0, 1, 2]
103100
});
104101
}
105102

106-
// set up global directory properly using
103+
// set up global directory properly using
107104
// npm config set prefix '~/.npm-global'
108105
if (installGlobal) {
109106
console.log("install bucklescript globally");
@@ -132,9 +129,9 @@ function main() {
132129
.filter(x => x);
133130
var themesDir = path.join(__dirname, "..", "themes");
134131

135-
if(fs.existsSync(themesDir)){
132+
if (fs.existsSync(themesDir)) {
136133
// fs.rmdirSync(themesDir,{recursive : true})
137-
cp.execSync(`rm -rf ${themesDir}`,{stdio:[0,1,2]})
134+
cp.execSync(`rm -rf ${themesDir}`, { stdio: [0, 1, 2] });
138135
// we dont remove post-installation
139136
// since it is useful for debugging
140137
}
@@ -149,19 +146,21 @@ function main() {
149146
if (error !== null) {
150147
throw new Error(`init theme ${theme} failed`);
151148
}
152-
cp.exec(
153-
`npm link bs-platform && npm install && npm run clean && npm run build`,
154-
{ cwd: path.join(themesDir, theme) },
155-
function(error, stdout, stderr) {
156-
console.log(stdout);
157-
console.log(stderr);
158-
if (error !== null) {
159-
throw new Error(
160-
`clean && install & build theme ${theme} failed`
161-
);
162-
}
163-
}
164-
);
149+
let config = {
150+
cwd: path.join(themesDir, theme),
151+
encoding: "utf8"
152+
};
153+
var output ;
154+
try {
155+
output = cp.execSync(`npm link bs-platform`, config);
156+
output = cp.execSync(`npm install`, config);
157+
output = cp.execSync(`npm run clean`, config);
158+
output = cp.execSync(`npm run build`, config);
159+
} catch (err) {
160+
console.error(`failed in theme ${theme}`)
161+
console.log(output+"")
162+
console.log(err + "")
163+
}
165164
}
166165
);
167166
});
@@ -178,8 +177,8 @@ function main() {
178177
var files = fs.readdirSync(buildTestDir);
179178
files.forEach(function(file) {
180179
var testDir = path.join(buildTestDir, file);
181-
if(file === 'node_modules' || !fs.lstatSync(testDir).isDirectory()){
182-
return
180+
if (file === "node_modules" || !fs.lstatSync(testDir).isDirectory()) {
181+
return;
183182
}
184183
if (!fs.existsSync(path.join(testDir, "input.js"))) {
185184
console.warn(`input.js does not exist in ${testDir}`);

0 commit comments

Comments
 (0)