Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Show errors when not finding merlin #39

Closed
ghost opened this issue Feb 3, 2017 · 4 comments
Closed

Show errors when not finding merlin #39

ghost opened this issue Feb 3, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 3, 2017

Could you show the errors returned by merlin? Also errors when merlin is not found.

@ghost
Copy link
Author

ghost commented Feb 3, 2017

Hi @maun, can you give me a bit more detail on what you are asking for?

In general, the errors from merlin for the current file should already be showing up in the problems panel. Is that what you are referring to or something else?

Regarding merlin not being found, can you tell me how you have your project set up and what your Reason development environment looks like?

The extension does try to check for the ocamlmerlin binary when it loads and report an error if it cannot be found but it may be that this is not working for some reason here.

@ghost
Copy link
Author

ghost commented Feb 4, 2017

Hi @freebroccolo, sorry I thought this behavior is known/intentional:
I use the newest extension on an ArchLinux VM with vscode 1.9. I am using this code and ran npm install.

When I start vscode without ocamlmerlin in my node_modules/path, or ocamlmerlin ends with an error I see no error in vscode, but at the bottom right the text "[loading]". There is also no error in the developer console.

With the posted source code I have a working installation with working autocomplete, I can reproduce the described behavior as follows.

No error for ocamlmerlin errors:

  • Rename _build to 2build
  • Start vscode either with npm run env -- code . or normally with the project folder open
  • Open a reason file from the project

For the missing ocamlmerlin binary I did the following:

  • Rename ocamlmerlin in node_modules to ocamlmerlin2
  • Start vscode either with npm run env -- code . or normally with the project folder open
  • Open a reason file from the project

Someone on discord also mentioned that this extension shows no errors for ocamlmerlin.
I can remember having seen an error dialog some time ago that ocamlmerlin cannot be found.
By the way, this extension is great, thanks 👍

@ghost
Copy link
Author

ghost commented Feb 4, 2017

@maun thanks for the details. I know there used to be some issues with the server not always reporting the failure properly if the call to execute ocamlmerlin under node_modules failed.

I thought I fixed that but maybe not. I'll take a look and see if I can figure out what's going on.

@pjhenning
Copy link

Hello, I am also having the same problem. I am trying to use merlin with reason-react-example. I tried the following:

  1. Installing merlin as a local dev dependency
  2. Installing merlin globally via npm
  3. Manually adding the location of the globally installed binary to my system PATH

I am running MacOS 10.12.4, VS Code 1.10.2, Reason plugin 0.0.99.

@ghost ghost closed this as completed Apr 24, 2017
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant