Skip to content

Commit 5bf5fc2

Browse files
committed
Add is_type_dev to Module as well.
1 parent aedcb1e commit 5bf5fc2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

rewatch/src/build/build_types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ pub struct Module {
7171
pub last_compiled_cmi: Option<SystemTime>,
7272
pub last_compiled_cmt: Option<SystemTime>,
7373
pub deps_dirty: bool,
74+
pub is_type_dev: bool,
7475
}
7576

7677
impl Module {

rewatch/src/build/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ fn compile_file(
581581
}?;
582582
let module_name = helpers::file_path_to_module_name(implementation_file_path, &package.namespace);
583583
let has_interface = module.get_interface().is_some();
584-
let is_type_dev = package.is_source_file_type_dev(implementation_file_path);
584+
let is_type_dev = module.is_type_dev;
585585
let to_mjs_args = compiler_args(
586586
&package.config,
587587
&root_package.config,

rewatch/src/build/packages.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,8 @@ pub fn parse_packages(build_state: &mut BuildState) {
749749
compile_dirty: false,
750750
last_compiled_cmt: None,
751751
last_compiled_cmi: None,
752+
// Not sure if this is correct
753+
is_type_dev: false,
752754
},
753755
);
754756
});
@@ -801,6 +803,7 @@ pub fn parse_packages(build_state: &mut BuildState) {
801803
compile_dirty: true,
802804
last_compiled_cmt: None,
803805
last_compiled_cmi: None,
806+
is_type_dev: metadata.is_type_dev,
804807
});
805808
} else {
806809
// remove last character of string: resi -> res, rei -> re, mli -> ml
@@ -862,6 +865,7 @@ pub fn parse_packages(build_state: &mut BuildState) {
862865
compile_dirty: true,
863866
last_compiled_cmt: None,
864867
last_compiled_cmi: None,
868+
is_type_dev: metadata.is_type_dev,
865869
});
866870
}
867871
}

0 commit comments

Comments
 (0)