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

Fix failing check for ocamlc existence #1008

Open
ulugbekna opened this issue Aug 28, 2022 · 1 comment
Open

Fix failing check for ocamlc existence #1008

ulugbekna opened this issue Aug 28, 2022 · 1 comment

Comments

@ulugbekna
Copy link
Collaborator

The extension checks for existence of ocamlc binary for some reason related to checking whether the current sandbox contains ocaml installation. This doesn't work in local opam switches

$ /usr/local/bin/opam exec --switch=/Users/ulugbekna/code/merlin --set-switch --root /Users/ulugbekna/.opam -- ocamlc --version
[ERROR] Command not found 'ocamlc'

which results in a user-facing error notification on extension startup.

AFAIU, opam exec on a local switch checks for commands in <local-switch-path>/bin/, which doesn't contain ocamlc (new switch creation was suspiciously fast, is there a new hack in opam that allows to avoid copying ocamlc?)

@rgrinberg
Copy link
Contributor

Not quite sure I understand this one. How can the local switch not contain ocamlc? Is it because the local switch is using the system OCaml? In any case, I would expect the command /usr/local/bin/opam exec --switch=/Users/ulugbekna/code/merlin --set-switch --root /Users/ulugbekna/.opam -- ocamlc --version to pick up the system ocamlc from $PATH.

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

2 participants