Lwt 4.0.0 — a major cleanup of the repo



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 [1] [2].

In short:

  • lwt.ppx, lwt.syntax, lwt.log are now factored out into lwt_ppx, lwt_camlp4, lwt_log.
  • lwt.preemptive has been merged into lwt.unix.
  • lwt.simple-top and Lwt_chan had no users and were deleted.

During Lwt 3.x.y, we also moved lwt_ssl and lwt_glib into separate repos, substantially clarified Lwt’s C code, and documented the Lwt core.

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 :slight_smile: 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:

  • Lwt.pick, choose, and similar functions will raise Invalid_argument if 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 :slight_smile:

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!