Skip to content

Commit a3cedc1

Browse files
committed
Analysis test output changes
1 parent e78c0b6 commit a3cedc1

11 files changed

+21
-151
lines changed

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": "event => event",
868+
"label": "mouse => mouse",
869869
"kind": 12,
870870
"tags": [],
871871
"detail": "ReactEvent.Mouse.t => unit",
872872
"documentation": null,
873873
"sortText": "A",
874-
"insertText": "${1:event} => ${0:event}",
874+
"insertText": "${1:mouse} => ${0:mouse}",
875875
"insertTextFormat": 2
876876
}]
877877

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

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,7 @@ ContextPath CArgument CArgument Value[reactEventFn]($0)($0)
250250
ContextPath CArgument Value[reactEventFn]($0)
251251
ContextPath Value[reactEventFn]
252252
Path reactEventFn
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-
}]
253+
[]
263254

264255
Complete src/CompletionInferValues.res 41:50
265256
posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:11->41:56]
@@ -275,17 +266,7 @@ Path event
275266
ContextPath CArgument CJsxPropValue [div] onMouseEnter($0)
276267
ContextPath CJsxPropValue [div] onMouseEnter
277268
Path ReactDOM.domProps
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-
}]
269+
[]
289270

290271
Complete src/CompletionInferValues.res 44:50
291272
posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:11->44:56]
@@ -832,22 +813,7 @@ ContextPath CArgument CArgument Value[fn2](~cb)($0)
832813
ContextPath CArgument Value[fn2](~cb)
833814
ContextPath Value[fn2]
834815
Path fn2
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-
}]
816+
[]
851817

852818
Complete src/CompletionInferValues.res 139:30
853819
posCursor:[139:30] posNoWhite:[139:29] Found expr:[139:3->139:33]
@@ -974,22 +940,7 @@ ContextPath CArgument CArgument Value[CompletionSupport2, makeRenderer](~render)
974940
ContextPath CArgument Value[CompletionSupport2, makeRenderer](~render)
975941
ContextPath Value[CompletionSupport2, makeRenderer]
976942
Path CompletionSupport2.makeRenderer
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-
}]
943+
[]
993944

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

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,8 @@ 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-
Path JsxDOM.domProps
633-
[{
634-
"label": "hidden",
635-
"kind": 4,
636-
"tags": [],
637-
"detail": "bool",
638-
"documentation": null
639-
}]
632+
[completing-lowercase-jsx] could not find element props to complete from.
633+
[]
640634

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

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

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -223,20 +223,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
223223
Resolved opens 1 Stdlib
224224
ContextPath CJsxPropValue [div] muted
225225
Path ReactDOM.domProps
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-
}]
226+
[]
240227

241228
Complete src/CompletionJsxProps.res 18:29
242229
posCursor:[18:29] posNoWhite:[18:28] Found expr:[18:11->18:32]
@@ -246,17 +233,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
246233
Resolved opens 1 Stdlib
247234
ContextPath CJsxPropValue [div] onMouseEnter
248235
Path ReactDOM.domProps
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-
}]
236+
[]
260237

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

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

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,7 @@ Path support
470470
CPPipe pathFromEnv:CompletionSupport.Nested found:false
471471
Path CompletionSupport.Nested.root
472472
Path root
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-
}]
473+
[]
483474

484475
Complete src/CompletionPipeChain.res 88:16
485476
posCursor:[88:16] posNoWhite:[88:15] Found expr:[76:15->93:1]
@@ -496,16 +487,7 @@ Resolved opens 1 Stdlib
496487
ContextPath Value[root]->ren
497488
ContextPath Value[root]
498489
Path root
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-
}]
490+
[]
509491

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

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ 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-
Path JsxDOM.domProps
12-
[{
13-
"label": "dangerouslySetInnerHTML",
14-
"kind": 4,
15-
"tags": [],
16-
"detail": "{\"__html\": string}",
17-
"documentation": null
18-
}]
11+
[completing-lowercase-jsx] could not find element props to complete from.
12+
[]
1913

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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 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 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"}}
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"}}
33

44
Hover src/Fragment.res 9:56
55
{"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"}}

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\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"}}
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"}}
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: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
356356
Resolved opens 1 Stdlib
357357
ContextPath Type[React, e]
358358
Path React.e
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-
}]
359+
[]
366360

367361
Complete src/Jsx2.res 96:20
368362
posCursor:[96:20] posNoWhite:[96:19] Found pattern:[96:7->99:6]
@@ -472,17 +466,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
472466
Resolved opens 1 Stdlib
473467
ContextPath CJsxPropValue [div] x
474468
Path ReactDOM.domProps
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-
}]
469+
[]
486470

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

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

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
1212
Resolved opens 1 Stdlib
1313
ContextPath Type[React, e]
1414
Path React.e
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-
}]
15+
[]
2216

2317
Complete src/Jsx2.resi 10:18
2418
posCursor:[10:18] posNoWhite:[10:17] Found type:[10:11->10:18]
@@ -28,11 +22,5 @@ Package opens Stdlib.place holder Pervasives.JsxModules.place holder
2822
Resolved opens 1 Stdlib
2923
ContextPath Type[React, e]
3024
Path React.e
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-
}]
25+
[]
3826

0 commit comments

Comments
 (0)