@@ -36,26 +36,6 @@ let bsb_helper_exe = "bsb_helper.exe"
3636let dash_i = " -I"
3737
3838
39- let output_reason_config
40- (has_reason_files : bool )
41- (refmt : Bsb_config_types.refmt )
42- (bsc_dir : string )
43- (refmt_flags : string )
44- (oc : out_channel ) : unit =
45- if has_reason_files then
46- Bsb_ninja_util. output_kvs
47- [|
48- Bsb_ninja_global_vars. refmt,
49- (Ext_filename. maybe_quote
50- (match refmt with
51- | Refmt_none ->
52- Bsb_log. warn " @{<warning>Warning:@} refmt version missing. Please set it explicitly, since we may change the default in the future.@." ;
53- bsc_dir // Bsb_default. refmt_none
54- | Refmt_v3 ->
55- bsc_dir // Bsb_default. refmt_v3
56- | Refmt_custom x -> x ));
57- Bsb_ninja_global_vars. refmt_flags, refmt_flags;
58- |] oc
5939
6040let get_bsc_flags
6141 ~(toplevel : bool )
@@ -130,7 +110,6 @@ let output_ninja_and_namespace_map
130110 bs_dependencies;
131111 bs_dev_dependencies;
132112 refmt;
133- refmt_flags;
134113 js_post_build_cmd;
135114 package_specs;
136115 file_groups = { files = bs_file_groups } ;
@@ -147,9 +126,7 @@ let output_ninja_and_namespace_map
147126
148127 let cwd_lib_bs = cwd // Bsb_config. lib_bs in
149128 let ppx_flags = Bsb_build_util. ppx_flags ppx_files in
150- let refmt_flags = String. concat Ext_string. single_space refmt_flags in
151129 let oc = open_out_bin (cwd_lib_bs // Literals. build_ninja) in
152- let has_reason_files = ref false in
153130 let g_pkg_flg , g_ns_flg =
154131 match namespace with
155132 | None ->
@@ -209,7 +186,6 @@ let output_ninja_and_namespace_map
209186 else Ext_list. map_append resources acc_resources (fun x -> dir // x ) )
210187 ) in
211188 Bsb_db_util. sanity_check bs_group;
212- has_reason_files := ! has_reason_files || Bsb_db. has_reason_files bs_group ;
213189 [|bs_group|], source_dirs, static_resources
214190 else
215191 let bs_groups = Array. init (number_of_dev_groups + 1 ) (fun i -> String_map. empty) in
@@ -224,11 +200,9 @@ let output_ninja_and_namespace_map
224200 ) in
225201 let lib = bs_groups.((Bsb_dir_index. lib_dir_index :> int )) in
226202 Bsb_db_util. sanity_check lib;
227- has_reason_files := ! has_reason_files || Bsb_db. has_reason_files lib ;
228203 for i = 1 to number_of_dev_groups do
229204 let c = bs_groups.(i) in
230205 Bsb_db_util. sanity_check c;
231- has_reason_files := ! has_reason_files || Bsb_db. has_reason_files c ;
232206 String_map. iter c
233207 (fun k a ->
234208 if String_map. mem lib k then
@@ -241,10 +215,12 @@ let output_ninja_and_namespace_map
241215 bs_groups,source_dirs.((Bsb_dir_index. lib_dir_index:>int )), static_resources
242216 in
243217
244- output_reason_config ! has_reason_files refmt bsc_dir refmt_flags oc;
245218 let digest = Bsb_db_encode. write_build_cache ~dir: cwd_lib_bs bs_groups in
246219 let rules : Bsb_ninja_rule.builtin =
247220 Bsb_ninja_rule. make_custom_rules
221+ ~refmt: (match refmt with
222+ | Refmt_none | Refmt_v3 -> None
223+ | Refmt_custom x -> Some x)
248224 ~has_gentype: (gentype_config <> None )
249225 ~has_postbuild: (js_post_build_cmd <> None )
250226 ~has_ppx: (ppx_files <> [] )
0 commit comments