Skip to content

Commit 8508be5

Browse files
committed
Revert "Try legacy behaviour"
This reverts commit 2da1956.
1 parent 2da1956 commit 8508be5

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

rewatch/src/build/build_types.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,26 +106,7 @@ impl BuildState {
106106
}
107107

108108
pub fn get_module(&self, module_name: &str) -> Option<&Module> {
109-
// Try exact match first
110-
if let Some(module) = self.modules.get(module_name) {
111-
return Some(module);
112-
}
113-
// Fallback: try with first letter uncapitalized (legacy behavior)
114-
// This matches the logic in compiler/gentype/ModuleResolver.ml:
115-
// match map |> ModuleNameMap.find module_name with
116-
// | resolved_module_dir -> Some (resolved_module_dir, Uppercase, bs_dependencies)
117-
// | exception Not_found -> (
118-
// match map |> ModuleNameMap.find (module_name |> ModuleName.uncapitalize)
119-
// with | resolved_module_dir -> Some (resolved_module_dir, Lowercase, bs_dependencies)
120-
// | exception Not_found -> None)
121-
if let Some(first_char) = module_name.chars().next() {
122-
if first_char.is_ascii_uppercase() {
123-
let mut uncapitalized = first_char.to_lowercase().collect::<String>();
124-
uncapitalized.push_str(&module_name[1..]);
125-
return self.modules.get(&uncapitalized);
126-
}
127-
}
128-
None
109+
self.modules.get(module_name)
129110
}
130111
pub fn new(
131112
project_root: PathBuf,

0 commit comments

Comments
 (0)