Lwt 2.7.0
Written by Anton Bachin on January 06, 2017

Lwt 2.7.0 was released today. This release aims to (1) improve communication between maintainers and users, and (2) prepare for (minor) breaking changes to some APIs in Lwt 3.0.0 (planned for April).

To this end:

  • Lwt now uses deprecation warnings ([@deprecated]), especially for upcoming breaking changes. This required dropping support for OCaml 4.01.
  • There is a gradual, communicative, conservative process for deprecation and breaking. Maintainers of packages in OPAM get notified proactively. If you have code not published in OPAM, watch the Lwt repo, recompile the code at least once in three months, or subscribe to the Lwt announcements issue.
  • If a planned breaking change is a bad idea, please let the maintainers know when you see the warning.
  • Lwt now uses semantic versioning. The major version will grow slowly but steadily, but this does not mean that the whole API is being redesigned or broken.

If you are releasing a package to OPAM that depends on Lwt, it is not recommended to constrain Lwt to its current major version. A major release of Lwt will break only a few APIs, and your package is likely not to be affected – if it is, you will be notified. You may, however, wish to constrain Lwt to a major version in your private or production code.

Additional changes

  • The main OPAM package lwt is getting rid of some optional dependencies in 3.0.0, which are now installable through separate OPAM packages lwt_ssl, lwt_glib, lwt_react. This is to reduce recompilation of Lwt when installing OPAM packages ssl, lablgtk, and react.
  • Values of types 'a Lwt.t are now called promises rather than threads. This should eliminate a lot of confusion for beginners.

Lwt 2.7.0 also has a number of more ordinary changes, such as bug fixes and the addition of bindings to writev and readv. See the full changelog.

Future work

I am working on an all-new manual, including fully rewritten API documentation with examples. It should be ready towards the end of winter.

My hope is that all the above allows Lwt to be taken progressively into the future, at the same time making development more open and more humane.

Discuss on reddit!