Repository activity
40458 results across all weeks
ocsigen/js_of_ocaml
Js_of_ocaml: Binaryen's wasm-opt is now optional for wasm_of_ocaml. Without it, the compiler emits a missing-wasm-opt warning and uses its own optimization passes instead. (#2571)
oxcaml/merlin
No recorded changes this week.
oxcaml/opam-repository
OxCaml installation: an open issue reports that opam install oxcaml-compiler fails on systems without rsync installed. The reporter suggests documenting this dependency in the README; the issue remains open with no resolution yet.
1.7
CHANGES:
Thomas Leonard (@talex5)Enable Windows MDX
This begins activating Windows MDX support, now that we have mdx_skip in mdx.2.7.0+.
Anil Madhavapeddy (@avsm)Flow.single_write: document that a call that raises wrote nothing
Eio.Flow.single_write "writes at least one byte from bufs and returns the number of bytes written", but its documentation does not say what has been written when it raises.
Thomas Gazagnaire (@samoht)Is NUL a device through the unrestricted fs?
nt_path.mli says "Reserved names such as NUL and COM1 name devices in any Win32 directory", and lib_eio_windows/fs.mli says unrestricted fs paths use Win32 normalisation. But to_nt "C:\\a\\NUL" keeps NUL as a name, as tests/fs.md says it should, so Eio.Path.(env#fs / "C:\\a\\NUL") reaches a file called NUL where the Stdlib's open_in reaches the device.
Thomas Gazagnaire (@samoht)Is a resource's type meant to limit what its holder can do?
The capabilities design note reasons about authority by following what each function is handed, and says that since OCaml is not a capability language, code can ignore Eio and use the non-capability APIs directly. I've been trying to close that second gap (refusing the non-capability APIs at compile time), and found two ways a function can do more than its a…
Thomas Gazagnaire (@samoht)Knowing when a domain has nothing left to run
In console (a terminal UI library), I have a recording mode for tests: time is virtual, and it jumps to the next sleep once nothing in the program can run. Eio_mock.Backend already does this, but it has no real IO, and the programs I record run under Eio_main.
Thomas Gazagnaire (@samoht)Open files can't be renamed or deleted with eio_windows
A file that Eio holds open on Windows cannot be renamed or unlinked, and a directory holding such a file cannot be renamed either:
Thomas Gazagnaire (@samoht)Prepare release
Thomas Leonard (@talex5)Raw Unix_error from pread/pwrite and Unix datagram sockets on Windows
With Eio 1.7 on Windows, three calls let a Unix.Unix_error through instead of an Eio.Io. This program checks each of them, and its Windows step prints:
Thomas Gazagnaire (@samoht)Switch Eio_windows over to IO completion ports
This is my long-running PR to switch Eio Windows over to use IOCP, based on @patricoferris ' bindings but further extended for feature completeness and to deal with Windows quirks. This is a draft PR as I was hoping @samoht could verify that this branch fixes the number of Windows issues he's reported recently. I'm also delighted that Forester 6.0 works on …
Anil Madhavapeddy (@avsm)UDP receive raises Connection_reset on Windows after a send to a closed port?
When a UDP socket on Windows sends to a port nobody holds, the ICMP port unreachable comes back as an error on its next receive. With eio_windows that receive raises Eio.Io Net Connection_reset ... "recvfrom", where Linux and macOS keep waiting for a datagram: program, failing Windows step (Eio 1.7).
Thomas Gazagnaire (@samoht)WSAEMSGSIZE from Net.recv instead of a truncated datagram
The doc of Eio.Net.recv says the excess bytes of a datagram "may be discarded". On eio_windows a datagram larger than the buffer raises instead, and the byte that did fit is lost too:
Thomas Gazagnaire (@samoht)Wrap Not_found exception from Unix.getnameinfo
OCaml's documentation says it "Raises Not_found if an error occurs" (this can happen if networking isn't configured). Turn it into an Eio.Io exception.
Thomas Leonard (@talex5)abstract Unix addresses are accepted by eio_windows
Windows has no abstract Unix-domain namespace, yet with Eio 1.7 Eio.Net.listen on (`Unix "\000eio-repro") succeeds there twice in a row, and both sockets end up unnamed, so no client can reach them:
Thomas Gazagnaire (@samoht)eio_linux: domains from Domain_manager have no io_uring fallback, so ENOMEM (RLIMIT_MEMLOCK) kills the program
Eio_main.run falls back to eio_posix when the main domain can't create an io_uring (ENOMEM since #852), but domains started with Eio.Domain_manager / Eio.Executor_pool get no fallback: Eio_linux.run builds the domain manager with run_event_loop ?fallback:None config, so with_sched turns ENOMEM into failwith "io_uring is not available (ENOMEM)" and the whole …
劉昱廷 Yu-Ting Liu (@GongYuanCaiJi)eio_posix: File.sync and Path.sync_dir do not flush the drive's cache on macOS
Eio.File.sync and Eio.Path.sync_dir on eio_posix both end in Unix.fsync (Low_level.fsync in lib_eio_posix/low_level.ml, called from flow.ml and fs.ml). On macOS, fsync(2) gives the data to the drive but does not ask the drive to write its cache out. The man page says:
Thomas Gazagnaire (@samoht)eio_posix: `mkdir "x/."` creates x and `rmdir "x/."` removes x
On eio_posix, mkdir "missing/." creates missing and rmdir "d/." removes d. Linux and macOS fail both (ENOENT and EINVAL), and so does eio_linux. tokenise in lib_eio_posix/path.ml reads a final . as a trailing slash ("path/." is the same as "path/"), but mkdir and rmdir treat the two differently.
Thomas Gazagnaire (@samoht)