Skip to content

Commit 4f8b945

Browse files
cknittnojaf
andauthored
Fix rewatch panic on duplicate module name (#8102)
* Fix rewatch panic on duplicate module name * Deterministic order of file/module names in error message * Update rewatch/src/build/packages.rs Co-authored-by: Florian Verdonck <[email protected]> * Fix snapshot * Move cloning root_path into error handling code * CHANGELOG --------- Co-authored-by: Florian Verdonck <[email protected]>
1 parent ff9d6d3 commit 4f8b945

File tree

6 files changed

+226
-203
lines changed

6 files changed

+226
-203
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- Fix: do not warn for "editor" field in `rescript.json`. https://github.com/rescript-lang/rescript/pull/8084
2727
- Fix `@val` shadowing (rewrite using `globalThis`). https://github.com/rescript-lang/rescript/pull/8098
2828
- Fix `@scope` shadowing (rewrite using `globalThis`). https://github.com/rescript-lang/rescript/pull/8100
29+
- Fix rewatch panic on duplicate module name. https://github.com/rescript-lang/rescript/pull/8102
2930

3031
#### :memo: Documentation
3132

rewatch/src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub fn initialize_build(
147147
}
148148

149149
let mut build_state = BuildCommandState::new(project_context, packages, compiler, warn_error);
150-
packages::parse_packages(&mut build_state);
150+
packages::parse_packages(&mut build_state)?;
151151

152152
let compile_assets_state = read_compile_state::read(&mut build_state)?;
153153

rewatch/src/build/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ pub fn clean(path: &Path, show_progress: bool, plain_output: bool) -> Result<()>
366366

367367
let timing_clean_mjs = Instant::now();
368368
let mut build_state = BuildState::new(project_context, packages, compiler_info);
369-
packages::parse_packages(&mut build_state);
369+
packages::parse_packages(&mut build_state)?;
370370
let root_config = build_state.get_root_config();
371371
let suffix_for_print = match root_config.package_specs {
372372
None => match &root_config.suffix {

0 commit comments

Comments
 (0)