File tree 4 files changed +6
-7
lines changed
4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ src/BuildSystem.cmx : \
5
5
src/Cli.cmx : \
6
6
src/Commands.cmx
7
7
src/Cmt.cmx : \
8
- src/Utils.cmx \
9
8
src/Uri2.cmx \
10
9
src/SharedTypes.cmx \
11
10
src/ProcessCmt.cmx \
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ let fromUri ~uri =
10
10
in
11
11
match Hashtbl. find_opt package.pathsForModule moduleName with
12
12
| Some paths ->
13
- let cmt =
14
- SharedTypes. getCmtPath ~interface: (Utils. endsWith path " i" ) paths
15
- in
13
+ let cmt = SharedTypes. getCmtPath ~uri paths in
16
14
ProcessCmt. fullForCmt ~module Name ~package ~uri cmt
17
15
| None ->
18
16
prerr_endline (" can't find module " ^ moduleName);
Original file line number Diff line number Diff line change @@ -1260,8 +1260,8 @@ let fileForModule modname ~package =
1260
1260
if Hashtbl. mem package.pathsForModule modname then (
1261
1261
let paths = Hashtbl. find package.pathsForModule modname in
1262
1262
(* TODO: do better *)
1263
- let cmt = SharedTypes. getCmtPath ~interface: true paths in
1264
1263
let uri = SharedTypes. getUri paths in
1264
+ let cmt = SharedTypes. getCmtPath ~uri paths in
1265
1265
Log. log (" fileForModule " ^ SharedTypes. showPaths paths);
1266
1266
match fileForCmt ~module Name:modname ~cmt ~uri state with
1267
1267
| None -> None
Original file line number Diff line number Diff line change @@ -146,11 +146,13 @@ let getUri p =
146
146
| Namespace {cmt} -> Uri2. fromPath cmt
147
147
| IntfAndImpl {resi} -> Uri2. fromPath resi
148
148
149
- let getCmtPath ~interface p =
149
+ let getCmtPath ~uri p =
150
150
match p with
151
151
| Impl {cmt} -> cmt
152
152
| Namespace {cmt} -> cmt
153
- | IntfAndImpl {cmti; cmt} -> if interface then cmti else cmt
153
+ | IntfAndImpl {cmti; cmt} ->
154
+ let interface = Utils. endsWith (Uri2. toPath uri) " i" in
155
+ if interface then cmti else cmt
154
156
155
157
let emptyDeclared name =
156
158
{
You can’t perform that action at this time.
0 commit comments