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

Go-to-definition (via LSP) fails in merlin sourcetree when symbols are from copied sources #1842

Open
ManasJayanth opened this issue Sep 27, 2024 · 2 comments
Labels

Comments

@ManasJayanth
Copy link

I used Emacs with Eglot with opam exec -- ocamllsp as the language server command.

In mpipeline.ml when I try to run go-to-definition on Pparse.apply_pp - it fails. If it run it on just Pparse it takes me to the compiler-libs instead of taking me to vendored/patched source files in src/ocaml/driver/pparse.ml

Pparse.apply_pp ~workdir
~filename:Mconfig.(config.query.filename)
~source ~pp:workval

additional information

$ opam exec -- ocamllsp --version
1.19.0
$ opam exec -- ocaml --version
The OCaml toplevel, version 5.2.0
@voodoos
Copy link
Collaborator

voodoos commented Sep 27, 2024

Thanks for your report, I was able to reproduce it.

@voodoos
Copy link
Collaborator

voodoos commented Oct 11, 2024

So it is due to the fact the the pparse module is copied via a Dune rules and Merlin doesn't use the added line directive to resolve the correct path. Copy directives support is very lacking right now.

@voodoos voodoos changed the title Go-to-definition (via LSP) fails in merlin sourcetree when symbols are from vendored sources Go-to-definition (via LSP) fails in merlin sourcetree when symbols are from copied sources Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants