File tree Expand file tree Collapse file tree 4 files changed +7
-36
lines changed Expand file tree Collapse file tree 4 files changed +7
-36
lines changed Original file line number Diff line number Diff line change 1818- Remove unused ` -bs-D ` and ` -bs-list-conditionals ` flags. https://github.com/rescript-lang/rescript/pull/7631
1919- Remove obsolete jsx options. https://github.com/rescript-lang/rescript/pull/7633
2020- Remove obsolete option ` -bs-unsafe-empty-array ` . https://github.com/rescript-lang/rescript/pull/7635
21+ - Clean up ` config.ml ` . https://github.com/rescript-lang/rescript/pull/7636
2122
2223# 12.0.0-beta.1
2324
Original file line number Diff line number Diff line change @@ -5,18 +5,14 @@ let tryReadCmt cmt =
55 else
66 match Cmt_format. read_cmt cmt with
77 | exception Cmi_format. Error err ->
8- Log. log
9- (" Failed to load " ^ cmt ^ " as a cmt w/ ocaml version " ^ " 406"
10- ^ " , error: "
11- ^
12- (Cmi_format. report_error Format. str_formatter err;
13- Format. flush_str_formatter () ));
8+ let error_message =
9+ Cmi_format. report_error Format. str_formatter err;
10+ Format. flush_str_formatter ()
11+ in
12+ Log. log (" Invalid cmt format " ^ cmt ^ " : " ^ error_message);
1413 None
1514 | exception err ->
16- Log. log
17- (" Invalid cmt format " ^ cmt
18- ^ " - probably wrong ocaml version, expected " ^ Config. version ^ " : "
19- ^ Printexc. to_string err);
15+ Log. log (" Invalid cmt format " ^ cmt ^ " : " ^ Printexc. to_string err);
2016 None
2117 | x -> Some x
2218
Original file line number Diff line number Diff line change 1- let version = " 4.06.1+BS"
2-
31(* This resolves the location of the standard library starting from the location of bsc.exe,
42 handling different supported package layouts. *)
53let standard_library =
@@ -31,8 +29,6 @@ let standard_library =
3129 | _ :: _ :: _ :: _ :: rest -> build_path rest [" lib" ; " ocaml" ]
3230 | _ -> " "
3331
34- let standard_library_default = standard_library
35-
3632let cmi_magic_number = " Caml1999I022"
3733
3834and ast_impl_magic_number = " Caml1999M022"
@@ -42,20 +38,3 @@ and ast_intf_magic_number = "Caml1999N022"
4238and cmt_magic_number = " Caml1999T022"
4339
4440let load_path = ref ([] : string list )
45-
46- (* This is normally the same as in obj.ml, but we have to define it
47- separately because it can differ when we're in the middle of a
48- bootstrapping phase. *)
49-
50- let print_config oc =
51- let p name valu = Printf. fprintf oc " %s: %s\n " name valu in
52- p " version" version;
53- p " standard_library_default" standard_library_default;
54- p " standard_library" standard_library;
55-
56- (* print the magic number *)
57- p " cmi_magic_number" cmi_magic_number;
58- p " ast_impl_magic_number" ast_impl_magic_number;
59- p " ast_intf_magic_number" ast_intf_magic_number;
60- p " cmt_magic_number" cmt_magic_number;
61- flush oc
Original file line number Diff line number Diff line change 1515
1616(* System configuration *)
1717
18- val version : string
19- (* The current version number of the system *)
20-
2118val standard_library : string
2219(* The directory containing the standard libraries *)
2320
@@ -35,5 +32,3 @@ val ast_impl_magic_number : string
3532(* Magic number for file holding an implementation syntax tree *)
3633val cmt_magic_number : string
3734(* Magic number for compiled interface files *)
38-
39- val print_config : out_channel -> unit
You can’t perform that action at this time.
0 commit comments