-
Notifications
You must be signed in to change notification settings - Fork 246
Add reproduction case for #1987 #2020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| - Add a test to reproduce [Locate command fails on multi-line type definitions](#1987) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the correct section of the changelog, since 5.6.1 was released recently we should use a new "unreleased" section.
voodoos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ! Just a few comments.
| > let f = Fun.id | ||
| > EOF | ||
|
|
||
| $ ocamlmerlin single locate -position 3:0 -prefix List.hd -look-for interface -filename test.ml < test.ml | jq .value | jq .pos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should always use $MERLIN instead of ocamlmerlin in tests (here and in your other PRs). It's a wrapper that perform a number of sanitization steps.
| -- FIXME : locate should also points to the list interface file | ||
| $ ocamlmerlin single locate -position 2:0 -prefix List.hd -look-for interface -filename test.ml < test.ml | jq .value | ||
| "Already at definition point" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I guess this is another example of the more generic issue: Merlin's environment before the end of the first structure item is Empty when it should be the initial env.
This is the most probable cause for that issue, you can add it to the test's comment.
This PR reproduces the buggy behaviour of #1987.