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 1.7 install fails to install vim plugin #245

Closed
nilsbecker opened this issue Aug 21, 2014 · 12 comments
Closed

merlin 1.7 install fails to install vim plugin #245

nilsbecker opened this issue Aug 21, 2014 · 12 comments

Comments

@nilsbecker
Copy link
Contributor

i do opam reinstall merlin. it reports

rm -rf /Users/<user>/.opam/4.01.0/share/ocamlmerlin
  make
  make merlin.install

and further reports success. but after installation, ~/.opam/4.01.0/share/merlin/ is an empty directory, and no ocamlmerlin directory exists. looking at the Makefile and Makefile.config (but not understanding much) there seems to be a confusion between /share/ocamlmerlin and /share/merlin. also in the documentation sometimes one sometimes the other is mentioned. os x 10.9.

@let-def
Copy link
Contributor

let-def commented Aug 21, 2014

The installation should be handled by opam. What is your version of opam?

@let-def
Copy link
Contributor

let-def commented Aug 21, 2014

More details.

The normal installation process is handled by the install rule of the Makefile. Since the first version of merlin, it used share/ocamlmerlin as directory to store various files.

Opam now provides a declarative system for installation: make rule produces files, and the merlin.install file list all files to install.
opam takes care of putting those files in the appropriate directory (which should be share/merlin/vim for vim mode).
The first command rm -rf /Users/<user>/.opam/4.01.0/share/ocamlmerlin is here to remove leftovers from previous installations.
It's worth checking the content of merlin.install.

@nilsbecker
Copy link
Contributor Author

opam version is 1.1.1. the contents of merlin.install are

bin: [
  "ocamlmerlin.native" {"ocamlmerlin"}
  "omake-merlin"
  "jenga-merlin"
]

share: [
  "emacs/merlin.el" {"../emacs/site-lisp/merlin.el"}
  "?emacs/merlin.elc" {"../emacs/site-lisp/merlin.elc"}
]

about the ocamlmerlin directory: yes, this was used and worked previously on my system. but in the post-install message i get from opam, it says

Quick setup for VIM
-------------------
Append this to your .vimrc to add merlin to vim's runtime-path:
  let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
  execute "set rtp+=" . g:opamshare . "/merlin/vim"

and opam config var share gives /Users/<user>/.opam/4.01.0/share

@nilsbecker
Copy link
Contributor Author

wait, has this changed? in commit 7c44a25 is now says ocamlmerlin in the message?! maybe a stale version is still on the opam repository?

@let-def
Copy link
Contributor

let-def commented Aug 22, 2014

This has been changed after this commit, when switching everything to opam-managed install.
The bug comes from relying on the GNU implementation of find, whereas OSX provides a BSD implementation. I thought this bug was already fixed, but I made a mistake when committing.

@let-def
Copy link
Contributor

let-def commented Aug 22, 2014

I'll push the update on opam master server. In the meantime, could you try

opam pin merlin https://github.com/the-lambda-church/merlin
opam reinstall merlin

The vim files should be installed now.

@let-def
Copy link
Contributor

let-def commented Aug 22, 2014

(and you will want to do an opam pin merlin none to get back to the opam repository version later)

@nilsbecker
Copy link
Contributor Author

ok, thanks. i did that and indeed it installs the files under share/merlin/vim. ocamlmerlin no longer exists. after changing my .vimrc according to the post-install message, it's working again. i think in the docs there were some places that still referred to the ocamlmerlin directory though. for example the README contradicts the post-install message.

@let-def
Copy link
Contributor

let-def commented Aug 22, 2014

Yep, thanks, we should update that.

The problem is that manual installation is still allowed, and manual installation uses "ocamlmerlin" (I choose that name because in a system-wide installation there might be conflicts with merlin name).

@nilsbecker
Copy link
Contributor Author

On 22/08/14 11:14, def-lkb wrote:

Yep, thanks, we should update that.

The problem is that manual installation is still allowed, and manual installation uses "ocamlmerlin" (I choose that name because in a system-wide installation there might be conflicts with merlin name).


Reply to this email directly or view it on GitHub:
#245 (comment)

what about ocaml/merlin for the system wide install? or is directory
nesting not desirable?

@samoht
Copy link
Member

samoht commented Aug 22, 2014

You can use opam-installer merlin.install for manual installation.

@let-def
Copy link
Contributor

let-def commented Aug 22, 2014

@Samoth: yes but the Makefile install rule is used when outside of opam, so we can't assume that opam-installer is available, and using share/ocamlmerlin instead of share/merlin is a deliberate choice

let-def added a commit that referenced this issue Aug 23, 2014
merlin.install.sh expects a GNU version of find, which fails on
OSX/BSDs.

This has been fixed, once… The bug was reintroduced. The best is to
remove the script from the installation and precompute merlin.install.
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

3 participants