The ocamlformat looks like you have extraneous and unnecessary quotes in the profile name. ocamlformat does work; I use it habitually several times a day. My guess is you are invoking it directly with extra quotes; a bug issue would really help here.
ppx_jane; I’m unfamiliar with this one, probably because there are many Jane Street packages that do not and will likely not support Windows for the foreseeable future. I’ll have a look at this when I’m back at a PC (may be awhile) for this specific package. Regardless ppx_jane is an indicator that you may be reliant on other Jane Street packages. I don’t want to speak for Jane Street, but I recall them being clear in their documentation about what only works on Unix and why (mostly they don’t have a Windows Async scheduler) and they have also said on discuss.ocaml.org that they didn’t use Windows in their testing. So three issues. 1. I really need to be more upfront that existing OCaml developers reliant on Jane Street must switch to alternatives (ex. Lwt not Async) to work on Windows. 2. Much of the very very useful Real World OCaml book promotes Jane Street libraries which will cause new Windows users to have immediate problems; I’ll see if a chat with the authors can help create a path forward. 3. The error you get is not helpful here. I think this will change in Opam 2.2 … packages that don’t work in Windows will be clearly flagged as not available in Windows. But regardless some change needs to occur; a bug issue would be helpful here.
FWIW ppx_jane doesn’t have any unix dependencies and should work on Windows. We use ppx_jane along with quite a few other Janestreet libraries at work and have been using it successfully on windows with Cygwin + fdopen repositories for a while now.
Curious what “quite a few other Janestreet libraries” implies. Does that mean you don’t need to be aware of the Base/Core split at the bottom of Base, and then for each Janestreet library you want to use check its transitive dependencies to see whether a library will work on Windows? Or are you relying on tribal knowledge / trial-and-error about what should work and what doesn’t?
and then for each Janestreet library you want to use check its transitive dependencies to see whether a library will work on Windows? Or are you relying on tribal knowledge / trial-and-error about what should work and what doesn’t?
Checking the transitive dependencies has worked well so far. If a library doesn’t use core_unix or async_unix it has worked well on windows in my experience.
Okay that is what I thought. That doesn’t translate well for a new OCaml user. They won’t know how to do that, and even if they did they wouldn’t be able to predict which packages they would need in the future. Speaking from personal experience here … @bobzhang was rightly talking about 3 hours being a hard sell … but using Janestreet on Windows could (and did) waste weeks of time when you realize you can’t get past an Async dependency. Using Cygwin+MinGW doesn’t solve it. Incredibly frustrating and can easily become “I hate OCaml; let me post soemthing terrible on Reddit or HN”, and while I’m glad your work (which sounds like a very experienced OCaml group) only needed the subset that is compatible with Windows, that isn’t the bar for recommending a set of packages to all Windows users.
Does that make sense?
Regardless, Ppx_jane and all the PPX subset of JS packages need to be added to the Diskuv OCaml test suite and perhaps upgraded to 0.15.x; I was quite unaware of that package.
MSYS2 variables are available as Opam global variables. The list is here. For example, opam var --global msystem is CLANG64 and opam var --global mingw-package-prefix is mingw-w64-clang-x86_64. They will become useful when Opam depext functionality is added for MSYS2.
Fix version in Add/Remove Programs that was dev instead of 1.0.1 (etc.)