-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conflicting versions of merlin with the ocaml layer #6521
Comments
A solution would be for the OCaml layer to not try to install Merlin at all, the elisp package alone is useless if the OCaml side is not installed, and if it is installed, then it comes with the matching elisp code, which the layer knows how to find already, it only breaks now because a conflicting Merlin package is installed from ELPA too. |
On my machine,
PS: I am using develop, perhaps you can try and see if it still the case. |
Right now on my system the opam version comes first on my Is there a way to figure out which merlin is loaded right now just to be sure? |
I also see @tizoc You can try |
@NJBS it is 2.5.0 but the elisp code gets the version from the merlin command, the version is not part of the elisp code. Note that the problem has gone away after I forced an upgrade to the ELPA version of merlin (which was months old), so the way things are setup now on my machine I cannot reproduce the problem anymore, even if the ELPA version is loaded things will work because it is up to date. |
Ah, I see. If it's first in your |
Thanks, I didn't occur to me to use that, but now that you mention it, it was obvious :) It is weird, because the directory that contains merlin from opam comes first, and the files are there, but the merlin file that is pointed to from the function help is the one from ELPA: But now I tried the So, I did something else, to be sure I edited the I don't really know what else changed, but before deleting the old merlin version in the ELPA directory things weren't working, and my best guess is that the problem is that the old version in ELPA was being loaded instead of the opam version. |
Does it work for you with latest versions? |
@d12frosted I haven't experienced the problem anymore since I forced an upgrade of the merlin package. |
Glad to hear that it's fixed! Thus closing this one 😸 |
Description
The OCaml layer loads a Merlin from ELPA instead of the one installed by Opam, this causes problems if the merlin from ELPA and the Merlin installed by Opam are not the same version.
It seems the layer does try to load the version installed by Opam, but since Spacemacs also installs Merlin from ELPA it ends first in the
load-path
and given preference over the version installed by Opam. See https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Blang/ocaml/funcs.el#L20Reproduction guide
Observed behaviour:
The Emacs' side of Merlin fails to communicate with the Merlin process.
Described here ocaml/merlin#457 (not specific to Spacemacs, just having different versions for the elisp part of Merlin and the external Merlin process)
Expected behaviour:
For it to not fail
System Info
Backtrace
The text was updated successfully, but these errors were encountered: