@@ -4822,7 +4822,7 @@ type file_group =
4822
4822
sources : Bsb_db.map;
4823
4823
resources : string list ;
4824
4824
public : public ;
4825
- dev_index : bool ; (* false means not in dev mode *)
4825
+ is_dev : bool ; (* false means not in dev mode *)
4826
4826
generators : build_generator list ;
4827
4827
(* output of [generators] should be added to [sources],
4828
4828
if it is [.ml,.mli,.re,.rei]
@@ -4899,7 +4899,7 @@ type file_group =
4899
4899
sources : Bsb_db.map;
4900
4900
resources : string list ;
4901
4901
public : public ;
4902
- dev_index : bool ;
4902
+ is_dev : bool ;
4903
4903
generators : build_generator list ;
4904
4904
(* output of [generators] should be added to [sources],
4905
4905
if it is [.ml,.mli,.re,.rei]
@@ -10582,7 +10582,7 @@ let errorf x fmt =
10582
10582
10583
10583
type cxt = {
10584
10584
package_kind : Bsb_package_kind.t ;
10585
- dev_index : bool;
10585
+ is_dev : bool;
10586
10586
cwd : string ;
10587
10587
root : string;
10588
10588
cut_generators : bool;
@@ -10802,18 +10802,18 @@ let rec
10802
10802
sources = sources;
10803
10803
resources ;
10804
10804
public ;
10805
- dev_index = cxt.dev_index ;
10805
+ is_dev = cxt.is_dev ;
10806
10806
generators = if has_generators then scanned_generators else [] }
10807
10807
?globbed_dir:(
10808
10808
if !cur_globbed_dirs then Some dir else None)
10809
10809
children
10810
10810
10811
10811
10812
- and parsing_single_source ({package_kind; dev_index ; cwd} as cxt ) (x : Ext_json_types.t )
10812
+ and parsing_single_source ({package_kind; is_dev ; cwd} as cxt ) (x : Ext_json_types.t )
10813
10813
: t =
10814
10814
match x with
10815
10815
| Str { str = dir } ->
10816
- begin match package_kind, dev_index with
10816
+ begin match package_kind, is_dev with
10817
10817
| Dependency _ , true ->
10818
10818
Bsb_file_groups.empty
10819
10819
| Dependency _, false
@@ -10829,7 +10829,7 @@ and parsing_single_source ({package_kind; dev_index ; cwd} as cxt ) (x : Ext_jso
10829
10829
| Some (Str {str="dev"}) ->
10830
10830
true
10831
10831
| Some _ -> Bsb_exception.config_error x {|type field expect "dev" literal |}
10832
- | None -> dev_index in
10832
+ | None -> is_dev in
10833
10833
begin match package_kind, current_dir_index with
10834
10834
| Dependency _ , true ->
10835
10835
Bsb_file_groups.empty
@@ -10847,7 +10847,7 @@ and parsing_single_source ({package_kind; dev_index ; cwd} as cxt ) (x : Ext_jso
10847
10847
10848
10848
in
10849
10849
parsing_source_dir_map
10850
- {cxt with dev_index = current_dir_index;
10850
+ {cxt with is_dev = current_dir_index;
10851
10851
cwd= Ext_path.concat cwd dir} map
10852
10852
end
10853
10853
| _ -> Bsb_file_groups.empty
@@ -10873,7 +10873,7 @@ let scan
10873
10873
parse_sources {
10874
10874
ignored_dirs;
10875
10875
package_kind;
10876
- dev_index = false;
10876
+ is_dev = false;
10877
10877
cwd = Filename.current_dir_name;
10878
10878
root ;
10879
10879
cut_generators;
@@ -13454,7 +13454,7 @@ let handle_files_per_dir
13454
13454
~(namespace : string option)
13455
13455
(group: Bsb_file_groups.file_group )
13456
13456
: unit =
13457
-
13457
+ let is_dev = group.is_dev in
13458
13458
handle_generators oc group rules.customs ;
13459
13459
let installable =
13460
13460
match group.public with
@@ -13464,12 +13464,12 @@ let handle_files_per_dir
13464
13464
fun module_name ->
13465
13465
Set_string.mem set module_name in
13466
13466
Map_string.iter group.sources (fun module_name module_info ->
13467
- if installable module_name then
13467
+ if installable module_name && not is_dev then
13468
13468
Queue.add
13469
13469
module_info files_to_install;
13470
13470
emit_module_build rules
13471
13471
package_specs
13472
- group.dev_index
13472
+ is_dev
13473
13473
oc
13474
13474
namespace module_info
13475
13475
)
@@ -13726,9 +13726,9 @@ let output_ninja_and_namespace_map
13726
13726
[] (
13727
13727
fun
13728
13728
(acc_resources : string list)
13729
- {sources; dir; resources; dev_index }
13729
+ {sources; dir; resources; is_dev }
13730
13730
->
13731
- if dev_index then begin
13731
+ if is_dev then begin
13732
13732
bs_groups.dev <- Bsb_db_util.merge bs_groups.dev sources ;
13733
13733
source_dirs.dev <- dir :: source_dirs.dev;
13734
13734
end else begin
0 commit comments