Skip to content

Commit ec22484

Browse files
aspeddrozth
authored andcommitted
remove location field
1 parent a3affc8 commit ec22484

File tree

4 files changed

+2
-102
lines changed

4 files changed

+2
-102
lines changed

analysis/src/DocExtraction.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ let rec stringifyDocItem ?(indentation = 0) ~originalEnv (item : docItem) =
150150
match deprecated with
151151
| Some msg -> Some (wrapInQuotes msg)
152152
| None -> None );
153-
("location", Some (stringifyLoc loc ~indentation));
153+
(* ("location", Some (stringifyLoc loc ~indentation)); *)
154154
( "signature",
155155
Some (signature |> String.trim |> Json.escape |> wrapInQuotes) );
156156
("docstrings", Some (stringifyDocstrings docstring));
@@ -166,7 +166,7 @@ let rec stringifyDocItem ?(indentation = 0) ~originalEnv (item : docItem) =
166166
match deprecated with
167167
| Some msg -> Some (wrapInQuotes msg)
168168
| None -> None );
169-
("location", Some (stringifyLoc loc ~indentation));
169+
(* ("location", Some (stringifyLoc loc ~indentation)); *)
170170
("signature", Some (signature |> Json.escape |> wrapInQuotes));
171171
("docstrings", Some (stringifyDocstrings docstring));
172172
( "detail",

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ preferring found resi file for impl: src/DocExtraction2.resi
1212
"kind": "type",
1313
"name": "t",
1414
"deprecated": false,
15-
"location": {
16-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
17-
"line": 4,
18-
"col": 1
19-
},
2015
"signature": "type t",
2116
"docstrings": ["Type t is pretty cool."]
2217
},
@@ -25,11 +20,6 @@ preferring found resi file for impl: src/DocExtraction2.resi
2520
"kind": "value",
2621
"name": "make",
2722
"deprecated": false,
28-
"location": {
29-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
30-
"line": 7,
31-
"col": 5
32-
},
3323
"signature": "let make: unit => t",
3424
"docstrings": ["Makerz of stuffz."]
3525
},
@@ -47,11 +37,6 @@ preferring found resi file for impl: src/DocExtraction2.resi
4737
"kind": "type",
4838
"name": "t",
4939
"deprecated": false,
50-
"location": {
51-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
52-
"line": 13,
53-
"col": 3
54-
},
5540
"signature": "type t",
5641
"docstrings": ["This type is also t."]
5742
},
@@ -60,11 +45,6 @@ preferring found resi file for impl: src/DocExtraction2.resi
6045
"kind": "value",
6146
"name": "make",
6247
"deprecated": false,
63-
"location": {
64-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
65-
"line": 15,
66-
"col": 3
67-
},
6848
"signature": "let make: unit => t",
6949
"docstrings": ["Maker of tea."]
7050
}]

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ extracting docs for src/DocExtraction2.resi
1111
"kind": "type",
1212
"name": "t",
1313
"deprecated": false,
14-
"location": {
15-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
16-
"line": 4,
17-
"col": 1
18-
},
1914
"signature": "type t",
2015
"docstrings": ["Type t is pretty cool."]
2116
},
@@ -24,11 +19,6 @@ extracting docs for src/DocExtraction2.resi
2419
"kind": "value",
2520
"name": "make",
2621
"deprecated": false,
27-
"location": {
28-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
29-
"line": 7,
30-
"col": 5
31-
},
3222
"signature": "let make: unit => t",
3323
"docstrings": ["Makerz of stuffz."]
3424
},
@@ -46,11 +36,6 @@ extracting docs for src/DocExtraction2.resi
4636
"kind": "type",
4737
"name": "t",
4838
"deprecated": false,
49-
"location": {
50-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
51-
"line": 13,
52-
"col": 3
53-
},
5439
"signature": "type t",
5540
"docstrings": ["This type is also t."]
5641
},
@@ -59,11 +44,6 @@ extracting docs for src/DocExtraction2.resi
5944
"kind": "value",
6045
"name": "make",
6146
"deprecated": false,
62-
"location": {
63-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtraction2.resi",
64-
"line": 15,
65-
"col": 3
66-
},
6747
"signature": "let make: unit => t",
6848
"docstrings": ["Maker of tea."]
6949
}]

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

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ extracting docs for src/DocExtractionRes.res
1111
"kind": "type",
1212
"name": "t",
1313
"deprecated": false,
14-
"location": {
15-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
16-
"line": 4,
17-
"col": 1
18-
},
1914
"signature": "type t = {name: string, online: bool}",
2015
"docstrings": ["This type represents stuff."],
2116
"detail":
@@ -41,11 +36,6 @@ extracting docs for src/DocExtractionRes.res
4136
"kind": "value",
4237
"name": "make",
4338
"deprecated": false,
44-
"location": {
45-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
46-
"line": 17,
47-
"col": 5
48-
},
4939
"signature": "let make: string => t",
5040
"docstrings": ["Create stuff.\n\n```rescript example\nlet stuff = make(\"My name\")\n```"]
5141
},
@@ -54,11 +44,6 @@ extracting docs for src/DocExtractionRes.res
5444
"kind": "value",
5545
"name": "asOffline",
5646
"deprecated": false,
57-
"location": {
58-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
59-
"line": 23,
60-
"col": 5
61-
},
6247
"signature": "let asOffline: t => t",
6348
"docstrings": ["Stuff goes offline."]
6449
},
@@ -76,11 +61,6 @@ extracting docs for src/DocExtractionRes.res
7661
"kind": "type",
7762
"name": "status",
7863
"deprecated": false,
79-
"location": {
80-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
81-
"line": 27,
82-
"col": 3
83-
},
8464
"signature": "type status = Started(t) | Stopped | Idle",
8565
"docstrings": [],
8666
"detail":
@@ -112,11 +92,6 @@ extracting docs for src/DocExtractionRes.res
11292
"kind": "type",
11393
"name": "validInputs",
11494
"deprecated": false,
115-
"location": {
116-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
117-
"line": 31,
118-
"col": 3
119-
},
12095
"signature": "type validInputs = [\\n | #\\\"needs-escaping\\\"\\n | #something\\n | #status(status)\\n | #withPayload(int)\\n]",
12196
"docstrings": ["These are all the valid inputs."]
12297
},
@@ -125,11 +100,6 @@ extracting docs for src/DocExtractionRes.res
125100
"kind": "type",
126101
"name": "callback",
127102
"deprecated": false,
128-
"location": {
129-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
130-
"line": 33,
131-
"col": 3
132-
},
133103
"signature": "type callback = (t, ~status: status) => unit",
134104
"docstrings": []
135105
}]
@@ -155,11 +125,6 @@ extracting docs for src/DocExtractionRes.res
155125
"kind": "type",
156126
"name": "callback",
157127
"deprecated": false,
158-
"location": {
159-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
160-
"line": 44,
161-
"col": 3
162-
},
163128
"signature": "type callback = SomeInnerModule.status => unit",
164129
"docstrings": ["Testing what this looks like."]
165130
},
@@ -168,11 +133,6 @@ extracting docs for src/DocExtractionRes.res
168133
"kind": "value",
169134
"name": "isGoodStatus",
170135
"deprecated": false,
171-
"location": {
172-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
173-
"line": 46,
174-
"col": 7
175-
},
176136
"signature": "let isGoodStatus: SomeInnerModule.status => bool",
177137
"docstrings": []
178138
},
@@ -181,11 +141,6 @@ extracting docs for src/DocExtractionRes.res
181141
"kind": "type",
182142
"name": "someVariantWithInlineRecords",
183143
"deprecated": false,
184-
"location": {
185-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
186-
"line": 49,
187-
"col": 3
188-
},
189144
"signature": "type someVariantWithInlineRecords = SomeStuff({offline: bool})",
190145
"docstrings": ["Trying how it looks with an inline record in a variant."],
191146
"detail":
@@ -205,11 +160,6 @@ extracting docs for src/DocExtractionRes.res
205160
"kind": "type",
206161
"name": "domRoot",
207162
"deprecated": false,
208-
"location": {
209-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
210-
"line": 54,
211-
"col": 3
212-
},
213163
"signature": "type domRoot = unit => ReactDOM.Client.Root.t",
214164
"docstrings": ["Callback to get the DOM root..."]
215165
}]
@@ -229,11 +179,6 @@ extracting docs for src/DocExtractionRes.res
229179
"kind": "type",
230180
"name": "t",
231181
"deprecated": false,
232-
"location": {
233-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
234-
"line": 61,
235-
"col": 3
236-
},
237182
"signature": "type t",
238183
"docstrings": ["The type t is stuff."]
239184
},
@@ -242,11 +187,6 @@ extracting docs for src/DocExtractionRes.res
242187
"kind": "value",
243188
"name": "make",
244189
"deprecated": false,
245-
"location": {
246-
"path": "/home/pedro/Desktop/projects/rescript-vscode/analysis/tests/src/DocExtractionRes.res",
247-
"line": 63,
248-
"col": 3
249-
},
250190
"signature": "let make: unit => t",
251191
"docstrings": ["The maker of stuff!"]
252192
}]

0 commit comments

Comments
 (0)