Repository navigation
Description
Fundraiser for Better Editor Support in Windows (Without WSL)
Why
Reason is still not at it's optimal support level in Windows because of shaky editor support.
Reason's VSCode extension requires Merlin and isn't working when running Merlin in windows runtime environment. Current best workaround requires running Merlin in WSL. WSL works but is unstable (known issues WSL#2613, WSL#2746).
Current Target
Improve editor support
Run Merlin (be it 2.5.x or 3.x) in Windows runtime environment working with VSCode Reason extension with all features (code lens, code completion, errors, hints, etc) working properly without requiring WSL. The focus is in improving developer experience. Not in getting Merlin ported to Windows native. (That would be great but not required.)
Future possible goal
- Improve Windows native toolchain.
It is a large undertaking. Not current goal. Current priority is editor support. When done we can upgrade target (or start a new fundraising issue) until Windows support is rock solid. For now, baby steps.
On contributing
- As expected, any developer can participate. First to get it done can claim their bounty. :)
- Fundraiser organization process is open and ongoing.
- Which platform should we use for fundraising? Suggestions?
- For now, this is the main fundraiser page. Just post a message here stating your contribution.
- The collection will probably happen on a platform that handles this properly. We are listing interested people, and once platform is decided, will be notified.
I encourage everyone that can or would like to help or support this cause, to join in and support the cause.
Be it by volunteering some effort or by pledging a few coins. Anything that can help is welcomed.
Current Pledges
- superherointj
50 USD - romainquellec
25 EUR - chenglou
50 USD - frankwallis
50 USD - isaksky
50 USD - johann-sonntagbauer
50 EUR - leolimasa
50 USD - bryphe
50 USD - jordwalke
50 USD - saitonakamura
50 USD
I will add your GitHub's username here if you pledge bellow.
Activity
superherointj commentedon Dec 11, 2017
I'm in. 50 USD
rgripper commentedon Dec 11, 2017
Is there a fundraiser page somewhere?
superherointj commentedon Dec 11, 2017
The fundraiser page is this issue. Feel free to join in and contribute to the discussion with your suggestions, thoughts on topic and show your support. :)
rgripper commentedon Dec 11, 2017
How do you collect donations then? :-]
superherointj commentedon Dec 11, 2017
Just say in and how much and later we collect. :)
@rgripper Do you have suggestions? What would you like to see different here? Do you like the target? Other thoughts?
[-]Campaign: Fundraising for proper Windows Support[/-][+]Campaign: Fundraising for proper Windows Tooling Support[/+][-]Campaign: Fundraising for proper Windows Tooling Support[/-][+]Campaign: Fundraising for better Tooling in Windows[/+][-]Campaign: Fundraising for better Tooling in Windows[/-][+]Crowdsourced Fundraising for better Tooling in Windows[/+]superherointj commentedon Dec 11, 2017
Actually the how much shouldn't be required. Only that you want to contribute.
romainquellec commentedon Dec 11, 2017
Hey ! I'm on windows and sad about doing all this work !
I'm in for 25E. (euros)
curtis0x commentedon Dec 11, 2017
Great idea!
It might be worth breaking the target into a few bite size subtargets given that getting Merlin + OCaml toolchain going on Windows natively has been a long running work in progress on the OCaml side. This is promising (https://fdopen.github.io/opam-repository-mingw/installation/) yet still requires Cygwin, so not sure if that is really any better than WSL. I have found the WSL integration gives me the majority of functionality in VSCode (Codelens + Completion + Refmt) with GoToDefinition being the only weak point due to path mismatches.
Here are a few related issues on the opam/OCaml front that might need to progress to really get Reason working well on Windows:
ocaml/opam#2191
ocaml/ocamlbuild#64
jordwalke commentedon Dec 12, 2017
@jubos The mingw installation may be superior to WSL because it is possible for it to be silently installed and sandboxed without the user knowing. WSL is a great tool in my opinion, but it does require some intervention on behalf of the end user (to make sure they have the right OS etc).
If anyone is opposed to mingw purely on the grounds that it's an extra tool, you might ask how VSCode manages to get real
gitintegration on windows. They use similar Unix abstraction layers (msys2 IIRC) - but you'd never know it because it's all hidden from the user, which is what really matters.romainquellec commentedon Dec 12, 2017
mingw seems to be a good solution. I looked at the issues, but it's a bit complicated to me.
Any timeline / deadline on it ? Do it solve everything for windows users using reasonml ?
jordwalke commentedon Dec 12, 2017
@romainquellec This current issue is tracking improved support for a more specific use case of ReasonML: developing with Reason+BuckleScript on Windows. General windows support beyond the BuckleScript use case for ReasonML is another issue and will require more work/planning though we're thinking about it as well.
chenglou commentedon Dec 12, 2017
I believe @superherointj is aiming for merlin on Windows native. This isn't BS-only. I'm in for 50 bucks
12 remaining items
Schmavery commentedon Jan 8, 2018
Hey @superherointj
@bsansouci and I have been working fairly actively on trying to improve the story on windows lately (because we think it "would be nice" if windows devs could use reason too!). We just finished making bsb-native run on native (cmd.exe) windows (anyone feel free to message us or open issues if you have any trouble/suggestions) and I've been more recently starting to look into getting better editor support using a combination of changes to ocaml-language-server and by working to get windows binary of merlin shipping along with bsb-native.
Not sure how this will go as we haven't started trying to build merlin on windows yet but fingers are crossed. If anyone wants to help out, getting a start on the ocaml-language-server changes (https://github.com/freebroccolo/ocaml-language-server/issues/84) might not be a bad place to start (and even without windows, would improve bs-platform/editor consistency in general!).
I get that this might not the under the exact scope of this issue, but I thought it was related enough to be worth mentioning.
superherointj commentedon Jan 8, 2018
Hi @Schmavery .
Thanks for working in improving windows story. And sorry for not taking your work into account in my previous message. It is certainly great that there is work going into Windows.
patoncrispy commentedon Feb 4, 2018
I don't know what's involved, but I'd love to help out in any way I can. Only done a small bit of OS in the past but would love to get involved in the Reason ecosystem. New to Reason, too, but very happy to learn and help.
leolimasa commentedon Apr 10, 2018
In for $50.
Loving ReasonML, but setting it up on windows is laborious. I also think this is crucial for it to gain traction on the larger dev community.
bryphe commentedon Jun 1, 2018
I'm a bit late to the party here but excited to see the enthusiasm here! You can put me down for $50 too. π My primary development machine is Windows, so this is my major hurdle at the moment. Coming from my "Redmond bubble" I know there are lots of other developers in the same boat here - so IMO this is critical to achieving mainstream adoption.
The future goal of having the binaries work natively on Windows definitely seems like the right long-term approach. Sounds like it will need significant investment, though!
For the nearer tearm goal of editor support - I like the idea of the
cygwinandmingwstack that @jordwalke . I haven't used either tool recently, but if they do allow runningmerlinon Windows and getting editor support, the nice thing is that the 'setup' experience on Windows could be streamlined.For example, there could be a
reason-cli@windowsNPM package that has a Powershell script run as a postinstall step, that would bring in a local cygwin (and then use it to bring in mingw) - all happening transparently on thereason-cliinstall. It could even be really nice and try and update your VSCode configuration for you, if it seems you have one...It would be great to have the initial
reason-clisteps be in parity across all platforms (with Windows doing some extra lifting to bring in dependencies):npm install reason-cli@{version}-{platform}. Eventually, once the longer-term goal of full Windows support is realized, perhaps cygwin / mingw wouldn't be needed in a future iteration...IMO, one concrete way to start pressing forward on this would be to create a
reason-windows-setupGitHub repo that can help test the reason setup on Windows, using AppVeyor builds.bs-platformocaml-language-serverbsb initproject (go to definition, completions, etc). It's expected that these would fail at this point, because we haven't done any work yet to enable it. Having test cases that concretely specify the goals would be a big step forward in making this actionable!cygwinand installsmingw+ the required dependencies.ocaml-language-serverto account for the new paths - hopefully we can start to see some of our tests turn 'green' at this point.At this point, we'd have a blessed manual path with
cygwin/mingw, and we know we can install the dependencies through Powershell.EDIT: @jordwalke mentioned that a major challenge is the use of OPAM packages. A solid next step here would be to add a test case for installing an OPAM package, and then validate that the
ocaml-language-servergives proper results for that package. Seems like this would be the real crux of the problem - getting those tests green.The next step would be to integrate this powershell script as a postinstall script for an appropriate NPM package. Then, we'd have infra to validate build-over-build that the tooling works (or test on various Windows platforms + x86/x64).
Not sure if that's helpful or not; just some ideas! Can't wait to use Reason on Windows π
jordwalke commentedon Jun 2, 2018
@bryphe I think that this particular Github issue is for a short term solution that only needs to work with bsb, doesn't need to work with native/opam packages, and more revolves around editing with merlin than building executables.
I can't recall if a mingw build of merlin itself is possible in its current form. I think there was some major compatibility breakage in the recent versions and someone is trying to fix that deeper in merlin. (Anyone recall?)
Separately, I'm also giving considerable support to more comprehensive windows support for a broader set of requirements (building of native packages, multiple versions of the compiler, maybe cross compilation). Many of the requirements revolve around the ability to build/run/link windows executables, as opposed to just developing on Windows. It's a bit beyond the scope of the proposal discussed in this Issue and it's operating on a different timeline, but anyone let me know (on Discord) if you are interested in another bigger challenge that will also help us move forward for proper long term Window support. While that is underway, count me in for fifty bucks for the proposal being discussed in this Issue!
jaredly commentedon Jun 14, 2018
Oooh I'd forgotten this issue was around π do I win the prize? I've got a language-server that works on windows https://github.com/jaredly/reason-language-server/releases/tag/1.0.0-beta.2
(there are a variety of unfinished things about it, but it's reasonably usable at this point)
rgripper commentedon Jun 14, 2018
Ok, now we need ppl to verify that it's a yay-time :-)
bsansouci commentedon Jun 18, 2018
To answer @bryphe, I think merlin should be compile-able on windows as it was before 3.0 and could work if we went and checked all paths to make sure they use appropriate separators. I'd be willing to bundle merlin with bsb-native, so that apart from the editor and editor plugin, the user only needs bsb-native.
bryphe commentedon Aug 25, 2018
With the latest Windows work done on
esy-merlin@3.1.0is buildable on Windows viaesy. (The limitation at the moment is that theesylockfile needs to be generated outside of Windows, but I have a minimal merlin project w/ the lockfile here: https://github.com/bryphe/esy-minimal-merlin-project)jordwalke commentedon Aug 25, 2018
To properly manage expectations: Iβve heard that getting merlin to run correctly on Windows may still require some work to fix the path issues - it may require substantial dedication to find those issues and submit patches upstream. But what a massive accomplishment to even get it building nonetheless!
barclay13 commentedon Aug 30, 2018
@jaredly great work on your reason language server. I know it's early days but how does the feature set compare vs the merlin one and would it take a huge amount of work to close the gap? (ie which option makes sense to get behind for the mid - long term?)
saitonakamura commentedon Jan 30, 2019
I'm also desiring to add my 50
cents$ to the noble cause.