Skip to content

Commit 3ad0d01

Browse files
authored
Install melange.5.0.0-52 in CI (#882)
* check only the visible hover type, not the entire tree * check only the visible hover type, not the entire tree in issue-429 * force melange.5.0.0-52 in devsetup * check only the visible hover type, not the entire tree in uppercase * check only the visible hover type, not the entire tree in uppercase, annotate errors * annotate regressions on keys.t * remove DUNE_CACHE_ROOT from blackbox-tests * make sure ppxlib.0.33.0 is used in reason-react-ppx for dev-setup * change with-dev-setup into with-test for melange * since ppxlib#530 -dparsetree doesn't print locations
1 parent 8553810 commit 3ad0d01

File tree

10 files changed

+341
-6741
lines changed

10 files changed

+341
-6741
lines changed

dune-project

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
(depends
3636
ocaml
3737
(melange
38-
(>= 3.0.0))
38+
(or
39+
(>= 3.0.0)
40+
(and
41+
(= 5.0.0-52)
42+
:with-test)))
3943
(reason-react-ppx
4044
(= :version))
4145
(reason

ppx/test/hover.t

Lines changed: 25 additions & 221 deletions
Original file line numberDiff line numberDiff line change
@@ -25,232 +25,36 @@ Test some locations in reason-react components, reproduces #840
2525

2626
Let's test hovering over parts of the component
2727

28-
`React.string`:
28+
`React.string`
2929

3030
$ ocamlmerlin single type-enclosing -position 3:25 -verbosity 0 \
31-
> -filename component.ml < component.ml | jq '.value'
32-
[
33-
{
34-
"start": {
35-
"line": 3,
36-
"col": 17
37-
},
38-
"end": {
39-
"line": 3,
40-
"col": 29
41-
},
42-
"type": "string -> React.element",
43-
"tail": "no"
31+
> -filename component.ml < component.ml | jq '.value[0]'
32+
{
33+
"start": {
34+
"line": 3,
35+
"col": 17
4436
},
45-
{
46-
"start": {
47-
"line": 3,
48-
"col": 17
49-
},
50-
"end": {
51-
"line": 3,
52-
"col": 33
53-
},
54-
"type": "React.element",
55-
"tail": "no"
37+
"end": {
38+
"line": 3,
39+
"col": 29
5640
},
57-
{
58-
"start": {
59-
"line": 2,
60-
"col": 2
61-
},
62-
"end": {
63-
"line": 4,
64-
"col": 15
65-
},
66-
"type": "React.element array",
67-
"tail": "no"
68-
},
69-
{
70-
"start": {
71-
"line": 2,
72-
"col": 2
73-
},
74-
"end": {
75-
"line": 4,
76-
"col": 15
77-
},
78-
"type": "React.element",
79-
"tail": "no"
80-
},
81-
{
82-
"start": {
83-
"line": 2,
84-
"col": 2
85-
},
86-
"end": {
87-
"line": 4,
88-
"col": 15
89-
},
90-
"type": "React.element option",
91-
"tail": "no"
92-
},
93-
{
94-
"start": {
95-
"line": 2,
96-
"col": 2
97-
},
98-
"end": {
99-
"line": 4,
100-
"col": 15
101-
},
102-
"type": "ReactDOM.domProps",
103-
"tail": "no"
104-
},
105-
{
106-
"start": {
107-
"line": 2,
108-
"col": 2
109-
},
110-
"end": {
111-
"line": 4,
112-
"col": 15
113-
},
114-
"type": "React.element",
115-
"tail": "no"
116-
},
117-
{
118-
"start": {
119-
"line": 1,
120-
"col": 32
121-
},
122-
"end": {
123-
"line": 4,
124-
"col": 15
125-
},
126-
"type": "bar:int -> React.element",
127-
"tail": "no"
128-
},
129-
{
130-
"start": {
131-
"line": 1,
132-
"col": 27
133-
},
134-
"end": {
135-
"line": 4,
136-
"col": 15
137-
},
138-
"type": "foo:string -> bar:int -> React.element",
139-
"tail": "no"
140-
}
141-
]
41+
"type": "string -> React.element",
42+
"tail": "no"
43+
}
14244

14345
The `foo` variable inside the component body
14446

14547
$ ocamlmerlin single type-enclosing -position 3:31 -verbosity 0 \
146-
> -filename component.ml < component.ml | jq '.value'
147-
[
148-
{
149-
"start": {
150-
"line": 3,
151-
"col": 30
152-
},
153-
"end": {
154-
"line": 3,
155-
"col": 33
156-
},
157-
"type": "string",
158-
"tail": "no"
159-
},
160-
{
161-
"start": {
162-
"line": 3,
163-
"col": 17
164-
},
165-
"end": {
166-
"line": 3,
167-
"col": 33
168-
},
169-
"type": "React.element",
170-
"tail": "no"
171-
},
172-
{
173-
"start": {
174-
"line": 2,
175-
"col": 2
176-
},
177-
"end": {
178-
"line": 4,
179-
"col": 15
180-
},
181-
"type": "React.element array",
182-
"tail": "no"
183-
},
184-
{
185-
"start": {
186-
"line": 2,
187-
"col": 2
188-
},
189-
"end": {
190-
"line": 4,
191-
"col": 15
192-
},
193-
"type": "React.element",
194-
"tail": "no"
195-
},
196-
{
197-
"start": {
198-
"line": 2,
199-
"col": 2
200-
},
201-
"end": {
202-
"line": 4,
203-
"col": 15
204-
},
205-
"type": "React.element option",
206-
"tail": "no"
207-
},
208-
{
209-
"start": {
210-
"line": 2,
211-
"col": 2
212-
},
213-
"end": {
214-
"line": 4,
215-
"col": 15
216-
},
217-
"type": "ReactDOM.domProps",
218-
"tail": "no"
219-
},
220-
{
221-
"start": {
222-
"line": 2,
223-
"col": 2
224-
},
225-
"end": {
226-
"line": 4,
227-
"col": 15
228-
},
229-
"type": "React.element",
230-
"tail": "no"
231-
},
232-
{
233-
"start": {
234-
"line": 1,
235-
"col": 32
236-
},
237-
"end": {
238-
"line": 4,
239-
"col": 15
240-
},
241-
"type": "bar:int -> React.element",
242-
"tail": "no"
243-
},
244-
{
245-
"start": {
246-
"line": 1,
247-
"col": 27
248-
},
249-
"end": {
250-
"line": 4,
251-
"col": 15
252-
},
253-
"type": "foo:string -> bar:int -> React.element",
254-
"tail": "no"
255-
}
256-
]
48+
> -filename component.ml < component.ml | jq '.value[0]'
49+
{
50+
"start": {
51+
"line": 3,
52+
"col": 30
53+
},
54+
"end": {
55+
"line": 3,
56+
"col": 33
57+
},
58+
"type": "string",
59+
"tail": "no"
60+
}

0 commit comments

Comments
 (0)