Skip to content

Commit d6afd37

Browse files
committed
add some comments
1 parent 6a7cb1b commit d6afd37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/build/clean.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ pub fn cleanup_previous_build(
159159
.expect("Could not find module for ast file");
160160

161161
let compile_dirty = compile_assets_state.cmt_modules.get(module_name);
162+
// if there is a new AST but it has not been compiled yet, we mark the module as compile dirty
163+
// we do this by checking if the cmt file is newer than the AST file. We always compile the
164+
// interface AND implementation. For some reason the CMI file is not always rewritten if it
165+
// doesn't have any changes, that's why we just look at the CMT file.
162166
if let Some(compile_dirty) = compile_dirty {
163167
let last_modified = Some(ast_last_modified);
164168

0 commit comments

Comments
 (0)