ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.59k stars 233 forks source link

C-c C-l fails for some reason #1548

Open mimoo opened 1 year ago

mimoo commented 1 year ago

Hello hello,

I'm getting the following bottom buffer (that looks like it might be an error?) on emacs when trying to jump to definition:

Screenshot 2022-12-21 at 11 06 04 AM

(the offending code)

I've been trying to use emacs since vscode doesn't really work for me (see https://github.com/ocamllabs/vscode-ocaml-platform/issues/1020), but it looks like I'm getting the same kind of jump to definition errors with emacs.

voodoos commented 1 year ago

That is unfortunate indeed. I will try to reproduce on my side.

Meanwhile, could you try to get the complete error log after enabing M-x merlin-enable-debug ? Also a minimal reproduction would be great, but that might be difficult to get.

voodoos commented 1 year ago

I have not been able to reproduce so far: on either vscode of emacs it does jump do the declaration of the value (which is not what we are looking for but still better than the crash you witness).

mimoo commented 1 year ago

do you know what I should do after M-x merlin-enable-debug? I get the same temporary buffer at the bottom when I do that.

mimoo commented 1 year ago

OK I found a *merlin-log* buffer that had the info. Looks like a stack overflow: https://controlc.com/aa924e03

voodoos commented 1 year ago

Thank you. I don't have a file called src/lib/transaction_snark/test/zkapps_examples/thing/thing.ml so I cannot try to reproduce this specific SO.

voodoos commented 1 year ago

Just a blind guess: could you try to explicitely add the mina_wire_types library to the dune file of the concerned lib/executable, then rebuild and retry the query ?

mimoo commented 1 year ago

oh the file is the same as https://github.com/MinaProtocol/mina/blob/develop/src/lib/transaction_snark/test/zkapps_examples/empty_update/empty_update.ml#L31

I tried again today and now it works, not sure what happened in between :|