Skip to content

Commit 8bb7f0e

Browse files
Clarify clean output coverage and progress suffixes
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
1 parent 41103ba commit 8bb7f0e

2 files changed

Lines changed: 7 additions & 19 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- Allow `rescript clean` to remove generated files when the source module graph is invalid. https://github.com/rescript-lang/rescript/pull/8640
1+
- Allow `rescript clean` to remove generated files when the source module graph is invalid, including out-of-source `lib/es6` and `lib/js` outputs in the project and its dependencies. https://github.com/rescript-lang/rescript/pull/8640

‎rewatch/src/build/clean.rs‎

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -374,24 +374,12 @@ pub fn clean(path: &Path, show_progress: bool, plain_output: bool, prod: bool) -
374374

375375
let timing_clean_mjs = Instant::now();
376376
let root_config = project_context.get_root_config();
377-
let suffix_for_print = match root_config.package_specs {
378-
None => match &root_config.suffix {
379-
None => String::from(".js"),
380-
Some(suffix) => suffix.clone(),
381-
},
382-
Some(_) => root_config
383-
.get_package_specs()
384-
.into_iter()
385-
.filter_map(|spec| {
386-
if spec.in_source {
387-
spec.suffix.or_else(|| root_config.suffix.clone())
388-
} else {
389-
None
390-
}
391-
})
392-
.collect::<Vec<String>>()
393-
.join(", "),
394-
};
377+
let suffix_for_print = root_config
378+
.get_package_specs()
379+
.iter()
380+
.map(|spec| root_config.get_suffix(spec))
381+
.collect::<Vec<String>>()
382+
.join(", ");
395383

396384
if !plain_output && show_progress {
397385
print!(

0 commit comments

Comments
 (0)