Skip to content

Commit 0f26053

Browse files
committed
rename Cmt.fullFromPath to Cmt.loadFullCmtFromPath
1 parent be67d21 commit 0f26053

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

analysis/src/Cmt.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ let fullFromModule ~package ~moduleName =
3131
fullFromUri ~uri
3232
else None
3333

34-
let fullFromPath ~path =
34+
let loadFullCmtFromPath ~path =
3535
let uri = Uri.fromPath path in
3636
fullFromUri ~uri

analysis/src/Commands.ml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let getCompletions ~debug ~path ~pos ~currentFile ~forHover =
1313
Printf.printf "Completable: %s\n"
1414
(SharedTypes.Completable.toString completable);
1515
(* Only perform expensive ast operations if there are completables *)
16-
match Cmt.fullFromPath ~path with
16+
match Cmt.loadFullCmtFromPath ~path with
1717
| None -> []
1818
| Some {file; package} ->
1919
let env = SharedTypes.QueryEnv.fromFile file in
@@ -46,7 +46,7 @@ let codeLens ~path ~debug =
4646

4747
let hover ~path ~pos ~currentFile ~debug ~supportsMarkdownLinks =
4848
let result =
49-
match Cmt.fullFromPath ~path with
49+
match Cmt.loadFullCmtFromPath ~path with
5050
| None -> Protocol.null
5151
| Some full -> (
5252
match References.getLocItem ~full ~pos ~debug with
@@ -102,7 +102,7 @@ let codeAction ~path ~pos ~currentFile ~debug =
102102

103103
let definition ~path ~pos ~debug =
104104
let locationOpt =
105-
match Cmt.fullFromPath ~path with
105+
match Cmt.loadFullCmtFromPath ~path with
106106
| None -> None
107107
| Some full -> (
108108
match References.getLocItem ~full ~pos ~debug with
@@ -138,7 +138,7 @@ let definition ~path ~pos ~debug =
138138

139139
let typeDefinition ~path ~pos ~debug =
140140
let maybeLocation =
141-
match Cmt.fullFromPath ~path with
141+
match Cmt.loadFullCmtFromPath ~path with
142142
| None -> None
143143
| Some full -> (
144144
match References.getLocItem ~full ~pos ~debug with
@@ -157,7 +157,7 @@ let typeDefinition ~path ~pos ~debug =
157157

158158
let references ~path ~pos ~debug =
159159
let allLocs =
160-
match Cmt.fullFromPath ~path with
160+
match Cmt.loadFullCmtFromPath ~path with
161161
| None -> []
162162
| Some full -> (
163163
match References.getLocItem ~full ~pos ~debug with
@@ -183,7 +183,7 @@ let references ~path ~pos ~debug =
183183

184184
let rename ~path ~pos ~newName ~debug =
185185
let result =
186-
match Cmt.fullFromPath ~path with
186+
match Cmt.loadFullCmtFromPath ~path with
187187
| None -> Protocol.null
188188
| Some full -> (
189189
match References.getLocItem ~full ~pos ~debug with

analysis/src/Hint.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ let inlay ~path ~pos ~maxLength ~debug =
7777
in
7878
let {Res_driver.parsetree = structure} = parser ~filename:path in
7979
iterator.structure iterator structure |> ignore);
80-
match Cmt.fullFromPath ~path with
80+
match Cmt.loadFullCmtFromPath ~path with
8181
| None -> None
8282
| Some full ->
8383
let result =
@@ -141,7 +141,7 @@ let codeLens ~path ~debug =
141141
in
142142
let {Res_driver.parsetree = structure} = parser ~filename:path in
143143
iterator.structure iterator structure |> ignore);
144-
match Cmt.fullFromPath ~path with
144+
match Cmt.loadFullCmtFromPath ~path with
145145
| None -> None
146146
| Some full ->
147147
let result =

analysis/src/Hover.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ let getHoverViaCompletions ~debug ~path ~pos ~currentFile ~forHover
133133
Printf.printf "Completable: %s\n"
134134
(SharedTypes.Completable.toString completable);
135135
(* Only perform expensive ast operations if there are completables *)
136-
match Cmt.fullFromPath ~path with
136+
match Cmt.loadFullCmtFromPath ~path with
137137
| None -> None
138138
| Some {file; package} -> (
139139
let env = SharedTypes.QueryEnv.fromFile file in

analysis/src/SignatureHelp.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let findFunctionType ~currentFile ~debug ~path ~pos =
1616
with
1717
| None -> None
1818
| Some (completable, scope) -> (
19-
match Cmt.fullFromPath ~path with
19+
match Cmt.loadFullCmtFromPath ~path with
2020
| None -> None
2121
| Some {file; package} ->
2222
let env = QueryEnv.fromFile file in

analysis/src/Xform.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ let parse ~filename =
301301
(structure, printExpr, printStructureItem)
302302

303303
let extractCodeActions ~path ~pos ~currentFile ~debug =
304-
match Cmt.fullFromPath ~path with
304+
match Cmt.loadFullCmtFromPath ~path with
305305
| Some full when Files.classifySourceFile currentFile = Res ->
306306
let structure, printExpr, printStructureItem =
307307
parse ~filename:currentFile

0 commit comments

Comments
 (0)