jaredly / jaredly/reason-language-server
On vscode mac (mojave) : "Unable to load compilation data: Unable to find _build directory"
- Dominant language
- OCaml
- Stars
- 649
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
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`:
```ocaml
print_endline "Hello, world!"
```
and `dune`:
```ocaml
(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
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the two-file project using main.ml, dune, the generated .merlin file, and the _build directory. Start by tracing how reason_language_server.location and the language server discover _build on macOS, then verify code actions and document symbols work after editing main.ml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, ocaml, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100