Skip to content

Commit 39e90c7

Browse files
authored
Rewatch: remove support for .ml(i) and .re(i) (#7727)
* Rewatch: remove support for .ml(i) and .re(i) * CHANGELOG
1 parent b50e72c commit 39e90c7

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
- Don't skip Stdlib docstring tests. https://github.com/rescript-lang/rescript/pull/7694
6060
- Remove all leftovers of `pinned-dependencies` handling. https://github.com/rescript-lang/rescript/pull/7686
6161
- Add `rust-version` field to Rewatch's `Cargo.toml`. https://github.com/rescript-lang/rescript/pull/7701
62+
- Rewatch: remove support for .ml(i) and .re(i). https://github.com/rescript-lang/rescript/pull/7727
6263

6364
# 12.0.0-beta.2
6465

rewatch/src/build/packages.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ fn extend_with_children(
599599
/// Make turns a folder, that should contain a config, into a tree of Packages.
600600
/// It does so in two steps:
601601
/// 1. Get all the packages parsed, and take all the source folders from the config
602-
/// 2. Take the (by then deduplicated) packages, and find all the '.re', '.res', '.ml' and
602+
/// 2. Take the (by then deduplicated) packages, and find all the '.res' and
603603
/// interface files.
604604
///
605605
/// The two step process is there to reduce IO overhead
@@ -785,13 +785,11 @@ pub fn parse_packages(build_state: &mut BuildState) {
785785
is_type_dev: metadata.is_type_dev,
786786
});
787787
} else {
788-
// remove last character of string: resi -> res, rei -> re, mli -> ml
788+
// remove last character of string: resi -> res
789789
let mut implementation_filename = file.to_owned();
790790
let extension = implementation_filename.extension().unwrap().to_str().unwrap();
791791
implementation_filename = match extension {
792792
"resi" => implementation_filename.with_extension("res"),
793-
"rei" => implementation_filename.with_extension("re"),
794-
"mli" => implementation_filename.with_extension("ml"),
795793
_ => implementation_filename,
796794
};
797795
match source_files.get(&implementation_filename) {

rewatch/src/helpers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ pub fn get_system_time() -> u128 {
306306
}
307307

308308
pub fn is_interface_file(extension: &str) -> bool {
309-
matches!(extension, "resi" | "mli" | "rei")
309+
extension == "resi"
310310
}
311311

312312
pub fn is_implementation_file(extension: &str) -> bool {
313-
matches!(extension, "res" | "ml" | "re")
313+
extension == "res"
314314
}
315315

316316
pub fn is_source_file(extension: &str) -> bool {

0 commit comments

Comments
 (0)