Skip to content

Commit 29f5200

Browse files
committed
rename dir_index into dev_index
1 parent 19dc156 commit 29f5200

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

jscomp/bsb/bsb_file_groups.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type file_group =
4040
sources : Bsb_db.t;
4141
resources : string list ;
4242
public : public ;
43-
dir_index : bool ;
43+
dev_index : bool ;
4444
generators : build_generator list ;
4545
(* output of [generators] should be added to [sources],
4646
if it is [.ml,.mli,.re,.rei]

jscomp/bsb/bsb_file_groups.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type file_group =
4040
sources : Bsb_db.t;
4141
resources : string list ;
4242
public : public ;
43-
dir_index : bool ; (* false means not in dev mode *)
43+
dev_index : bool ; (* false means not in dev mode *)
4444
generators : build_generator list ;
4545
(* output of [generators] should be added to [sources],
4646
if it is [.ml,.mli,.re,.rei]

jscomp/bsb/bsb_ninja_file_groups.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ let handle_files_per_dir
194194
module_info.name_sans_extension;
195195
emit_module_build rules
196196
package_specs
197-
group.dir_index
197+
group.dev_index
198198
oc
199199
~bs_suffix
200200
js_post_build_cmd

jscomp/bsb/bsb_ninja_gen.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ let output_ninja_and_namespace_map
167167
let bs_groups = Array.init 2 (fun _ -> Map_string.empty) in
168168
let source_dirs = Array.init 2 (fun _ -> []) in
169169
let static_resources =
170-
Ext_list.fold_left bs_file_groups [] (fun (acc_resources : string list) {sources; dir; resources; dir_index}
170+
Ext_list.fold_left bs_file_groups [] (fun (acc_resources : string list) {sources; dir; resources; dev_index}
171171
->
172-
let dir_index = if dir_index then 1 else 0 in
172+
let dir_index = if dev_index then 1 else 0 in
173173
bs_groups.(dir_index) <- Bsb_db_util.merge bs_groups.(dir_index) sources ;
174174
source_dirs.(dir_index) <- dir :: source_dirs.(dir_index);
175175
Ext_list.map_append resources acc_resources (fun x -> dir//x)

jscomp/bsb/bsb_parse_sources.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ let errorf x fmt =
4545

4646
type cxt = {
4747
toplevel : bool ;
48-
dir_index : bool;
48+
dev_index : bool;
4949
cwd : string ;
5050
root : string;
5151
cut_generators : bool;
@@ -339,18 +339,18 @@ let rec
339339
sources = sources;
340340
resources ;
341341
public ;
342-
dir_index = cxt.dir_index ;
342+
dev_index = cxt.dev_index ;
343343
generators = if has_generators then scanned_generators else [] }
344344
?globbed_dir:(
345345
if !cur_globbed_dirs then Some dir else None)
346346
children
347347

348348

349-
and parsing_single_source ({toplevel; dir_index ; cwd} as cxt ) (x : Ext_json_types.t )
349+
and parsing_single_source ({toplevel; dev_index ; cwd} as cxt ) (x : Ext_json_types.t )
350350
: t =
351351
match x with
352352
| Str { str = dir } ->
353-
if not toplevel && dir_index then
353+
if not toplevel && dev_index then
354354
Bsb_file_groups.empty
355355
else
356356
parsing_source_dir_map
@@ -363,7 +363,7 @@ and parsing_single_source ({toplevel; dir_index ; cwd} as cxt ) (x : Ext_json_ty
363363
| Some (Str {str="dev"}) ->
364364
true
365365
| Some _ -> Bsb_exception.config_error x {|type field expect "dev" literal |}
366-
| None -> dir_index in
366+
| None -> dev_index in
367367
if not toplevel && current_dir_index then
368368
Bsb_file_groups.empty
369369
else
@@ -379,7 +379,7 @@ and parsing_single_source ({toplevel; dir_index ; cwd} as cxt ) (x : Ext_json_ty
379379

380380
in
381381
parsing_source_dir_map
382-
{cxt with dir_index = current_dir_index;
382+
{cxt with dev_index = current_dir_index;
383383
cwd= Ext_path.concat cwd dir} map
384384
| _ -> Bsb_file_groups.empty
385385
and parsing_arr_sources cxt (file_groups : Ext_json_types.t array) =
@@ -405,7 +405,7 @@ let scan
405405
parse_sources {
406406
ignored_dirs;
407407
toplevel;
408-
dir_index = false;
408+
dev_index = false;
409409
cwd = Filename.current_dir_name;
410410
root ;
411411
cut_generators;

0 commit comments

Comments
 (0)