Asynchronous data type with typed errors.
Scala 3 Support is here!
Published on ScalaJS 1.x, Scala 2.12, 2.13, and 3.0.0.
Big thanks to @Avasil @paualarco @Hiosdra @eliav-lavi for contributions!
This release includes a highly requested feature of better stack traces for IO
!
Big thanks to @RaasAhsan and @djspiewak for providing the original implementation that we have ported.
They are enabled by default, but it is configurable. Refer to Stack Traces section for more details.
We have measured about 10-30% performance hit in CACHED mode (the default) in microbenchmarks.
If you have any performance tests, we would greatly appreciate any reports!
If the hit is too big, you can disable the stack traces with -Dmonix.bio.stackTracingMode=none
.
Running IO
isolates Local
, which was not available in the Future
, resulting in runToFuture
.
This release enables it and unblocks compelling use cases, such as reading proper request context in Akka HTTP Directive.
We've created an AkkaHTTP Example that demonstrates it.
More information about Local
can be found in the new Local documentation.
IO.when
, unless
, raiseWhen
, raiseUnless
tapEval
as
, none
, some
, left
, right
absorb
, absorbWith
*>
<*
Big thanks to @Avasil @alexandru @ptr97 @VladPodilnyk @GKhotyan @mbszarek @WesselVS for contributions!
First long-term stable release.
Binary compatibility will be kept in the entire 1.x.x
line.
Big thanks to all contributors and people showing interest in the library!
The first stable release of Monix BIO.
It covers almost entire monix.eval.Task
API and introduces extra type parameter for errors (like a built-in Task[Either[E, A]]
and relevant combinators.
Missing Task
combinators are:
BIO.gatherN(n)(list.map(f))
parMapN
and parTupled
from Cats syntaxfinal def flatMapLoop[E1 >: E, S](seed: S)(f: (A, S, S => BIO[E1, S]) => BIO[E1, S]): BIO[E1, S] =
this.flatMap { a =>
f(a, seed, flatMapLoop[E1, S](_)(f))
}
0.1.1
version will be released as soon as these are added.
The project will maintain binary compatibility in 0.1.x line. It is suitable for general usage but I would not recommend building a lot of libraries on it just yet unless you are fine with upgrade in few months.
Not all scaladocs are updated for BIO and currently there is no other documentation on the website. It will be my priority in April. Until then I consider the project as something for more advanced user who are already familiar with idea of IO Monad and error type exposed in the type parameter.
I'm really grateful to all the contributors (in the order of commits):
As well as all the people who encouraged me and showed interest in the project :blush: