Skip to content

Commit 6516db5

Browse files
committed
Merge branch 'master' into adapt-build-to-react-ppx-in-syntax
2 parents 72a7bf5 + f1a6581 commit 6516db5

File tree

307 files changed

+45033
-89733
lines changed

Some content is hidden

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

307 files changed

+45033
-89733
lines changed

.gitmodules

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[submodule "ocaml"]
22
path = ocaml
33
url = https://github.com/rescript-lang/ocaml
4+
ignore = untracked
45
[submodule "syntax"]
56
path = syntax
67
url = https://github.com/rescript-lang/syntax
78
branch = master
9+
[submodule "ninja"]
10+
path = ninja
11+
url = git@github.com:rescript-lang/ninja.git
12+
ignore = untracked

.npmignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ package/
3838
.nyc_output/
3939
themes
4040
vendor/js_of_ocaml.bc
41-
syntax/
41+
syntax/
42+
*.log
43+
ninja

Changes.md

+70
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,74 @@
11
`*` means potential break changes
2+
3+
# 8.3.1
4+
This is a minor bug fix release for 8.3.0
5+
- capture warnings when rebuild without enforce warn-as-error
6+
- #4716 internal, make ninja a submodule in dev process
7+
- #4722 better dataflow for cases like `let {a;b} as obj = ...`
8+
- no need call `caml_enter_blocking_section` for single threaded compiler
9+
- #4739 fix the interaction of exotic filenames like `[id]` with the build system.
10+
11+
# 8.3
12+
13+
- #4694, #4712 improving/customizing the underlying ninja build system, better performance
14+
15+
- #4681, #4710 creating persistent lib/bs.compiler.log per each build for editor diagnostics
16+
17+
- #4688, #4707 better error message
18+
19+
- * #4702 remove nativeint module which is not meaningful on js platform
20+
21+
- #4701 support both `bs.val` and `val` attributes, in the future to recommend the shorter ones
22+
23+
- #4693 Fix the compiler runtime issue, always flush err_formatter when at_exit
24+
25+
- #4687, #4689, #4691 allow user to customize js file extension in bsconfig.json (checkout the schema )
26+
27+
- #4685, #4624, #4690 allow more character set in filenames to make rescript play better with react native and next.js
28+
29+
- #4684 fix the raise of Sys.is_directory, make bsb works better with Emacs temp files
30+
31+
- #4679 better error message for nonrec GADT
32+
33+
- #4671, #4678 better strategies to remove staled output for the build system
34+
35+
- #4676 (internal) add Config.syntax_kind so that some changes in super_errors can be made upstream
36+
37+
- #4650, #4656, #4657, #4662 always warn-as-error while not degrading user expereince (with the help of build system)
38+
39+
- #4661 (internal) not depending on upstream compenv module
40+
41+
- #4639, #4642 refined static analysis to generate better code
42+
43+
- #4636, #4641 es6 default import support
44+
45+
- #4638 clean up the confusing error message over uncurry label
46+
47+
- #4637 remove unneeded mention of BuckleScript in uncurried message
48+
49+
- #4623 better data flow inference for common pattern: `let {a,b,c} = ...`
50+
51+
- #4622 add html element & observer phantom types
52+
53+
- #4618 fix combination of bs.obj with bs.as so that bs.as can carry more kinds of playload
54+
55+
- #4613 (internal) pass down @inlined attribute from upstream. (the info is passed down, how to make use of it is not done yet)
56+
57+
- #4609 Lift the restriction that user can only define a type with less than 256 constructors
58+
59+
60+
- #4606, #3961 (internal) use is_a_functor from upstream instead of guessing
61+
62+
- #4605 (experimental) take `@@inline` attribute into consideration for functions
63+
64+
- #4604 enhance Random module
65+
66+
- #4600, #4599 fix missing bounds checking for Bytes.set
67+
68+
- #4597 fix Js.Array and Js.Array2 the wrong return type for `from` method
69+
70+
- #4513 better error message when interface/implementation mismatches (done in commit db485f1)
71+
272
# 8.2
373

474
- `bsc -fmt myFile` now changed to `bsc -format myFile`

darwin/ninja.exe

-57 KB
Binary file not shown.

docs/docson/build-schema.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
],
1010
"description": "es6-global generate relative `require` paths instead of relying on NodeJS' module resolution. Default: commonjs."
1111
},
12+
"suffix-spec" : {
13+
"enum" : [
14+
".js",
15+
".bs.js",
16+
".mjs",
17+
".cjs"
18+
],
19+
"description": "suffix of generated js files, default to [.js] "
20+
},
1221
"module-format-object": {
1322
"type": "object",
1423
"properties": {
@@ -18,6 +27,9 @@
1827
"in-source": {
1928
"type": "boolean",
2029
"description": "Default: false."
30+
},
31+
"suffix" : {
32+
"$ref" : "#/definitions/suffix-spec"
2133
}
2234
},
2335
"required": [
@@ -484,11 +496,7 @@
484496
"description": "(Not needed usually) arguments to pass to `refmt` above. Default: `[\"--print\", \"binary\"]`."
485497
},
486498
"suffix" : {
487-
"enum" : [
488-
".js",
489-
".bs.js"
490-
],
491-
"description": "suffix of generated js files, default to [.js] "
499+
"$ref" : "#/definitions/suffix-spec"
492500
}
493501
},
494502
"additionalProperties": false,

jscomp/artifacts.json

+1-28
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"package.json",
1515
"COPYING.LESSER",
1616
"Changes.md",
17-
"CONTRIBUTING_EXTRA.md",
1817
"CONTRIBUTING.md",
1918
"DCO.md",
2019
"README.md",
@@ -113,9 +112,7 @@
113112
"callback.js",
114113
"caml_array_extern.js",
115114
"caml_array.js",
116-
"caml_bytes_extern.js",
117115
"caml_bytes.js",
118-
"caml_char.js",
119116
"caml_exceptions.js",
120117
"caml_external_polyfill.js",
121118
"caml_float_extern.js",
@@ -160,7 +157,6 @@
160157
"dom.js",
161158
"filename.js",
162159
"format.js",
163-
"gc.js",
164160
"genlex.js",
165161
"hashtbl.js",
166162
"int32.js",
@@ -202,7 +198,6 @@
202198
"map.js",
203199
"marshal.js",
204200
"moreLabels.js",
205-
"nativeint.js",
206201
"node_buffer.js",
207202
"node_child_process.js",
208203
"node_fs.js",
@@ -220,7 +215,6 @@
220215
"scanf.js",
221216
"set.js",
222217
"sort.js",
223-
"spacetime.js",
224218
"stack.js",
225219
"std_exit.js",
226220
"stdLabels.js",
@@ -283,9 +277,7 @@
283277
"callback.js",
284278
"caml_array_extern.js",
285279
"caml_array.js",
286-
"caml_bytes_extern.js",
287280
"caml_bytes.js",
288-
"caml_char.js",
289281
"caml_exceptions.js",
290282
"caml_external_polyfill.js",
291283
"caml_float_extern.js",
@@ -330,7 +322,6 @@
330322
"dom.js",
331323
"filename.js",
332324
"format.js",
333-
"gc.js",
334325
"genlex.js",
335326
"hashtbl.js",
336327
"int32.js",
@@ -372,7 +363,6 @@
372363
"map.js",
373364
"marshal.js",
374365
"moreLabels.js",
375-
"nativeint.js",
376366
"node_buffer.js",
377367
"node_child_process.js",
378368
"node_fs.js",
@@ -390,7 +380,6 @@
390380
"scanf.js",
391381
"set.js",
392382
"sort.js",
393-
"spacetime.js",
394383
"stack.js",
395384
"std_exit.js",
396385
"stdLabels.js",
@@ -456,7 +445,6 @@
456445
"dom.cmi",
457446
"filename.cmi",
458447
"format.cmi",
459-
"gc.cmi",
460448
"genlex.cmi",
461449
"hashtbl.cmi",
462450
"int32.cmi",
@@ -498,7 +486,6 @@
498486
"map.cmi",
499487
"marshal.cmi",
500488
"moreLabels.cmi",
501-
"nativeint.cmi",
502489
"node_buffer.cmi",
503490
"node_child_process.cmi",
504491
"node_fs.cmi",
@@ -516,7 +503,6 @@
516503
"scanf.cmi",
517504
"set.cmi",
518505
"sort.cmi",
519-
"spacetime.cmi",
520506
"stack.cmi",
521507
"std_exit.cmi",
522508
"stdLabels.cmi",
@@ -589,7 +575,6 @@
589575
"dom.cmt",
590576
"filename.cmt",
591577
"format.cmt",
592-
"gc.cmt",
593578
"genlex.cmt",
594579
"hashtbl.cmt",
595580
"int32.cmt",
@@ -631,7 +616,6 @@
631616
"map.cmt",
632617
"marshal.cmt",
633618
"moreLabels.cmt",
634-
"nativeint.cmt",
635619
"node_buffer.cmt",
636620
"node_child_process.cmt",
637621
"node_fs.cmt",
@@ -649,7 +633,6 @@
649633
"scanf.cmt",
650634
"set.cmt",
651635
"sort.cmt",
652-
"spacetime.cmt",
653636
"stack.cmt",
654637
"std_exit.cmt",
655638
"stdLabels.cmt",
@@ -713,7 +696,6 @@
713696
"digest.cmti",
714697
"filename.cmti",
715698
"format.cmti",
716-
"gc.cmti",
717699
"genlex.cmti",
718700
"hashtbl.cmti",
719701
"int32.cmti",
@@ -738,7 +720,6 @@
738720
"map.cmti",
739721
"marshal.cmti",
740722
"moreLabels.cmti",
741-
"nativeint.cmti",
742723
"node_process.cmti",
743724
"obj.cmti",
744725
"parsing.cmti",
@@ -750,7 +731,6 @@
750731
"scanf.cmti",
751732
"set.cmti",
752733
"sort.cmti",
753-
"spacetime.cmti",
754734
"stack.cmti",
755735
"stdLabels.cmti",
756736
"stream.cmti",
@@ -823,7 +803,6 @@
823803
"dom.ml",
824804
"filename.ml",
825805
"format.ml",
826-
"gc.ml",
827806
"genlex.ml",
828807
"hashmap.cppo.ml",
829808
"hashset.cppo.ml",
@@ -873,7 +852,6 @@
873852
"mapm.cppo.ml",
874853
"marshal.ml",
875854
"moreLabels.ml",
876-
"nativeint.ml",
877855
"node_buffer.ml",
878856
"node_child_process.ml",
879857
"node_fs.ml",
@@ -893,7 +871,6 @@
893871
"setm.cppo.ml",
894872
"sort.cppo.ml",
895873
"sort.ml",
896-
"spacetime.ml",
897874
"stack.ml",
898875
"std_exit.ml",
899876
"stdLabels.ml",
@@ -958,7 +935,6 @@
958935
"digest.mli",
959936
"filename.mli",
960937
"format.mli",
961-
"gc.mli",
962938
"genlex.mli",
963939
"hashmap.cppo.mli",
964940
"hashset.cppo.mli",
@@ -987,7 +963,6 @@
987963
"mapm.cppo.mli",
988964
"marshal.mli",
989965
"moreLabels.mli",
990-
"nativeint.mli",
991966
"node_process.mli",
992967
"obj.mli",
993968
"parsing.mli",
@@ -1001,7 +976,6 @@
1001976
"setm.cppo.mli",
1002977
"sort.cppo.mli",
1003978
"sort.mli",
1004-
"spacetime.mli",
1005979
"stack.mli",
1006980
"stdLabels.mli",
1007981
"stream.mli",
@@ -1051,8 +1025,7 @@
10511025
],
10521026
"vendor": [
10531027
"ninja.tar.gz",
1054-
"ocaml.tar.gz",
1055-
"README.md"
1028+
"ocaml.tar.gz"
10561029
],
10571030
"win32": [
10581031
"ninja.COPYING",

jscomp/bsb/bsb_build_schemas.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ let export_all = "all"
6262
let export_none = "none"
6363

6464

65-
let g_lib_incls = "g_lib_incls"
65+
6666
let use_stdlib = "use-stdlib"
6767
let reason = "reason"
6868
let react_jsx = "react-jsx"

jscomp/bsb/bsb_clean.ml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ let (//) = Ext_path.combine
2929
let ninja_clean proj_dir =
3030
try
3131
let cmd = Bsb_global_paths.vendor_ninja in
32-
let lib_artifacts_dir = !Bsb_global_backend.lib_artifacts_dir in
32+
let lib_artifacts_dir = Bsb_config.lib_bs in
3333
let cwd = proj_dir // lib_artifacts_dir in
3434
if Sys.file_exists cwd then
3535
let eid =
3636
Bsb_unix.run_command_execv {cmd ; args = [|cmd; "-t"; "clean"|] ; cwd} in
3737
if eid <> 0 then
38-
Bsb_log.warn "@{<warning>ninja clean failed@}@."
38+
Bsb_log.warn "@{<warning>Failed@}@."
3939
with e ->
40-
Bsb_log.warn "@{<warning>ninja clean failed@} : %s @." (Printexc.to_string e)
40+
Bsb_log.warn "@{<warning>Failed@}: %s @." (Printexc.to_string e)
4141

4242
let clean_bs_garbage proj_dir =
4343
Bsb_log.info "@{<info>Cleaning:@} in %s@." proj_dir ;

0 commit comments

Comments
 (0)