Skip to content

Commit c512f60

Browse files
committed
No pervasives extension in debug.
Not sure why it would be different on linux. As this is just debug, drop the extension.
1 parent f8c2dfd commit c512f60

26 files changed

+367
-362
lines changed

analysis/src/CompletionBackEnd.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,12 @@ let getOpens ~debug ~rawOpens ~package ~env =
11361136
^ " "
11371137
^ String.concat " "
11381138
(resolvedOpens
1139-
|> List.map (fun (e : QueryEnv.t) -> Uri.toString e.file.uri)));
1139+
|> List.map (fun (e : QueryEnv.t) ->
1140+
let name = Uri.toString e.file.uri in
1141+
1142+
if Utils.startsWith name "pervasives." then
1143+
Filename.chop_extension name
1144+
else name)));
11401145
(* Last open takes priority *)
11411146
List.rev resolvedOpens
11421147

analysis/tests/src/expected/BrokenParserCases.res.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ posCursor:[2:24] posNoWhite:[2:23] Found expr:[2:11->2:30]
33
Pexp_apply ...[2:11->2:17] (~isOff2:19->2:24=...[2:27->2:29])
44
Completable: CnamedArg(Value[someFn], isOff, [isOff])
55
Package opens Pervasives.JsxModules.place holder
6-
Resolved opens 1 pervasives.res
6+
Resolved opens 1 pervasives
77
ContextPath Value[someFn]
88
Path someFn
99
[]
@@ -12,7 +12,7 @@ Complete src/BrokenParserCases.res 6:17
1212
posCursor:[6:17] posNoWhite:[6:16] Found pattern:[6:16->6:19]
1313
Completable: Cpattern Value[s]=t
1414
Package opens Pervasives.JsxModules.place holder
15-
Resolved opens 1 pervasives.res
15+
Resolved opens 1 pervasives
1616
ContextPath Value[s]
1717
Path s
1818
[]
@@ -23,7 +23,7 @@ posCursor:[10:29] posNoWhite:[10:27] Found pattern:[10:24->10:28]
2323
Ppat_construct None:[10:24->10:28]
2424
Completable: Cpath Value[None]
2525
Package opens Pervasives.JsxModules.place holder
26-
Resolved opens 1 pervasives.res
26+
Resolved opens 1 pervasives
2727
ContextPath Value[None]
2828
Path None
2929
[]

analysis/tests/src/expected/CompletePrioritize1.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Complete src/CompletePrioritize1.res 5:6
22
posCursor:[5:6] posNoWhite:[5:5] Found expr:[5:3->0:-1]
33
Completable: Cpath Value[a]->
44
Package opens Pervasives.JsxModules.place holder
5-
Resolved opens 1 pervasives.res
5+
Resolved opens 1 pervasives
66
ContextPath Value[a]->
77
ContextPath Value[a]
88
Path a

analysis/tests/src/expected/CompletePrioritize2.res.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Complete src/CompletePrioritize2.res 9:7
22
posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1]
33
Completable: Cpath Value[ax]->
44
Package opens Pervasives.JsxModules.place holder
5-
Resolved opens 1 pervasives.res
5+
Resolved opens 1 pervasives
66
ContextPath Value[ax]->
77
ContextPath Value[ax]
88
Path ax
@@ -23,7 +23,7 @@ posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5]
2323
Pexp_ident ax:[12:3->12:5]
2424
Completable: Cpath Value[ax]
2525
Package opens Pervasives.JsxModules.place holder
26-
Resolved opens 1 pervasives.res
26+
Resolved opens 1 pervasives
2727
ContextPath Value[ax]
2828
Path ax
2929
[{

0 commit comments

Comments
 (0)