Skip to content

Commit 5cb90c6

Browse files
committed
🐛 - Fix retaining errors
1 parent 1f83dfa commit 5cb90c6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/build/clean.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ pub fn cleanup_after_build(build_state: &BuildState) {
327327
// up the AST file if compile is not successful
328328
match &module.source_type {
329329
SourceType::SourceFile(source_file) => {
330-
// we only clean the cmt (typed tree) here, this will cause the file to be recompiled
330+
// we only clean the ast here, this will cause the file to be recompiled
331331
// (and thus keep showing the warning), but it will keep the cmi file, so that we don't
332332
// unecessary mark all the dependents as dirty, when there is no change in the interface
333-
remove_compile_asset(package, &source_file.implementation.path, "cmt");
333+
remove_compile_asset(package, &source_file.implementation.path, "ast");
334334
}
335335
SourceType::MlMap(_) => (),
336336
}

src/helpers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ pub fn get_compiler_asset(
172172
source_file: &str,
173173
extension: &str,
174174
) -> String {
175+
let namespace = match extension {
176+
"ast" | "iast" => &packages::Namespace::NoNamespace,
177+
_ => namespace,
178+
};
175179
package.get_build_path()
176180
+ "/"
177181
+ &file_path_to_compiler_asset_basename(source_file, namespace)

0 commit comments

Comments
 (0)