Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support windows #15

Open
panglesd opened this issue May 10, 2022 · 3 comments
Open

Support windows #15

panglesd opened this issue May 10, 2022 · 3 comments

Comments

@panglesd
Copy link
Contributor

panglesd commented May 10, 2022

At least one workflow (cygwin/WSL/native/..., I'll know more about that after investigating).

This includes:

  • Having a test workflow in the CI for windows
  • Releasing a binary for windows in the CI
  • Many other more difficult and important things
@panglesd panglesd added the CI label May 12, 2022
@pitag-ha
Copy link
Member

(cygwin/WSL/native/..., I'll know more about that after investigating).

If I understand correctly, the goal is to have native Windows support.

Are you sure that we only need to work on the CI for Windows support? I'm asking because I'm wondering two things:

Do all OCaml Platform tools already support native Windows, assuming that the system fulfills the pre-requisites, i.e. it has a c compiler and git etc installed? What are all those pre-requisites?

And also, does the ocaml-platform installer support native Windows? I'm doubting because it does a couple of things like copying binaries of which I'm not sure they'll just work on Windows out of the box.

If you want to keep this issue about the CI only, let me know and I open a separate one about the installer!

@panglesd
Copy link
Contributor Author

I don't know what I was thinking when I wrote this issue. Of course supporting windows is way more than the CI.

However, I think having native windows support will come after the cygwin/WSL one.

@panglesd panglesd removed the CI label May 31, 2022
@pitag-ha
Copy link
Member

However, I think having native windows support will come after the cygwin/WSL one.

With WSL, are you referring to WSL2? If so, I think that should already work (it's just a Linux VM inside the Windows system, so our Linux installer should just work fine in there, if I'm not missing anything).

About cygwin: that might be a good first step as I think it would be considerably easier. However: I used to think that cygwin support would also be good as a first step to then tackle native Windows support from there (possibly after an intermediate step through MSYS2). However, if I understand correctly, cygwin support and native Windows support are so different from each other that working on one won't help when working on the other. So if we want to integrate cygwin support as a first step, we should be aware: we'll need to do a lot of "Windows" effort twice: once for cygwin support and once for native windows support and the two will be very different experiences.

All that being said, I don't really know much/anything about Windows and I'm mostly just repeating things I've heard/read somewhere, so please don't take anything I'm saying for granted. To repeat some more things I've read/heard:

The state of the Platform tools in terms of native Windows support

What's our Windows support roadmap?

For when are we aiming to support native Windows?

For the 5.0.0 compiler, the native Windows support is planned to work only on the C compiler mingw-w64 (see here). If I understand correctly, mingw-w64 can't be installed natively. So if we wanted to support native Windows for 5.0.0, what would our recommended native Windows workflow look like? Something like using MSYS2/cygwin to install the C compiler, remove MSYS2/cygwin and extract that compiler, install OCaml and the Platform tools, give up on the things that don't work anymore due to the strange C compiler installation and cross fingers that the rest will work? Again, I don't know much about how Windows works, so this might make more sense than I think.

From what I understand, from 5.1.0 on, the idea for the compiler is to natively support Windows based on the C compiler Visual Studio, which can be installed natively. So maybe we should aim for native Windows support for the Platform more or less in sync with the 5.1.0 compiler release? (which of course wouldn't mean that we shouldn't start yet, since native Windows support seems quite ambitious and will take its time...)

In any case, for any Windows questions (e.g. if the things I've said so far are correct), we should probably ask @dra27 (I hope it's ok to have pinged you! No need to answer already now. I know this issue isn't super relevant yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants