Skip to content

Commit 4569093

Browse files
committed
Analysis test outputs changed again
1 parent 630fde2 commit 4569093

13 files changed

+192
-22
lines changed

tests/analysis_tests/tests/src/expected/Completion.res.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,6 +1967,26 @@ Path Res
19671967
"tags": [],
19681968
"detail": "module Result",
19691969
"documentation": null
1970+
}, {
1971+
"label": "RescriptReactErrorBoundary",
1972+
"kind": 9,
1973+
"tags": [],
1974+
"detail": "module RescriptReactErrorBoundary",
1975+
"documentation": null,
1976+
"data": {
1977+
"modulePath": "RescriptReactErrorBoundary",
1978+
"filePath": "src/Completion.res"
1979+
}
1980+
}, {
1981+
"label": "RescriptReactRouter",
1982+
"kind": 9,
1983+
"tags": [],
1984+
"detail": "module RescriptReactRouter",
1985+
"documentation": null,
1986+
"data": {
1987+
"modulePath": "RescriptReactRouter",
1988+
"filePath": "src/Completion.res"
1989+
}
19701990
}, {
19711991
"label": "RescriptTools",
19721992
"kind": 9,

tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,13 @@ ContextPath CArgument Value[fnTakingCallback]($2)
865865
ContextPath Value[fnTakingCallback]
866866
Path fnTakingCallback
867867
[{
868-
"label": "mouse => mouse",
868+
"label": "event => event",
869869
"kind": 12,
870870
"tags": [],
871871
"detail": "ReactEvent.Mouse.t => unit",
872872
"documentation": null,
873873
"sortText": "A",
874-
"insertText": "${1:mouse} => ${0:mouse}",
874+
"insertText": "${1:event} => ${0:event}",
875875
"insertTextFormat": 2
876876
}]
877877

tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,16 @@ ContextPath CArgument CArgument Value[reactEventFn]($0)($0)
250250
ContextPath CArgument Value[reactEventFn]($0)
251251
ContextPath Value[reactEventFn]
252252
Path reactEventFn
253-
[]
253+
CPPipe pathFromEnv:ReactEvent.Mouse found:false
254+
Path ReactEvent.Mouse.pr
255+
Path pr
256+
[{
257+
"label": "ReactEvent.Mouse.preventDefault",
258+
"kind": 12,
259+
"tags": [],
260+
"detail": "t => unit",
261+
"documentation": null
262+
}]
254263

255264
Complete src/CompletionInferValues.res 41:50
256265
posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:11->41:56]
@@ -266,7 +275,17 @@ Path event
266275
ContextPath CArgument CJsxPropValue [div] onMouseEnter($0)
267276
ContextPath CJsxPropValue [div] onMouseEnter
268277
Path ReactDOM.domProps
269-
[]
278+
Path JsxDOM.domProps
279+
CPPipe pathFromEnv:JsxEvent.Mouse found:false
280+
Path JsxEvent.Mouse.pr
281+
Path pr
282+
[{
283+
"label": "JsxEvent.Mouse.preventDefault",
284+
"kind": 12,
285+
"tags": [],
286+
"detail": "t => unit",
287+
"documentation": null
288+
}]
270289

271290
Complete src/CompletionInferValues.res 44:50
272291
posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:11->44:56]
@@ -813,7 +832,22 @@ ContextPath CArgument CArgument Value[fn2](~cb)($0)
813832
ContextPath CArgument Value[fn2](~cb)
814833
ContextPath Value[fn2]
815834
Path fn2
816-
[]
835+
CPPipe pathFromEnv:ReactDOM.Client.Root found:false
836+
Path ReactDOM.Client.Root.
837+
Path
838+
[{
839+
"label": "ReactDOM.Client.Root.unmount",
840+
"kind": 12,
841+
"tags": [],
842+
"detail": "(t, unit) => unit",
843+
"documentation": null
844+
}, {
845+
"label": "ReactDOM.Client.Root.render",
846+
"kind": 12,
847+
"tags": [],
848+
"detail": "(t, React.element) => unit",
849+
"documentation": null
850+
}]
817851

818852
Complete src/CompletionInferValues.res 139:30
819853
posCursor:[139:30] posNoWhite:[139:29] Found expr:[139:3->139:33]
@@ -940,7 +974,22 @@ ContextPath CArgument CArgument Value[CompletionSupport2, makeRenderer](~render)
940974
ContextPath CArgument Value[CompletionSupport2, makeRenderer](~render)
941975
ContextPath Value[CompletionSupport2, makeRenderer]
942976
Path CompletionSupport2.makeRenderer
943-
[]
977+
CPPipe pathFromEnv:ReactDOM.Client.Root found:false
978+
Path ReactDOM.Client.Root.
979+
Path
980+
[{
981+
"label": "ReactDOM.Client.Root.unmount",
982+
"kind": 12,
983+
"tags": [],
984+
"detail": "(t, unit) => unit",
985+
"documentation": null
986+
}, {
987+
"label": "ReactDOM.Client.Root.render",
988+
"kind": 12,
989+
"tags": [],
990+
"detail": "(t, React.element) => unit",
991+
"documentation": null
992+
}]
944993

945994
Hover src/CompletionInferValues.res 160:27
946995
Nothing at that position. Now trying to use completion.

tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,14 @@ Completable: Cjsx([h1], hidd, [hidd])
629629
Package opens Stdlib.place holder Pervasives.JsxModules.place holder
630630
Resolved opens 1 Stdlib
631631
Path ReactDOM.domProps
632-
[completing-lowercase-jsx] could not find element props to complete from.
633-
[]
632+
Path JsxDOM.domProps
633+
[{
634+
"label": "hidden",
635+
"kind": 4,
636+
"tags": [],
637+
"detail": "bool",
638+
"documentation": null
639+
}]
634640

635641
Complete src/CompletionJsx.res 61:30
636642
posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:3->61:29]

tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,20 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
223223
Resolved opens 1 Stdlib
224224
ContextPath CJsxPropValue [div] muted
225225
Path ReactDOM.domProps
226-
[]
226+
Path JsxDOM.domProps
227+
[{
228+
"label": "true",
229+
"kind": 4,
230+
"tags": [],
231+
"detail": "bool",
232+
"documentation": null
233+
}, {
234+
"label": "false",
235+
"kind": 4,
236+
"tags": [],
237+
"detail": "bool",
238+
"documentation": null
239+
}]
227240

228241
Complete src/CompletionJsxProps.res 18:29
229242
posCursor:[18:29] posNoWhite:[18:28] Found expr:[18:11->18:32]
@@ -233,7 +246,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
233246
Resolved opens 1 Stdlib
234247
ContextPath CJsxPropValue [div] onMouseEnter
235248
Path ReactDOM.domProps
236-
[]
249+
Path JsxDOM.domProps
250+
[{
251+
"label": "event => event",
252+
"kind": 12,
253+
"tags": [],
254+
"detail": "JsxEvent.Mouse.t => unit",
255+
"documentation": null,
256+
"sortText": "A",
257+
"insertText": "{${1:event} => ${0:event}}",
258+
"insertTextFormat": 2
259+
}]
237260

238261
Complete src/CompletionJsxProps.res 22:52
239262
posCursor:[22:52] posNoWhite:[22:51] Found expr:[22:11->22:52]

tests/analysis_tests/tests/src/expected/CompletionPipeChain.res.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,16 @@ Path support
470470
CPPipe pathFromEnv:CompletionSupport.Nested found:false
471471
Path CompletionSupport.Nested.root
472472
Path root
473-
[]
473+
CPPipe pathFromEnv:ReactDOM.Client.Root found:false
474+
Path ReactDOM.Client.Root.ren
475+
Path ren
476+
[{
477+
"label": "ReactDOM.Client.Root.render",
478+
"kind": 12,
479+
"tags": [],
480+
"detail": "(t, React.element) => unit",
481+
"documentation": null
482+
}]
474483

475484
Complete src/CompletionPipeChain.res 88:16
476485
posCursor:[88:16] posNoWhite:[88:15] Found expr:[76:15->93:1]
@@ -487,7 +496,16 @@ Resolved opens 1 Stdlib
487496
ContextPath Value[root]->ren
488497
ContextPath Value[root]
489498
Path root
490-
[]
499+
CPPipe pathFromEnv:ReactDOM.Client.Root found:false
500+
Path ReactDOM.Client.Root.ren
501+
Path ren
502+
[{
503+
"label": "ReactDOM.Client.Root.render",
504+
"kind": 12,
505+
"tags": [],
506+
"detail": "(t, React.element) => unit",
507+
"documentation": null
508+
}]
491509

492510
Complete src/CompletionPipeChain.res 95:20
493511
posCursor:[95:20] posNoWhite:[95:19] Found expr:[95:3->95:21]

tests/analysis_tests/tests/src/expected/Div.res.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Completable: Cjsx([div], dangerous, [dangerous])
88
Package opens Stdlib.place holder Pervasives.JsxModules.place holder
99
Resolved opens 1 Stdlib
1010
Path ReactDOM.domProps
11-
[completing-lowercase-jsx] could not find element props to complete from.
12-
[]
11+
Path JsxDOM.domProps
12+
[{
13+
"label": "dangerouslySetInnerHTML",
14+
"kind": 4,
15+
"tags": [],
16+
"detail": "{\"__html\": string}",
17+
"documentation": null
18+
}]
1319

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Hover src/Fragment.res 6:19
2-
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<SectionHeader.props<React.element>>\n```\n\n---\n\n```\n \n```\n```rescript\ntype SectionHeader.props<'children> = {children: 'children}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Fragment.res%22%2C1%2C2%5D)\n"}}
2+
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<SectionHeader.props<React.element>>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype SectionHeader.props<'children> = {children: 'children}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Fragment.res%22%2C1%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}}
33

44
Hover src/Fragment.res 9:56
5-
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<React.fragmentProps>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C12%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.fragmentProps = {children?: element}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C41%2C0%5D)\n"}}
5+
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<React.fragmentProps>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.fragmentProps = {children?: element}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C42%2C0%5D)\n"}}
66

tests/analysis_tests/tests/src/expected/Hover.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Path
253253
}]
254254

255255
Hover src/Hover.res 197:4
256-
{"contents": {"kind": "markdown", "value": "```rescript\nCompV4.props<int, string> => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n"}}
256+
{"contents": {"kind": "markdown", "value": "```rescript\nCompV4.props<int, string> => React.element\n```\n\n---\n\n```\n \n```\n```rescript\ntype CompV4.props<'n, 's> = {n?: 'n, s: 's}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C190%2C2%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype React.element = Jsx.element\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C0%2C0%5D)\n"}}
257257

258258
Hover src/Hover.res 202:16
259259
{"contents": {"kind": "markdown", "value": "```rescript\nuseR\n```\n\n---\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list<option<r<float>>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n"}}

tests/analysis_tests/tests/src/expected/Jsx2.res.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,13 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
356356
Resolved opens 1 Stdlib
357357
ContextPath Type[React, e]
358358
Path React.e
359-
[]
359+
[{
360+
"label": "element",
361+
"kind": 22,
362+
"tags": [],
363+
"detail": "type element",
364+
"documentation": {"kind": "markdown", "value": "```rescript\ntype element = Jsx.element\n```"}
365+
}]
360366

361367
Complete src/Jsx2.res 96:20
362368
posCursor:[96:20] posNoWhite:[96:19] Found pattern:[96:7->99:6]
@@ -466,7 +472,17 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
466472
Resolved opens 1 Stdlib
467473
ContextPath CJsxPropValue [div] x
468474
Path ReactDOM.domProps
469-
[]
475+
Path JsxDOM.domProps
476+
[{
477+
"label": "\"\"",
478+
"kind": 12,
479+
"tags": [],
480+
"detail": "string",
481+
"documentation": null,
482+
"sortText": "A",
483+
"insertText": "{\"$0\"}",
484+
"insertTextFormat": 2
485+
}]
470486

471487
Complete src/Jsx2.res 150:21
472488
posCursor:[150:21] posNoWhite:[150:20] Found expr:[150:11->150:32]

tests/analysis_tests/tests/src/expected/Jsx2.resi.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
1212
Resolved opens 1 Stdlib
1313
ContextPath Type[React, e]
1414
Path React.e
15-
[]
15+
[{
16+
"label": "element",
17+
"kind": 22,
18+
"tags": [],
19+
"detail": "type element",
20+
"documentation": {"kind": "markdown", "value": "```rescript\ntype element = Jsx.element\n```"}
21+
}]
1622

1723
Complete src/Jsx2.resi 10:18
1824
posCursor:[10:18] posNoWhite:[10:17] Found type:[10:11->10:18]
@@ -22,5 +28,11 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
2228
Resolved opens 1 Stdlib
2329
ContextPath Type[React, e]
2430
Path React.e
25-
[]
31+
[{
32+
"label": "element",
33+
"kind": 22,
34+
"tags": [],
35+
"detail": "type element",
36+
"documentation": {"kind": "markdown", "value": "```rescript\ntype element = Jsx.element\n```"}
37+
}]
2638

tests/analysis_tests/tests/src/expected/JsxV4.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Path M4.make
1717
}]
1818

1919
Hover src/JsxV4.res 14:9
20-
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<M4.props<string, string, string>>\n```\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n\n---\n Doc Comment For M4 "}}
20+
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<M4.props<string, string, string>>\n```\n\n---\n\n```\n \n```\n```rescript\ntype React.component<'props> = Jsx.component<'props>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22React.res%22%2C13%2C0%5D)\n\n\n---\n\n```\n \n```\n```rescript\ntype M4.props<'first, 'fun, 'second> = {\n first: 'first,\n fun?: 'fun,\n second?: 'second,\n}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22JsxV4.res%22%2C3%2C2%5D)\n\n---\n Doc Comment For M4 "}}
2121

2222
Create Interface src/JsxV4.res
2323
module M4: {

tests/analysis_tests/tests/src/expected/RecoveryOnProp.res.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,26 @@ Path Res
2121
"tags": [],
2222
"detail": "module Result",
2323
"documentation": null
24+
}, {
25+
"label": "RescriptReactErrorBoundary",
26+
"kind": 9,
27+
"tags": [],
28+
"detail": "module RescriptReactErrorBoundary",
29+
"documentation": null,
30+
"data": {
31+
"modulePath": "RescriptReactErrorBoundary",
32+
"filePath": "src/RecoveryOnProp.res"
33+
}
34+
}, {
35+
"label": "RescriptReactRouter",
36+
"kind": 9,
37+
"tags": [],
38+
"detail": "module RescriptReactRouter",
39+
"documentation": null,
40+
"data": {
41+
"modulePath": "RescriptReactRouter",
42+
"filePath": "src/RecoveryOnProp.res"
43+
}
2444
}, {
2545
"label": "RescriptTools",
2646
"kind": 9,

0 commit comments

Comments
 (0)