Comments (16)
My 2c: I just installed this package about four hours ago, and the intellisense was working great! However, after restarting vscode, it seems to have stopped working. I no longer get inline error messages or autocompletions. I also see the command 'reason.showMerlinFiles' not found
error.
from vscode-reasonml.
I had the same issue because I installed reason-cli
etc. while inside the VS Code terminal. When I quit the editor and launched it from another terminal it worked 👍
from vscode-reasonml.
Update: After installing reason-cli
(which is working properly again now), it now seems to be resolved.
from vscode-reasonml.
In case it's helpful for anyone, I experienced the same problem and resolved it by deleting my local ./node_modules/.cache
from vscode-reasonml.
@bobzhang this is strange. Does it just happen with a specific project (and is the project source available)? Does it always give that error? It might have something to do with the environment detection part of the ocaml server but I'm not sure.
from vscode-reasonml.
I am seeing this as well in chenglou's reason-react-example. It seems to be always giving that error. I'm also seeing an error in vscode itself: command 'reason.showMerlinFiles' not found
. Not sure what's going wrong, sorry I am not more help, just getting started on this stuff : /
from vscode-reasonml.
Okay, thanks for letting me know. I'm working on a new release which I think may fix this issue.
from vscode-reasonml.
I just installed reason and merlin through opam (because the reason-cli script is currently broken), and now I am not seeing either of these errors, but now I no longer see a Reason
debug output option, and there is no autocomplete available:
I suspect the initial issue I was seeing was caused by not having installed the latest reason/merlin/etc.
from vscode-reasonml.
If it helps, the extensions seems to be perpetually loading:
from vscode-reasonml.
@gilbert: you could try adding dependency-env
to the project dependencies, installing it, and see if that helps. I thought I had this particular issue fixed but I'll take a look at it and see what's going on.
from vscode-reasonml.
Could it be related to hackwaly/vscode-ocaml#78 ?
from vscode-reasonml.
@freebroccolo Do you mean https://www.npmjs.com/package/dependency-env ? If so, doesn't seem to help.
It seems I now have Merlin running in VS Code, but it's not picking up my .merlin
file:
I had seen my .merlin
file at some point, but I think I'm messing with my ocaml install too much. I don't have intellisense, probably due to this.
Do you think you could provide a list of executables that vscode-reasonml
requires to work properly?
from vscode-reasonml.
Do you think you could provide a list of executables that vscode-reasonml requires to work properly?
Normally this extension only requires ocamlmerlin
in order to function. The issue with some reason projects is that they do not use opam
to install dependencies so they cannot be discovered by Merlin in the same way that OCaml libraries are found.
Instead, the idea is to install OCaml/Reason dependencies for a library locally to node_modules
. The problem here that there is not a completely reliable way to detect whether a given project is using dependencies via open or via node_modules
. The situation is even more complicated when using an IDE because the environment variables may need to be set up to refer to some particular node_modules
which the editor only knows about once the project gets loaded; they can't just be set globally ahead of time.
The way this extension handles the situation is to use some heuristics to try and detect if a project is using local dependencies under node_modules
. This involves trying to call dependency-env
which is supposed to set the environment variables so that when ocamlmerlin
is executed everything just works.
My impression was that this was supposed to be the convention to use for Reason projects which is why I baked it into the editor. The other alternative was to require the user to launch the editor from the terminal through npm run
but I do not like this approach because I think it impacts usability too much and frankly it should not be necessary.
In any case, it seems some projects are not using dependency-env
. I haven't been paying too close attention to current practices since I haven't had the opportunity to use Reason much lately so maybe the situation has changed.
@jordwalke @chenglou is dependency-env
no longer recommended for this?
Anyway, I'll take a look at the project and see if I can figure out what's wrong.
from vscode-reasonml.
Okay, with reason-react-example I think there is either something wrong with the way the .merlin
file is setup or maybe there is a communication problem with bucklescript ppx stuff. If you rename or delete .merlin
then the interactive features start working but you will get syntax errors for bucklescript specific stuff at that point. But if you just use some standard Reason syntax it will work.
I'll have to investigate further to figure out what is causing this. @bobzhang any ideas?
from vscode-reasonml.
Closed since I don't know what caused the original issue and would need more information.
from vscode-reasonml.
I ran across this issue in OCaml. It manifests as the extension remaining as "loading" perpetually. I didn't have merlin
installed, so I resolved it by opam install merlin
and reloading the extension, and it works great!
from vscode-reasonml.
Related Issues (20)
- Error "connection got disposed off" (but not on save as in #247 and #142 but on start/load) HOT 5
- Error starting reason-vscode "expected string", fix error message for invalid bsconfig.json HOT 1
- Options for ReasonML formatting?
- BSC.exe: Wrong Argument. -bs-jsx expects an integer HOT 4
- Incorrect problem matcher for ocaml >= 4.09
- Wrong module for "go to definition" HOT 3
- merlin error reporting can be excessive
- [Feature] Completion on labelled arguments
- Unable to run first ocaml "hello world" program.
- Double error/warning dislayed
- WSL: opam local switch environment
- What does this highlighting of a whole function mean?
- Ternary Operators are Highlighted as bool
- Restart Merlin? HOT 1
- Why is the highlighting for OCaml so weird?
- Node module errors preventing extension from working
- Autocomplete not working HOT 1
- OCaml: Incorrect syntax highligthing if identifier starts with let
- Request textDocument/formatting failed
- VS Code: we have marked your extension as deprecated HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-reasonml.