Skip to content

Commit 060edd5

Browse files
authored
Fix playground bundle API (#7486)
* Use unsafe API instead of PPX, which is even more unsafe
1 parent 2f25dc4 commit 060edd5

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

compiler/jsoo/dune

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
(= %{profile} browser))
88
(flags
99
(:standard -w +a-4-9-40-42-44-45))
10-
(libraries core syntax ml js_of_ocaml)
11-
(preprocess
12-
(pps js_of_ocaml-ppx)))
10+
(libraries core syntax ml js_of_ocaml))

compiler/jsoo/jsoo_playground_main.ml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,10 @@ end
675675

676676
let () =
677677
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)
678+
Js.Unsafe.(
679+
obj
680+
[|
681+
("api_version", inject @@ Js.string api_version);
682+
("version", inject @@ Js.string Bs_version.version);
683+
("make", inject @@ Export.make);
684+
|])

rescript.opam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ depends: [
3333

3434
# Test dependencies that would be broken on Windows runners
3535
"js_of_ocaml" {os != "win32" & with-test & = "6.0.1"}
36-
"js_of_ocaml-ppx" {os != "win32" & with-test & = "6.0.1"}
3736
"wasm_of_ocaml-compiler" {os != "win32" & with-test & = "6.0.1"}
3837
]
3938
pin-depends: [

rescript.opam.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ depends: [
1111

1212
# Test dependencies that would be broken on Windows runners
1313
"js_of_ocaml" {os != "win32" & with-test & = "6.0.1"}
14-
"js_of_ocaml-ppx" {os != "win32" & with-test & = "6.0.1"}
1514
"wasm_of_ocaml-compiler" {os != "win32" & with-test & = "6.0.1"}
1615
]
1716
pin-depends: [

0 commit comments

Comments
 (0)