File tree Expand file tree Collapse file tree 14 files changed +105
-77
lines changed Expand file tree Collapse file tree 14 files changed +105
-77
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ jobs:
152152 # matrix.ocaml_compiler may contain commas
153153 - name : Get OPAM cache key
154154 shell : bash
155- run : echo "opam_cache_key=opam-env-v7-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project ') }}" | sed 's/,/-/g' >> $GITHUB_ENV
155+ run : echo "opam_cache_key=opam-env-v7-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('*.opam ') }}" | sed 's/,/-/g' >> $GITHUB_ENV
156156
157157 - name : Restore OPAM environment
158158 id : cache-opam-env
@@ -249,7 +249,7 @@ jobs:
249249 id : compiler-build-state-key
250250 shell : bash
251251 run : |
252- echo "value=compiler-build-state-v1-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project ') }}" \
252+ echo "value=compiler-build-state-v1-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('*.opam ') }}" \
253253 | sed 's/,/-/g' >> "$GITHUB_OUTPUT"
254254
255255 - name : Restore compiler build state
Original file line number Diff line number Diff line change @@ -9,10 +9,11 @@ bug-reports: "https://github.com/rescript-lang/rescript-compiler/issues"
99depends: [
1010 "ocaml" {>= "4.14"}
1111 "cppo" {= "1.8.0"}
12- "dune"
12+ "dune" {>= "3.17"}
13+ "odoc" {with-doc}
1314]
1415build: [
15- ["dune" "subst"] {pinned }
16+ ["dune" "subst"] {dev }
1617 [
1718 "dune"
1819 "build"
Original file line number Diff line number Diff line change 1- (dirs bsb bsb_exe bsb_helper bsb_helper_exe bsc cmij common core depends ext
2- frontend gentype jsoo js_parser ml syntax)
1+ (dirs
2+ bsb
3+ bsb_exe
4+ bsb_helper
5+ bsb_helper_exe
6+ bsc
7+ cmij
8+ common
9+ core
10+ depends
11+ ext
12+ frontend
13+ gentype
14+ jsoo
15+ js_parser
16+ ml
17+ syntax)
318
419(env
520 (dev
Original file line number Diff line number Diff line change 33 (wrapped false)
44 (preprocess
55 (action
6- (run %{bin:cppo} -V OCAML:%{ocaml_version} %{env:CPPO_FLAGS=}
7- %{input-file})))
6+ (run
7+ %{bin:cppo}
8+ -V
9+ OCAML:%{ocaml_version}
10+ %{env:CPPO_FLAGS=}
11+ %{input-file})))
812 (flags
913 (:standard -w +a-4-42-40-9-48-70))
1014 (foreign_stubs
Original file line number Diff line number Diff line change 22
33(executables
44 (names jsoo_playground_main)
5- (modes js)
5+ (modes js wasm )
66 (enabled_if
77 (= %{profile} browser))
88 (flags
99 (:standard -w +a-4-9-40-42-44-45))
10- (libraries core syntax ml js_of_ocaml))
10+ (libraries core syntax ml js_of_ocaml)
11+ (preprocess
12+ (pps js_of_ocaml-ppx)))
Original file line number Diff line number Diff line change @@ -54,8 +54,6 @@ let api_version = "5"
5454
5555module Js = Js_of_ocaml. Js
5656
57- let export (field : string ) v = Js.Unsafe. set Js.Unsafe. global field v
58-
5957module Lang = struct
6058 type t = Res
6159
@@ -676,11 +674,9 @@ module Export = struct
676674end
677675
678676let () =
679- export " rescript_compiler"
680- Js.Unsafe. (
681- obj
682- [|
683- (" api_version" , inject @@ Js. string api_version);
684- (" version" , inject @@ Js. string Bs_version. version);
685- (" make" , inject @@ Export. make);
686- |])
677+ Js. export " rescript_compiler"
678+ (object % js
679+ val api_version = api_version
680+ val version = Bs_version. version
681+ method make = Export. make ()
682+ end)
Original file line number Diff line number Diff line change 2626*)
2727module Color = struct
2828 (* use ANSI color codes, see https://en.wikipedia.org/wiki/ANSI_escape_code *)
29- type color =
30- | Black [ @ live]
29+ type [ @ warning " -37 " ] color =
30+ | Black
3131 | Red
32- | Green [ @ live]
32+ | Green
3333 | Yellow
34- | Blue [ @ live]
34+ | Blue
3535 | Magenta
3636 | Cyan
37- | White [ @ live]
37+ | White
3838
39- type style =
39+ type [ @ warning " -37 " ] style =
4040 | FG of color (* foreground *)
41- | BG of color [ @ live] (* background *)
41+ | BG of color (* background *)
4242 | Bold
4343 | Reset
4444 | Dim
@@ -132,7 +132,7 @@ module Color = struct
132132 let term = try Sys. getenv " TERM" with Not_found -> " " in
133133 term <> " dumb" && term <> " " && isatty stderr
134134
135- type setting = Auto [ @ live] | Always [ @ live] | Never [ @ live]
135+ type [ @ warning " -37 " ] setting = Auto | Always | Never
136136
137137 let setup =
138138 let first = ref true in
Original file line number Diff line number Diff line change 1- (lang dune 2 .3 )
1+ (lang dune 3 .17 )
22
33(name rescript)
44
1616
1717( package
1818 (name rescript)
19- (synopsis " ReScript compiler" )
20- ( depends
21- ( ocaml
22- ( >= 4 .14) )
23- ( ocamlformat
24- ( and
25- :with -test
26- ( = 0 .27.0) ) )
27- ( yojson
28- ( and
29- :with -test
30- ( = 2 .2.2) ) )
31- ( ocaml-lsp-server
32- ( and
33- :with -dev-setup
34- ( = 1 .22.0) ) )
35- ( cppo
36- ( = 1 .8.0) )
37- (js_of_ocaml
38- ( = 6 .0.1) )
39- ( ounit2
40- ( = 2 .2.7) )
41- dune) )
19+ (synopsis " ReScript compiler" ))
4220
4321( package
4422 (name analysis)
Original file line number Diff line number Diff line change 1- require ( "./compiler.js" )
1+ // Playground bundle is UMD module
2+ // It uses `module.exports` in current context, or fallback to `globalThis`
3+ const { rescript_compiler } = require ( "./compiler.js" )
4+
25require ( "./packages/compiler-builtins/cmij.js" )
36require ( "./packages/@rescript/react/cmij.js" )
47
Original file line number Diff line number Diff line change @@ -6,18 +6,8 @@ authors: ["Hongbo Zhang <bobzhang1988@gmail.com>"]
66license: "LGPL-3.0-or-later"
77homepage: "https://github.com/rescript-lang/rescript-compiler"
88bug-reports: "https://github.com/rescript-lang/rescript-compiler/issues"
9- depends: [
10- "ocaml" {>= "4.14"}
11- "ocamlformat" {with-test & = "0.27.0"}
12- "yojson" {with-test & = "2.2.2"}
13- "ocaml-lsp-server" {with-dev-setup & = "1.22.0"}
14- "cppo" {= "1.8.0"}
15- "js_of_ocaml" {= "6.0.1"}
16- "ounit2" {= "2.2.7"}
17- "dune"
18- ]
199build: [
20- ["dune" "subst"] {pinned }
10+ ["dune" "subst"] {dev }
2111 [
2212 "dune"
2313 "build"
@@ -30,3 +20,17 @@ build: [
3020 "@doc" {with-doc}
3121 ]
3222]
23+ depends: [
24+ "ocaml" {>= "4.14"}
25+ "ocamlformat" {with-test & = "0.27.0"}
26+ "yojson" {with-test & = "2.2.2"}
27+ "ocaml-lsp-server" {with-dev-setup & = "1.22.0"}
28+ "cppo" {= "1.8.0"}
29+ "ounit2" {= "2.2.7"}
30+ "dune" {>= "3.17"}
31+ "odoc" {with-doc}
32+ # Dependencies that could be broken on Windows runners
33+ "js_of_ocaml" {= "6.0.1" & os != "win32"}
34+ "js_of_ocaml-ppx" {= "6.0.1" & os != "win32"}
35+ "wasm_of_ocaml-compiler" {= "6.0.1" & os != "win32"}
36+ ]
You can’t perform that action at this time.
0 commit comments