Lwt 3.3.0 and Lwt_ppx 1.1.0 released – nice stack traces restored



We are pleased to announce release 3.3.0 of Lwt, the promise and concurrent I/O library. Lwt_ppx 1.1.0 is released simultaneously.

The main highlight is that proper stack trace support is restored in the PPX (thanks Gabe Levi!). Stack traces now look like this:

Raised at file "pervasives.ml", line 32, characters 17-33
Called from file "test.ml" (inlined), line 1, characters 14-29
Called from file "test.ml" (inlined), line 6, characters 23-39
Called from file "test.ml", line 13, characters 13-31
Called from file "src/core/lwt.ml", line 1950, characters 23-26
Re-raised at file "test.ml", line 8, characters 2-117
Re-raised at file "test.ml", line 25, characters 0-70

For a couple years, they would just stop at the src/core/lwt.ml entry (argh!), even though, in this case, Pervasives.failwith was called at test.ml line 1.

There are several other important fixes and improvements. From the changelog:

Bugs fixed

  • Restore backtrace support (#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, @jsthomas).



Many thanks to all the contributors!


I’m very excited to see the return of proper stack traces, but I wish it happened a week ago when I had to debug some stuff without them. :slight_smile:


On the subject of Lwt.bind, I think we will delay and/or maybe abandon the plan to change its semantics. So, that won’t break in 4.0.0. I’ll post in the threads where that was discussed a bit later.