Skip to content

Releases: ocaml-multicore/eio

1.2

23 Nov 11:33
f26d70d
Compare
Choose a tag to compare

CHANGES:

Changes:

  • Make fork_action.h a public header (@patricoferris #769, reviewed by @talex5).
    Allows other libraries to add new actions.

  • Record trace event when spawning processes (@talex5 #749).
    Spawning a subprocess can take a long time in some cases, so show it clearly in the traces.

  • Eio_unix.Net: make some return types more polymorphic (@talex5 #744).

Bug fixes:

Linux backend:

  • Allow alloc_fixed_or_wait to be cancelled (@talex5 #753).

  • Avoid triggering a (harmless) TSan warning (@talex5 #754, reported by @avsm).

Windows backend:

  • Unregister FDs on cancel (@talex5 #756).
    Fixes exception Unix.Unix_error(Unix.ENOTSOCK, "select", "").

  • Work around problems in Unix.getaddrinfo (@talex5 #780).
    Fixes e.g. No addresses found for host name "127.0.0.1".

  • Group ECONNABORTED with other connection reset errors (@talex5 #783).

  • Check has_symlink for tests (@create2000 #771, reviewed by @patricoferris and @talex5).

  • Improve openat error handling (@talex5 #742, reported by @kentookura).
    Fixes exception Unix.Unix_error(Unix.ENOENT, "openat", "").

Documentation:

Build and test:

1.1

28 May 12:10
77d8810
Compare
Choose a tag to compare
1.1

CHANGES:

New features:

Documentation:

Linux backend:

  • Require Linux >= 5.15 (@talex5 #720, reviewed by @SGrondin and @avsm).
    Removes a work-around that required checking whether every flow was a tty.

  • Don't call submit immediately before wait (@talex5 #728).
    This is slightly faster and makes the traces clearer.

  • Don't record submit events when there's nothing to submit (@talex5 #729).
    Makes the traces a bit clearer.

  • Split flow into its own file (@talex5 #727).

  • Add work-around for signals race (@talex5 #734).

POSIX backend:

  • Add _BSD_SOURCE flag to fix build on OpenBSD (@prgbln #722).

  • Fix sandboxed path resolution on OpenBSD (@jebrosen #723, reviewed by @talex5).
    OpenBSD uses ELOOP when opening a symlink with O_NOFOLLOW.

Build and test:

  • Benchmarks: record uname, Eio backend, and number of cores (@talex5 #719).

  • Update to MDX 2.4.1 for OCaml 5.2 (@talex5 #712).

1.0

10 Mar 15:11
edfe8de
Compare
Choose a tag to compare
1.0

CHANGES:

New features:

  • Add Eio_unix.Cap module to enable Capsicum mode (@talex5 #697, reviewed by @SGrondin).

  • eio_linux: expose more functions in the Low_level module (@talex5 #705, reviewed by @SGrondin).
    Add all the functions used by other parts of eio_linux (openat, mkdir, read_link, unlink, rename and pipe).
    Tidied the API up a bit too:

    • mkdir_beneath is now just mkdir.
    • statx_confined is now just statx.
    • open_dir is gone; the single user now calls openat directly.

Documentation:

  • Add README documentation for Eio.Executor_pool (@SGrondin @talex5 #707, reviewed by @Sudha247).

  • eio_linux: remove logging (@talex5 #708, requested by @clecat).
    There were only two remaining uses of Logs, neither of which has proved useful.

Build:

  • Add upper-bound on MDX (@talex5 #706).
    The new version attempts to execute included blocks.

  • Fix tests to pass with both old and new Kcas (@polytypic #704).

  • Make posix open_beneath test idempotent (@SGrondin #703).

  • Executor_pool: mention requested weight in error message (@talex5 #702, reported by @yawaramin).

0.15

22 Feb 14:22
4f3ec08
Compare
Choose a tag to compare

CHANGES:

New features:

  • eio_posix: use directory FDs instead of realpath (@talex5 #694 #696, reviewed by @SGrondin).
    Using realpath was an old hack from the libuv days and subject to races. It was also slow.

  • Keep pool of systhreads for blocking operations (@SGrondin @talex5 #681).
    This is much faster than creating a new thread for each operation.
    It mainly benefits the eio_posix backend, as that uses lots of systhreads.

  • Make Switch.on_release thread-safe (@talex5 #684, requested by @art-w and @clecat).
    This allows resource pools to be shared between domains easily.

  • Add Eio.Path.read_link (@talex5 #686).

  • Add Eio_unix.Fd.is_open (@talex5 #690).

  • Include backtrace in systhread errors (@talex5 #688, reviewed by @SGrondin).
    Also, add Eio.Exn.empty_backtrace as a convenience.

  • eio.mock: add tracing support to mock backend (@talex5 #687).

  • Improve tracing (@talex5 #675 #683 #676, reviewed by @SGrondin).
    Update tracing section of README and trace more things
    (run_in_systhread, close, submit, traceln, cancellation and domain spawning).

Documentation:

Bug fixes:

  • eio_linux: retry openat2 on EAGAIN (@talex5 #693, reviewed by @SGrondin).

  • eio_posix and eio_windows: check for IO periodically (@talex5 #674).

  • Handle EPERM when trying to initialise uring (@talex5 #691).
    This can happen when using a Docker container.

Build and tests:

0.14

17 Jan 13:31
c502574
Compare
Choose a tag to compare

CHANGES:

New features / API changes:

  • Add Eio.Executor_pool (@SGrondin #639, reviewed by @talex5).
    Provides an easy way to distribute jobs across domains.

  • Add Fiber.first ~combine and Fiber.n_any (@SGrondin @talex5 #587).
    Allows keeping both results in the case where multiple fibers succeed.

  • Add Eio_mock.Backend.run_full with auto-advancing mock clock (@talex5 #644, reviewed by @SGrondin).
    Simplifies testing of code using clocks.

  • Add Buf_write.printf (@SGrondin @talex5 #655).

  • Add Net.listening_addr (@mefyl #555, reviewed by @patricoferris @talex5).
    Useful to get the socket's address if the OS assigns it.

  • Add Promise.try_resolve (@talex5 #646).

  • Remove Cancel_hook_failed exception (@talex5 #640).
    Didn't seem to be used and broke dscheck.

Tracing:

Performance:

Bug fixes:

  • Fix handling of very long IO vectors (@talex5 #653, reported by @Cjen1).

  • eio_posix: use caml_enter_blocking_section in more places (@talex5 #654, reviewed by @SGrondin).

  • eio_posix: work around caml_unix_alloc_sockaddr bug (@talex5 #651).

  • Remove default backtrace from Switch.fail (@talex5 #664).

Documentation:

Build / internals:

  • Allow closing synchronous streams (@talex5 #641, reviewed by @SGrondin).
    This isn't currently exposed in the public interface.

  • Fix non-idempotent tests (@SGrondin #662).

  • eio_windows: add explicit fmt dependency (@talex5 #643).

0.13

02 Nov 11:15
bc1e231
Compare
Choose a tag to compare

CHANGES:

New features / API changes:

Documentation:

Build and test changes:

0.12

29 Aug 10:42
ad7149d
Compare
Choose a tag to compare

CHANGES:

New features / API changes:

  • Replace objects with variants (@talex5 @patricoferris #553 #605 #608, reviewed by @avsm).
    Some potential users found object types confusing, so we now use an alternative scheme for OS resources.
    For users of the resources, the only thing that changes is the types:

    • Instead of taking an argument of type #foo, you should now take _ foo.
    • Instead of returning a value of type foo, you should now return foo_ty Eio.Resource.t.

    To provide your own implementation of an interface, you now provide a module rather than an object.
    For example, to provide your own source flow, use Eio.Flow.Pi.source (module My_source).

    If you want to define your own interfaces, see the Eio.Resource module documentation.

  • Add Eio.Pool (@talex5 @darrenldl #602, reviewed by @patricoferris).
    A lock-free pool of resources. This is similar to Lwt_pool.

  • Add Eio.Lazy (@talex5 #609, reviewed by @SGrondin).
    If one fiber tries to force a lazy value while another is already doing it,
    this will wait for the first one to finish rather than raising an exception (as Stdlib.Lazy does).

  • Add Eio.Path.native (@talex5 #603, reviewed by @patricoferris).
    This is useful when interacting with non-Eio libraries, for spawning sub-processes, and for displaying paths to users.

  • Add Flow.single_write (@talex5 #598).

  • Add Eio.Flow.Pi.simple_copy (@talex5 #611).
    Provides an easy way to implement the copy operation when making your own sink.

  • Eio_unix: add FD passing (@talex5 #522).
    Allows opening a file and passing the handle over a Unix-domain socket.

  • Add Process.run ?is_success to control definition of success (@SGrondin #586, reviewed by @talex5).

  • Add Eio_mock.Domain_manager (@talex5 #610).
    This mock domain manager runs everything in a single domain, allowing tests to remain deterministic.

  • Add Eio.Debug.with_trace_prefix (@talex5 #610).
    Allows prefixing all traceln output. The mock domain manager uses this to indicate which fake domain is running.

Bug fixes:

  • Fork actions must not allocate (@talex5 #593).
    When using multiple domains, child processes could get stuck if they forked while another domain held the malloc lock.

  • eio_posix: ignore some errors writing to the wake-up pipe (@talex5 #600).
    If the pipe is full or closed, the wake-up should simply be ignored.

Build/test fixes:

  • Fix some MDX problems on Windows (@polytypic #597).

  • The README depends on kcas (@talex5 #606).

  • Clarify configuration for lib_eio_linux and enable tests on other arches (@dra27 #592).

  • eio_linux tests: skip fixed buffer test if not available (@talex5 #604).

  • eio_windows: update available line to win32 (@talex5 #588 #591).

0.11

12 Jul 14:44
3fe5755
Compare
Choose a tag to compare

CHANGES:

New features / API changes:

  • Extend Eio.Condition API (@talex5 #563).

    • loop_no_mutex is a simpler and more efficient way to way for a condition.
    • register_immediate allows integration with other IO libraries.
  • Expose Eio.Stdenv.backend_id (@bord-o #560, reviewed by @talex5).
    Useful in tests to report which backend is being used.

  • Remove deprecated features (@talex5 #552, reviewed by @avsm).
    These were all already marked as deprecated in v0.10 and are now gone completely:

    • Fiber.fork_sub
    • Eio_unix.{FD,Ipaddr,socketpair,getnameinfo}
    • Eio_linux.{FD,get_fd,get_fd_opt}
    • Eio_posix.Low_level.Fd
  • Allow calling close more than once (@talex5 #547, requested by @anmonteiro, reviewed by @patricoferris, @avsm).

  • Add close to socket type (@talex5 #549).
    Simplifies the type signatures a bit by avoiding having to mention this everywhere.

Bug fixes:

  • Fix handling of empty path strings (@talex5 #569, reported by @SGrondin).
    Using "" instead of "." in some places resulted in an error.

  • eio_posix: fix update to watched FDs on cancel (@talex5 #574, reported and reviewed by @quernd).
    Cancelling the last watcher of an FD didn't remove it from the set passed to poll,
    which could result in constant wake-ups.

  • eio_posix: fix pread at end-of-file (@talex5 #581, reported by @SGrondin).
    It tried to return 0 instead of End_of_file, triggering an assertion.

  • eio_posix: don't reap non-Eio child processes (@talex5 #562).
    This allows spawning processes with e.g. the stdlib or Lwt
    (but see ocaml-multicore/lwt_eio#19 for Lwt support).

  • Preserve backtraces across Domain_manager.run (@talex5 #571).
    See ocaml/ocaml#12362.

  • Correct the backend selection for Cygwin (@dra27 #557).
    Use eio_posix, not eio_windows in this case.

Other changes:

  • Simplify dune files with dune 3.9's build_if (@talex5 #582).

  • Remove Waiters from Eio_core (@talex5 #567).
    Eio.Switch no longer uses this so it can finally be removed.

  • Use Fmt.Dump.signal to format signals (@talex5, @MisterDA #543).

Documentation:

  • Add some notes about thread-safety in the documentation (@talex5 #568).

0.10

02 Jun 10:57
687ebf9
Compare
Choose a tag to compare

New features / API changes:

  • Add Eio.Process for cross-platform subprocess support (@patricoferris @talex5 #499, reviewed by @anmonteiro @avsm @haesbaert).

  • Add Eio_unix.Net module (@talex5 #516, reviewed by @avsm).
    The Unix network APIs have been cleaned up and moved here, and some missing datagram operations have been added.
    send now takes an iovec, not just a single buffer.

  • Add support for domain local await (@polytypic @talex5 #494 #503).
    Allows sharing e.g. kcas data-structures across Eio and Domainslib domains.

  • Add initial eio_windows backend (@patricoferris @talex5 #497 #530 #511 #523 #509, reviewed by @avsm @polytypic).

  • Remove eio_luv backend (@talex5 #485).
    It was only used on Windows, and has been replaced by eio_windows.

  • Unify Eio_linux.FD and Eio_posix.Fd as Eio_unix.Fd (@talex5 #491).
    Now that eio_luv is gone, there is no need for different backends to have different types for wrapped file descriptors.

  • Move Eio.Stdenv.t to Eio_unix.Stdenv.base (@talex5 #498).
    Note that the rest of Eio.Stdenv is still there; only the definition of a full Unix-like environment has moved.

  • Deprecation cleanups (@talex5 #508).
    Removed some APIs that were already marked as deprecated in Eio 0.8.

Bug fixes:

Documentation:

Other changes:

0.9

11 Apr 08:27
72f9d77
Compare
Choose a tag to compare
0.9

CHANGES:

New features:

  • Add eio_posix backend (@talex5 @haesbaert #448 #477, reviewed by @avsm @patricoferris @polytypic).
    This replaces eio_luv on all platforms except Windows (which will later switch to its own backend). It is a lot faster, provides access to more modern features (such as openat), and can safely share OS resources between domains.

  • Add subprocess support (@patricoferris @talex5 #461 #464 #472, reviewed by @haesbaert @avsm).
    This is the low-level API support for eio_linux and eio_posix. A high-level cross-platform API will be added in the next release.

  • Add Fiber.fork_seq (@talex5 #460, reviewed by @avsm).
    This is a light-weight alternative to using a single-producer, single-consumer, 0-capacity stream, similar to a Python generator function.

Bug fixes:

  • eio_linux: make it safe to share FDs across domains (@talex5 #440, reviewed by @haesbaert).
    It was previously not safe to share file descriptors between domains because if one domain used an FD just as another was closing it, and the FD got reused, then the original operation could act on the wrong file.

  • eio_linux: release uring if Linux is too old (@talex5 #476).
    Avoids a small resource leak.

  • eio_linux: improve error handling creating pipes and sockets (@talex5 #474, spotted by @avsm).
    If we get an error (e.g. too many FDs) then report it to the calling fiber, instead of exiting the event loop.

  • eio_linux: wait for uring to finish before exiting (@talex5 #470, reviewed by @avsm).
    If the main fiber raised an exception then it was possible to exit while a cancellation operation was still in progress.

  • eio_main: make EIO_BACKEND handling more uniform (@talex5 #447).
    Previously this environment variable was only used on Linux. Now all platforms check it.

  • Tell dune about EIO_BACKEND (@talex5 #442).
    If this changes, dune needs to re-run the tests.

  • eio_linux: add some missing close-on-execs (@talex5 #441).

  • eio_linux: read_exactly fails to update file offset (@talex5 #438).

  • Work around dune enabled_if bug on non-Linux systems (@polytypic #475, reviewed by @talex5).

  • Use raw system call of getrandom for glibc versions before 2.25 (@zenfey #482).

Documentation:

  • Add HACKING.md with hints for working on Eio (@talex5 #443, reviewed by @avsm @polytypic).

  • Improve worker pool example (@talex5 #454).

  • Add more Conditions documentation (@talex5 #436, reviewed by @haesbaert).
    This adds a discussion of conditions to the README and provides examples using them to handle signals.

  • Condition: fix the example in the docstring (@avsm #468).

Performance:

Other changes: