Skip to content

Commit 459d60b

Browse files
zthcknitt
authored andcommitted
commit OK changes to analysis output
1 parent e242851 commit 459d60b

12 files changed

+118
-58
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Hover src/Auto.res 2:13
2-
{"contents": {"kind": "markdown", "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```"}}
2+
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, List.t<'a>) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22List.res%22%2C34%2C0%5D)\n"}}
33

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

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,16 @@ Path someFnTakingVariant
174174
"modulePath": "Obj",
175175
"filePath": "src/CompletionFunctionArguments.res"
176176
}
177+
}, {
178+
"label": "Object",
179+
"kind": 9,
180+
"tags": [],
181+
"detail": "module Object",
182+
"documentation": null,
183+
"data": {
184+
"modulePath": "Object",
185+
"filePath": "src/CompletionFunctionArguments.res"
186+
}
177187
}, {
178188
"label": "Objects",
179189
"kind": 9,
@@ -184,6 +194,26 @@ Path someFnTakingVariant
184194
"modulePath": "Objects",
185195
"filePath": "src/CompletionFunctionArguments.res"
186196
}
197+
}, {
198+
"label": "Option",
199+
"kind": 9,
200+
"tags": [],
201+
"detail": "module Option",
202+
"documentation": null,
203+
"data": {
204+
"modulePath": "Option",
205+
"filePath": "src/CompletionFunctionArguments.res"
206+
}
207+
}, {
208+
"label": "Ordering",
209+
"kind": 9,
210+
"tags": [],
211+
"detail": "module Ordering",
212+
"documentation": null,
213+
"data": {
214+
"modulePath": "Ordering",
215+
"filePath": "src/CompletionFunctionArguments.res"
216+
}
187217
}]
188218

189219
Complete src/CompletionFunctionArguments.res 57:33
@@ -200,19 +230,8 @@ Path someFnTakingVariant
200230
"tags": [],
201231
"detail": "someVariant",
202232
"documentation": {"kind": "markdown", "value": "```rescript\ntype someVariant = One | Two | Three(int, string)\n```"},
203-
"sortText": "A Some(_)",
204233
"insertText": "Some($0)",
205234
"insertTextFormat": 2
206-
}, {
207-
"label": "Sort",
208-
"kind": 9,
209-
"tags": [],
210-
"detail": "module Sort",
211-
"documentation": null,
212-
"data": {
213-
"modulePath": "Sort",
214-
"filePath": "src/CompletionFunctionArguments.res"
215-
}
216235
}]
217236

218237
Complete src/CompletionFunctionArguments.res 60:44
@@ -248,6 +267,16 @@ Path someFnTakingVariant
248267
"modulePath": "Obj",
249268
"filePath": "src/CompletionFunctionArguments.res"
250269
}
270+
}, {
271+
"label": "Object",
272+
"kind": 9,
273+
"tags": [],
274+
"detail": "module Object",
275+
"documentation": null,
276+
"data": {
277+
"modulePath": "Object",
278+
"filePath": "src/CompletionFunctionArguments.res"
279+
}
251280
}, {
252281
"label": "Objects",
253282
"kind": 9,
@@ -258,6 +287,26 @@ Path someFnTakingVariant
258287
"modulePath": "Objects",
259288
"filePath": "src/CompletionFunctionArguments.res"
260289
}
290+
}, {
291+
"label": "Option",
292+
"kind": 9,
293+
"tags": [],
294+
"detail": "module Option",
295+
"documentation": null,
296+
"data": {
297+
"modulePath": "Option",
298+
"filePath": "src/CompletionFunctionArguments.res"
299+
}
300+
}, {
301+
"label": "Ordering",
302+
"kind": 9,
303+
"tags": [],
304+
"detail": "module Ordering",
305+
"documentation": null,
306+
"data": {
307+
"modulePath": "Ordering",
308+
"filePath": "src/CompletionFunctionArguments.res"
309+
}
261310
}]
262311

263312
Complete src/CompletionFunctionArguments.res 63:23

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ Path someVariant
8484
"modulePath": "Obj",
8585
"filePath": "src/CompletionTypeAnnotation.res"
8686
}
87+
}, {
88+
"label": "Object",
89+
"kind": 9,
90+
"tags": [],
91+
"detail": "module Object",
92+
"documentation": null,
93+
"data": {
94+
"modulePath": "Object",
95+
"filePath": "src/CompletionTypeAnnotation.res"
96+
}
8797
}, {
8898
"label": "Objects",
8999
"kind": 9,
@@ -94,6 +104,26 @@ Path someVariant
94104
"modulePath": "Objects",
95105
"filePath": "src/CompletionTypeAnnotation.res"
96106
}
107+
}, {
108+
"label": "Option",
109+
"kind": 9,
110+
"tags": [],
111+
"detail": "module Option",
112+
"documentation": null,
113+
"data": {
114+
"modulePath": "Option",
115+
"filePath": "src/CompletionTypeAnnotation.res"
116+
}
117+
}, {
118+
"label": "Ordering",
119+
"kind": 9,
120+
"tags": [],
121+
"detail": "module Ordering",
122+
"documentation": null,
123+
"data": {
124+
"modulePath": "Ordering",
125+
"filePath": "src/CompletionTypeAnnotation.res"
126+
}
97127
}]
98128

99129
Complete src/CompletionTypeAnnotation.res 21:27

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Definition src/Definition.res 10:23
55
{"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}}
66

77
Hover src/Definition.res 14:14
8-
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n---\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "}}
8+
{"contents": {"kind": "markdown", "value": "```rescript\n(List.t<'a>, 'a => 'b) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22List.res%22%2C34%2C0%5D)\n\n---\n\n`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) // list{3, 4}\n```\n"}}
99

1010
Hover src/Definition.res 18:14
11-
{"contents": {"kind": "markdown", "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```"}}
11+
{"contents": {"kind": "markdown", "value": "```rescript\n('a => 'b, List.t<'a>) => List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22List.res%22%2C34%2C0%5D)\n"}}
1212

1313
Hover src/Definition.res 23:3
1414
{"contents": {"kind": "markdown", "value": "```rescript\n(int, int) => int\n```"}}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DocumentSymbol src/DocumentSymbol.res
1414
"children": [
1515
{
1616
"name": "customDouble",
17-
"kind": 12,
17+
"kind": 13,
1818
"range": {"start": {"line": 6, "character": 2}, "end": {"line": 6, "character": 35}},
1919
"selectionRange": {"start": {"line": 6, "character": 2}, "end": {"line": 6, "character": 35}}
2020
}]
@@ -27,13 +27,13 @@ DocumentSymbol src/DocumentSymbol.res
2727
"children": [
2828
{
2929
"name": "foo",
30-
"kind": 12,
30+
"kind": 13,
3131
"range": {"start": {"line": 10, "character": 2}, "end": {"line": 10, "character": 55}},
3232
"selectionRange": {"start": {"line": 10, "character": 2}, "end": {"line": 10, "character": 55}}
3333
},
3434
{
3535
"name": "next",
36-
"kind": 12,
36+
"kind": 13,
3737
"range": {"start": {"line": 11, "character": 2}, "end": {"line": 11, "character": 48}},
3838
"selectionRange": {"start": {"line": 11, "character": 2}, "end": {"line": 11, "character": 48}}
3939
}]
@@ -58,13 +58,13 @@ DocumentSymbol src/DocumentSymbol.res
5858
},
5959
{
6060
"name": "abc",
61-
"kind": 12,
61+
"kind": 13,
6262
"range": {"start": {"line": 18, "character": 2}, "end": {"line": 18, "character": 32}},
6363
"selectionRange": {"start": {"line": 18, "character": 2}, "end": {"line": 18, "character": 32}}
6464
},
6565
{
6666
"name": "abd",
67-
"kind": 12,
67+
"kind": 13,
6868
"range": {"start": {"line": 19, "character": 2}, "end": {"line": 19, "character": 32}},
6969
"selectionRange": {"start": {"line": 19, "character": 2}, "end": {"line": 19, "character": 32}}
7070
}]
@@ -89,7 +89,7 @@ DocumentSymbol src/DocumentSymbol.res
8989
"children": [
9090
{
9191
"name": "make",
92-
"kind": 12,
92+
"kind": 13,
9393
"range": {"start": {"line": 26, "character": 4}, "end": {"line": 27, "character": 98}},
9494
"selectionRange": {"start": {"line": 26, "character": 4}, "end": {"line": 27, "character": 98}}
9595
}]

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
Hover src/Fragment.res 6:19
2-
getLocItem #4: heuristic for </Comp> within fragments: take make as makeProps does not work
3-
the type is not great but jump to definition works
4-
{"contents": {"kind": "markdown", "value": "```rescript\nReact.component<{\"children\": Jsx.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"}}
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"}}
53

64
Hover src/Fragment.res 9:56
75
Nothing at that position. Now trying to use completion.

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,9 @@ Hover src/Hover.res 33:4
2222
{"contents": {"kind": "markdown", "value": "```rescript\nunit => int\n```\n---\nDoc comment for functionWithTypeAnnotation"}}
2323

2424
Hover src/Hover.res 37:13
25-
getLocItem #5: heuristic for JSX and compiler combined:
26-
~x becomes Props#x
27-
heuristic for: [Props, x], give loc of `x`
28-
n1:Props n2:name
2925
{"contents": {"kind": "markdown", "value": "```rescript\nstring\n```"}}
3026

3127
Hover src/Hover.res 42:15
32-
getLocItem #7: heuristic for JSX on type-annotated labeled (~arg:t):
33-
(~arg:t) becomes Props#arg
34-
Props has the location range of arg:t
35-
arg has the location range of arg
36-
heuristic for: [Props, arg], give loc of `arg`
37-
n1:Props n2:name
3828
{"contents": {"kind": "markdown", "value": "```rescript\nstring\n```"}}
3929

4030
Hover src/Hover.res 46:10

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
Definition src/Jsx2.res 5:9
2-
getLocItem #4: heuristic for </Comp> within fragments: take make as makeProps does not work
3-
the type is not great but jump to definition works
42
{"uri": "Jsx2.res", "range": {"start": {"line": 2, "character": 6}, "end": {"line": 2, "character": 10}}}
53

64
Complete src/Jsx2.res 8:15
@@ -56,13 +54,13 @@ Path M
5654
"filePath": "src/Jsx2.res"
5755
}
5856
}, {
59-
"label": "MapLabels",
57+
"label": "Math",
6058
"kind": 9,
6159
"tags": [],
62-
"detail": "module MapLabels",
60+
"detail": "module Math",
6361
"documentation": null,
6462
"data": {
65-
"modulePath": "MapLabels",
63+
"modulePath": "Math",
6664
"filePath": "src/Jsx2.res"
6765
}
6866
}, {
@@ -75,16 +73,6 @@ Path M
7573
"modulePath": "ModuleStuff",
7674
"filePath": "src/Jsx2.res"
7775
}
78-
}, {
79-
"label": "MoreLabels",
80-
"kind": 9,
81-
"tags": [],
82-
"detail": "module MoreLabels",
83-
"documentation": null,
84-
"data": {
85-
"modulePath": "MoreLabels",
86-
"filePath": "src/Jsx2.res"
87-
}
8876
}]
8977

9078
Complete src/Jsx2.res 22:19
@@ -256,8 +244,6 @@ Path M.make
256244
}]
257245

258246
Definition src/Jsx2.res 58:11
259-
getLocItem #4: heuristic for </Comp> within fragments: take make as makeProps does not work
260-
the type is not great but jump to definition works
261247
{"uri": "Component.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}}
262248

263249
Complete src/Jsx2.res 68:10

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
Hover src/Jsx2.resi 1:4
2-
getLocItem #1: heuristic for makeProps in interface files
3-
n1:componentLike n2:unit n3:string
4-
{"contents": {"kind": "markdown", "value": "```rescript\n(~first: string, ~key: string=?, unit) => {\"first\": string}\n```"}}
2+
{"contents": {"kind": "markdown", "value": "```rescript\nprops<string>\n```\n\n---\n\n```\n \n```\n```rescript\ntype props<'first> = {first: 'first}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Jsx2.resi%22%2C0%2C0%5D)\n"}}
53

64
Hover src/Jsx2.resi 4:4
75
{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}}

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Complete src/RecoveryOnProp.res 6:26
22
posCursor:[6:26] posNoWhite:[6:25] Found expr:[3:3->11:8]
33
JSX <div:[3:3->3:6] onClick[4:4->4:11]=...[4:13->0:-1]> _children:None
44
posCursor:[6:26] posNoWhite:[6:25] Found expr:[4:13->8:6]
5+
posCursor:[6:26] posNoWhite:[6:25] Found expr:[4:13->8:6]
56
posCursor:[6:26] posNoWhite:[6:25] Found expr:[5:6->8:5]
67
posCursor:[6:26] posNoWhite:[6:25] Found expr:[6:16->8:5]
78
posCursor:[6:26] posNoWhite:[6:25] Found pattern:[6:20->8:5]
@@ -34,5 +35,15 @@ Path Res
3435
"modulePath": "RescriptReactRouter",
3536
"filePath": "src/RecoveryOnProp.res"
3637
}
38+
}, {
39+
"label": "Result",
40+
"kind": 9,
41+
"tags": [],
42+
"detail": "module Result",
43+
"documentation": null,
44+
"data": {
45+
"modulePath": "Result",
46+
"filePath": "src/RecoveryOnProp.res"
47+
}
3748
}]
3849

0 commit comments

Comments
 (0)