Skip to content

Conversation

@Lucccyo
Copy link
Contributor

@Lucccyo Lucccyo commented Jan 2, 2026

This PR reproduces the buggy behaviour of #1987.

Comment on lines +19 to +20
- Add a test to reproduce [Locate command fails on multi-line type definitions](#1987)

Copy link
Collaborator

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.

Copy link
Collaborator

@voodoos voodoos left a 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
Copy link
Collaborator

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.

Comment on lines +13 to +15
-- 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"
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants