-
Notifications
You must be signed in to change notification settings - Fork 84
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
RLS Attempting to access nonexistant ~/.opam/4.07.0 folder #248
Comments
exactly the same problem |
Are you using a global switch? Or a local one? |
Global for me |
hmmmmm. where does that switch live? |
Also global switch, no local switch configured. I don't know where global switch lives. Is |
I believe it's in |
I'm not aware of the preferred tools in ocaml (i.e. opam/opamfind etc) to find the compiler. However, I see the same error on OS X with homebrew and a corresponding opam 'system compiler'. with homebrew ocamlopt.opt is in Cellar/ocaml/4.07.1/bin/ocamlopt.opt (similar for ocamlc) Instead simply using (with opam)
Alternatively (with findlib)
Works just fine without second guessing any paths. |
Same here, archlinux with the ocaml compiler installed by the distribution's pack manager (instead of opam), using opam v2.0.4 with a single global switch. Guess this is typical for those who just prefer a single compiler backend provided by the OS instead of multiple self-compiled ones. opam recognizes the existing compiler under the special switch name
But unlike other switches fully compiled/placed by opam itself, the path to this switch backend is So the path composing algorithm ( The other extension (vscode-reasonml) had no such problem, which seems to rely on opam/ocaml/env commands invocations (or explicit path setting) to get the relevant info instead of computing the paths itself. The issue #280 looks like a dup of this one. Same as the reporter on that issue, I also make use of VSCode's remote development (SSH) extension (so this extension was automatically installed on the server side), but I guess that is irrelevant. |
@zli If you can determine an algorithm that will reliably find |
@jaredly IIUIC, the The easiest ways to detect this might be just checking if the current switch is Once we detect the switch is Note that The function FYI, here are the output of some opam environment vairalbes on my machine ($OPAMROOT=~/dev/opam):
|
While trying to open a very simple dune project, I get this error:
Excerpt from the log file:
I'm not sure why it's trying to access
/Users/james.kraus/.opam/4.07.0/bin/ocamlopt.opt
since/Users/james.kraus/.opam/4.07.0
doesn't exist.Anyone have any ideas?
Versions of stuff being used:
I'm using version 1.5.2 of RLS
Edit:
I'm guessing the directory is coming from these lines:
reason-language-server/src/analyze/BuildSystem.re
Lines 209 to 214 in af83153
Further debug info:
The text was updated successfully, but these errors were encountered: