Skip to content

Commit d2c1d2a

Browse files
committed
Open Pervasives.JsxModules by default.
See rescript-lang/rescript#6091 where the jsx modules are moved inside Pervasives, to provide 2 different copies for curried and uncurried mode.
1 parent a9c1af7 commit d2c1d2a

26 files changed

+362
-1
lines changed

analysis/src/Packages.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ let newBsPackage ~rootPath =
7777
| None -> []
7878
in
7979
let opens =
80-
opens_from_namespace
80+
["Pervasives"; "JsxModules"] :: opens_from_namespace
8181
|> List.rev_append opens_from_bsc_flags
8282
|> List.map (fun path -> path @ ["place holder"])
8383
in

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ Complete src/BrokenParserCases.res 2:24
22
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])
5+
Package opens Pervasives.JsxModules.place holder
56
ContextPath Value[someFn]
67
Path someFn
78
[]
89

910
Complete src/BrokenParserCases.res 6:17
1011
posCursor:[6:17] posNoWhite:[6:16] Found pattern:[6:16->6:19]
1112
Completable: Cpattern Value[s]=t
13+
Package opens Pervasives.JsxModules.place holder
1214
ContextPath Value[s]
1315
Path s
1416
[]
@@ -18,6 +20,7 @@ posCursor:[10:29] posNoWhite:[10:27] Found pattern:[10:24->10:39]
1820
posCursor:[10:29] posNoWhite:[10:27] Found pattern:[10:24->10:28]
1921
Ppat_construct None:[10:24->10:28]
2022
Completable: Cpath Value[None]
23+
Package opens Pervasives.JsxModules.place holder
2124
ContextPath Value[None]
2225
Path None
2326
[]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Complete src/CompletePrioritize1.res 5:6
22
posCursor:[5:6] posNoWhite:[5:5] Found expr:[5:3->0:-1]
33
Completable: Cpath Value[a]->
4+
Package opens Pervasives.JsxModules.place holder
45
ContextPath Value[a]->
56
ContextPath Value[a]
67
Path a

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Complete src/CompletePrioritize2.res 9:7
22
posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1]
33
Completable: Cpath Value[ax]->
4+
Package opens Pervasives.JsxModules.place holder
45
ContextPath Value[ax]->
56
ContextPath Value[ax]
67
Path ax
@@ -20,6 +21,7 @@ Complete src/CompletePrioritize2.res 12:5
2021
posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5]
2122
Pexp_ident ax:[12:3->12:5]
2223
Completable: Cpath Value[ax]
24+
Package opens Pervasives.JsxModules.place holder
2325
ContextPath Value[ax]
2426
Path ax
2527
[{

0 commit comments

Comments
 (0)