ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
548 stars 66 forks source link

Correct the backend selection for Cygwin #557

Closed dra27 closed 1 year ago

dra27 commented 1 year ago

os-family = "windows" covers both native Windows (os = "win32") and Cygwin (os = "cygwin"). Cygwin is a posix implementation, so it should be using eio_posix.

I encountered this while checking something else in opam-repository, so I haven't actually tried it with a Cygwin 5.1 switch, but if eio_posix isn't building on Cygwin, I would very strongly expect that to be a bug in eio_posix rather than that eio should actually be using eio_windows.

dra27 commented 1 year ago

Thanks! Just to confirm: "win32" means "64-bit Windows"?

Yes😉 It refers to the API - back in the nineties, there was Win16 and Win32... in a piece of marketing excellence, Microsoft decided Win64 would be really confusing, so to emphasise compatibility, 64-bit Windows has an API with 32 in the name 🤷

CI failed downloading "ocamlbuild.0.14.2+win" so I've restarted it. Update: still failing.

Looking into this, although at low speed... it's not strictly related to this PR (@polytypic is also seeing it)

talex5 commented 1 year ago

The opam problem is tracked at https://github.com/ocaml/opam-repository/issues/23954.

Oddly, it first says it downloaded it, and then that it couldn't:

[ocamlbuild.0.14.2+win] downloaded from https://github.com/ocaml/ocamlbuild/archive/refs/tags/0.14.2.tar.gz
...
[ERROR] The sources of the following couldn't be obtained, aborting:
          - ocamlbuild.0.14.2+win

It downloads OK for me.

talex5 commented 1 year ago

I tried rebuilding now the original issue is fixed. CI has been running for over 4 hours now, though!

talex5 commented 1 year ago

Windows CI is now failing with:

 -> installed yojson.2.1.0
Terminate batch job (Y/N)? 
^C[ERROR] User interruption

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build mdx 2.3.0
+- 

(after running for 5h 56m!)

Another build failed after 5h 55m with:

-> installed yojson.2.1.0
Terminate batch job (Y/N)? 
^C[ERROR] User interruption

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build stdlib-shims 0.3.0
+- 
talex5 commented 1 year ago

I rebased it and updated the dune-project file.