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 with 3.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 release 4.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 of Scheduler.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 in Task so
      โš™ running it with runToFutureOpt or setting env variable is no longer a necessity.
    • Local.isolate has a overload for isolating Future which is safer than regular Local.isolate.

    0๏ธโƒฃ The Local model since 3.0.0-RC3 shares by default. To isolate modifications of Local by
    other concurrently running Future, you have to call Local.isolate.

    In case of Task, there is a TaskLocal.isolate version. It is automatically called whenever you run Task
    so if your use case is setting correlationId or similar, it probably won't require any explicit isolation because
    your HTTP library will most likely run the Task per request.

    ๐Ÿ— Task Builders

    There are two major improvements:

    • โฑ Now all Task builders (Task.create, Task.async, Task.fromFuture etc.) will return a Task that continues on default Scheduler which is the one supplied during execution unless overriden by executeOn.
    • ๐Ÿ”€ 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 to Task.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: