Skip to content

Commit cb85c61

Browse files
committed
fix refmt build
1 parent 6ac5d58 commit cb85c61

File tree

5 files changed

+10683
-10683
lines changed

5 files changed

+10683
-10683
lines changed

jscomp/refmt/jsoo_refmt_main.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,23 @@ let compile ~use_super_errors ?react_ppx_version impl =
114114
let shake_compile ~prefix ~use_super_errors ?react_ppx_version impl =
115115
implementation ~prefix ~use_super_errors ?react_ppx_version impl
116116

117-
let load_module cmi_path cmi_content cmj_name cmj_content =
117+
(* let load_module cmi_path cmi_content cmj_name cmj_content =
118118
Js.create_file cmi_path cmi_content;
119119
Js_cmj_datasets.data_sets :=
120120
Map_string.add !Js_cmj_datasets.data_sets
121-
cmj_name (lazy (Js_cmj_format.from_string cmj_content))
121+
cmj_name (lazy (Js_cmj_format.from_string cmj_content)) *)
122122

123123
let export (field : string) v =
124124
Js.Unsafe.set (Js.Unsafe.global) field v
125125
;;
126126

127127
(* To add a directory to the load path *)
128-
128+
(*
129129
let dir_directory d =
130130
Config.load_path := d :: !Config.load_path
131131
132132
let () =
133-
dir_directory "/static/cmis"
133+
dir_directory "/static/cmis" *)
134134

135135
module Converter = Refmt_api.Migrate_parsetree.Convert(Refmt_api.Migrate_parsetree.OCaml_404)(Refmt_api.Migrate_parsetree.OCaml_406)
136136

@@ -170,15 +170,15 @@ let make_compiler ~name ~prefix impl=
170170
Js.wrap_meth_callback
171171
(fun _ code -> (shake_compile impl ~use_super_errors:true ~prefix (Js.to_string code)));
172172
"version", Js.Unsafe.inject (Js.string (match name with | "reason" -> Refmt_api.version | _ -> Bs_version.version));
173-
"load_module",
173+
(* "load_module",
174174
inject @@
175175
Js.wrap_meth_callback
176176
(fun _ cmi_path cmi_content cmj_name cmj_content ->
177177
let cmj_bytestring = Js.to_bytestring cmj_content in
178178
(* HACK: force string tag to ASCII (9) to avoid
179179
* UTF-8 encoding *)
180180
Js.Unsafe.set cmj_bytestring "t" 9;
181-
load_module cmi_path cmi_content (Js.to_string cmj_name) cmj_bytestring);
181+
load_module cmi_path cmi_content (Js.to_string cmj_name) cmj_bytestring); *)
182182
|]))
183183

184184
let () = make_compiler ~name:"ocaml" ~prefix:"[@@@bs.config {no_export}]\n#1 \"repl.ml\"\n" Parse.implementation

jscomp/snapshot.ninja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ build $SNAP/unstable/js_compiler.ml: bspack | ./bin/bspack.exe
6565
main = Jsoo_main
6666

6767
build $SNAP/unstable/js_refmt_compiler.ml: bspack | ./bin/bspack.exe
68-
flags = -D BS_BROWSER=true -D BS_RELEASE_BUILD=true -bs-MD -module-alias Config=Config_whole_compiler -bs-exclude-I config -I $OCAML_SRC_UTILS -I $OCAML_SRC_PARSING -I $OCAML_SRC_TYPING -I $OCAML_SRC_BYTECOMP -I $OCAML_SRC_DRIVER -I js_parser -I stubs -I ext -I syntax -I depends -I common -I core -I super_errors -I bsb -I outcome_printer -I main -I refmt
68+
flags = -D BS_BROWSER=true -D BS_RELEASE_BUILD=true -bs-MD -module-alias Config=Config_whole_compiler -bs-exclude-I config -I $OCAML_SRC_UTILS -I $OCAML_SRC_PARSING -I $OCAML_SRC_TYPING -I $OCAML_SRC_BYTECOMP -I $OCAML_SRC_DRIVER -I js_parser -I stubs -I ext -I syntax -I depends -I common -I core -I super_errors -I bsb -I outcome_printer -I js_parser -I main -I refmt
6969
main = Jsoo_refmt_main
7070
# -o $@
7171
# Check it later

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356136,7 +356136,7 @@ end = struct
356136356136

356137356137
(* Clflags.keep_docs := false; *)
356138356138
(* default to false -check later*)
356139-
356139+
(* Clflags.keep_locs := false; *)
356140356140
let setup_env () =
356141356141

356142356142
Env.Persistent_signature.load := Bs_cmi_load.browse_load;

0 commit comments

Comments
 (0)