Monix v3.0.0-RC4 Release Notes
Release Date: 2019-08-25 // over 4 years ago-
๐ Version 3.0.0-RC4 (August 25, 2019)
๐ Last release before
3.0.0
which will be released as soon as Cats-Effect 2.0.0 is available. At the time of writing release notes, it is only waiting on Cats 2.0.0 which is about to release next RC which will become stable version if no critical issues are discovered.๐ Any other development for this release is now frozen except if we discover critical bugs like memory leaks. All other changes will target
3.1.0
.๐
3.0.0
will be binary and source compatible with3.0.0-RC4
for Scala 2.12. Monix itself will be also binary compatible for 2.11 but it will have a dependency on Cats-Effect which is not. See Cats-Effect release notes for more details.๐ We wish we could release
3.0.0
already but if we released now, we would have to release4.0.0
for Cats-Effect 2.0 because of 2.11 incompatibility there so we decided to hold on.
๐ It was a rough road but currently we have multiple active maintainers that can do releases going forward, instead of just Alex so we hope it can give you a confidence for the future! :)
๐ Note that Cats-Effect 2.0 is very small release and mostly targeted at support for Scala 2.13 and bug fixes - the upgrade should be limited to bumping version without changing a single line of code.๐ This release depends on Cats-Effect 1.4.0 and Cats 1.6.1
๐ This release is binary compatible with
3.0.0-RC3
on Scala 2.12.
โฑ On Scala 2.11 there is an incompatibility caused by introduction ofScheduler.features
:exclude[ReversedMissingMethodProblem]("monix.execution.Scheduler.features")
Main changes
Local
๐ There are several fixes related to
Local
usage.- โฑ Using
TracingScheduler
will also automatically enable local context propagation inTask
so
โ running it withrunToFutureOpt
or setting env variable is no longer a necessity. Local.isolate
has a overload for isolatingFuture
which is safer than regularLocal.isolate
.
0๏ธโฃ The
Local
model since3.0.0-RC3
shares by default. To isolate modifications ofLocal
by
other concurrently runningFuture
, you have to callLocal.isolate
.In case of
Task
, there is aTaskLocal.isolate
version. It is automatically called whenever you runTask
so if your use case is settingcorrelationId
or similar, it probably won't require any explicit isolation because
your HTTP library will most likely run theTask
per request.๐ Task Builders
There are two major improvements:
- โฑ Now all
Task
builders (Task.create
,Task.async
,Task.fromFuture
etc.) will return aTask
that continues on defaultScheduler
which is the one supplied during execution unless overriden byexecuteOn
. - ๐ Callback in
Task.create
is now thread-safe against contract violation (calling it more than once) so does not require synchronization on the user side.
Sub-project: monix-execution
PR #946: Expose less implementation details in Local
PR #948: Make Task.memoize play well with Local
โฑ PR #953: Make default scheduler remove cancelled tasks
โฑ PR #960: Scheduler.features
PR #971: Callback tryOnSuccess/tryOnFailure
PR #973: Fix Local.isolate corner case
PR #977: Use type classes instead of overloads in Local.isolate/bind
Sub-project: monix-eval
โก๏ธ PR #913: Optimize Task.guarantee
PR #921 & PR #917: Callbacks in Task.create are now thread-safe and
โฑ always return to the main Scheduler.PR #933: Adds >> syntax to Task
PR #935: Adds >> syntax to Coeval
PR #934: Implement doOnFinish in terms of guaranteeCase
PR #951: Add void to Task + Coeval
PR #952: Implement ContextShift.evalOn in terms of Task.executeOn
PR #954: Add gatherN + wanderN
PR #972: Rename
Task.forkAndForget
toTask.startAndForget
Sub-project: monix-reactive
PR #906: Fix race in MapParallelOrderedObservable
PR #918: switchMap should wait for last child to complete
PR #919: propagate cancellation to tasks in async Consumers
๐ PR #932: Remove try-catch for EvalOnceObservable implementation
PR #941: Added some polymorphic methods for Observable
PR #945: Add collectWhile observable
PR #958: Add Observable.throttle
PR #963: Added fromAsyncStateActionF
PR #970: Observable.unfold
PR #989: Observable.unfoldEval and Observable.unfoldEvalF
Sub-project: monix-tail
- ๐ PR #965: fixes resource handling in Iterant.repeat, adds Iterant.retryIfEmpty
Chores
0๏ธโฃ PR #936: Add defaults values for benchmarking
โก๏ธ Tons of updates by https://github.com/fthomas/scala-steward
Thanks
๐ People that made this release possible, in alphabetical order:
- Alexandru Nedelcu (@alexandru)
- Allan Timothy Leong (@allantl)
- BambooTuna (@BambooTuna)
- Carlo (@entangled90)
- Oleg Pyzhcov (@oleg-py)
- Paul K (@pk044)
- Piotr Gawryล (@Avasil)
- Rahil Bohra (@rahilb)
- Richard Tarczaly (@arlequin-nyc)
- Ryo Fukumuro (@rfkm)
- TapanVaishnav (@TapanVaishnav)
- Valentin Willscher (@valenterry)
- โฑ Using