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

On vscode mac (mojave) : "Unable to load compilation data: Unable to find _build directory" #162

Open
voodoos opened this issue Oct 30, 2018 · 6 comments

Comments

@voodoos
Copy link

voodoos commented Oct 30, 2018

Hi,

I have tried lot of things, including multiple re-installations of the plugin and downloading another release of the language server and changing reason_language_server.location...

I installed OCaml (v4.06.0) and Merlin (v3.1.0) via OPAM. I installed the reason-vscode extension via the marketplace. I made a very simple project with only two files:

main.ml:

print_endline "Hello, world!"

and dune:

(executable
  (name main))

The project compile fine, dune creates the _build/ folder and the following .merlin file:

B _build/default/.main.eobjs
S .
FLG -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs

But the language server doesn't work, each time I update the source file I get a Unable to find _build directory. Am I missing something ?

Here is the (not very useful) debug log :

[Error - 4:27:27 PM] Request textDocument/codeAction failed.
  Message: Unable to find _build directory
  Code: -32603 
[Error - 4:27:27 PM] Request textDocument/documentSymbol failed.
  Message: Unable to find _build directory
  Code: -32603 
[Error - 4:27:27 PM] Request textDocument/codeAction failed.
  Message: Unable to find _build directory
  Code: -32603 
@mscharley
Copy link

Also getting this on a simple one-file Reason native project with esy + dune.

@mscharley
Copy link

mscharley commented Nov 14, 2018

For my use-case with esy I managed to 'fix' it with this:

ln -s _esy/default/build/default _build

@despairblue
Copy link

Same happens in atom using https://github.com/reasonml-editor/atom-ide-reason

Sadly symlinking just leads to another error.

@anmonteiro
Copy link
Collaborator

Which version of Esy / RLS are you running?

@nielmond
Copy link

nielmond commented Dec 4, 2018

I see this too using esy 0.4.3 and RLS 1.4.0 (the latest reason-vscode).

@anmonteiro Incidentally what brought me here was that I get this error for the files here https://github.com/anmonteiro/reason-graphql-fullstack/tree/master/src/server Couldn't get the symlink approach to work either.

@zetashift
Copy link

I'm getting this error too on Windows 64bit and esy 0.5.6 and latest RLS, steps to reproduce:

  1. Git clone: https://github.com/esy-ocaml/hello-reason
  2. esy install
  3. open project with vscode

Projects made with bs work great.

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

6 participants