-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore hidden branches when listing occurrences (#1677)
from voodoos/issue1671-occurrences-hidden-nodes
- Loading branch information
Showing
9 changed files
with
98 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
$ cat >dune-project <<EOF | ||
> (lang dune 2.0) | ||
> EOF | ||
|
||
$ cat >main.ml <<EOF | ||
> let f x = | ||
> [%string | ||
> "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ | ||
> %{x}"] | ||
> ;; | ||
> print_endline @@ f "42";; | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> (executable | ||
> (name main) | ||
> (preprocess (pps ppx_string))) | ||
> EOF | ||
|
||
$ dune build @check | ||
|
||
$ dune exec ./main.exe | ||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 42 | ||
|
||
FIX upstream: locs issued by the ppx does not enable Merlin to work as expected | ||
$ $MERLIN single type-enclosing -position 3:7 \ | ||
> -filename main.ml <main.ml | ||
{ | ||
"class": "return", | ||
"value": [ | ||
{ | ||
"start": { | ||
"line": 1, | ||
"col": 6 | ||
}, | ||
"end": { | ||
"line": 3, | ||
"col": 97 | ||
}, | ||
"type": "string -> string", | ||
"tail": "no" | ||
} | ||
], | ||
"notifications": [] | ||
} | ||
|
||
Merlin should ignore hidden nodes in occurrences results | ||
$ $MERLIN single occurrences -identifier-at 1:6 \ | ||
> -filename main.ml <main.ml | ||
{ | ||
"class": "return", | ||
"value": [ | ||
{ | ||
"start": { | ||
"line": 1, | ||
"col": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"col": 7 | ||
} | ||
} | ||
], | ||
"notifications": [] | ||
} |