Skip to content

Commit 7a5c059

Browse files
committed
tweak
1 parent 954069d commit 7a5c059

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

jscomp/bsb_helper/bsb_db_decode.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ type module_info = {
102102

103103

104104
let find_opt
105-
((sorteds,whole) : t ) i (key : string)
105+
((sorteds,whole) : t )
106+
(i : int) (key : string)
106107
: module_info option =
107108
let group = sorteds.(i) in
108109
let i = Ext_string_array.find_sorted group.modules key in

jscomp/bsb_helper/bsb_helper_depfile_gen.ml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,14 @@ let oc_cmi buf namespace source =
119119
When ns is turned on, `B` is interprted as `Ns-B` which is a cyclic dependency,
120120
it can be errored out earlier
121121
*)
122-
let find_module db dependent_module is_not_lib_dir (index : Bsb_dir_index.t) =
122+
let find_module db dependent_module is_not_lib_dir
123+
: Bsb_db_decode.module_info option =
123124
let opt = Bsb_db_decode.find_opt db 0 dependent_module in
124125
match opt with
125126
| Some _ -> opt
126127
| None ->
127128
if is_not_lib_dir then
128-
Bsb_db_decode.find_opt db (index :> int) dependent_module
129+
Bsb_db_decode.find_opt db 1 dependent_module
129130
else None
130131
let oc_impl
131132
(mlast : string)
@@ -163,7 +164,7 @@ let oc_impl
163164
end
164165
);
165166
(match
166-
find_module db dependent_module is_not_lib_dir index
167+
find_module db dependent_module is_not_lib_dir
167168
with
168169
| None -> ()
169170
| Some ({dir_name; case }) ->
@@ -225,7 +226,7 @@ let oc_intf
225226
exit 2
226227
end
227228
);
228-
(match find_module db dependent_module is_not_lib_dir index
229+
(match find_module db dependent_module is_not_lib_dir
229230
with
230231
| None -> ()
231232
| Some {dir_name; case} ->

0 commit comments

Comments
 (0)