This is a bug-fixing release for the 3.5.x series.
Fixes:
- Monix
3.5.1failed on any JDK older than27, including the supported minimum of17, withUnsupportedClassVersionError(class file version71.0), because the Java classes in its artifacts were compiled for JDK27, the version used by the release workflow; Java sources are now compiled with-sourceand-targetset to17(#2085, #2086).
This release was made possible by the work and feedback of:
- Alexandru Nedelcu (@alexandru)
- Kenji Yoshida (@xuwei-k)
This is a bug-fixing release for the 3.5.x series.
Fixes:
Observable.fromInputStreamandObservable.fromInputStreamUnsafenow emit a chunk as soon as no more bytes are currently available from the underlyingInputStream, instead of blocking until the buffer fills up (#1479, #2082).- The Reactive Streams bridges (
Observer.toReactiveSubscriber,Subscriber.toReactiveSubscriber,Subject.toReactiveProcessor) andTask.parSequenceUnorderednow derive their buffer and batching sizes fromPlatform.recommendedBatchSizeinstead of the scheduler'sExecutionModel#recommendedBatchSize, which is effectively unbounded forExecutionModel.SynchronousExecutionand resulted in unbounded buffers with no backpressure (#1670, #2081).
Build and publishing:
- Automatic snapshot releases from
mainwere disabled; publishing now happens by triggering themanual-publishworkflow. - The build was updated to sbt
1.13.0, with sbt plugin updates such as Scala.js1.22.0and sbt-mima1.2.1; runtime dependencies are unchanged.
This release was made possible by the work and feedback of:
- Alexandru Nedelcu (@alexandru)
- Jakub Pinowski (@Pinioo)
- Kamil Podsiadło (@kpodsiad)
- Kenji Yoshida (@xuwei-k)
- Roman Janusz (@ghik)
- Tomasz Godzik (@tgodzik)
This is the first Monix release since 3.4.1. It updates the supported runtime and Scala versions and includes several concurrency and scheduler fixes.
Breaking changes:
- JDK
17is now the minimum supported runtime and build target. - JDK
21is now part of the validated support matrix. - Scala
2.12support is dropped. - The supported Scala versions are now
2.13.18and3.3.7. - Legacy
sun.misc.Unsafe-based internals were removed in favor of JDKVarHandle-based implementations.
Fixes and improvements:
- Scheduled task failures are now reported to the configured
UncaughtExceptionReporterbyScheduledExecutorService-backed schedulers and the Scala.jsAsyncScheduler(#2036). - Forked
Trampolineexecutions no longer share mutable, non-thread-safe queues across threads, preventing dropped or stuck tasks and memory consistency errors (#2031). Zip2ObservablethroughZip6Observablenow synchronize completion and error signaling at their call sites, avoiding re-entrant synchronization and stale reads (#2040).DynamicWorkerThreadFactorydelegates maximum thread-count management toForkJoinPool(#1589).- Invalid-state errors from
MapTaskObservablenow include the mapping function to improve diagnostics (#2030). - Scala.js scheduling now uses
MacrotaskExecutor(#1522).
Modules and dependencies:
- Added the
monix-execution-atomicmodule (#1561). - Updated Cats to
2.13.0and Cats Effect to2.5.5. - Updated Scala.js to
1.21.0and JCTools to4.0.6. - Published artifacts now declare the
semver-specversion scheme.
Build and publishing:
- Maven Central publishing now uses the Central Portal, including automatic snapshot publication from
main. - Scaladoc JARs omit bundled fonts and Inkuire assets to reduce their size.
This release was made possible by the work and feedback of:
- Alexandru Nedelcu (@alexandru)
- Mikołaj Bul (@mikkolaj)
- Bartłomiej Kozak (@halotukozak)
- Łukasz Petka (@lpetka)
- Roman Janusz
- Arman Bilge (@armanbilge)
- Kenji Yoshida
This is a minor bug-fixing release for the 3.x series.
Updated dependencies (#1554):
- Scala compiler updated to 2.12.15, 2.13.8 and 3.1.2;
- Typelevel Cats updated to 2.7.0;
- Typelevel Cats-Effect updated to 2.5.4;
- Updated compiler and sbt plugins to latest versions;
Fixes:
Trampoline.trampolineContextno longer ignores its parent BlockContext (#1544)- Only include JCTools in
executionShadedJCTools(#1514)
This release was made possible by the work and feedback of:
- Alexandru Nedelcu (@alexandru)
- Gabriele Petronella (@gabro)
- Roman Janusz (@ghik)
The release is binary and source compatible with 3.x series, and was cross-built for the following Scala and ScalaJS versions:
- Scala
2.12,2.13and3.0 - Scala.js
1.5.1
WARN: we're dropping compatibility with Scala 2.11 and ScalaJS 0.6.x. If you still need those you'll have to stay on version 3.3.0.
Changes in this release:
- Dropped support for Scala
2.11and Scala.js0.6.x - Dependency updates:
- Cats
2.6.1 - Cats-Effect
2.5.1 - JCTools
3.3.0
- Cats
- Adds support for Scala 3 (#1326, #1327, #1328, #1329, #1344, #1323)
- Adds
Observable.whileBusyAggregateEvents(#1320) - Fix tracing in
CoevalandTaskvia a more accurate filter (#1353) - Adds
Observable.throttleLatest(#1396) - Implement pagination for
Observable(#1381)
This release was made possible by the work and feedback of:
- Alexandru Nedelcu (@alexandru)
- Dominik Wosiński (@Wosin)
- Lars Hupel (@larsrh)
- Luke Stephenson (@lukestephenson)
- Oleg Pyzhcov (@oleg-py)
- Pau Alarcón (@paualarco)
- Piotr Gawryś (@Avasil)
The release is binary and source compatible with 3.x.x line. It is released for the following Scala and ScalaJS versions:
- Scala 2.11: ScalaJS 0.6.x
- Scala 2.12: ScalaJS 0.6.x and 1.3.x
- Scala 2.13: ScalaJS 0.6.x and 1.3.x
Note that most likely, this is going to be the last release on ScalaJS 0.6.x. We can consider doing backports on-demand.
This release includes a highly requested feature of better stack traces for Task and Coeval!
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.eval.stackTracingMode=none.
For the following code:
package test.app
import monix.eval.Task
import monix.execution.Scheduler
import cats.implicits._
import scala.concurrent.duration._
object TestTracingApp extends App {
implicit val s = Scheduler.global
def customMethod: Task[Unit] =
Task.now(()).guarantee(Task
10BC8
span>.sleep(10.millis))
val tracingTestApp: Task[Unit] = for {
_ <- Task.shift
_ <- Task.unit.attempt
_ <- (Task(println("Started the program")), Task.unit).parTupled
_ <- customMethod
_ <- if (true) Task.raiseError(new Exception("boom")) else Task.unit
} yield ()
tracingTestApp.onErrorHandleWith(ex => Task(ex.printStackTrace())).runSyncUnsafe
}The default (cached) stack trace is going to be:
java.lang.Exception: boom
at test.app.TestTracingApp$.$anonfun$tracingTestApp$5(TestTracingApp.scala:36)
at guarantee @ test.app.TestTracingApp$.customMethod(TestTracingApp.scala:29)
at flatMap @ test.app.TestTracingApp$.$anonfun$tracingTestApp$4(TestTracingApp.scala:35)
at parTupled @ test.app.TestTracingApp$.$anonfun$tracingTestApp$2(TestTracingApp.scala:34)
at parTupled @ test.app.TestTracingApp$.$anonfun$tracingTestApp$2(TestTracingApp.scala:34)
at flatMap @ test.app.TestTracingApp$.$anonfun$tracingTestApp$2(TestTracingApp.scala:34)
at flatMap @ test.app.TestTracingApp$.$anonfun$tracingTestApp$1(TestTracingApp.scala:33)
at flatMap @ test.app.TestTracingApp$.delayedEndpoint$test$app$TestTracingApp$1(TestTracingApp.scala:32)
Before 3.3.0 and with stack traces disabled, stack traces are a mess:
java.lang.Exception: boom
at test.app.TestTracingApp$.$anonfun$tracingTestApp$5(TestTracingApp.scala:36)
at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:188)
at monix.eval.internal.TaskRestartCallback.syncOnSuccess(TaskRestartCallback.scala:101)
at monix.eval.internal.TaskRestartCallback$$anon$1.run(TaskRestartCallback.scala:118)
at monix.execution.internal.Trampoline.monix$execution$internal$Trampoline$$immediateLoop(Trampoline.scala:66)
at monix.execution.internal.Trampoline.startLoop(Trampoline.scala:32)
at monix.execution.schedulers.TrampolineExecutionContext$JVMNormalTrampoline.super$startLoop(TrampolineExecutionContext.scala:142)
at monix.execution.schedulers.TrampolineExecutionContext$JVMNormalTrampoline.$anonfun$startLoop$1(TrampolineExecutionContext.scala:142)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)
at monix.execution.schedulers.TrampolineExecutionContext$JVMNormalTrampoline.startLoop(TrampolineExecutionContext.scala:142)
at monix.execution.internal.Trampoline.execute(Trampoline.scala:40)
at monix.execution.schedulers.TrampolineExecutionContext.execute(TrampolineExecutionContext.scala:57)
at monix.execution.schedulers.BatchingScheduler.execute(BatchingScheduler.scala:50)
at monix.execution.schedulers.BatchingScheduler.execute$(BatchingScheduler.scala:47)
at monix.execution.schedulers.AsyncScheduler.execute(AsyncScheduler.scala:31)
at monix.eval.internal.TaskRestartCallback.onSuccess(TaskRestartCallback.scala:72)
at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:183)
at monix.eval.internal.TaskRestartCallback.syncOnSuccess(TaskRestartCallback.scala:101)
at monix.eval.internal.TaskRestartCallback.onSuccess(TaskRestartCallback.scala:74)
at monix.eval.internal.TaskSleep$SleepRunnable.run(TaskSleep.scala:71)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Running Task 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.
Latest behavior is:
implicit val s: Scheduler = Scheduler.Implicits.traced
val local = Local(0)
for {
_ <- Task(local.update(1)).runToFuture
value <- Future(local.get)
} yield println(s"Local value in Future $value")
println(s"Local value on the current thread = $value")
// => Local value on the current thread = 0
// => Local value in Future = 1Task still isolates the Local, but the Future continuation keeps the same reference and can read it.
Before the change, Local would be 0 in the Future.
More information about Local can be found in the new Local documentation.
- #1205: Observable.mergePrioritizedList
- #1209: Bring back Observable.transform and Transformer alias
- #1198: Fix flatMapIterable calling recursively itself
- #1213: Propagate Local isolation in runToFuture
- #1217: Fix performance regression in bufferSliding
- #1244: Add support for compression: Gzip and deflate
- #1262: Fix bug in Task.runSyncUnsafe related to ContextSwitch
- #1265: Implement Observable#bufferWhile and bufferWhileInclusive
- #1267: Implement Asynchronous Stack Traces for Task
- #1276: Add Task/Coeval convenience methods like .when
- #1282: Add 'as' in Task and Coeval
- #1284: Add left/right builders for Task and Coeval
- #1286: Add none/some builders for Task and Coeval
- #1291: tapEval, tapError methods at Task and Coeval
- #1293: removing no-op onComplete() in Observable.takeByTimespan
- #1299: Fix a bug in Local.value
- #1307: Observable.fromIteratorBuffered
- Adrian (@adrian-salajan)
- Alexandru Nedelcu (@alexelcu)
- ctoomey (@ctoomey)
- Dmitro Pochapsky (@pchpsky)
- Georgy Khotyan (@GKhotyan)
- James Yoo (@jyoo980)
- Kasper Kondzielski (@ghostbuster91)
- Pau Alarcón (@paualarco)
- Piotr Gawryś (@Avasil)
- Sandeep Kota (@sandeepkota)
- tafit3 (@tafit3)
- Vladyslav (@VladPodilnyk)
The release is binary and source compatible with 3.x.x line. It is released for the following Scala and ScalaJS versions:
- Scala 2.11: ScalaJS 0.6.x
- Scala 2.12: ScalaJS 0.6.x and 1.0.x
- Scala 2.13: ScalaJS 0.6.x and 1.0.x
Relevant updates:
- #1197: Fixes a memory leak in bracket, introduced in 3.2.0
- #1195: Fixes non-deterministic behavior in Observable.zip of sources different size
- #1190: Now Observable.groupBy correctly signals error as a failed stream instead of normal completion
- #1188: Fixes an issue in ForeachAsyncConsumer where it wasn't properly propagaing errors in some cases
- #1187: Fixes an issue where Observable.doAfterSubscribe was not executing its finalizer
- #1186: Observable.interval method now schedules the first tick asynchronously
- #1184: Huge performance improvement in CharsReader, InputStream and LinesReaderObservable
- #1154: Observable.fromInputStream and fromCharsReader now respects the chunkSize
- #1181: Fix MatchError in Iterant.fromReactivePublisher
People who made this release possible:
- Akosh Farkash (@aakoshh)
- Alexander (@ppressives)
- fnqista (@fnqista)
- Kasper Kondzielski (@ghostbuster91)
- Pau Alarcón (@paualarco)
- Piotr Gawryś (@Avasil)
- Vasily Kirichenko (@vasily-kirichenko)
- Viktor Lövgren (@vlovgr)
Bug fix release, fixing a critical issue with ScalaJS 1.0.x #1666 and a corner case with Bracket #1175
The release is binary and source compatible with 3.x.x line. It is released for the following Scala and ScalaJS versions:
- Scala 2.11: ScalaJS 0.6.x
- Scala 2.12: ScalaJS 0.6.x and 1.0.x
- Scala 2.13: ScalaJS 0.6.x and 1.0.x
Relevant updates:
- #1087: Bracket should not evaluate "use" if Task was canceled during "acquire"
- #1098: Allow to pass Long in Observable.drop(n)
- #1101: Canceled tasks in Half-Open state should return to Open state in CircuitBreaker
- #1107: Add CommutativeApplicative[Task.Par] instance
- #1106 and #1125: Add Observable.concatMapIterable
- #1117: SyncEffect instance for Coeval
- #1120: Cancel should always wait for the finalizer
- #1126: bufferIntrospective should signal Stop upstream when it is back-pressured
- #1135: Observable.intervalAtFixedRate under-millisecond interval fix
- #1132: Add Iterant.withFilter
- #1129: Add Observable.withFilter
- #1145: Deprecate gather, gatherN, gatherUnordered in favor of parSequence, parSequenceN, parSequenceUnordered
- #1152: Add Consumer.toList
People that made this release possible:
- Allan Timothy Leong (@allantl)
- Eugene Platonov (@jozic)
- Fabien Chaillou (@fchaillou)
- Gabriel Claramunt (@gclaramunt)
- Mantas Indrašius (@mantasindrasius)
- TapanVaishnav (@TapanVaishnav)
- najder-k (@najder-k)
- Oleg Pyzhcov (@oleg-py)
- Pau Alarcón (@paualarco)
- Piotr Gawryś (@Avasil)
- Ross A. Baker (@rossabaker)
- Viet Yen Nguyen (@nguyenvietyen)
- Viktor Dychko (@dychko)
The release is binary and source compatible with 3.0.0.
Important updates:
- #1008: Fixed stack safety issue of Observable.combineLatestList for big lists
- #1010: flatMapLoop for Task and Coeval
- #1012: ConcurrentQueue.isEmpty
- #1014: Observable.timeoutOnSlowDownstreamTo
- #1016: Observable.takeUntilEval
- #1057: Fix default scheduleOnce implementation
- #1062: Solves a memory leak which sometimes occurred when using Task with localContextPropagation and non-TracingScheduler
- #1063: Ensure async boundary in TaskCreate if LCP is enabled
- #1064 and #1070: Earlier cancelation in Observable.mapParallel if any task fails
- #1065: Add mapAccumulate to Observable
People that made this release possible:
- Alexandru Nedelcu (@alexandru)
- Allan Timothy Leong (@allantl)
- fdilg (@fdilg)
- Jan Bracker (@jbracker)
- Moritz Bust (@busti)
- mudsam (@mudsam)
- Oleg Pyzhcov (@oleg-py)
- Paweł Kiersznowski (@pk044)
- Piotr Gawryś (@Avasil)
- tanaka takaya (@takayahilton)
- TapanVaishnav (@TapanVaishnav)
Important updates:
Chores:
- #996: improve Observable.publishSelector scaladoc
- #1017: disable Scalafmt checks in build
- #1006: Update sbt to 1.3.0
- #1013: Update sbt-sonatype to 3.6
People that made this release possible:
- Alexandru Nedelcu (@alexandru)
- Oleg Pyzhcov (@oleg-py)
- Piotr Gawryś (@Avasil)
- The Cats and Cats-Effect contributors that worked on and released 2.0.0
Bug fix release:
- #991 (PR #993):
NullPointerExceptioninTaskwhen used in combination withLocal - #992 (PR #998): hide
InterceptableRunnableexposed accidentally, refactor it for efficiency - #997: bumped Scala version to 2.12.9 and Scala.js to 0.6.28
This release is binary compatible with 3.0.0-RC4.
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")
There are several fixes related to Local usage.
- Using
TracingSchedulerwill also automatically enable local context propagation inTaskso running it withrunToFutureOptor setting env variable is no longer a necessity. Local.isolatehas a overload for isolatingFuturewhich is safer than regularLocal.isolate.
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.
There are two major improvements:
- Now all
Taskbuilders (Task.create,Task.async,Task.fromFutureetc.) will return aTaskthat continues on defaultSchedulerwhich is the one supplied during execution unless overriden byexecuteOn. - Callback in
Task.createis now thread-safe against contract violation (calling it more than once) so does not require synchronization on the user side.
-
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
-
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.forkAndForgettoTask.startAndForget
-
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
- PR #965: fixes resource handling in Iterant.repeat, adds Iterant.retryIfEmpty
-
PR #936: Add defaults values for benchmarking
-
Tons of updates by https://github.com/fthomas/scala-steward
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)
This release depends on Cats-Effect 1.3.1 and Cats 1.6.1.
The next planned release will target Cats-Effect 2.0.0 with Scala 2.13 support.
NOTE: this release IS NOT binary compatible with 3.0.0-RC2, as it contains some API changes, but it should be source compatible (with @deprecated symbols where the case).
This sub-project no longer depends on cats-effect and there are various
improvement to Local aimed at fixing interop with Future. Note that
you might have to call Local.isolate to disable any sharing between tasks.
-
PR #775: Simplified FutureUtils materialize & dematerialize
-
PR #790: improve fixed rate scheduling on JS
-
PR #803: Eagerly null out dequeued elements in ChunkedArrayQueue
-
PR #822: remove dependency on cats-effect from monix-execution
-
PR #773: change Cancelable.empty type to Cancelable
-
PR #887: Shared locals with binds
-
PR #888: Fix uncaught exception reporting for Scheduler
-
PR #778: Adds ConcurrentChannel
-
PR #784: More concurrent tests for MVar/Semaphore
-
PR #865: Adding FunctionK values for Task, Coeval
-
PR #802: encapsulate local ctx on task execution
-
PR #807: Improve encapsulation test, encapsulate locals on ContextShift
-
PR #838: Add taskified variants of timeout combinators
-
PR #839: TaskLocal should propagate when used with Bracket Methods
-
PR #849: Specify exception on timeout
-
PR #887: Shared locals with binds
-
PR #865: Adding FunctionK values for Task, Coeval
-
PR #759: Add Contravariant Observer and Subscriber
-
PR #760: add Observable.filterEval
-
PR #774: Add FunctorFilter instances for Iterant&Observable
-
PR #779: fork blocking i/o observable ops
-
PR #794: Acquire lock per subscription instead of observable-wide lock
-
PR #801: Observable buffers refactoring
-
PR #819: Extend ObservableLike with filterNot method
-
PR #831: SerializableSuite to no longer test Future for serializability
-
PR #834: Observable.reduce should emit for single item source
-
PR #846: Ensure mapParallelOrdered runs in parallel
-
PR #872: Add observable take while inclusive
-
PR #895: Fix memory leak in MapParalle 10BC8 lOrderedObservable
-
PR #766: Update sbt-unidoc to 0.4.2
-
PR #766: Update sbt-pgp to 1.1.2
-
PR #768: Update sbt-mima-plugin to 0.3.0
-
PR #769: Update sbt-git to 1.0.0
-
PR #770: Update jctools-core to 2.1.2
-
PR #771: Update kind-projector to 0.9.8
-
PR #772: Update sbt-jmh to 0.3.4
-
PR #771: Update kind-projector to 0.9.9
-
PR #783: Use globally accessible (rather than local) source paths in JS source maps (#781)
-
PR #785: Update sbt-scalajs, scalajs-compiler, scalajs-library... to 0.6.26
-
PR #788: Update cats-effect, cats-effect-laws to 1.1.0
-
PR #796: fix scalacOptions
-
PR #797: Scala 2.12.8
-
PR #798: Update intervalWithFixedDelay scaladoc
-
PR #805: Rename keysBuffer to os in groupBy's parameters
-
PR #808: Update Copyright to 2019
-
PR #810: sbt 1.2.8 (was 1.1.0)
-
PR #812: Update Minitest to 2.3.2
-
PR #813: Disable code coverage
-
PR #818: Update Cats-Effect to 1.2.0
-
PR #820: Update cats-laws to 1.5.0
-
PR #821: Update cats-laws to 1.6.0
-
PR #823: Scala 2.13 support
-
PR #821: Update sbt-header to 5.1.0
-
PR #827: Remove comments from .jvmopts
-
PR #833: Fix build for 2.13.0-M5 by deactivating Mima for it
-
PR #840: Add adopters list seed
-
PR #842: Fixed deprecation docs for Task#coeval
-
PR #843: Remove dead code from tests
-
PR #844: Update sbt-header to 5.2.0
-
PR #847: Update ExecutionModel.scala
-
PR #850: Increase rate in AsyncSchedulerSuite
-
PR #854: fix apparently erronous code involving Unit companion
-
PR #855: Update sbt-jmh to 0.3.5
-
PR #857: Make benchmarks compile
-
PR #859: Update sbt-scalajs, scalajs-compiler to 0.6.27
-
PR #867: Update kind-projector to 0.10.0
-
PR #869: fix compile errors with latest Scala 2.13
-
PR #874: Update cats-effect, cats-effect-laws to 1.3.0
-
PR #878: Compile Benchmarks in CI
-
PR #879: Do on subscription cancel scaladoc fix
-
PR #889: Update cats-effect, cats-effect-laws to 1.3.1
-
PR #894: Add UnsafeBecauseImpure Annotation to foreach.
-
PR #896: Update cats-laws to 1.6.1
-
PR #898: Reformating via Scalafmt
-
PR #899: Fix autoCancelableRunLoops comment.
-
PR #901: avoid deprecated unicode arrow chars
-
PR #902: reformat build files
People that made this release possible, in alphabetical order:
- Alexandru Nedelcu (@alexandru)
- Allan Timothy Leong (@allantl)
- Daniel Neades (@djneades)
- Dawid Dworak (@ddworak)
- Eugene Platonov (@jozic)
- Itamar Ravid (@iravid)
- Jorge (@jvican)
- Jorge Branco (@jorgedfbranco)
- Kenji Yoshida (@xuwei-k)
- Luke Stephenson (@lukestephenson)
- Matthew de Detrich (@mdedetrich)
- Mikhail Chugunkov (@poslegm)
- Oleg Pyzhcov (@oleg-py)
- Ota Hauptmann (@Otah)
- Piotr Gawryś (@Avasil)
- Roman Tkalenko (@tkroman)
- Ryo Fukumuro (@rfkm)
- Sam Guymer (@guymers)
- Seth Tisue (@SethTisue)
- Tanaka Takaya (@takayahilton)
- Yann Simon (@yanns)
And special thanks to our top contributor in this release: https://github.com/fthomas/scala-steward :)
Supporting Cats-Effect 1.0.0 has been a massive amount of work:
- PR #659
Cats Effect
1.0.0-RCupdate - PR #681:
Cats-Effect
1.0.0-RC2update - PR #686:
Cats-Effect
1.0.0-RC3update,Taskconversions - 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)
Several features, deprecations and refactorings happened in
monix-execution, mentioned under the changes for monix-catnap
below:
monix.execution.misc.AsyncVarwas refactored, to have an interface in line with theMVarin Cats-Effect and moved tomonix.execution.AsyncVar(#753)monix.execution.misc.AsyncSemaphorewas also refactored and enhanced, with an interface resembling that of Cats-Effect'sSemaphoreand moved tomonix.execution.Semaphore(#754)monix.execution.AsyncQueuewas added (#757)monix.execution.Callbackwas added (#740)monix.execution.FutureUtilsandCancelableFuturecan now take care of the conversions of Scala'sFutureto and from Java'sCompletableFuture(#761)
Other features:
- PR #675:
Switches to stdlib
NonFatal - PR #738:
Adds
CancelablePromise - PR #765:
Changes
TrampolineScheduler's internal stack back to a queue
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.CircuitBreakerandLiftFuture - PR #753:
Adds generic
monix.catnap.MVarandmonix.execution.AsyncVarrefactoring - PR #756:
Makes
MVarfork on asynctakefor fairness - PR #754:
Adds generic
monix.catnap.Semaphoreandmonix.execution.AsyncSemaphorerefactoring - PR #757:
Adds
monix.execution.AsyncQueueandmonix.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.CancelableFandmonix.catnap.cancelables.BooleanCancelableF(#726)
Note: the new FutureLift type class provides some of the
functionality of the now deprecated monix-java8.
Major removals (with deprecation symbols kept around):
monix.eval.TaskSemaphore, replaced by the genericmonix.catnap.Semaphoremonix.eval.MVar, replaced by the genericmonix.catnap.MVarmonix.eval.TaskCircuitBreaker, replaced by the genericmonix.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
foreverforTask - PR #636:
Adds
jointo theforkdocumentation - PR #639:
Makes
Coeval.valueempty-parens to indicate side effects - PR #638:
Fixes
Task.foreachwaiting / error reporting - PR #634:
Adds ability to specify custom options on
Effect[Task] - PR #655:
Handles
InterruptedExceptioninNonFatal - PR #660:
Makes
TaskAppscheduler and options defs - PR #664:
Fixes
Task.map2not executing things in sequence - PR #661:
Makes
mapBothalways execute tasks in parallel - PR #669
Adds
uncancelableto example - PR #647:
Changes internal encoding for
Task.Async(major!) - PR #670:
Taskgets smarter about forking and async boundaries - PR #652:
Uses
TaskLocal#localinTaskLocal#bindLandTaskLocal#bindClear - PR #679:
Fixes
Task.bracket,onCancelRaiseError; introduceTask.ContextSwitch - PR #706:
Adds
SemigroupK[Task]instance - PR #715:
Implements Task
timedmethod - PR #724:
Makes
Taskauto-cancelable by defaul (major!) - PR #725:
Adds runtime check to
TaskLocalto make it safer - PR #726:
Changes
Taskto sequence (back-pressure) async finalizers (major!) - PR #732:
Adds
guaranteeandguaranteeCasemethods onTaskandCoeval - PR #740:
Moves
Callbacktomonix.execution, TaskrunAsyncrefactor, rename torunToFuture(major!) - PR #761:
Expands
FutureLiftto take care ofCompletableFuture
Observable suffered an API refactoring, changing the convention for
operators that take Task or F[_] : Effect values as arguments:
- operators using
Tasknow use theEvalsuffix instead ofTask, or no special suffix at all - operators using
F[_] : Syncparameters use anFsuffix - the
Fsuffixed operators previously signalled operators that kept theObservablecontext (e.g.findF), however all of them have been renamed
See PR #729 for details.
Features:
- PR #610:
Adds
scan0,flatScan0,flatScan0DelayErrors,scanEval0,scanMap0onObservable - PR #641:
Reference
bufferTumblinginstead ofbufferin scaladoc - PR #646:
Fixes
ack.futurecalled whenAckisnull - PR #657:
Adds a few missing tests to
Observablemethods - PR #684:
Simplifies logic in
TakeLastOperator.onNext - PR #704:
Introduces
Observable.doOnStartTaskandObservable.doOnStartEval - PR #723:
Adds
Alternativeinstance forObservable - PR #654:
Makes
Observable#++'s argument lazy - PR #729:
Adds
Observable.bracket, Iterant/Task API refactorings, fixes (major!) - PR #741:
Adds cats
Profunctorinstance forSubject - PR #739:
Adds operator
bufferTimedWithPressurewithsizeOfonObservable - PR #743:
Improvs
Observable.collectto avoid double evaluation - PR #749:
Adds
ProfunctorandContravariantinstance forConsumer - PR #750:
Fixes handling start/end of
Longrange inRangeObservable - PR #558:
Adds
Observable.mapParallelOrdered
The Iterant encoding suffered a major change, with all operators
described for Iterant being changed for it. This was done because:
- the old encoding couldn't be supported under the auto-cancelable model promoted by Cats-Effect 1.0.0
- the new encoding is safer and has better performance too
Features:
- PR #683: Iterant, version 2 (major)
- PR #614:
Adds
scan0,scanEval0,scanMap0onIterant - PR #622:
Adds
mapBatchforIterant - PR #629:
Fixes
IterantBuildersSyncmethods to not requireimplicit F: Sync[F] - PR #631:
Renames
toGeneratortotoBatchinCursor - PR #633:
Fixes eagerness of
.bracketonLastnodes - 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
The functionality in monix-java8 was implemented directly in:
monix.execution.FutureUtilsmonix.execution.CancelableFuturemonix.catnap.FutureLift
The monix-java8 sub-project is still provided, but is deprecated and
will soon be removed.
- 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
ConcatandScopetoIterant'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
TaskScalaDocs - PR #736: Update doctest plugin version
- PR #763: Fix Observable doc mentioning cats.Eq
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)
[https://typelevel.org/cats-effect/ Cats Effect] integration:
- PR #598:
Integrates
cats.effect.TimerandIO.cancelable - PR #600:
Add
Sync&Asyncinstances forIterant - PR #607:
implement
ConcurrentEffect[Task](upgrade to cats-effect 0.10) - PR #609: update Cats to 1.1.0 & Cats Effect to 0.10
Features for monix-execution:
- PR #527
(#517,
#525 and
#526):
removes macros, replacing them with plain extension methods,
removes
SerialCancelable#orderedUpdate - PR #556:
SchedulerService.awaitTerminationand fix concurrency tests - PR #584
(#221):
add conversions module for the Java 8
CompletableFuture
Features for monix-eval:
- PR #507: add
onErrorRestartLoopforTaskandCoeval - PR #533
(#523):
add
Task.forkoperator, deprecate oldTask.forkandexecuteWithFork, renamed toexecuteAsync - PR #530
(#520):
add
Task.forkAndForget - PR #537
(#535):
Make
MVarconstructors returnTask - PR #540
(#539):
make all
Taskabstractions referentially transparent - PR #545
(#538):
add
newtypeforTask.Par, using same encoding used incats-effect - PR #547
(#542):
add
Task.runSyncUnsafe - PR #550:
add
Task.sleep, refactor the implementation ofdelayExecutionanddelayResultand deprecatedelayExecutionWithanddelayResultBySelector - PR #482
(#477):
add the
.cancelableoperator onTask - PR #561:
Bracket for
Task/Coeval,Task.cancelableandTask.onCancelRaiseError - PR #596:
add
Fiberinterface, refactormemoizeforTaskandCoeval - PR #602:
TaskLocalshould exposeLocal - PR #603:
Changed implementation
TaskLocal#bindin terms ofTask#bracket
Features for monix-reactive:
- PR #511
(#269):
add
monix.reactive.subjects.Vartype - PR #528:
add
Observable.scanMapoperator - PR #536
(#459):
add a
NonEmptyParallelforObservableusingcombineLatest
Features for monix-tail:
- PR #503
(#487):
add
Iterant.liftFbuilder for lifting monadic values - PR #510
(#500):
add
Iterant.takeEveryNthoperator - PR #504
(#499):
add
Iterant.switchIfEmptyoperator - PR #509
(#495):
add
Iterant.dropLastoperator - PR #508
(#501):
add
Iterant.intersperseoperator - PR #512
(#496):
add
Iterant.dropWhileWithIndexoperator - PR #514
(#497):
add
Iterant.takeWhileWithIndexoperator - PR #523
(#519):
add
Iterant.scanMapoperator - PR #518
(#516):
add
Iterant[Task].intervalAtFixedRate - PR #524
(#498):
add
Iterant.interleave - PR #549
(#548):
add
Iterant.fromStateActionandfromStateActionL - PR #567
(related to #563):
completedLshould handleF[_]errors,mapEvalshould not - PR #569
(related to #563):
Iterantfold left operators (yieldingF[_]) need to handle errors thrown inF[_] - PR #566
(#562):
improve safety of
attempt&onErrorHandleWithonIterant - PR #578
(#570):
add
Iterant#sumLmethod - PR #579
(#577):
make
Iterant#reduceLandheadOptionLleft folds handle errors fromF[_]context - PR #575
(##571 and
#572):
add
Iterant.repeat(method and builder) - PR #583
(#549):
add
Iterant.fromStateActionbuilder - PR #582
(#573 and
#574):
add
repeatEval/repeatEvalFforIterant&repeatEvalFforObservable - PR #554
(#479):
add
Iterant#bracketoperator - PR #581
(#559):
handle broken nodes in
Iterant.skipSuspendL - PR #589:
improve handling of broken batches/cursors in
Iterant.attempt - PR #591
(#580):
improve strictness of
EqofIterant, fixdoOnFinishonLast
Bug fixes:
- PR #552
(#483):
MVaris stack unsafe, triggering stack overflow onput - PR #543
(#541):
Observable.take(0)shouldn't subscribe to the source at all - PR #496
(#468):
race condition for
Observablein concatenation operators - PR #568:
in
Iterant.toReactivePublisherthecancelshould be made byrequest() - PR #592
(#590):
potential nontermination in
Observable.zip[Map]
Chores:
- PR #502: update sbt to 1.1
- PR #488:
add note about execution model for
Observable.fromInputStream - PR #531 (related to #513): add automatic header creation on compilation
- PR #557: disable automatic publishing, too dangerous
- PR #546
(related to #513):
add
scalafmt.confconfiguration - PR #565:
correct small typo in doc of
Task#executeOn - PR #576: fix comment mentioning A 10BC8 kka instead of Monix
- PR #588: update copyright headers for Scala 2.11 source files
- PR #605: Make concurrent Atomic tests more resilient to timeouts
Release is binary backwards compatible with series 2.3.x.
Bug fixes:
- Issue #468:
Observables created using
concatdon't get canceled (critical) - Issue #483:
stack overflow error on
MVar.put - Issue #541:
observable.take(0)shouldn't subscribe to the source at all - Issue #475:
Observable.fromAsyncStateActiondoes not protect against exceptions thrown in use code
Issue #468 in particular is pretty serious as it can lead to resource leaks. Read the pull request for more details.
Upgrade to 2.3.3 is recommended!
Final milestone release before the RC and the final and stable 3.0.0.
Special thanks to Leandro Bolivar for implementing propagation of
"local vars" (aka Local and TaskLocal, the equivalents of
ThreadLocal, but for usage with Future and Task).
This release also lands a long awaited feature for Task: pure
cancellation, aka Task.cancel. It's building on top of the current
Task implementation, however it changes the API — e.g. in order to
keep Task pure, the chooseFirstOf operator is now gone, being
replaced with an equivalent racePair that operates with tasks and
pure functions.
The other highlight of the release are the performance improvements
for Task, an on-going process to make sure that Monix's Task
remains the best implementation in Scala's ecosystem.
We now depend on Cats 1.0.1 and cats-effect 0.8.
Full list of PRs:
- PR #464:
updates dependencies, Scala to
2.12.4and2.11.12, JCTools to2.1.1, Minitest to2.0.0, Scala.js to0.6.21 - PR #462:
Fix for
timeoutToto cancel source task directly after timeout - PR #444:
Add
localContextPropagationtoTask.Options, implement tracingLocalvars - PR 470: increase test coverage
- PR #473:
Fix issue where
fromAsyncStateActionis not safe for user code - PR #485 and
PR #489:
Updates Cats to
1.0.1and cats-effect to0.8 - PR #474:
Task/CoevalRun-loop Optimizations, First Batch - PR #492: Second batch of optimizations
- PR #494:
Task.cancelas a pure action, along with.start,.raceand.uncancelable
The highlight of this release is the upgrade to Cats 1.0-RC1,
bringing a cats.Parallel[Task, Task] instance that replaces
the need for Task.nondeterminism, now removed.
List of changes:
- PR #437:
Added
Iterant.zipWithIndex - PR #439:
Added
Iterant.dump - PR #441:
Observable.mapParallelUnorderedneeds configurable overflow strategy - PR #445:
Added
ShiftedRunnableinmonix.execution - PR #443:
Iterant
maxByLandminByLops - PR #442:
small fixes in
takeWhileNotCanceledandrunAsyncGetFirstdocs - PR #450: Minor test description fix
- PR #458:
Updates to cats 1.0-RC1 and cats-effect 0.5, along with
redesigning that integration, e.g. added
cats.Parallelinstance,Iterant.parZipandIterant.parZipMap
This is a major release that breaks both binary and source compatibility. The major themes of this release:
- deep integration with Typelevel Cats
- the
Iterantdata type in a newmonix-tailsub-project - API refactoring, eliminated deprecations
- major improvements to
Observable,TaskandCancelableFuture
Typelevel Cats integration:
- PR #370: introduced
Cats and
cats-effectas direct dependencies - PR #377: added
Cats related conversions, along with naming changes for consistency
(e.g. renamed
Coeval.AttempttoCoeval.Eager) - PR #387: updated Cats to
1.0.0-MF, removed deprecated functions and classes - PR #397: standardizes
on Cats-related naming, removes
Coeval'sComonadimplementation - PR #398: re-adds
instances for
CoflatMap - PR #427: adds conversions from Cats to Observable
New monix-tail sub-project, exposing monix.tail.Iterant[F[_], A]:
- PR #280: introduces
Iterant[F[_], A]for pull-based streaming based onTask/Coeval - PR #396:
adds the
Iterant.scanoperator - PR #403:
adds
Iterant.foldWhileLeftLandIterant.foldWhileLeftEvalLoperators - PR #404:
adds Iterant
existsL,forallL, changesObservable.foldWhileL(breaking change) - PR #402:
adds
Iterant.foldRightLoperator - PR #405:
adds
Iterantops -findL,foldL,maxL,minL,reduceL - PR #407:
adds
Iterantops -countL,distinctUntilChanged,distinctUntilChangedByKey - PR #412:
adds
scanEvalon bothIterantandObservable - PR #411:
another naming consistency change between
ObservableandIterant - PR #413:
Iterant.bufferSliding,bufferTumblingandbatchedoperators - PR #417 and
PR #418:
Reactive Streams implementation for
Iterant
Improvements for monix-execution and CancelableFuture:
- PR #390: changes for
flatMaponCancelableFutureto cancel all involved futures (thanks to @larsrh) - PR #395: adds
Cats type class implementations for
CancelableFuture - PR #431: improvements
to
CancelableFutureto get rid of memory leak, also adding utils likeCancelableFuture.async - PR #432: further
fixes to
CancelableFuture, since describing a cancellableflatMapis a hard problem - PR #418:
adds flip convenience method to
AtomicBoolean(thanks to@Wogan)
Improvements for monix-reactive and Observable:
- PR #391: makes Observable concatenation (++) stack safe
- PR #408:
changes for
Iterantand Cats consistency (make use ofEqandOrdertype classes, addfoldFandfoldL, removedistinctanddistinctByKey) - PR #368: added
the
Observable.intersperseoperator (thanks to @omainegra) - PR #384: added
contramapmethod to Callback (thanks to @Wogan) - PR #425: gets rid of
ObservableLike, makesObservableanabstract classwhere the operators are final,Pipeno longer hasObservable's operators, justtransform
Improvements for monix-eval, Task and Coeval:
- PR #410:
TaskandCoevalperformance optimisations - PR #422: adds
Task.shift, an innovation inspired bycats.effect.IO - PR #424:
Taskrefactoring, gets rid ofTask.OnFinishtype alias - PR #430:
CoevalandTaskrefactoring to therunmethods for consistency, introducedmap2,map3...map6on bothTaskandCoeval, renamedzipMap*toparMap2,parMap3...parMap6forTask
Administrative and build changes:
- PR #372: configured project for Git hash versioning (for enabling automatic releases)
- PR #378: dropped Scala 2.10 support
- enabled automatic deployments through Travis-ci, wrote a blog post documenting the necessarily steps, see Automatic Releases to Maven Central with Travis and sbt
- PR #423: updates Scala.js to 0.6.20, the final in the series before 1.0.0
Release is binary backwards compatible with series 2.3.x.
This is a service release, fixing a minor issue in AsyncScheduler
and upgrading Scala.js:
- PR #436:
adds reusable
ShiftedRunnable, leaving no room for error inBatchingSchedulertypes by usage ofTrampolinedRunnable; also upgrades Scala.js to 0.6.20
Release is binary backwards compatible with series 2.3.x.
This is a service release, fixing a minor issue in AsyncScheduler
and upgrading Scala.js:
- PR #436:
adds reusable
ShiftedRunnable, leaving no room for error inBatchingSchedulertypes by usage ofTrampolinedRunnable; also upgrades Scala.js to 0.6.20
Release is binary backwards compatible with series 2.2.x.
List of changes:
- Issue #340:
Optimization of
TaskSemaphore - Issue #349:
Replace usage of
scala.util.control.NonFatalin handling fatal exceptions tomonix.execution.misc.NonFatal - Issue #347:
Add
Task.deferActionbuilder - Issue #339:
Add
Observable.observeOnmethod - Issue #338:
Cancelablerefs built withCancelable.collectionshould useCancelable.cancelAllin its implementation - Issue #350:
Change
BackPressurebuffer implementation to be more fair and ensure that it doesn't lose events - Issue #353:
Refactor
Coeval/Taskrun-loop to introduce optimizedattempt/materializeimplementations and addtransform/transformWithmethods making use of this - Issue #355:
Add
Coeval.runmethod - Issue #356:
Add
Coeval#attemptandTask#attemptmethods - Issue #358:
Deprecate
materializeAttemptanddematerializeAttemptonTaskandCoeval - Issue #359:
Rename
Coeval.Attempt#isFailuretoCoeval.Attempt#isError - Issue #348:
Add
Consumer#transformInputmethod - Issue #352 /
PR #361:
No back-pressure when converting from
org.reactivestreams.PublishertoObservable - Issue #362:
Replace
[T]generic param to[A], as a convention, everywhere - PR #341, PR #344, PR #346, Commit 9357ba, etc: Update dependencies (Scalaz 7.2.11, Scala 2.11.11, Scala 2.12.2, Scala.js 0.6.16)
Administrative:
- Issue #354: Enable Mima and Unidoc error reporting in Travis build
- PR #351: Specify that Monix is now a Typelevel project with full membership
Critical bug fix release related to Scala 2.12:
- Bug #330:
Ack.Continue.transformWithandAck.Stop.transformWithare not stack-safe
Most (probably all) functionality in Monix is not affected, because Monix
rarely flatMaps Continue references and we have had extensive tests for it.
However this bug can be dangerous for people that have implemented the
communication protocol (as described in the docs) by themselves.
New Features:
- Issue #306:
Circuit Breaker for
Task - Issue #312:
Add
Task.memoizeOnSuccessandCoeval.memoizeOnSuccess - Issue #313:
Add
Task.deferFutureActionbuilder - Issue #325:
Add
SingleAssignmentCancelable.plusOne - Issue #319:
Move and redesign exceptions in
monix.execution - Issue #314:
Task.sequenceshould have lazy behavior in evaluating the given sequence
Bug fixes:
- Bug #268:
Optimise the unsubscribe logic in
PublishSubject - Bug #308:
Fix NPE on
AsyncSubject.unsubscribe - Bug #315:
The
MapTaskObservableinternal object is exposed (ScalaDoc) - Bug #321:
Observable.concatMapandmapTaskcannot be canceled if the source has already completed - Documentation fixes: #307, #309, #311, #316 and #317
Build:
- enabled the Scala
Migration Manager
(MiMa) in
build.sbtto check for backwards compatibility problems - Issue #322:
Switch projects which use
CrossVersion.full/"org.scala-lang"toCrossVersion.patch/scalaOrganization.value
Unfortunately we have to push an emergency fix:
- Issue #305:
Fix stack-overflow error in
MVar
In addition to the changes from the 2.2.0-M1 milestone:
- Issue #298: Don't publish empty jars in root projects
- Issue #300: Update to cats 0.9.0
- Issue #301:
MVar, a non-blocking Task-based implementation - Issue #303: Observable "doOn" operators refactoring
Version 2.2.0-M1 is a milestone release, released for feedback
and testing purposes.
- Issue #281:
Fix performance regression in
Task.flatMap - Issue #284:
Move
ExecutionModeltomonix.execution - Issue #285:
Rename
Task.runAsync(f: Try[A] => Unit)toTask.runOnComplete - Issue #286:
Add
Task.runSyncMaybe - Issue #287:
Add
Scheduler.forkJoinbuilder - Issue #266:
Add
SchedulerServiceinterface inmonix.execution.schedulers - Issue #288:
Task.createshould not force async boundary - Issue #289:
Observable.foreachshould not fork - Issue #291:
Add
Observable.takeEveryNthoperator - Issue #292:
Optimize
Observable.concatMap - Issue #294:
Optimize
Observable.bufferSliding - Issue #295:
Add
Observable.publishSelector,Observable.pipeThroughSelector - Issue #296:
Add
Task.deferFuturebuilder
Version 2.1.2 is a minor release, binary compatible with 2.1.x,
upgrading Scala to 2.12.1 and fixing a bug in Observable.bufferSliding.
- Bug #275:
Observable.bufferSlidingis broken
Version 2.1.1 is a minor release, binary compatible with 2.1.0,
fixing the compatibility with older Android versions.
The gist is that older Android versions are incompatible with our
usage of sun.misc.Unsafe. And this might also be true of other
platforms as well, like the upcoming Java 9.
Therefore we are doing two things:
- we introduce new
monix.execution.atomic.Atomicimplementations that make use ofAtomicFieldUpdaterclasses, for those platforms that do not supportsun.misc.Unsafe; hopefully this will perform well on top of Java 9, see this post by Aleksey Shipilёv: https://shipilev.net/blog/2015/faster-atomic-fu/\ - in our usage of JCTools,
since these rely heavily on
sun.misc.Unsafe, we fallback to implementations fromorg.jctools.queues.atomic, as these are safe to use
The issues being addressed:
- Bug #269: Observable throws NoSuchFieldException (via jctools) on Android
- Issue #270: Add support
for platforms that do not have
sun.misc.Unsafe(with the corresponding PR #272)
Version 2.1.0 is a major release that is not compatible with
the previous 2.0.x series.
Issues addressed:
- Issue #226:
Add
Task.Optionswith anautoCancelableRunLoopsproperty - Issue #227:
Add
executeWithFork,executeWithModelandasyncBoundaryoperators onTask - Issue #232:
Async
Taskinstances should execute withTrampolinedRunnableeverywhere we can - Issue #236:
TaskandCoevalneedforeachandforeachL - Issue #237:
Introduce
monix.execution.misc.ThreadLocal - Issue #238:
Add
Coeval.Attempt.get - Issue #239:
Task.flatMaploops should not be auto-cancelable by default - Issue #240:
Change type class encoding, provide optimal
Observable.tailRecM, upgrade Cats to0.8.x - Issue #251:
Provide instances for Scalaz
Catchable - Issue #241:
TestScheduler's exposedstateshould return theStateand notAtomic[State] - Issue #243:
Add the
TrampolineSchedulerfor the JVM, in addition to Javascript - Issue #256:
Refine extension methods on
Scheduler - Issue #264:
AtomicNumberclasses needgetAndAddoptimisation - Issue #262:
Add
TaskSemaphoreandAsyncSemaphore - Issue #263:
Add
Observable.mapTaskandObservable.mapFuture - Issue #205:
Add
Observable.mapAsyncfor parallel mapping overObservable - Issue #261:
Optimize the performance of the
Observablebuffers - Issue #254
Rename
Observable.runWithtoObservable.consumeWith - Issue #242:
Add
Scheduler.cachedbuilder for the JVM
- Upgrade Scala to 2.12.0 final release
- Upgrade Scalaz to 7.2.7
- Upgrade Minitest to 0.27
- Bug #247: Avoid runtime reflection
- Bug #248: Reset overflow counter on None onOverflow result
- Updates Scala.js to 0.6.13 and Scala to 2.12.0-RC2
- Bug #244: AsyncScheduler.scheduleAtFixedRate and scheduleWithFixedDelay (on the JVM) have incorrect behavior
- Bug #230:
Deadlock when blocking threads due to
LocalBatchingExecutor(affectsTaskusage)
- Issue #224:
IllegalStateExceptionlogged in parallel consumer, when streaming gets canceled due to a subscriber triggering an error
- Issue #218:
Upgrade Cats to
0.7.2, Scalaz to7.2.6and support Scala2.12.0-RC1
- Issue #216:
Change type class design in
monix.typesto an encoding inspired by the Scato and Scalaz 8, cleaning up the available types; also enable 2.12.0-M5 support, although releases are not automatic, because Cats doesn't yet support Scala 2.12
Emergency bug fix:
- Issue #215:
the instance created by
Task.gatherUnorderedkeeps state and has problems running (withrunAsync) a second time
Bug fixes:
- Issue #211:
CompositeCancelable.removewasn't working after the changes in RC10, fixed it in RC11 and now added some more tests - Issue #213: Fixes
Task/Coevalmemoize operation
Enhancements:
- Issue #212: Upgraded Cats to version 0.7.0
- PR #214: optimize Task, refactorings, some deprecations (details below)
Details on PR #214:
- Upgraded the Cats dependency to version 0.7.0. Had some trouble with that (see cats#1329), but it is now functional
- Renamed
evaltoevalAlwaysacross the board (inTask,CoevalandObservable), but keptevalAlwayswith the@deprecatedsign, so upgrade should be smooth. The reason is thatevalAlwaysis an often used operation and deserves a shorter name - For Scalaz converts introduced
Task.delayas an alias ofTask.eval,Task.suspendas an alias ofTask.deferandTask.asyncas an alias ofTask.create - Renamed
Task.eval(Coeval)toTask.coeval(Coeval)andObservable.eval(Coeval)toObservable.coeval(Coeval)in order to avoid a conflict - Removed
Task.bothbecause it is just an alias forTask.mapBoth. Judging in retrospective, we probably should've added it a@deprecatedwarning instead; on the other handbothandmapBothare so close that the IDE will probably suggestmapBoth(at least IntelliJ IDEA does) - Refactor the
Taskinternals again, for optimizations and simplifications:- Simplified the internal states, e.g. instead of having
Now,Error,AlwaysandOnce, we now have a singleDelay(coeval), thus reusing theCoevaltype for computing asynchronous values - Get rid of the
Task.Attempttype, it never made any sense that one. People can useCoeval.Attemptif they need aTryalternative (and convert toTaskif they end up needing aTask) - Introduced
Scheduler.executeAsyncandScheduler.executeLocalas extension methods powered by macros, for zero-overhead, because buildingRunnableinstances is too annoying - Used
Scheduler.executeLocalandLocalRunnablein key points in theTaskimplementation to reduce forking - Made
Task.gatherbe based onTask.gatherUnorderedand it is now way faster
- Simplified the internal states, e.g. instead of having
- Moved everything from
monix.types.shimstomonix.types
Bug fixes:
- Issue #207: Task flatMap loop isn't cancelable
- Issue #210: Fixed
CompositeCancelable.remove, a bug introduced in the last release (RC10)
Enhancements:
- Issue #208: Uniquely name threads generated from ThreadFactory
- Issue #210: Refactorings for performance and coherence reasons, described below
Issue #210 changes for the monix-execution sub-project:
- introduced the
CallbackRunnableinterface for markingRunnableinstances that could be executed on the current thread, on a local trampoline, as an optimization - introduced
LocalBatchingExecutor, a mixin for schedulers that can executeCallbackRunnablelocally, using a trampoline - made
AsyncSchedulerfor the JVM be able to executeCallbackRunnableinstances by inheriting fromLocalBatchingExecutor; but not on top of Javascript - fixed critical bug in
CompositeCancelablethat was introduced in the last release
Issue #210 changes for the monix-eval sub-project:
-
optimized
Task.fromFutureto the point that it has near zero overhead -
optimized
Task.gather,Task.gatherUnordered,Task.sequence -
Task.gathernow forces asynchronous execution for the given tasks -
Task.gatherUnorderedalso forces asynchronous execution -
optimized the
Tasktrampoline in general -
introduced
Callback.asyncwrapper andasyncApplyextension method -
renamed
Task.zipWithtoTask.zipMap(rename across the board, also forObservable) -
added
Task.executeOnfor overriding theScheduler -
added
Task.forkoverload with a scheduler override -
added
Task.asyncas an alias ofTask.create
Issue #210 changes for the monix-types sub-project:
- moved all shims to
monix.types.shims, in order to differentiate them from type classes that are not shims - added the
Deferrabletype class, to express lazy evaluation concerns (e.g.evalOnce,evalAlways,defer,memoize) - added the
Evaluabletype class, for computations that will eventually produce a value
Issue #210 changes for the monix-reactive project:
- for
foldLeftmethods, make the seed be just a normal by-name parameter instead of aCoeval, because otherwise it isn't compatible with other type classes / interfaces - affected methods are
foldLeft,foldLeftAsync - rename
zipWithtozipMap - rename
combineLatestWithtocombineLatestMap - add
Observable.fromAsyncStateAction - fix
Consumer.foldLeftAsync
Enhancements:
- Issue #200: Add an
executeNowextension method forScheduler, taking a by-name callback, as initializingRunnableinstances is too annoying - Issue #201: Fixes and
optimizes
Task.gatherUnordered- as an edge-case, it wasn't stack safe and it has been optimized to be more efficient - Issue #202: Added
asyncOnSuccessandasyncOnErroras extension methods forCallbackand madeTask.createsafe by forcing an asynchronous boundary when calling the callback (onSuccess/onError); also optimizesTask.chooseFirstOfListandTestScheduler - Issue #203: Changed
the
onOverflowfunction signature forOverflowStrategytypes supporting it - it can now return anOptionand if it returnsNone, then we don't signal any messages downstream, thus making it easier to just log that overflow happened without extra tricks
Bug fixes:
- Issue #193: Task Applicative instance doesn't run the tasks in parallel
- Issue #194:
Task.mapBothis not stack-safe
Enhancements:
- Issue #196: Add the
Consumer.createbuilder - Issue #166: Generalize
Task.sequence,Task.gatherandTask.gatherUnorderedfor arbitrary collections
Misc:
- updated Scala.js version to 0.6.11
- updated Cats version to 0.6.1
- changed PGP signing key
- increased timeout on the reactive streams publisher tests
Critical bug fix:
- BUG #181: the default operators
on
CancelableFutureare triggeringStackOverflowexceptions
New Features:
- Issue #184: introducing the
Consumertype, a factory of subscribers that makes it easier to specify reusable and composable consumers and for example, it makes it possible, out of the box, to load-balance the workload between multiple subscribers in parallel; see the description - Issue #186 (related to
issue #168): adds the
Observable.interleave2operator, similar with the one inFS2(former scalaz-streams) - Issue #180: the
Observer.feedfunction now has an overload that does not take a cancelable, because it's awkward coming up with one if it isn't needed; there's also aonNextAllextension for bothObserverandSubscriberwhich can push a whole collection of events - Issue #187: integrates
the
MonadCombinetype class from Cats, being similar to the ScalazMonadPlus, as somehow this was missed in the initial integration - Issue #177 reviews exposed
traits and abstract classes, making sure they inherit from
Serializable - Issue #85: small change,
clarifies the ScalaDoc on the
RefCountCancelabletype - Issue #162: implements
the
Observable.takeUntil(trigger: Observable[Any])operator, an operator that takes from the source until another observable triggers an event - Issue #189: for
Observableoperators that return a single item (e.g.sumF,foldLeftF, etc.) adds variants that do the same thing, but returnTaskresults instead, so now we havefoldLeftL,sumL, etc. that return tasks - Issue #190: changes many
observable operators, that were taking by-name parameters or initial state
parameters (e.g.
headOrElseF,foldLeftF, etc), to takeCoevalparams instead, in order to have fine control over the evaluation model - Issue #191: introduces
by default an implicit conversion from
AnytoCoeval.Now, to make it easier to useCoevalas function parameters - the default will thus simply be strict evaluation, strictness being usually the default in Scala
Bug fixes:
- BUG #170:
Task.materializeAttemptdoesn't work forBindAsync, leading toonErrorHandleWithnot working with errors triggered inflatMapon async tasks
New Features:
- Issue #171:
Add Scheduler builder on the JVM that allows specifying
just the
ExecutionModel, falling backglobalotherwise - Issue #174: Scalaz integration (in addition to the Cats integration) for FP goddess
- Issue #175:
Reintroduce all of project
Sincronintomonix-execution, which means that nowmonix-executionexposesAtomicreferences. This project was split from Monix, but the decision didn't make sense and the exposed functionality is super useful and in the spirit ofmonix-execution - Issue #176: now that we
have
Task, we introduceTaskApp, a safeApptype that allows one to specify pure programs
Breaking changes:
- Issue #157: Renaming
Observable.doOnCanceltodoOnSubscriptionCancelbecause its meaning has changed since Monifu 1.x and it will cause pain - Issue #160 (breaking change):
Revamp the buffer operators on
Observable - Issue #161 (breaking change): Revamp the ConcurrentSubject and Pipe constructors
Bug fixes and enhancements:
- Bug #153: already fixed in
2.0-RC5forTask, but now also fixed forCoeval - Issue #155: Coeval enhancements and fixes
- Issue #156: Adding
Observable.doOnTerminatefor executing a piece of logic whenonCompleteoronErrorhappens, or when the subscriber stops the streaming withStop - Issue #158:
Observable.fromIteratortakes now an optionalonFinishcallback for resource deallocation, because theIteratorinterface doesn't provide aclose()that could be used - Issue #163: added
Observable.fromInputStream,fromCharsReaderandfromLinesReaderfor reading fromjava.io.InputStream,java.io.Readerandjava.io.BufferedReaderdata sources - Issue #164: Add
Observable.executeOn, as alternative toobserveOn - Issue #165: Simplification of the Cats integration
Critical bug fix:
- Bug 153 - Task.sequence and Task.gather return a shared mutable.ListBuffer
- Issue #89 - reintroducing a minimal
Cats integration, along with tests based on
cats-laws. We are splittingmonix.typeinto its own sub-project andmonix-catsdepends on it. This ensures that the pick what you use approach also works withmonix-cats, as people wanting justTaskshould not getObservable, yetObservableneeds integration as well. - Issue #149 - documentation related fixes
- Improved the description of
Task Task.unitis now a final valTask.nevernow shares the reference instead of building a new instance every time- Exposing
Task.unsafeStartNowandTask.unsafeStartAsync, as otherwiseTask.unsafeCreateis useless. So we should expose all of them, or none at all. FutureUtils.Extensions.dematerializewas named "materialize" (WTF!) and is renamed- Task should inherit just from
Serializableand not fromProduct
- Improved the description of
- Issue #150 - add a new
Task.doOnFinishoperator that executes once a task is finished. - Issue #151 - changing
Future.sequenceto be ordered in both execution and effects - Issue #152 - introduce
Task.gatherwhich behaves like the previoussequenceandTask.gatherUnorderedwhich doesn't do ordering for results either.
- Issue #147 - Make
BehaviorSubjectandReplaySubjectremove subscribers that triggeredStopwhile connecting, thus freeing the memory sooner, otherwise the GC cannot free the subscriber because its reference is kept captive until the nextSubject.onNext - Remove
tutandsitefromproject/plugins, as the documentation will be handled in the monix.io repository - Re-enable code coverage in Travis and fix the build to actually test Scala 2.10.6
Minor release with a single bug fix:
- Issue #144 - fix Observable.zip
Feature freeze. There's lots of interesting stuff to work on, but I'd rather have a stable 2.0 release first.
Bug fix:
- Issue #143 - on RefCountObservable cancel and stop should be idempotent
The theme and the big issue of this release has been redesigning Task's
implementation and introducing Coeval. See Issue #141
for details.
List of changes:
- Issue #88: the
Taskimplementation has been redesigned from scratch - Issue #89: Cats integration has been tried and yielded very positive results, but is being delayed
- Issue #96
and issue 99: add
MulticastStrategyfor safer building of multicast Observables - Issue #127: Introduce operators onErrorHandle and onErrorHandleWith
- Issue #128: operators
materialize, dematerialize and memoize for
Task(andCoeval) - Issue #113: Introduce the
bufferIntrospectiveoperator - Issue #123: underlying protocol
changes, did some fixes for the work that already happened for
M1 - Issue #131: renamed
Ack.CanceltoAck.Stopin order to differentiate it as a verb fromCancelable.cancel, because in version2.0they are two different actions (and it's more semantically correct this way) - Issue #132: introduced the
Observable.onCancelTriggerErroroperator - Issue #133: introduced the
Observable.doOnDownstreamStopanddoOnCancel(which is one reason for #131) - Issue #134:
New operator
Observable.switchIfEmpty - Issue #136:
Clarify reactive streams, initiated
monix.execution.rstreamsfor reusable subscription types and added theReactivePublishertype class for things that can be converted toorg.reactivestreams.Publisher(both Observable and Task are instances) - Issue #140: Add type class hierarchy, to be integrated with both Cats and Scalaz
- Issue #141: reimplement Task from scratch, introduce Coeval, introduce Scheduler.executionModel
Milestone release for version 2.0, supplied as a preview. The final 2.0 release should not have major changes compared to this first milestone, but API breakage may still happen.
This version is not production ready. Use at your own risk.
List of changes:
- Issue #60 - initiated the
docssub-project with tutorials type-checked as part of the test process - Issue #88 - add Monix's own
Task, an alternative toFutureand the ScalazTask - Issue #89 - initial integration with Cats
- Issue #90 - remove functionality that isn't relevant to the purpose of Monix and be supported
- Issue #91 - project rename and reorganization (epic API breakage)
- Issue #93 - renamed
Observable.onSubscribetoObservable.unsafeSubscribeFn, because it shouldn't be used directly, unless you really, really know what you're doing - Issue #94 - fixed comments style to ScalaDoc
- Issue #96 - removed
Observable.createbecause it is unsafe - Issue #100 - enhanced the
Schedulerinterface - Issue #102 - brought back
sun.misc.Unsafe(actually this was done in separate project, as part of issue #104) - Issue #104 - separated the
Atomicimplementations in the Sincron - Issue #106 - enabled code coverage reports
- Issue #111 - improved test coverage
- Issue #114 - initiated the
benchmarkssub-project to track performance issues - Issue #115 -
Cancelable.cancelnow returnsUnitand notBoolean - Issue #118 - Fix
materialize, adddematerialize - Issue #119 - Introduced
Pipe, renamedChannelinConcurrentSubject, renamedSynchronousObserverinSyncObserver, renamedSynchronousSubscriberinSyncSubscriber - Issue #121 - Clarified the contract for synchronous
pipelines, got rid of the hacks from
internal, replacing them with macro-driven extensions forFuture[Ack] - Issue #123 - Changed the protocol of
Observable.subscribe, back-pressuringonCompleteandonErroris now optional andObservable.unsafeSubscribeFnneeds to return a usableCancelableinstead ofUnit(big internal change) - Issue #125 - Modified contract of
AsyncScheduler, added a newExecutorScheduler
- Issue #113 - Introduce the
bufferIntrospectiveoperator
- Issue #125 - Modify contract of AsyncScheduler, and add a new Scheduler type based entirely on Java's ScheduledExecutor
- Update versions of sbt dependencies
- Documentation changes (fixed missing argument in Observable docs, add code of conduct mention)