Skip to content

Commit 3b094e1

Browse files
authored
adding a few user experience enhancments (#5072)
* make CI error easier to spot * add some note * remove unused code * adapt the error message * fix a few small regressions (include syntax/ocaml repo) * updates
1 parent d5d46b3 commit 3b094e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+287
-512
lines changed

jscomp/bsb/bsb_exception.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let print (fmt : Format.formatter) (x : error) =
6868
"File \"bsconfig.json\", line 1\n\
6969
@{<error>Error:@} package @{<error>%s@} not found or built %s\n\
7070
- Did you install it?\n\
71-
- If you did, did you run `bsb -make-world`?"
71+
- If you did, did you run `rescript build -with-deps`?"
7272
name
7373
in_json
7474

jscomp/build_tests/super_errors/expected/modules1.re.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
The module or file Foo can't be found.
99
- If it's a third-party dependency:
1010
- Did you list it in bsconfig.json?
11-
- Did you run `bsb` instead of `bsb -make-world`
11+
- Did you run `rescript build` instead of `rescript build -with-deps`
1212
(latter builds third-parties)?
1313
- Did you include the file's directory in bsconfig.json?

jscomp/build_tests/super_errors/expected/syntaxErrors1.re.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
File "/.../fixtures/syntaxErrors1.re", line 1, characters 10-12:
1+
File "/.../fixtures/syntaxErrors1.re", line 1, characters 11-13:
22
Error: syntax error, consider adding a `;' before
33

44
We've found a bug for you!

jscomp/build_tests/super_errors/expected/syntaxErrors2.re.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
File "/.../fixtures/syntaxErrors2.re", line 2, characters 40-41:
1+
File "/.../fixtures/syntaxErrors2.re", line 2, characters 41-42:
22
Error: Syntax error
33

44
We've found a bug for you!

jscomp/build_tests/super_errors/expected/syntaxErrors3.re.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
File "/.../fixtures/syntaxErrors3.re", line 1, characters 19-20:
1+
File "/.../fixtures/syntaxErrors3.re", line 1, characters 20-21:
22
Error: Unclosed "(" (opened line 1, column 18)
33

44
We've found a bug for you!

jscomp/build_tests/super_errors/expected/syntaxErrors5.re.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
File "/.../fixtures/syntaxErrors5.re", line 2, characters 0-0:
1+
File "/.../fixtures/syntaxErrors5.re", line 2, characters 1-1:
22
Error: Unclosed "(" (opened line 1, column 8)
33

44
We've found a bug for you!

jscomp/main/builtin_cmj_datasets.ml

+9-9
Large diffs are not rendered by default.

jscomp/super_errors/super_typetexp.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let report_error env ppf = function
6969
@{<info>The module or file %a can't be found.@}@,\
7070
@[<v 2>- If it's a third-party dependency:@,\
7171
- Did you list it in bsconfig.json?@,\
72-
- @[Did you run `bsb` instead of `bsb -make-world`@ (latter builds third-parties)@]?\
72+
- @[Did you run `rescript build` instead of `rescript build -with-deps`@ (latter builds third-parties)@]?\
7373
@]@,\
7474
- Did you include the file's directory in bsconfig.json?@]\
7575
@]"

jscomp/test/arity.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ function f(x, y) {
1818
return x + y | 0;
1919
}
2020

21-
function add(prim, prim$1) {
22-
return prim + prim$1 | 0;
21+
function add(prim0, prim1) {
22+
return prim0 + prim1 | 0;
2323
}
2424

2525
function h(u) {

jscomp/test/array_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ var array_suites_1 = {
250250
26,
251251
27,
252252
28
253-
], (function (prim, prim$1) {
254-
return prim === prim$1;
253+
], (function (prim0, prim1) {
254+
return prim0 === prim1;
255255
}))
256256
};
257257
})
@@ -294,8 +294,8 @@ var array_suites_1 = {
294294
18,
295295
19,
296296
20
297-
], (function (prim, prim$1) {
298-
return prim === prim$1;
297+
], (function (prim0, prim1) {
298+
return prim0 === prim1;
299299
}))
300300
};
301301
})

jscomp/test/bdd.ml

+1-7
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,7 @@ let main () =
231231
succeeded := !succeeded && test_hwb bdd (random_vars n)
232232
done;
233233
assert !succeeded
234-
(*
235-
if !succeeded
236-
then print_string "OK\n"
237-
else print_string "FAILED\n";
238-
Format.eprintf "%d@." !nodeC;
239-
exit 0
240-
*)
234+
241235

242236
let _ = main()
243237

jscomp/test/bench.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ function f2(param) {
5252
var b = map((function (i) {
5353
return i + i - 1;
5454
}), arr);
55-
var v = fold_left((function (prim, prim$1) {
56-
return prim + prim$1;
55+
var v = fold_left((function (prim0, prim1) {
56+
return prim0 + prim1;
5757
}), 0, b);
5858
console.log(Pervasives.string_of_float(v));
5959

jscomp/test/bs_array_test.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -344,24 +344,24 @@ b("File \"bs_array_test.ml\", line 93, characters 4-11", Caml_obj.caml_equal(Bel
344344

345345
b("File \"bs_array_test.ml\", line 94, characters 4-11", Caml_obj.caml_equal(Belt_Array.rangeBy(3, 3, 1), [3]));
346346

347-
eq("File \"bs_array_test.ml\", line 99, characters 5-12", Belt_Array.reduceReverse([], 100, (function (prim, prim$1) {
348-
return prim - prim$1 | 0;
347+
eq("File \"bs_array_test.ml\", line 99, characters 5-12", Belt_Array.reduceReverse([], 100, (function (prim0, prim1) {
348+
return prim0 - prim1 | 0;
349349
})), 100);
350350

351351
eq("File \"bs_array_test.ml\", line 100, characters 5-12", Belt_Array.reduceReverse([
352352
1,
353353
2
354-
], 100, (function (prim, prim$1) {
355-
return prim - prim$1 | 0;
354+
], 100, (function (prim0, prim1) {
355+
return prim0 - prim1 | 0;
356356
})), 97);
357357

358358
eq("File \"bs_array_test.ml\", line 101, characters 5-12", Belt_Array.reduceReverse([
359359
1,
360360
2,
361361
3,
362362
4
363-
], 100, (function (prim, prim$1) {
364-
return prim - prim$1 | 0;
363+
], 100, (function (prim0, prim1) {
364+
return prim0 - prim1 | 0;
365365
})), 90);
366366

367367
eq("File \"bs_array_test.ml\", line 102, characters 5-12", Belt_Array.reduceWithIndex([
@@ -1124,8 +1124,8 @@ eq("File \"bs_array_test.ml\", line 258, characters 5-12", Belt_Array.zipBy([
11241124
1,
11251125
2,
11261126
3
1127-
], (function (prim, prim$1) {
1128-
return prim - prim$1 | 0;
1127+
], (function (prim0, prim1) {
1128+
return prim0 - prim1 | 0;
11291129
})), [
11301130
1,
11311131
1,
@@ -1141,8 +1141,8 @@ eq("File \"bs_array_test.ml\", line 259, characters 5-12", Belt_Array.zipBy([
11411141
3,
11421142
4,
11431143
1
1144-
], (function (prim, prim$1) {
1145-
return prim - prim$1 | 0;
1144+
], (function (prim0, prim1) {
1145+
return prim0 - prim1 | 0;
11461146
})), Belt_Array.map([
11471147
1,
11481148
1,
@@ -1226,8 +1226,8 @@ b("File \"bs_array_test.ml\", line 273, characters 4-11", !Belt_Array.some([
12261226
b("File \"bs_array_test.ml\", line 274, characters 4-11", !Belt_Array.eq([
12271227
0,
12281228
1
1229-
], [1], (function (prim, prim$1) {
1230-
return prim === prim$1;
1229+
], [1], (function (prim0, prim1) {
1230+
return prim0 === prim1;
12311231
})));
12321232

12331233
var c$1 = {

jscomp/test/bs_auto_uncurry.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ function add3(x, y, z) {
8080
}
8181

8282
function h2(x) {
83-
return ff(x, (function (prim, prim$1) {
84-
return prim + prim$1 | 0;
83+
return ff(x, (function (prim0, prim1) {
84+
return prim0 + prim1 | 0;
8585
}));
8686
}
8787

jscomp/test/bs_auto_uncurry_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ eq("File \"bs_auto_uncurry_test.ml\", line 40, characters 7-14", [
9090
1,
9191
2,
9292
3
93-
].reduce((function (prim, prim$1) {
94-
return prim + prim$1 | 0;
93+
].reduce((function (prim0, prim1) {
94+
return prim0 + prim1 | 0;
9595
}), 0), 6);
9696

9797
eq("File \"bs_auto_uncurry_test.ml\", line 44, characters 7-14", [

jscomp/test/bs_hashmap_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ var Y = Belt_Id.hashable(hash, eq);
3838

3939
var empty = Belt_internalBucketsType.make(Y.hash, Y.eq, 30);
4040

41-
function add(prim, prim$1) {
42-
return prim + prim$1 | 0;
41+
function add(prim0, prim1) {
42+
return prim0 + prim1 | 0;
4343
}
4444

4545
Belt_HashMap.mergeMany(empty, [

0 commit comments

Comments
 (0)