Skip to content

Releases: ocsigen/lwt

Lwt 5.8.0, Lwt_ppx 5.8.0

13 Nov 14:06
Compare
Choose a tag to compare

Note: To simplify the release process, Lwt_ppx versions now matches that of Lwt.

Improvements

  • Make Lwt_seq.of_list lazier, make Lwt_set.to_list tail-rec. (Samer Abdallah, #1019)
  • Convert more Lwt.fail into raise to increase availibility of backtraces. (#1008)

Documentation

  • Small fixes. (Nils André, #1001, #1006)
  • Convert manual to mld. (#951, Antonin Décimo)

Other

Lwt 5.7.0

23 Aug 07:03
Compare
Choose a tag to compare

Breaking API changes

  • Lwt_result.catch now takes a function (unit -> 'a t) rather than a promise ('a t). (#965)
  • Remove the deprecated Lwt.result type (use Stdlib.result instead). (#968)
  • Remove the deprecated Lwt.make_value and Lwt.make_result functions (use Ok and Error instead). (#968)
  • Remove the deprecated and unsafe waiter_of_wakener (keep the waiter around when you create the wakener instead). (#968)
  • Remove the deprecated Lwt_stream.on_termination and Lwt_stream.on_terminate (bind to Lwt_stream.closed instead). (#968)
  • Remove the deprecated Lwt_stream.result type (use Stdlib.result instead). (#968)
  • Remove the deprecated Lwt_stream.map_exn function (use wrap_exn instead). (#968)

Additions

  • Lwt.Exception_filter for enabling/disabling system-exception catching. (#964)
  • Lwt.reraise an exception raising function which preserves backtraces, recommended for use in Lwt.catch. (#963)
  • Expose Lwt_io.delete_recursively for deleting a directory and its content recursively. (#984, Antonin Décimo)
  • Lwt_preemptive.run_in_main_dont_wait to run a function in the main preemptive thread but without waiting for the result. (Kate Deplaix, #960)
  • Lwt_unix.handle_signal and Lwt_engine.forwards_signal to allow other IO libraries (such as Eio) to share signal handlers. (Thomas Leonard, #993, #991)

Build

  • Remove unused dependency in dune file. (#969, Kate Deplaix)
  • Fix some compilation warnings for C stubs with OCaml 5. (#976, Antonin Décimo)

Fixes

  • Use SA_ONSTACK on OCaml5 to avoid SIGSEGV. (Thomas Leonard, #993, #981)
  • Fix race in worker loop. (Thomas Leonard, #993, #994)
  • Fix marshall header size in Lwt_io.read_value. (Simmo Saan, #995)

Misc

  • Resolve paused promises only once in main loop. This lets Lwt.pause behave identical to Lwt_unix.yield. (#917, Christopher Zimmermann, Favonia)

Lwt 5.6.1

29 Jun 12:57
Compare
Choose a tag to compare

Bugs fixed

  • Fix null file descriptor being closed when used as redirection for standard fd of child processes. (#957, Antonin Décimo)

Lwt 5.6.0, Lwt_domain 0.2.0, Lwt_ppx 2.1.0, Lwt_ppx_let 5.6.0, Lwt_react 1.2.0

27 Jun 07:42
Compare
Choose a tag to compare

Installability

  • Lwt is now compatible with OCaml 5.00. Lwt is now incompatible with OCaml 4.02. (#925, #923, Kate Deplaix, Patrick Ferris)
  • Lwt is now incompatible with OCaml.4.07 and earlier. (#947, Hannes Mehnert, Tim McGilchrist)
  • Lwt-unix is now compatible with OCaml 5.0.0. (#953, David Allsopp)

Additions

  • In the Lwt_io module, add ?cloexec:bool optional arguments to functions that create file descriptors (pipe). The ?cloexec argument is simply forwarded to the wrapped Lwt_unix function. (#872, #911, Antonin Décimo)
  • Add Lwt_result.error, Lwt_result.iter, and Lwt_result.iter_error for consistency with Stdlib. (#927, Antonin Décimo)
  • Lwt_result.bind_error. (#943, Boning Dong)
  • Add ?cloexec parameter to Lwt_io.pipe. (#911, Antonin Décimo)

Misc

  • On Windows, make Lwt_process.create_process duplicate standard handles given to the child process if they're not inheritable, to mimic the behaviour of Unix.create_process. (#909, Antonin Décimo)
  • Add missing dependency to cppo in lwt-react's opam file. (#946, Rizo I)
  • Improve documentation (especially internal links). (#928, Antonin Décimo)
  • Fix documentation of infix choose. (#952, Reynir Björnsson)
  • Only define OCAML_NAME_SPACE for OCaml<5.0.0. (#929, Antonin Décimo)
  • Replace mentions of Pervasives with Stdlib in the doc. (#954, Antonin Décimo)
  • Improve deprecation message for auto_yield. (#908, Seb Mondet)
  • Fix mirage tutorial link. (#936, Tuomas Lukka)
  • Fix issues in opam file. (#937, Andreas Hauptmann)

Fixes

  • Fix win32_spawn leaking dev_null fd in the parent process. (#906, Antonin Décimo)
  • Prefer SetHandleInformation to DuplicateHandle in set_close_on_exec for sockets. DuplicateHandle mustn't be used on sockets. (#907, Antonin Décimo)
  • Lwt.pick and Lwt.choose select preferentially failed promises as per documentation (#856, #874, Raman Varabets)
  • Use the WSA_FLAG_NO_HANDLE_INHERIT on Windows when creating sockets with WSASocket if the cloexec (non-inheritable) parameter is true. Fixes a Windows problem where a child process would inherit a supposedly non-inheritable socket. (#910, Antonin Décimo)
  • Fix macOS/arm64 tests which have a 16k page. (#932, Kate Deplaix)
  • Fix Lwt_unix.closedir incorrectly checking the return value of closedir(3). (#942, Antonin Décimo)
  • Fix custom_operations struct not fully initialized after OCaml 4.08. (Antonin Décimo, #918)
  • Fix missing include directive. (#940, Antonin Décimo)
  • Fix missing initialisation in Unix stub. (#941, Antonin Décimo)

Deprecations

  • Alias Lwt_result.map_err and Lwt_result.bind_lwt_err to Lwt_result.map_error and Lwt_result.bind_lwt_error for consistency with Stdlib. (#927, Antonin Décimo)

Lwt 5.5.0, Lwt_domain 0.1.0, Lwt_ppx 2.0.3, Lwt_ppx_let 5.5.0, Lwt_react 1.1.5

26 Nov 09:39
Compare
Choose a tag to compare

Deprecations

  • Lwt_main.yield and Lwt_unix.yield are deprecated in favor of the generic Lwt.pause, and Lwt_unix.auto_yield is deprecated in favor of the new Lwt_unix.auto_pause. Currently, Lwt_main.run resolves paused promises more frequently than yielded promises; the difference is unintended but existing applications could unintentionally depend on it. (#855, #858, Favonia)

Fixes

  • Use is_blocking in dup and dup2 to fix ENOTSOCK on Windows. (#869, Antonin Décimo)

  • Lwt_unix.lstat was incorrectly calling Unix.stat on Win32. Fixes the behavior of Lwt_io.with_temp_dir following symlinks to directories on Win32. (#883, Antonin Décimo)

  • Support deleting symlinks on Windows during cleanup of Lwt_io.with_temp_dir. (#886, Antonin Décimo)

  • Lwt_react.S.l[2-6]_s used polymorphic equality which could cause errors when handling functional values. (#893, Jérôme Vouillon)

  • On Windows, treat ERROR_BROKEN_PIPE on read as zero-read instead of error. See OCaml PR #4790. (#898, Antonin Décimo)

  • Fix compilation under MSVC by replacing Noreturn with CAMLnoreturn. (#880, #887, Nicolás Ojeda Bär)

Additions

  • Lwt_bytes.blit_from_string: string complement of Lwt_bytes.blit. (#882, Hugo Heuzard)

  • Lwt_seq: a Seq-like data-structure with Lwt delayed nodes. (#836, #842, Zach Shipko)

  • Lwt_unix.auto_pause: the replacement of Lwt_unix.auto_yield that uses Lwt.pause instead of Lwt_unix.yield. (#855, #858, Favonia)

  • Lwt_stream.return, Lwt_stream.return_lwt: singleton stream constructors. (#864, Boning Dong)

  • Add ?to_dir param from Unix.symlink to Lwt_unix.symlink wrapper. (#884, Antonin Décimo)

  • Lwt_stream.of_lwt_seq to convert an Lwt-sequence into an Lwt-stream. (#873)

  • Support IPv6 (always) and PF_UNIX (with OCaml >= 4.14) socketpair on Windows. (#870, #876, Antonin Décimo, David Allsopp)

  • In the Lwt_unix module, add ?cloexec:bool optional arguments to functions that create file descriptors (dup, dup2, pipe, pipe_in, pipe_out, socket, socketpair, accept, accept_n). The ?cloexec argument is simply forwarded to the wrapped Unix function (with OCaml >= 4.05, see PR ocaml/ocaml#650), or emulated as best-effort with Unix.set_close_on_exec on older OCaml versions. (#327, #847, #872, #901, Antonin Décimo)

  • Lwt_domain: helpers for using domainslib from Lwt. (#860, Sudha Parimala)

Misc

  • Code quality improvement: remove an unneeded Obj.magic. (#844, Benoit Montagu)

  • On Windows, use the Unicode API in C stubs and functions introduced in OCaml 4.06 to handle Unicode strings. Raise the minimum requirement to OCaml 4.06 (on Windows only). (#843, #903, Antonin Décimo)

  • More complete coverage in the CI. (#890, #894, #896, Sora Morimoto)

  • Code quality improvement: use exception pattern instead of try-with. (#895, Antonin Décimo)

  • Code quality improvement: fix warnings on 4.13. (#899)

Lwt 5.4.2

03 Aug 08:13
Compare
Choose a tag to compare

Bugs fixed

  • Fix compilation on Windows by providing missing dummy stubs (#868, Andreas Hauptmann, Antonin Décimo).

Lwt 5.4.1

31 May 10:07
Compare
Choose a tag to compare

Bugs fixed

  • Fix Lwt_fmt.stderr to actually point to stderr (#852, #850, Volker Diels-Grabsch).

  • Make temporary files created by Lwt_io.with_temp_dir deletable on Windows by removing the RO bit (#849, #861, Antonin Décimo).

  • Handle ECONNABORTED in Lwt_io.establish_server* (#829, #830, Reynir Björnsson, Hannes Mehnert).

Lwt 5.4.0, Lwt_ppx 2.0.2, Lwt_react 1.1.4

18 Dec 14:48
Compare
Choose a tag to compare

Installability

  • Support for OCaml 4.12 (#804, #826, Kate Deplaix).

  • lwt_ppx now uses ppxlib. This introduce a transitive dependency to OCaml.4.04 (#807, Philippe Veber).

Bugfixes

Additions

Miscellaneous

  • Avoid double-reversing when traversing lists. This may change the order in which some promises are collected, which may change which of several rejection is arbitrarily selected during concurrent traversal (#784).

  • Numerous documentation improvements (including external contributions from Bikal Lem, Sudha Parimala, and Hannes Mehnert).

Lwt 5.3.0

23 Apr 06:34
Compare
Choose a tag to compare
  • Add let* and and* in Lwt.Syntax and Lwt_result.Syntax (#775, Rahul Kumar).
  • Also add let+ and and+ (#776, Craig Ferguson).
  • Add Lwt_result.both (#775, Rahul Kumar).
  • Always use libev if detected (#601).

Lwt 5.2.0, Lwt_ppx 2.0.1

09 Mar 04:18
Compare
Choose a tag to compare