Open mattferrin opened 7 years ago
@mattferrin oh gosh we've totally missed this issue. To be clear, this works under 1.13.5 right? The latest 1.13.5 release gives prebuilt binaries and is a bit different
@chenglou I'm not using reason-react (and reason-cli) at present. I loved experimenting with them though. If someone else ran into the same issue, I wanted them to see this. I don't know if Windows works now. Someone else might know.
Thanks for trying out reason-react! Yes, this did end up helping someone =)
I've verified that the latest Reason-cli dev branch works on cygwin without mingw, but have not yet tried cygwin with mingw. That is on my todo list as well. Thanks for reminding us.
Others have reported that Microsoft's new winbash works as well (but that's a whole other kind of approach to windows development).
Are there any plans on making it work on windows without installing a unix-like environment?
@fhelwanger in the future, yes. We'd love to have some contribution on this!
Well, I did a workaround that worked surprisingly well 😁
I installed ocaml and reason via opam on windows bash. Then, I made some batch files that simple call:
bash -c <ocaml-binary> <parameters>
With that, I got even autocomplete in vscode to work.
It's very dirty at the moment, I'll try to turn it into a script or npm package that setup all this automatically later.
The files that I used are here: https://github.com/fhelwanger/ocaml-on-windows
OK that's pretty crazy lol. @jordwalke would we be able to use that somewhat officially until things are cleaned up?
I updated the repo. Now it's a npm package.
I'm really new to this ocaml and reason world, so feedback is very appreciated 😄
Just tested on one machine without cygwin and the vscode-reasonml extension didn't work 😕
Already found why and opened this issue: https://github.com/freebroccolo/ocaml-language-server/issues/27
Compiler Missing
Install g++ compiler by selecting it as an option while using installer at http://www.mingw.org/
Add C:\MinGW\bin to your Path.
Non-Windows Unix Syntax
cd C:\ git clone https://github.com/reasonml/reason-cli.git
Change package.json line: "postinstall": "./scripts/performActualInstallAndFixLinks.sh" to "postinstall": ".\scripts\performActualInstallAndFixLinks.sh"
Possibly Unnecessary
Enable Bash and Developer Mode: https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/
Install cd C:\ npm install -g ./reasonml
Check where ocamlmerlin refmt ocamlmerlin-reason
Test
npm install --save reason-react
Follow steps: https://github.com/chenglou/reason-react-example
Edit the simple example to not say hello, and open it's index.html file in Chrome.