Releases: ocsigen/lwt
Releases · ocsigen/lwt
Lwt 2.7.0
General
- Values of types
'a Lwt.t
are now referred to as promises rather than threads (#300). The manual has not yet been updated.
Breaking
- After this release, Lwt will switch to semantic versioning. Future breaking changes will first require deprecation, then a major version number increase (#293).
- Lwt no longer supports OCaml 4.01 (#272).
Lwt_unix.fdatasync
is no longer available on macOS. It was calling an undocumented system call on that system (#285, Jeremy Yallop).
Planned to break in 3.0.0
- APIs in this category have deprecation messages attached. The messages will be displayed if you recompile your code, and can also be seen in #308.
Lwt_engine.libev
will have an argument for selecting the libev back end (#269, #294, Jeremy Yallop).Lwt_io.establish_server
will be replaced by a version that makes it difficult to leak file descriptors (#258, #260).Lwt_io.shutdown_server
will evaluate to a promise, which indicates when the close operation completes (#259).Lwt_unix.bind
will evaluate to a promise, sincebind
can block for Unix domain sockets (#296, requested David Sheets).ocamlfind
packageslwt.react
,lwt.ssl
, andlwt.glib
will be replaced by the newlwt_react
,lwt_ssl
, andlwt_glib
. These are now distributed in new OPAM packages with the same names, separately from OPAM packagelwt
(#301).
Additions
Lwt_unix.readv
andLwt_unix.writev
– zero-copy scatter/gather I/O (#291, #299).?fail_on_error
argument forLwt_log.load_rules
(#306, Daniil Baturin).Lwt_log.level_of_string
(#306, Daniil Baturin).
Changes
Lwt_stream.of_list
,Lwt_stream.of_array
,Lwt_stream.of_string
now immediately push all elements into the created streams (#239, Spiros Eliopoulos).
Deprecations
Lwt_stream.map_exn
in favor ofLwt_stream.wrap_exn
, which uses OCaml's standardresult
type (#295).
Bugs fixed
- Ungraceful failure if directory handle used after
Lwt_unix.closedir
(#292). - Buffer overflow in
Lwt_unix.readdir
andLwt_unix.readdir_n
(#292). - Unnecessary allocations in
Lwt_unix.readdir_n
(#292, found Jeremly Yallop).
Miscellaneous
- Annotate existing deprecations with
[@@ocaml.deprecated ...]
(5737f5b). - Improvements to the examples (#288, Rich Neswold).
- Documentation fixes, including by Rich Neswold.
- New tests and various minor internal improvements.
- Run tests in CI with all OCaml warnings enabled (dadb926).
- Much cleaner build output.
- Add
scratch/
directory for local use by developers.
Lwt 2.6.0
Additions
Lwt_stream.closed
andLwt_stream.is_closed
(#223, Spiros Eliopoulos).Lwt_switch.with_switch
(#256, Thomas Leonard).- Define
'a Lwt.result
as('a, exn) result
(#247, Simon Cruanes). Lwt_condition.broadcast_exn
(#241, Nicolas Ojeda Bar).Lwt_unix.utimes
(#193).
Bugs fixed
- Memory leak in
Lwt_unix.readdir_n
(#229, diagnosed Thomas Leonard). - Memory leak in
Lwt.protected
(#56, #181, reported @ygrek, Mauricio Fernandez). Lwt_switch.turn_off
hook exception handling (995b704).- Handling of
ENOTCONN
when channels passed to handler ofLwt_io.establish_server
are closed (95fb431). - Duplicate exceptions on implicit close in
Lwt_io.with_connection
(b1afe45). - Deadlock in
Lwt_main.at_exit
(#48, #114, reported Jérôme Vouillon, Vincent Bernardoff). - Performance of
Lwt_preemptive.detach
(#218, #219, Mauricio Fernandez). - Bad hash functions for
libev
loops (#146, reported Mark Christiaens). - Hash of uninitialized data in
Lwt_io
(#217, reported Jeremy Yallop). - Update log sections after
Lwt_log.load_rules
(#188, reported @rand00). - Print three digits for milliseconds in
Lwt_log
(#264, Fabian Hemmer). - Do not truncate Unix job notification ids in C (#277, diagnosed @stijn-devriendt).
Deprecations
Lwt_stream.on_termination
: bind onLwt_stream.closed
instead.Lwt.make_value
,Lwt.make_error
: useresult
'sOk
andError
constructors.Lwt_pqueue
,Lwt_sequence
: use min-heaps and linked lists from another library (#135).Pa_lwt
,Pa_lwt_log
: usePpx_lwt
.
Miscellaneous
- Update examples to use PPX syntax instead of Camlp4 (#108, Peter Zotov).
- Set up Travis, AppVeyor for testing on Linux, OS X, Cygwin, and MinGW. MSVC also planned.
- Large amount of local documentation fixes (including by Hezekiah Carty, Etienne Millon, Leo Wzukw, Sebastien Mondet).
- A bunch of new tests.
Lwt 2.5.2
Lwt 2.5.1
Lwt 2.5.0
- API CHANGE: Functions in Lwt_io that were previously using a
~buffer_size argument now takes a ~buffer argument. - Accept ?buffer argument in Lwt_ssl.{in,out}_channel_of_descr.
- Use newer Ssl bigarray read/write functionality to avoid
allocation in Lwt_ssl. - Fix non-reentrant function calls (#136)
- IPv4 multicast support.
- Add support for if%lwt in ppx extension.
- Add Lwt.return_some.
- Disable log syntax extension by default in ppx.
Give [-log] as ppx argument to enable it. - Nanosecond precision for Lwt_unix.stat.
- Minor fixes + documentation improvements.
Lwt 2.4.8
Lwt 2.4.3
Lwt 2.4.2
- Fix the stub for
Lwt_unix.readdir
. - Change the default method for
Lwt_glib.install
(use the glib main loop by default: more portable). - Ignore invalid file descriptors returned by glib (like the emulation of
select
in glib does). - Use environment variables in
discover.ml
:- Use
LIBRARY_PATH
andC_INCLUDE_PATH
for searching headers. - Allow to pass flags for a library in
<LIB>_CLFAGS
and<LIB>_LIBS
.
- Use
- Add
Lwt_unix.on_signal_full
.
Lwt 2.4.1
Lwt 2.4.0
- Reimplement
Lwt_stream
:- Much simpler and more efficient.
- Do not use
Weak
. - Add bounded push streams.
- Add
Lwt.async
. - Add
Lwt_preemptive.run_in_main
. - Implement
Lwt_unix.get_credentials
on MacOS X/OpenBSD. - Ensure that
on_cancel
functions are executed first. - Better implementation of
Lwt.cancel
with more tests. - Simplify the API for Unix jobs.
- Better handling of the master lock in libev stubs.
- Windows fixes/updates:
- Pass
-lws2_32
instead ofws2_32.lib
if building with MinGW. - Fix a bug causing
Lwt_unix.read
/write
to block when a socket is not readable/writable. - Port
Lwt_process
andLwt_unix.system
to Windows.
- Pass
- Compatibility with OCaml 4.00:
- Add
O_SHARE_DELETE
toLwt_unix.open_flag
. - Add
-package compiler-libs.toplevel
for files usingToploop
.
- Add
- Do not use module
Sys
for signal handling to avoid OCaml code to be called in a C thread. - Fix
Lwt_unix.wrap_syscall
:try
instead ofLwt.catch
. - Fix a dead-lock between
Lwt_unix_send_notification
andLwt_unix_recv_notifications
. - Fix #277: add a function to return the
Ssl.socket
of aLwt_ssl.socket
. - Fix problems with C libraries detection/linking.