We are glad to announce release 4.0.0 of Lwt, the library providing promises and asynchronous I/O. It is now installable from opam:
opam update && opam upgrade lwt
Lwt faithfully follows semantic versioning, so 4.0.0 does not come with big new features. Instead, the purpose of 4.0.0 is to make several breaking changes, each relatively minor, but which add up to a major, much-needed cleanup of the Lwt packaging and codebase. See the full changelog. There are also focused summaries of each breaking change, with instructions on how to adapt if your code is affected  .
lwt.logare now factored out into
lwt.preemptivehas been merged into
Lwt_chanhad no users and were deleted.
The result of all these changes is a much simpler, stock Dune build setup, fewer system dependencies, and a straightforward repo structure that can be visualized by human beings We hope this helps with Lwt development in the long term.
We are also announcing several breaking changes planned for Lwt 5.0.0. Most of these will affect very few users, but one is worth mentioning here:
choose, and similar functions will raise
Invalid_argumentif called with an empty list of promises. Before, they would return a promise that was pending forever.
Again, see the full changelog. Please let us know if you object to any of the breaking changes. We announce them both to warn users, and so that users can warn us
Lwt announces all breaking changes three months ahead of time in minor (
x.Y.0) releases. We try to proactively find affected code in opam and cc the maintainers. If your code is not in opam, we recommend either reading the changelogs of each release, announced here on
discuss.ocaml.org, or subscribing to the Lwt announcements issue.
Thanks to all the contributors, listed in the 4.0.0 and 3.x.y changelogs! In addition, the opam repository maintainers deserve thanks, as merging this release took quite a bit of work. In particular, thanks to at least @hcarty, @hannes, @kit-ty-kate, and @avsm.
Happy concurrent programming!