Releases: ocsigen/lwt
Releases · ocsigen/lwt
Lwt 4.2.0, Lwt_ppx 1.2.2, Lwt_react 1.1.2
Additions
Lwt.both
(#668, Brendan Long, Jeremy Yallop).- ppx_let support with
open Lwt.Infix
(#667, Brendan Long). Lwt_stream.of_seq
(#646, Hezekiah Carty).Lwt_io.is_closed
(#635, Andreas Garnaes).Lwt_unix.IO_vectors.byte_count
(#645, Raphaël Proust).- Support for higher baud rates in
Lwt_unix.tcgetattr
andLwt_unix.tcsetattr
(#678, Frédéric Fortier). - Replacement functions in
Lwt_main
for deprecated functions based onLwt_sequence
(#660).
Bugs fixed
- OCaml 4.08 compatibility (#658).
- Stack overflow in
Lwt_stream.iter_p
(#432, Varun Kohli). - Incorrect bounds check in
Lwt_bytes.mincore
(#627, Cédric Le Moigne). Lwt_bytes.mincore
will not be available in future releases of OpenBSD (#663, Kenneth Westerback).- Missing header in the Android build (#652, Justus Matthiesen).
- Build broken on MSVC (98303de, 85535f7, Dmitry Bely).
- Build broken on OpenBSD (#672, Christopher Zimmermann).
Lwt_io.of_bytes
produces a channel with inaccurate positions (#636, Nathan Rebours).Lwt_io._.read_int
behaves incorrectly on 32-bit systems (#671, reported Dmitry Bely).- Inaccurate locations for errors related to
;%lwt
(#602, @kandu). (_ : t)
not recognized as a catch-all pattern by the PPX (#640, Florian Angeletti).- Race condition in
Lwt_react.E.limit
(#606, Avni Fatehpuria). - Premature deallocation in
Lwt_react.E.with_finaliser
andLwt_react.S.with_finaliser
(#626, El-Hassan Wanas).
Miscellaneous
- New tests for
Lwt_bytes
, portions ofLwt_unix
(#619, #621, #628, #630, #673, Cédric Le Moigne, Anurag Soni). - Test suite improvements (#656, Dave Parfitt).
- Clarifications for documentation of
Lwt.try_bind
,Lwt.pick
(#648, #650, Bikal Lem). - Fixed documentation of
Lwt_io.read_line
(#657, Yoni Levy). - Fixed some typos (#611, #613, Rich Neswold).
Lwt 4.1.0, Lwt_ppx 1.2.1
Additions
- Change license to MIT (#560).
Lwt_fmt
, an Lwt-aware version ofFormat
(#548, Gabriel Radanne).Lwt_io.establish_server_with_client_socket
(#586).
Bugs fixed
Lwt_stream.iter_n
: rename?max_threads
argument to?max_concurrency
(#581, Hezekiah Carty).- PPX: reject
match
expressions that have onlyexception
cases (#597, Raphaël Proust).
Miscellaneous
Lwt 4.0.1
Lwt 4.0.0, Lwt_ppx 1.2.0, Lwt_react 1.1.1
Breaking
These changes were announced in Lwt 3.1.0 and Lwt 3.2.0. See #453 about smooth upgrade paths.
- Delete package
lwt.ppx
. The PPX syntax is in packagelwt_ppx
since Lwt 3.2.0 (#338). - Remove
>>
syntax from the PPX (#495). - Delete modules
Lwt_log
,Lwt_daemon
,Lwt_log_core
, and packagelwt.log
. These are in packagelwt_log
since Lwt 3.2.0, but it is recommended to useLogs_lwt
from the logs library instead (#484, initiated Hannes Mehnert). - Delete package
lwt.preemptive
. It is an alias forlwt.unix
since Lwt 3.2.0 (#487). - Delete package
lwt.syntax
. The Camlp4 syntax is in packagelwt_camlp4
since Lwt 3.2.0 (#370). - Delete module
Lwt_chan
, a predecessor ofLwt_io
(#441). - Delete package
lwt.simple-top
, a predecessor ofutop
(#371). - Make resolvers (
Lwt.u
) contravariant (#458).
Planned to break in 5.0.0
Lwt.pick
will raiseInvalid_argument
on the empty list, instead of returning a forever-pending promise. Also applies toLwt.choose
,Lwt.npick
,Lwt.nchoose
, andLwt.nchoose_split
(#562, Tim Reinke, prompted Hezekiah Carty).- Remove translation of
[%lwt ...]
toLwt.catch
from the PPX (#527). - Remove
-no-debug
option from the PPX (#528). - Remove
Lwt_log
support from the PPX (#520).
Bugs fixed
Lwt_io.file_length
now fails withEISDIR
when used on a directory (#563, requested Cedric Cellier).Lwt_react.E.limit
andLwt_react.S.limit
now working more correctly (#566, @Freyr666).
Miscellaneous
- Documentation improvements (#561, Jason Evans).
Lwt 3.3.0, Lwt_ppx 1.1.0
Bugs fixed
- Restore backtrace support in the PPX (#554, #556, Gabe Levi).
- Serious logic error that could cause Lwt to hang or crash (#549, reported @koen-struyve).
- All
Lwt_list
functions are now tail-recursive (#538, Joseph Thomas).
Additions
Miscellaneous
Lwt_ppx 1.0.1, Lwt 3.2.1
Lwt 3.2.1 is released because it still packages lwt.ppx
, a deprecated copy of package lwt_ppx
, and the two packages should be kept in sync.
Deprecations
- All PPX options are deprecated and should not be used (#534).
- The
[%lwt ...]
PPX syntax should be replaced byLwt.catch
(#534).
Fixes
- Clean up PPX
-help
usage message output (#525, Zan Doye).
Miscellaneous
Lwt 3.2.0
Additions
Lwt_mvar.take_available
,Lwt_mvar.is_empty
(#459, Hezekiah Carty).Lwt_io.open_temp_file
,Lwt_io.with_temp_file
(#467, Joe Thomas).- New reference documentation for module
Lwt
(#469). Lwt_pool.clear
and?dispose
argument forLwt_pool.create
(#483, Hezekiah Carty).Lwt_pool.wait_queue_length
(#493, Jerome Vouillon).
Bugs fixed
Lwt.npick
never worked (#447, Zack Coker).Lwt_pool.use
now always calls?validate
on elements (#461, Joe Thomas).- Better locations generated by the PPX (#470, Fabian Hemmer).
- Keep worker thread count accurate in
Lwt_unix
whenpthread_create
fails (#493, @koen-struyve). - Leaked exceptions in
Lwt_list
(#499). - Memory leak in
Lwt_unix.getnameinfo
(#503, Hannes Mehnert).
Planned to break in 4.0.0
See #453 for details and instructions about planned breakage in Lwt 4.0.0.
- The semantics of Lwt will be adjusted for better exception and stack safety (#500).
- The PPX will be factored out into its own opam package,
lwt_ppx
. This package is installable from opam now, as of Lwt 3.2.0 (#338). - Similarly, the deprecated Camlp4 syntax will be factored out into
lwt_camlp4
, which is installable from opam now (#370). - Modules
Lwt_log
,Lwt_log_core
,Lwt_log_rules
, andLwt_daemon
are being deprecated and factored out into opam packagelwt_log
, also installable from opam now. Use the logs library for logging, in particular moduleLogs_lwt
. Direct daemonization is deprecated on most platforms (#484, Hannes Mehnert). - The
>>
construct from the PPX will be deleted (#471, Raphaël Proust). - Package
lwt.preemptive
is being merged intolwt.unix
. In 3.2.0,lwt.preemptive
becomes an alias forlwt.unix
, and the package namelwt.preemptive
will be deleted in 4.0.0 (#487).
Deprecations
Lwt.waiter_of_wakener
should not be used, as it can lead to soundness bugs in future (but not current) Lwt (#458).Lwt_sequence
was deprecated in Lwt 2.6.0, but it now has a warning attached, as doLwt.add_task_r
andLwt.add_task_l
, which use it (#361).- Use of the following functions is discouraged, but they have not yet received deprecation warnings:
Lwt.with_value
,Lwt.cancel
,Lwt.state
,Lwt.ignore_result
(#359, #469).
Miscellaneous
Lwt_ssl 1.1.1
- Compatibility with
-safe-string
, and thus OCaml 4.06.Lwt_ssl.read
andLwt_ssl.write
now take a buffer of typebytes
as argument, rather than a buffer of typestring
(#479).
Lwt 3.1.0
Additions
- Port to Jbuilder (#374, Andrew Ray).
Lwt_io.establish_server_with_client_address
(#346, Rudi Grinberg).Lwt_unix.getcwd
(#403, Raphaël Proust).
Planned to break in 4.0.0
- Delete
lwt.simple-top
(#371). - Delete
Lwt_chan
(#441).
Fixes
- Make
Lwt_log
functions tail-recursive (#348, Jan Doms). - Make more of
Lwt_list
tail-recursive (#347, Jan Doms). - Improve string messages in exceptions (#368, #382, Jan Doms, Raphaël Proust).
- Don't call
Unix.set_nonblock
orUnix.clear_nonblock
unnecessarily on some fds (#356, David Sheets). Lwt_unix.sleep
andLwt_unix.timeout
returning too early when using libev (#433, Stijn Devriendt).Lwt_sequence.fold_r
iterating the wrong way in some cases (#405, Stijn Devriendt).- Build conflicts in some cases due to duplicate
cst_to_constr
function (#362, Jérémie Dimino). - Don't use deprecated
readdir_r
system call (#430, Raphaël Proust).
Miscellaneous
- The Lwt core,
lwt.ml
, has been thoroughly refactored and commented (#354, reviewed Gabriel Radanne, Edwin Török, Raphaël Proust, Jan Doms, Fabian Hemmer, Sebastien Mondet, Simon Cruanes, Anil Madhavapeddy, Pierre Chambart, and many others). - Lots of tests for most of the Lwt core (#339, #389, #392, #440, #448, #450, Joseph Thomas, Ryan Slade).
- Documentation fixes (including by Joseph Thomas, Raphaël Proust, Richard Degenne, Stavros Polymenis).
- Contributing documentation (#379).
- Massively adjust whitespace for legibility (#400, #409, #416, Richard Degenne).
- Improvements to CI (Etienne Millon, Raphael Rafatpanah, Zack Coker, Yotam Barnoy).
- The additional packages
lwt_ssl
,lwt_react
,lwt_glib
get new minor releases, the change being new Jbuilder build systems (#374, Andrew Ray).
Lwt 3.0.0
Breaking
- These changes were originally announced in release 2.7.0 (#308).
Lwt_engine.libev
now has an optional argument for selecting the libev back end (#269, #294, Jeremy Yallop).Lwt_io.establish_server
has been changed to make it more difficult to leak file descriptors (#258, #260).Lwt_io.shutdown_server
now evaluates to a promise, which completes when the listening socket'sclose(2)
operation completes (#259).Lwt_unix.bind
now evaluates to a promise, because thebind(2)
system call can block for Unix domain sockets (#296, requested David Sheets).ocamlfind
packageslwt.react
,lwt.ssl
,lwt.glib
are replaced bylwt_react
,lwt_ssl
,lwt_glib
. These have been separate OPAM packages, under those names, since 2.7.0 (#301).