Skip to content

Commit d72c2ae

Browse files
committed
Remove jsoo_main, use js_of_ocaml library instead of jsoo_common
1 parent dae6ceb commit d72c2ae

File tree

6 files changed

+8
-288
lines changed

6 files changed

+8
-288
lines changed

jscomp/jsoo/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
; Don't build the JS compiler by default as it slows down CI considerably.
22

33
(executables
4-
(names jsoo_main jsoo_playground_main)
4+
(names jsoo_playground_main)
55
(modes js)
66
(enabled_if
77
(= %{profile} browser))
88
(flags
99
(:standard -w +a-4-9-40-42-44-45))
10-
(libraries core ml super_errors))
10+
(libraries core syntax ml js_of_ocaml))

jscomp/jsoo/jsoo_common.ml

Lines changed: 0 additions & 69 deletions
This file was deleted.

jscomp/jsoo/jsoo_common.mli

Lines changed: 0 additions & 59 deletions
This file was deleted.

jscomp/jsoo/jsoo_main.ml

Lines changed: 0 additions & 126 deletions
This file was deleted.

jscomp/jsoo/jsoo_main.mli

Lines changed: 0 additions & 25 deletions
This file was deleted.

jscomp/jsoo/jsoo_playground_main.ml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* *)
5252
let apiVersion = "3"
5353

54-
module Js = Jsoo_common.Js
54+
module Js = Js_of_ocaml.Js
5555

5656
let export (field : string) v =
5757
Js.Unsafe.set (Js.Unsafe.global) field v
@@ -199,9 +199,10 @@ end
199199
(* One time setup for all relevant modules *)
200200
let () =
201201
Bs_conditional_initial.setup_env ();
202+
(* From now on the default setting will be uncurried mode *)
203+
Config.uncurried := Uncurried;
202204
Clflags.binary_annotations := false;
203-
Misc.Color.setup (Some Always);
204-
Lazy.force Super_main.setup;
205+
Clflags.color := Some Always;
205206
Lazy.force Res_outcome_printer.setup
206207

207208
let error_of_exn e =
@@ -329,7 +330,7 @@ module Compile = struct
329330
match Warnings.report w with
330331
| `Inactive -> ()
331332
| `Active { Warnings. number; is_error; } ->
332-
Super_location.super_warning_printer loc ppf w;
333+
!Location.warning_printer loc ppf w;
333334
let open LocWarnInfo in
334335
let fullMsg = flush_warning_buffer () in
335336
let shortMsg = Warnings.message w in
@@ -458,7 +459,7 @@ module Compile = struct
458459
List.iter Iter.iter_structure_item structure.str_items;
459460
Js.array (!acc |> Array.of_list)
460461

461-
let implementation ~(config: BundleConfig.t) ~lang str : Js.Unsafe.obj =
462+
let implementation ~(config: BundleConfig.t) ~lang str =
462463
let {BundleConfig.module_system; warn_flags} = config in
463464
try
464465
reset_compiler ();
@@ -677,8 +678,6 @@ module Export = struct
677678
end
678679

679680
let () =
680-
(* From now on the default setting will be uncurried mode *)
681-
Config.uncurried := Uncurried;
682681
export "rescript_compiler"
683682
(Js.Unsafe.(obj
684683
[|

0 commit comments

Comments
 (0)