Monix v3.0.0-RC2 Release Notes

Release Date: 2018-11-06 // over 5 years ago
  • ⚑️ Cats-Effect Updates

    πŸ‘Œ Supporting Cats-Effect 1.0.0 has been a massive amount of work:

    • PR #659 Cats Effect 1.0.0-RC update
    • PR #681: Cats-Effect 1.0.0-RC2 update
    • PR #686: Cats-Effect 1.0.0-RC3 update, Task conversions
    • PR #716: Updates to Cats-Effect 1.0.0

    Also related, but mentioned below:

    • Iterant's encoding had to change due to the new contract of Cats-Effect's type classes, in a massive change of internals that also improved its performance and safety (#683)

    Sub-project: monix-execution

    πŸ”¨ Several features, deprecations and refactorings happened in monix-execution, mentioned under the changes for monix-catnap below:

    • πŸ”¨ monix.execution.misc.AsyncVar was refactored, to have an interface in line with the MVar in Cats-Effect and moved to monix.execution.AsyncVar (#753)
    • πŸ”¨ monix.execution.misc.AsyncSemaphore was also refactored and enhanced, with an interface resembling that of Cats-Effect's Semaphore and moved to monix.execution.Semaphore (#754)
    • monix.execution.AsyncQueue was added (#757)
    • monix.execution.Callback was added (#740)
    • monix.execution.FutureUtils and CancelableFuture can now take care of the conversions of Scala's Future to and from Java's CompletableFuture (#761)

    Other features:

    • PR #675: Switches to stdlib NonFatal
    • PR #738: Adds CancelablePromise
    • PR #765: Changes TrampolineScheduler's internal stack back to a queue

    Sub-project: monix-catnap

    This is a new project introduced that currently depends on only monix-execution and Cats/Cats-Effect and whose purpose is to provide abstractions built on top of Cats-Effect's type classes.

    • PR #744: Adds monix.catnap.CircuitBreaker and LiftFuture
    • PR #753: Adds generic monix.catnap.MVar and monix.execution.AsyncVar refactoring
    • PR #756: Makes MVar fork on async take for fairness
    • PR #754: Adds generic monix.catnap.Semaphore and monix.execution.AsyncSemaphore refactoring
    • PR #757: Adds monix.execution.AsyncQueue and monix.catnap.ConcurrentQueue
    • PR #762: Fixes issue typelevel/cats-effect#403, also added monix.catnap.cancelables.SingleAssignCancelableF

    Also mentioned below, as part of other features:

    • βž• Added monix.catnap.CancelableF and monix.catnap.cancelables.BooleanCancelableF (#726)

    Note: the new FutureLift type class provides some of the πŸ—„ functionality of the now deprecated monix-java8.

    Sub-project: monix-eval

    πŸ—„ Major removals (with deprecation symbols kept around):

    • monix.eval.TaskSemaphore, replaced by the generic monix.catnap.Semaphore
    • monix.eval.MVar, replaced by the generic monix.catnap.MVar
    • monix.eval.TaskCircuitBreaker, replaced by the generic monix.catnap.CircuitBreaker

    This was done because having these implementations specialized for πŸ‘ Task doesn't make sense and the new implementations are better and have more features.

    πŸ”‹ Features:

    • PR #626: Adds forever for Task
    • PR #636: Adds join to the fork documentation
    • PR #639: Makes Coeval.value empty-parens to indicate side effects
    • PR #638: Fixes Task.foreach waiting / error reporting
    • PR #634: Adds ability to specify custom options on Effect[Task]
    • PR #655: Handles InterruptedException in NonFatal
    • PR #660: Makes TaskApp scheduler and options defs
    • PR #664: Fixes Task.map2 not executing things in sequence
    • PR #661: Makes mapBoth always execute tasks in parallel
    • PR #669 Adds uncancelable to example
    • PR #647: Changes internal encoding for Task.Async (major!)
    • PR #670: Task gets smarter about forking and async boundaries
    • PR #652: Uses TaskLocal#local in TaskLocal#bindL and TaskLocal#bindClear
    • PR #679: Fixes Task.bracket, onCancelRaiseError; introduce Task.ContextSwitch
    • PR #706: Adds SemigroupK[Task] instance
    • PR #715: Implements Task timed method
    • PR #724: Makes Task auto-cancelable by defaul (major!)
    • PR #725: Adds runtime check to TaskLocal to make it safer
    • PR #726: Changes Task to sequence (back-pressure) async finalizers (major!)
    • PR #732: Adds guarantee and guaranteeCase methods on Task and Coeval
    • PR #740: Moves Callback to monix.execution, Task runAsync refactor, rename to runToFuture (major!)
    • PR #761: Expands FutureLift to take care of CompletableFuture

    Sub-project: monix-reactive

    πŸ”¨ Observable suffered an API refactoring, changing the convention for operators that take Task or F[_] : Effect values as arguments:

    • operators using Task now use the Eval suffix instead of Task, or no special suffix at all
    • πŸ”€ operators using F[_] : Sync parameters use an F suffix
    • 🚦 the F suffixed operators previously signalled operators that kept the Observable context (e.g. findF), however all of them have been renamed

    πŸ‘€ See PR #729 for details.

    πŸ”‹ Features:

    • PR #610: Adds scan0, flatScan0, flatScan0DelayErrors, scanEval0, scanMap0 on Observable
    • PR #641: Reference bufferTumbling instead of buffer in scaladoc
    • PR #646: Fixes ack.future called when Ack is null
    • PR #657: Adds a few missing tests to Observable methods
    • PR #684: Simplifies logic in TakeLastOperator.onNext
    • PR #704: Introduces Observable.doOnStartTask and Observable.doOnStartEval
    • PR #723: Adds Alternative instance for Observable
    • PR #654: Makes Observable#++'s argument lazy
    • PR #729: Adds Observable.bracket, Iterant/Task API refactorings, fixes (major!)
    • PR #741: Adds cats Profunctor instance for Subject
    • PR #739: Adds operator bufferTimedWithPressure with sizeOf on Observable
    • PR #743: Improvs Observable.collect to avoid double evaluation
    • PR #749: Adds Profunctor and Contravariant instance for Consumer
    • PR #750: Fixes handling start/end of Long range in RangeObservable
    • PR #558: Adds Observable.mapParallelOrdered

    Sub-project: monix-tail

    The Iterant encoding suffered a major change, with all operators described for Iterant being changed for it. This was done because:

    πŸ‘ 1. the old encoding couldn't be supported under the auto-cancelable model promoted by Cats-Effect 1.0.0 🐎 2. the new encoding is safer and has better performance too

    πŸ”‹ Features:

    • PR #683: Iterant, version 2 (major)
    • PR #614: Adds scan0, scanEval0, scanMap0 on Iterant
    • PR #622: Adds mapBatch for Iterant
    • PR #629: Fixes IterantBuildersSync methods to not require implicit F: Sync[F]
    • PR #631: Renames toGenerator to toBatch in Cursor
    • PR #633: Fixes eagerness of .bracket on Last nodes
    • PR #621: Changes behavior of Batch#fromArray, fromAnyArray
    • PR #656: Makes Iterant's ++ take a lazy (by-name) parameter
    • PR #662: Adds Iterant.fromReactivePublisher
    • PR #709: Removes unused function from EvalOnNextAck
    • PR #707: Add Iterant.lastOptionL
    • PR #746: Fix Iterant.fromReactivePublisher
    • PR #755: Remove the Sync[Iterant] instance

    πŸ—„ Sub-project deprecation: monix-java8

    The functionality in monix-java8 was implemented directly in:

    1. monix.execution.FutureUtils
    2. monix.execution.CancelableFuture
    3. monix.catnap.FutureLift

    πŸ—„ The monix-java8 sub-project is still provided, but is deprecated and 🚚 will soon be removed.

    Chores

    • PR #653: Update Monix's rootdoc, the landing page for the ScalaDoc
    • PR #671: Optionally allow forcing a build on Java 9+
    • PR #677: Add Starting Point section to CONTRIBUTING.md
    • PR #693: Fix micro doc typo in monix.execution.misc.InlineMacros
    • PR #699: Add Concat and Scope to Iterant's description
    • PR #640: Add sbt-doctest, to verify code examples in ScalaDoc
    • PR #705: Fix all ScalaDocs (except Task's) in monix.eval
    • PR #717: Change to Scala's Code of Conduct
    • PR #720: Add @Avasil to the Code of Conduct
    • PR #718: Fix Task ScalaDocs
    • PR #736: Update doctest plugin version
    • PR #763: Fix Observable doc mentioning cats.Eq

    Thanks

    πŸš€ People that made this release possible, in alphabetical order:

    • Alexandru Nedelcu (@alexandru)
    • Eduardo Barrientos (@kdoomsday)
    • Eugene Platonov (@jozic)
    • Jakub KozΕ‚owski (@kubukoz)
    • Jamie Wilson (@jfwilson)
    • Joe Ferris (@jferris)
    • Jules Ivanic (@guizmaii)
    • Kacper Gunia (@cakper)
    • Kamil Kloch (@kamilkloch)
    • LorΓ‘nd SzakΓ‘cs (@lorandszakacs)
    • Oleg Pyzhcov (@oleg-py)
    • Piotr GawryΕ› (@Avasil)
    • Raas A (@RaasAhsan)
    • Seth Tisue (@SethTisue)
    • Yohann B (@ybr)
    • jendakol (@jendakol)
    • volth (@volth)