Skip to content
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

merlin-locate 3.0.5 doesn't work with Base/Core/Async etc #781

Closed
yminsky opened this issue Feb 4, 2018 · 4 comments
Closed

merlin-locate 3.0.5 doesn't work with Base/Core/Async etc #781

yminsky opened this issue Feb 4, 2018 · 4 comments

Comments

@yminsky
Copy link

yminsky commented Feb 4, 2018

Cross-linking to this issue:

janestreet/base#36

Given that it's a problem that came up with 3.0.5, it seems like there's a decent chance that it's a Merlin side issue.

@hhugo
Copy link

hhugo commented Feb 8, 2018

The issue does not exist with 3.0.4 because reading the cmts was broken with 4.06.
Merlin was instead jumping to the interface.

Because merlin.3.0.5 can now read cmts, it tries to locate the implementation and fails
because the implementation is not installed. (see ocaml/dune#500)

@trefis
Copy link
Contributor

trefis commented Feb 8, 2018

More precisely: an exception is generated (and caught) when the .cmt doesn't match the version we know how to read. In which case we decide to use the location stored in the environment (there is one by default since 4.06.0, there wasn't any before), and that location always points to the interface, so we jump there.

Merlin should probably just report that the .cmt doesn't match the expected version.

@copy
Copy link
Contributor

copy commented Feb 19, 2018

A related issue, is the following fixable with the extra information available from cmt files?

Several source files in your path have the same name, and merlin doesn't know which is the right one: /home/fabian/.opam/4.06.0+flambda/lib/ocaml/queue.ml, /home/fabian/.opam/4.06.0+flambda/lib/core_kernel/queue.ml

Also, a MerlinLocateInterface command might be useful.

@trefis
Copy link
Contributor

trefis commented Feb 21, 2018

Also, a MerlinLocateInterface command might be useful.

You can define one, have a look at g:merlin_locate_preference.

@trefis trefis closed this as completed Oct 25, 2019
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

No branches or pull requests

4 participants