Let's maintain a list of all the things we need to change in order to get windows esy support off the ground. Let's also track the things we need in order to get an entirely pure windows install setup:
esy supports windows out of the box without having to install anything but esygcc.Blockers To Preliminary Support:
esy release wrappers to something cross platform.npm install -g esy package that includes everything esy install needs on windows to fetch packages and pull from git etc.esy build steps for packages some prebuilt/prebundled windows gcc native compiler. (so long as those packages don't have unixisms).Completely Eliminating Cygwin:
As a temporary solution, we might embed an unattended cygwin install to get some helpful utilities like curl/rsync etc. This is the list of things we need to do to completely eliminate any use of cygwin:
curlrsyncgittarpatchNotes
For some of the operations that create or import npm releases for packages, it may be suitable to rely on node to do some of the releases, as long as the startup time is not important: Justification:
esy running on cygwinesy install - can a separate, standalone version of esy-install suffice?esy build - can we use a bytecode version of esyBuildPackage on a specific plan?__Goals: __
esy commands should all work on Cygwin. Test with a canonical set of packages.esy native executables running on Windows (w/ cygwin behind the scenes)esy installesy-install.js - Incorporate esy-cygwin to enable tar -xzf call on Windowsesy-install.js - Incorporate esy-cygwin to enable patch call on Windows__Goals:__
esy install works on Windows__OPEN ISSUE__: Will we need to point the OPAM path to the windows fork? Will come out in
esy buildif we have failures that are addressed in the Windows OPAM repo.
esy build:ShellParamExpansion escape issue - #232 Task.ml - fix path character there - #232 rsync invocation when relocating sources - #233 esy-ocaml/ocaml: OCAMLLIB & OCAML_TOPLEVEL_PATH need to point to $ocaml_install/lib instead of $ocaml_install/lib/ocaml - #226 , esy-ocaml/ocaml#3esy-ocaml/ocaml: CAML_LD_LIBRARY_PATH needs ; separators instead of : - #226 , esy-ocaml/ocaml#3esy-bash. (In progress - #239 )resolveCommand #247 esy-bash argument escaping (failing esy-installer step) bryphe/esy-bash#5ocaml configuration steps are specific to Linux + Mac. Need to investigate porting over setup strategy from fdopen's repo to esy-ocaml/ocaml. esy-ocaml/ocaml#1esy-solve-cudf fails on postinstall: andreypopp/esy-solve-cudf#4esy install for esy-reason-projectesy build for esy-reason-projecte2e #241 opam__Goals:__
npm install -g @bryphe/esy-windows should work on Windows to provide esy build and esy installnpmplatform-release equivalent target for Windows, to create architecture specific bundles (x86, x64)esyi running instead of JS-based strategyesyi - fix yaml dependency - #214 postinstall fails on cygwin / windowsmccs fails to install on cygwin / windows # #esy-solve-cudf, publish cygwin-friendly NPM packageMy windows-specific investigation branch is here: https://github.com/bryphe/esy/commits/windows-bootstrap
esy command supportStill unknowns here - need testing to evaluate blockers.
__Sandbox introspection__
esy ls-libsesy ls-buildsesy build-envesy command-env__Command execution:__
esy build <anycommand> esy x <any command>__Environment-specific shells:__
__TBD:__ Assuming build environment shell would open in cygwin-bash on Windows, for now?
esy build-shell <path-to-package> esy shell__Other:__
esy addesy releaseesy configesy import-opamesy install-cacheesy export-dependenciesesy export-build - #286 esy import-buildMakefile with esy-bash once there is an 'npm-installable'esy`\ -> /) when we have test coveragebash dependency and just calling the Cygwin bundled tools directly.Can this be updated in any way with recent findings? I'm thinking an emphasis on esyi instead of esy install, maybe something else? I'm catching up now.
@jordwalke - sure thing! I just updated it. @andreypopp was able to unblock me on esy-install.js - so I went ahead with that for now to investigate esy build. I'll revisit esyi shortly - my hope is I can get a set of tests working on AppVeyor with esy install (via esy-install.js) andesy build... would be great to have a test story in place when we swap inesyi`!
My hope is that I can have esy install and esy build working from a Windows command prompt by EOW for a simple project, and then we can start porting over PRs to esy. One issue we'll have to consider as we start porting in the Windows-specific fixes esy/esy#220 - how we want to handle the cross-platform artifacts.
In addition, if we can leverage the existing automated tests on AppVeyor, that will help highlight additional commands that will need to be addressed for Windows.
| Project | Status | Comments |
| -- | -- | -- |
| esy-minimal-ocamlbuild-project | WORKS * | esy-ocaml/ocaml#6aacc055 |
| esy-minimal-jbuilder-project | WORKS *| esy-ocaml/ocaml#6aacc055 |
| esy-minimal-merlin-project | WORKS *| esy-ocaml/ocaml#6aacc055 |
| esy-reason-project | BLOCKED | Blocked by #295, requires esy-ocaml/ocaml#6aacc055 |
| esy-solve-cudf | BLOCKED | Blocked by #302 |
| esy | BLOCKED | Blocked by #295 |
| fastpack | *??| ?? |
| graphql_ppx | *?? | ?? |
We've made great progress on the Windows front! esy can be installed via npm on Windows, and can build projects like hello-reason and hello-ocaml that already have a lockfile.
I created a new issue to track the next steps for Windows support: #428
Most helpful comment
We've made great progress on the Windows front!
esycan be installed vianpmon Windows, and can build projects likehello-reasonandhello-ocamlthat already have a lockfile.I created a new issue to track the next steps for Windows support: #428