Skip to content

Fundraiser for better Editor Support in Windows (Without WSL)Β #1698

Closed

Description

@superherointj

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

  1. superherointj 50 USD
  2. romainquellec 25 EUR
  3. chenglou 50 USD
  4. frankwallis 50 USD
  5. isaksky 50 USD
  6. johann-sonntagbauer 50 EUR
  7. leolimasa 50 USD
  8. bryphe 50 USD
  9. jordwalke 50 USD
  10. saitonakamura 50 USD

I will add your GitHub's username here if you pledge bellow.

Activity

  1. superherointj commented on Dec 11, 2017

    @superherointj
    Author

    I'm in. 50 USD

  2. rgripper commented on Dec 11, 2017

    @rgripper

    Is there a fundraiser page somewhere?

  3. superherointj commented on Dec 11, 2017

    @superherointj
    Author

    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. :)

  4. rgripper commented on Dec 11, 2017

    @rgripper

    How do you collect donations then? :-]

  5. superherointj commented on Dec 11, 2017

    @superherointj
    Author

    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?

  6. changed the title [-]Campaign: Fundraising for proper Windows Support[/-] [+]Campaign: Fundraising for proper Windows Tooling Support[/+] on Dec 11, 2017
  7. changed the title [-]Campaign: Fundraising for proper Windows Tooling Support[/-] [+]Campaign: Fundraising for better Tooling in Windows[/+] on Dec 11, 2017
  8. changed the title [-]Campaign: Fundraising for better Tooling in Windows[/-] [+]Crowdsourced Fundraising for better Tooling in Windows[/+] on Dec 11, 2017
  9. superherointj commented on Dec 11, 2017

    @superherointj
    Author

    Actually the how much shouldn't be required. Only that you want to contribute.

  10. romainquellec commented on Dec 11, 2017

    @romainquellec

    Hey ! I'm on windows and sad about doing all this work !
    I'm in for 25E. (euros)

  11. curtis0x commented on Dec 11, 2017

    @curtis0x

    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

  12. jordwalke commented on Dec 12, 2017

    @jordwalke
    Member

    @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 git integration 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.

  13. romainquellec commented on Dec 12, 2017

    @romainquellec

    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 ?

  14. jordwalke commented on Dec 12, 2017

    @jordwalke
    Member

    @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.

  15. chenglou commented on Dec 12, 2017

    @chenglou
    Member

    I believe @superherointj is aiming for merlin on Windows native. This isn't BS-only. I'm in for 50 bucks

  16. 12 remaining items

  17. Schmavery commented on Jan 8, 2018

    @Schmavery
    Contributor

    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.

  18. superherointj commented on Jan 8, 2018

    @superherointj
    Author

    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.

  19. patoncrispy commented on Feb 4, 2018

    @patoncrispy

    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.

  20. leolimasa commented on Apr 10, 2018

    @leolimasa

    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.

  21. bryphe commented on Jun 1, 2018

    @bryphe

    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 cygwin and mingw stack that @jordwalke . I haven't used either tool recently, but if they do allow running merlin on 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@windows NPM 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 the reason-cli install. 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-cli steps 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-setup GitHub repo that can help test the reason setup on Windows, using AppVeyor builds.

    • Install bs-platform
    • Install ocaml-language-server
    • Write test cases that validate aspects of the LSP against a simple bsb init project (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!
    • Write a powershell setup script that brings in cygwin and installs mingw + the required dependencies.
    • Update the initialization arguments to ocaml-language-server to 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-server gives 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 πŸ‘

  22. jordwalke commented on Jun 2, 2018

    @jordwalke
    Member

    @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!

  23. jaredly commented on Jun 14, 2018

    @jaredly
    Contributor

    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)

  24. rgripper commented on Jun 14, 2018

    @rgripper

    Ok, now we need ppl to verify that it's a yay-time :-)

  25. bsansouci commented on Jun 18, 2018

    @bsansouci
    Contributor

    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.

  26. bryphe commented on Aug 25, 2018

    @bryphe

    With the latest Windows work done on esy - merlin@3.1.0 is buildable on Windows via esy. (The limitation at the moment is that the esy lockfile 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)

  27. jordwalke commented on Aug 25, 2018

    @jordwalke
    Member

    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!

  28. barclay13 commented on Aug 30, 2018

    @barclay13

    @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?)

  29. saitonakamura commented on Jan 30, 2019

    @saitonakamura

    I'm also desiring to add my 50 cents $ to the noble cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions