From df4d18603ca832a7193336cfa93b656c2a84d52a Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Tue, 11 Aug 2020 21:52:00 +0300 Subject: [PATCH 01/69] Update build.yml for series/4.x --- .github/workflows/build.yml | 16 +++++++++++----- README.md | 5 +++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1795ebf12..a794558c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,10 @@ jobs: # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it scala: [ 2.11.12, 2.12.12, 2.13.3 ] - + + env: + CI: true + steps: - uses: actions/checkout@v2 - uses: olafurpg/setup-scala@v7 @@ -70,6 +73,9 @@ jobs: - { java: 8, scala: 2.13.3, scalajs: 0.6.33 } - { java: 8, scala: 2.13.3, scalajs: 1.1.1 } + env: + CI: true + steps: - uses: actions/checkout@v2 - uses: olafurpg/setup-scala@v7 @@ -197,7 +203,7 @@ jobs: publish: name: Publish to Sonatype - if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/3.x') + if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x') needs: [ jvm-tests, js-tests, mima, unidoc ] strategy: matrix: @@ -221,12 +227,12 @@ jobs: - name: SCALAJS_VERSION=${{ matrix.scalajs }} sbt ci-release run: | - if [ "$AUTO_PUBLISH_SERIES_3X" = "true" ]; then + if [ "$AUTO_PUBLISH_SERIES_4X" = "true" ]; then echo "SCALAJS_VERSION=$SCALAJS_VERSION" git fetch --depth=100 origin +refs/tags/*:refs/tags/* sbt ci-release else - echo "Skipping due to AUTO_PUBLISH_SERIES_3X=false" + echo "Skipping due to AUTO_PUBLISH_SERIES_4X=false" fi env: PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }} @@ -235,4 +241,4 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SCALAJS_VERSION: ${{ matrix.scalajs }} PUBLISH_STABLE_VERSION: true - AUTO_PUBLISH_SERIES_3X: ${{ secrets.AUTO_PUBLISH_SERIES_3X }} + AUTO_PUBLISH_SERIES_4X: ${{ secrets.AUTO_PUBLISH_SERIES_4X }} diff --git a/README.md b/README.md index a67b7aee4..781cfaef7 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ Asynchronous, Reactive Programming for Scala and [Scala.js](http://www.scala-js.org/). -[![Build status](https://github.com/monix/monix/workflows/build/badge.svg)](https://github.com/monix/monix/actions?query=workflow%3Abuild) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build](https://github.com/monix/monix/workflows/build/badge.svg?branch=series/4.x)](https://github.com/monix/monix/actions?query=branch%3Aseries%2F4.x+workflow%3Abuild) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix) + +**IN-DEVELOPMENT, UNSTABLE BRANCH!** ## Overview From 171586dab47922774e5c56cae0311163ccc6a828 Mon Sep 17 00:00:00 2001 From: ctoomey Date: Tue, 11 Aug 2020 14:34:23 -0700 Subject: [PATCH 02/69] 1202: prioritized merge (#1205) * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * Fix unrelated InputStreamObservableSuite bug that failed build * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge * 1202: prioritized merge --- .../scala/monix/reactive/Observable.scala | 24 +++ .../MergePrioritizedListObservable.scala | 179 ++++++++++++++++++ .../operators/MergePrioritizedListSuite.scala | 170 +++++++++++++++++ 3 files changed, 373 insertions(+) create mode 100644 monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala create mode 100644 monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index e7b627508..a4e59f0f9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -6050,6 +6050,30 @@ object Observable extends ObservableDeprecatedBuilders { } } + /** Given a sequence of priority/observable pairs, combines them into a new + * observable that eagerly emits source items downstream as soon as demand is + * signaled, choosing the item from the highest priority (greater numbers + * mean higher priority) source when items from multiple sources are + * available. If items are available from multiple sources with the same + * highest priority, one of them is chosen arbitrarily. + * + * Source items are buffered only to the extent necessary to accommodate + * backpressure from downstream, and thus if only a single item is available + * when demand is signaled, it will be emitted regardless of priority. + * + * Backpressure is propagated from downstream to the source observables, so + * that items from a given source will always be emitted downstream in the + * same order as received from the source, and at most a single item from a + * given source will be in flight at a time. + */ + def mergePrioritizedList[A](sources: (Int, Observable[A])*): Observable[A] = { + if (sources.isEmpty) { + Observable.empty + } else { + new MergePrioritizedListObservable[A](sources) + } + } + /** Given a list of source Observables, emits all of the items from * the first of these Observables to emit an item or to complete, * and cancel the rest. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala new file mode 100644 index 000000000..97e943fa2 --- /dev/null +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2014-2020 by The Monix Project Developers. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.reactive.internal.builders + +import monix.execution.Ack.{Continue, Stop} +import monix.execution.cancelables.CompositeCancelable +import monix.execution.{Ack, Cancelable, Scheduler} +import monix.reactive.Observable +import monix.reactive.observers.Subscriber + +import scala.collection.mutable +import scala.concurrent.{Future, Promise} +import scala.util.Success + +/** Given a sequence of priority/observable pairs, combines them into a new + * observable that eagerly emits source items downstream as soon as demand is + * signaled, choosing the item from the highest priority (greater numbers + * mean higher priority) source when items from multiple sources are + * available. If items are available from multiple sources with the same + * highest priority, one of them is chosen arbitrarily. + * + * Source items are buffered only to the extent necessary to accommodate + * backpressure from downstream, and thus if only a single item is available + * when demand is signaled, it will be emitted regardless of priority. + * + * Backpressure is propagated from downstream to the source observables, so + * that items from a given source will always be emitted downstream in the + * same order as received from the source, and at most a single item from a + * given source will be in flight at a time. + */ +private[reactive] final class MergePrioritizedListObservable[A]( + sources: Seq[(Int, Observable[A])]) + extends Observable[A] { + + override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { + import out.scheduler + + val numberOfObservables = sources.size + + val lock = new AnyRef + var isDone = false + + // MUST BE synchronized by `lock` + var lastAck = Continue: Future[Ack] + + case class PQElem(data: A, promise: Promise[Ack], priority: Int) + + object PQElemOrdering extends Ordering[PQElem] { + override def compare(x: PQElem, y: PQElem): Int = + x.priority.compareTo(y.priority) + } + + val pq = new mutable.PriorityQueue[PQElem]()(PQElemOrdering) + + // MUST BE synchronized by `lock` + var completedCount = 0 + + // MUST BE synchronized by `lock` + def rawOnNext(a: A): Future[Ack] = { + if (isDone) Stop + else out.onNext(a).syncOnStopOrFailure(_ => lock.synchronized(completePromises())) + } + + // MUST BE synchronized by `lock` + def processNext(): Future[Ack] = { + val e = pq.dequeue() + val fut = rawOnNext(e.data) + e.promise.completeWith(fut) + fut + } + + // MUST BE synchronized by `lock` + def signalOnNext(): Future[Ack] = { + lastAck = lastAck match { + case Continue => processNext() + case Stop => Stop + case async => + async.flatMap { + // async execution, we have to re-sync + case Continue => lock.synchronized(processNext()) + case Stop => Stop + } + } + lastAck + } + + def signalOnError(ex: Throwable): Unit = + lock.synchronized { + if (!isDone) { + isDone = true + out.onError(ex) + lastAck = Stop + completePromises() + } + } + + def signalOnComplete(): Unit = + lock.synchronized { + completedCount += 1 + + if (completedCount == numberOfObservables && !isDone) { + lastAck match { + case Continue => + isDone = true + out.onComplete() + completePromises() + case Stop => + completePromises() + case async => + async.onComplete { + case Success(Continue) => + lock.synchronized { + if (!isDone) { + isDone = true + out.onComplete() + completePromises() + } + } + case _ => + lock.synchronized(completePromises()) + } + } + + lastAck = Stop + } + } + + // MUST BE synchronized by `lock` + def completePromises(): Unit = { + pq.iterator.foreach(e => e.promise.tryComplete(Success(Stop))) + } + + val composite = CompositeCancelable() + val priSources = + sources.sorted(Ordering.by[(Int, Observable[A]), Int](_._1).reverse) + + priSources.foreach { + case (pri, obs) => + composite += obs.unsafeSubscribeFn(new Subscriber[A] { + implicit val scheduler: Scheduler = out.scheduler + + def onNext(elem: A): Future[Ack] = + lock.synchronized { + if (isDone) { + Stop + } else { + val p = Promise[Ack]() + pq.enqueue(PQElem(elem, p, pri)) + signalOnNext() + p.future + } + } + + def onError(ex: Throwable): Unit = + signalOnError(ex) + + def onComplete(): Unit = { + signalOnComplete() + } + }) + } + composite + } +} diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala new file mode 100644 index 000000000..483f2d58a --- /dev/null +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2014-2020 by The Monix Project Developers. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.reactive.internal.operators + +import monix.eval.Task +import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.Ack.{Continue, Stop} +import monix.reactive.observers.Subscriber +import monix.reactive.{Observable, Observer} + +import scala.concurrent.Future +import scala.concurrent.duration.Duration.Zero +import scala.concurrent.duration._ + +object MergePrioritizedListSuite extends BaseOperatorSuite { + def createObservable(sourceCount: Int) = + Some { + val sources = (1 to sourceCount).map(i => (i, Observable.fromIterable(Seq.fill(4)(i.toLong)))) + val o = Observable.mergePrioritizedList(sources: _*) + Sample(o, count(sourceCount), sum(sourceCount), Zero, Zero) + } + + def count(sourceCount: Int) = + 4 * sourceCount + + def observableInError(sourceCount: Int, ex: Throwable) = { + val o = Observable.range(0L, sourceCount.toLong).mergeMap(_ => Observable.raiseError(ex)) + Some(Sample(o, 0, 0, Zero, Zero)) + } + + def sum(sourceCount: Int) = { + 4L * sourceCount * (sourceCount + 1) / 2 + } + + def brokenUserCodeObservable(sourceCount: Int, ex: Throwable): Option[Sample] = None + + override def cancelableObservables(): Seq[Sample] = { + val sources1 = (1 to 100).map(i => (i, Observable.range(0, 100).delayExecution(2.second))) + val sample1 = Observable.mergePrioritizedList(sources1: _*) + Seq( + Sample(sample1, 0, 0, 0.seconds, 0.seconds), + Sample(sample1, 0, 0, 1.seconds, 0.seconds) + ) + } + + test("should return Observable.empty if sources empty") { implicit s => + assertEquals(Observable.mergePrioritizedList(), Observable.empty) + } + + test("should pick items in priority order") { implicit s => + val sources = (1 to 10).map(i => (i, Observable.now(i * 1L))) + val source = Observable.mergePrioritizedList(sources: _*) + var last = 0L + source.unsafeSubscribeFn(new Observer[Long] { + def onNext(elem: Long): Future[Ack] = { + Task + .sleep(FiniteDuration(1, SECONDS)) // sleep so that other source observables' items queued before next call + .map { _ => + last = elem + Continue + } + .runToFuture + } + def onError(ex: Throwable): Unit = throw ex + def onComplete(): Unit = () + }) + + (10L to 1L by -1).foreach { p => + s.tick(1.seconds) + assertEquals(last, p) + } + assert(s.state.tasks.isEmpty, "tasks.isEmpty") + } + + test("should push all items downstream before calling onComplete") { implicit s => + val source = + Observable.mergePrioritizedList((1, Observable.now(1L)), (1, Observable.now(1L)), (1, Observable.now(1L))) + var count = 0L + source.unsafeSubscribeFn(new Observer[Long] { + def onNext(elem: Long): Future[Ack] = { + Task + .sleep(FiniteDuration(1, SECONDS)) + .map { _ => + count += elem + Continue + } + .runToFuture + } + def onError(ex: Throwable): Unit = throw ex + def onComplete(): Unit = assertEquals(count, 3L) + }) + + s.tick(1.seconds) + assertEquals(count, 1L) + s.tick(1.seconds) + assertEquals(count, 2L) + s.tick(1.seconds) + assertEquals(count, 3L) + assert(s.state.tasks.isEmpty, "tasks.isEmpty") + } + + test("should complete all upstream onNext promises when downstream stops early") { implicit s => + val sources = (1 to 10).map(i => (i, new OnNextExposingObservable(i * 1L))) + val source = Observable.mergePrioritizedList(sources: _*) + + source.unsafeSubscribeFn(new Observer[Long] { + def onNext(elem: Long): Future[Ack] = { + Task + .sleep(FiniteDuration(1, SECONDS)) // sleep so that other source observables' items queued before next call + .map { _ => + Stop + } + .runToFuture + } + def onError(ex: Throwable): Unit = throw ex + def onComplete(): Unit = () + }) + + s.tick(1.seconds) + sources.foreach(src => assert(src._2.onNextRes.exists(_.isCompleted), "source promise completed")) + } + + test("should complete all upstream onNext promises when downstream errors early") { implicit s => + val sources = (1 to 10).map(i => (i, new OnNextExposingObservable(i * 1L))) + val source = Observable.mergePrioritizedList(sources: _*) + + source.unsafeSubscribeFn(new Observer[Long] { + def onNext(elem: Long): Future[Ack] = { + Task + .sleep(FiniteDuration(1, SECONDS)) // sleep so that other source observables' items queued before next call + .map { _ => + throw new RuntimeException("downstream failed") + } + .runToFuture + } + def onError(ex: Throwable): Unit = throw ex + def onComplete(): Unit = () + }) + + s.tick(1.seconds) + sources.foreach(src => assert(src._2.onNextRes.exists(_.isCompleted), "source promise completed")) + } + + // Enables verification that MergePrioritizedListObservable completes + // upstream onNext promises when downstream stops early + private class OnNextExposingObservable[+A](elem: A)(implicit s: Scheduler) extends Observable[A] { + var onNextRes: Option[Future[Ack]] = None + + def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { + onNextRes = Some(subscriber.onNext(elem)) + subscriber.onComplete() + Cancelable.empty + } + } +} From 60eec2348a9e4625dbe761128408cba21f3d0bfd Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 12 Aug 2020 09:43:53 +0300 Subject: [PATCH 03/69] Disable stable version publishes --- .github/workflows/build.yml | 2 +- build.sbt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a794558c3..8051603f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -240,5 +240,5 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SCALAJS_VERSION: ${{ matrix.scalajs }} - PUBLISH_STABLE_VERSION: true + PUBLISH_STABLE_VERSION: false AUTO_PUBLISH_SERIES_4X: ${{ secrets.AUTO_PUBLISH_SERIES_4X }} diff --git a/build.sbt b/build.sbt index 2d95cb661..eeaf404ae 100644 --- a/build.sbt +++ b/build.sbt @@ -251,6 +251,9 @@ lazy val sharedSettings = pgpSettings ++ Seq( sonatypeProfileName in ThisBuild := organization.value, sonatypeSessionName := s"[sbt-sonatype] ${name.value}${customScalaJS_Version.fold("-nojs")(v => s"-sjs$v")}-${version.value}", + // Only on the Series 4.x branch + dynverVTagPrefix in ThisBuild := false, + publishMavenStyle := true, publishArtifact in Test := false, pomIncludeRepository := { _ => false }, // removes optional dependencies From 4e92eaf7ff3d75e86eefc61134bb885d06b0fe02 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 12 Aug 2020 09:47:35 +0300 Subject: [PATCH 04/69] Fix #1229: Drop support for Scala 2.11 (#1230) --- .github/workflows/build.yml | 9 +- build.sbt | 63 ++---- .../internal/FutureLiftForPlatform.scala | 0 .../internal/FutureLiftForPlatform.scala | 21 -- .../scala/monix/eval/TaskLocalJVMSuite.scala | 2 +- .../src/main/scala/monix/eval/Task.scala | 11 +- .../eval/instances/CatsSyncForCoeval.scala | 0 .../eval/internal/ForwardCancelable.scala | 29 ++- .../scala/monix/eval/internal/TaskShift.scala | 8 +- .../eval/instances/CatsSyncForCoeval.scala | 95 --------- .../TaskClockTimerAndContextShiftSuite.scala | 15 +- .../scala/monix/eval/TaskLocalSuite.scala | 4 +- .../eval/TypeClassLawsForCoevalSuite.scala | 0 .../eval/TypeClassLawsForCoevalSuite.scala | 32 --- .../CancelableFutureForPlatform.scala | 0 .../internal/FutureUtilsForPlatform.scala | 0 .../forkJoin/AdaptedForkJoinPool.scala | 2 + .../forkJoin/AdaptedForkJoinTask.scala | 6 +- .../forkJoin/DynamicWorkerThreadFactory.scala | 20 +- .../StandardWorkerThreadFactory.scala | 7 +- .../schedulers/ExecutorScheduler.scala | 15 +- .../CancelableFutureForPlatform.scala | 22 -- .../execution/internal/forkJoin/package.scala | 42 ---- .../execution/internal/forkJoin/package.scala | 42 ---- .../schedulers/AsyncSchedulerJVMSuite.scala | 6 +- .../schedulers/ExecutorSchedulerSuite.scala | 13 +- .../schedulers/ScheduleOnceJVMSuite.scala | 8 +- .../TestSchedulerCompanionSuite.scala | 20 +- .../TrampolineExecutionContextSuite.scala | 26 +-- .../src/main/scala/monix/execution/Ack.scala | 4 +- .../main/scala/monix/execution/Callback.scala | 5 +- .../monix/execution/CancelableFuture.scala | 4 +- .../monix/execution/FutureUtils.scala | 14 +- .../scala/monix/execution/Scheduler.scala | 47 ++++- .../execution/misc/HygieneUtilMacros.scala | 3 +- .../monix/execution/misc/InlineMacros.scala | 4 +- .../schedulers/ReferenceScheduler.scala | 30 ++- .../schedulers/TrampolinedRunnable.scala | 0 .../monix/execution/FutureUtils.scala | 199 ------------------ .../execution/internal/ScalaConcurrent.scala | 40 ---- .../monix/execution/misc/compat.scala | 28 --- .../schedulers/ExecuteExtensions.scala | 88 -------- .../schedulers/TrampolinedRunnable.scala | 31 --- .../monix/execution/misc/compat.scala | 28 --- .../schedulers/ExecuteExtensions.scala | 87 -------- .../scala_2.13+/monix/execution/compat.scala | 4 +- .../scala_2.13-/monix/execution/compat.scala | 5 +- .../schedulers/TestSchedulerSuite.scala | 2 +- .../schedulers/TracingSchedulerSuite.scala | 14 +- .../UncaughtExceptionReporterSuite.scala | 4 +- ...trategyBackPressuredConcurrencySuite.scala | 4 +- ...tegyDropNewAndSignalConcurrencySuite.scala | 4 +- ...rflowStrategyDropNewConcurrencySuite.scala | 5 +- ...OverflowStrategyFailConcurrencySuite.scala | 8 +- ...lowStrategyUnboundedConcurrencySuite.scala | 8 +- .../consumers/CancelledConsumer.scala | 2 +- .../internal/consumers/MapConsumer.scala | 24 +-- .../internal/consumers/MapTaskConsumer.scala | 36 ++-- .../consumers/RaiseErrorConsumer.scala | 2 +- .../DelayExecutionByTimespanObservable.scala | 8 +- .../operators/DelayOnCompleteObservable.scala | 4 +- .../operators/RestartUntilObservable.scala | 4 +- .../operators/SubscribeOnObservable.scala | 8 +- .../internal/operators/ScanTaskSuite.scala | 4 +- .../IterantFromReactivePublisherSuite.scala | 42 ++-- .../IterantFromReactiveStreamAsyncSuite.scala | 52 +++-- project/MimaFilters.scala | 10 +- 67 files changed, 294 insertions(+), 1090 deletions(-) rename monix-catnap/jvm/src/main/{scala_2.12+ => scala}/monix/catnap/internal/FutureLiftForPlatform.scala (100%) delete mode 100644 monix-catnap/jvm/src/main/scala_2.11/monix/catnap/internal/FutureLiftForPlatform.scala rename monix-eval/shared/src/main/{scala_2.12+ => scala}/monix/eval/instances/CatsSyncForCoeval.scala (100%) delete mode 100644 monix-eval/shared/src/main/scala_2.11/monix/eval/instances/CatsSyncForCoeval.scala rename monix-eval/shared/src/test/{scala_2.12+ => scala}/monix/eval/TypeClassLawsForCoevalSuite.scala (100%) delete mode 100644 monix-eval/shared/src/test/scala_2.11/monix/eval/TypeClassLawsForCoevalSuite.scala rename monix-execution/jvm/src/main/{scala_2.12+ => scala}/monix/execution/internal/CancelableFutureForPlatform.scala (100%) rename monix-execution/jvm/src/main/{scala_2.12+ => scala}/monix/execution/internal/FutureUtilsForPlatform.scala (100%) delete mode 100644 monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/CancelableFutureForPlatform.scala delete mode 100644 monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/forkJoin/package.scala delete mode 100644 monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/forkJoin/package.scala rename monix-execution/shared/src/main/{scala_2.12+ => scala}/monix/execution/FutureUtils.scala (94%) rename monix-execution/shared/src/main/{scala_2.12+ => scala}/monix/execution/schedulers/TrampolinedRunnable.scala (100%) delete mode 100644 monix-execution/shared/src/main/scala_2.11/monix/execution/FutureUtils.scala delete mode 100644 monix-execution/shared/src/main/scala_2.11/monix/execution/internal/ScalaConcurrent.scala delete mode 100644 monix-execution/shared/src/main/scala_2.11/monix/execution/misc/compat.scala delete mode 100644 monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/ExecuteExtensions.scala delete mode 100644 monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/TrampolinedRunnable.scala delete mode 100644 monix-execution/shared/src/main/scala_2.12+/monix/execution/misc/compat.scala delete mode 100644 monix-execution/shared/src/main/scala_2.12+/monix/execution/schedulers/ExecuteExtensions.scala diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8051603f6..7f4104fe0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,11 +17,11 @@ jobs: java: [ 8, 11 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.11.12, 2.12.12, 2.13.3 ] + scala: [ 2.12.12, 2.13.3 ] env: CI: true - + steps: - uses: actions/checkout@v2 - uses: olafurpg/setup-scala@v7 @@ -49,9 +49,6 @@ jobs: - name: sbt ci-jvm run: | - if [[ "$SCALA_VERSION"~="2.11" ]]; then - export SCALAJS_VERSION="0.6.33" - fi ./.github/scripts/exec-sbt-command env: SCALA_VERSION: ${{ matrix.scala }} @@ -67,7 +64,6 @@ jobs: # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it include: - - { java: 8, scala: 2.11.12, scalajs: 0.6.33 } - { java: 8, scala: 2.12.12, scalajs: 0.6.33 } - { java: 8, scala: 2.12.12, scalajs: 1.1.1 } - { java: 8, scala: 2.13.3, scalajs: 0.6.33 } @@ -122,7 +118,6 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.11.12, scalajs: 0.6.33 } - { java: 8, scala: 2.12.12, scalajs: 1.1.1 } - { java: 8, scala: 2.13.3, scalajs: 1.1.1 } diff --git a/build.sbt b/build.sbt index eeaf404ae..3dcfe09c9 100644 --- a/build.sbt +++ b/build.sbt @@ -19,12 +19,9 @@ addCommandAlias("ci-release", ";+publishSigned ;sonatypeBundleRelease") // ------------------------------------------------------------------------------------------------ // Dependencies - Versions -val cats_GeneralVersion = "2.1.1" -val cats_ForScala211Version = "2.0.0" -val catsEffect_GeneralVersion = "2.1.4" -val catsEffect_ForScala211Version = "2.0.0" -val fs2_GeneralVersion = "2.4.0" -val fs2_ForScala211Version = "2.1.0" +val cats_Version = "2.1.1" +val catsEffect_Version = "2.1.4" +val fs2_Version = "2.4.0" val jcTools_Version = "3.0.0" val reactiveStreams_Version = "1.0.3" val minitest_Version = "2.8.2" @@ -39,28 +36,7 @@ val customScalaJS_Version = // The Monix version with which we must keep binary compatibility. // https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin -val monixSeries = "3.0.0" - -lazy val cats_CrossVersion = Def.setting { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 11)) => cats_ForScala211Version - case _ => cats_GeneralVersion - } -} - -lazy val catsEffect_CrossVersion = Def.setting { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 11)) => catsEffect_ForScala211Version - case _ => catsEffect_GeneralVersion - } -} - -lazy val fs2_CrossVersion = Def.setting { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 11)) => fs2_ForScala211Version - case _ => fs2_GeneralVersion - } -} +val monixSeries = "3.2.2" // ------------------------------------------------------------------------------------------------ // Dependencies - Libraries @@ -75,15 +51,15 @@ lazy val scalaCompilerLib = Def.setting { /** [[https://typelevel.org/cats/typeclasses/lawtesting.html]] */ lazy val catsLawsLib = - Def.setting { "org.typelevel" %%% "cats-laws" % cats_CrossVersion.value } + Def.setting { "org.typelevel" %%% "cats-laws" % cats_Version } /** [[https://typelevel.org/cats-effect/]] */ lazy val catsEffectLib = - Def.setting { "org.typelevel" %%% "cats-effect" % catsEffect_CrossVersion.value } + Def.setting { "org.typelevel" %%% "cats-effect" % catsEffect_Version } /** [[https://typelevel.org/cats-effect/]] */ lazy val catsEffectLawsLib = - Def.setting { "org.typelevel" %%% "cats-effect-laws" % catsEffect_CrossVersion.value } + Def.setting { "org.typelevel" %%% "cats-effect-laws" % catsEffect_Version } /** [[https://github.com/monix/implicitbox]] */ lazy val implicitBoxLib = @@ -244,6 +220,10 @@ lazy val sharedSettings = pgpSettings ++ Seq( // https://github.com/sbt/sbt/issues/2654 incOptions := incOptions.value.withLogRecompileOnMacro(false), + // Series/4.x is unpublished. + // Delete this after the first release ... + dynverVTagPrefix in ThisBuild := false, + // -- Settings meant for deployment on oss.sonatype.org publishTo in ThisBuild := sonatypePublishToBundle.value, isSnapshot in ThisBuild := !(isVersionStable.value && publishStableMonixVersion.value), @@ -308,19 +288,16 @@ lazy val crossVersionSourcesSettings: Seq[Setting[_]] = (unmanagedSourceDirectories in sc).value.flatMap { dir => Seq( scalaPartV.value match { - case Some((2, y)) if y == 11 => new File(dir.getPath + "_2.11") - case Some((2, y)) if y == 12 => new File(dir.getPath + "_2.12") - case Some((2, y)) if y >= 13 => new File(dir.getPath + "_2.13") - }, - scalaPartV.value match { - case Some((2, n)) if n >= 12 => new File(dir.getPath + "_2.12+") - case _ => new File(dir.getPath + "_2.12-") + case Some((2, y)) if y == 12 => Some(new File(dir.getPath + "_2.12")) + case Some((2, y)) if y >= 13 => Some(new File(dir.getPath + "_2.13")) + case _ => None }, scalaPartV.value match { - case Some((2, n)) if n >= 13 => new File(dir.getPath + "_2.13+") - case _ => new File(dir.getPath + "_2.13-") + case Some((2, n)) if n >= 13 => Some(new File(dir.getPath + "_2.13+")) + case Some((2, _)) => Some(new File(dir.getPath + "_2.13-")) + case _ => None } - ) + ).flatten } } } @@ -681,7 +658,7 @@ lazy val benchmarksPrev = project.in(file("benchmarks/vprev")) libraryDependencies ++= Seq( "io.monix" %% "monix" % "3.2.2", "dev.zio" %% "zio-streams" % "1.0.0-RC21-2", - "co.fs2" %% "fs2-core" % fs2_CrossVersion.value + "co.fs2" %% "fs2-core" % fs2_Version )) lazy val benchmarksNext = project.in(file("benchmarks/vnext")) @@ -694,5 +671,5 @@ lazy val benchmarksNext = project.in(file("benchmarks/vnext")) .settings( libraryDependencies ++= Seq( "dev.zio" %% "zio-streams" % "1.0.0-RC21-2", - "co.fs2" %% "fs2-core" % fs2_CrossVersion.value + "co.fs2" %% "fs2-core" % fs2_Version )) diff --git a/monix-catnap/jvm/src/main/scala_2.12+/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala similarity index 100% rename from monix-catnap/jvm/src/main/scala_2.12+/monix/catnap/internal/FutureLiftForPlatform.scala rename to monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala diff --git a/monix-catnap/jvm/src/main/scala_2.11/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/jvm/src/main/scala_2.11/monix/catnap/internal/FutureLiftForPlatform.scala deleted file mode 100644 index 3713c8de5..000000000 --- a/monix-catnap/jvm/src/main/scala_2.11/monix/catnap/internal/FutureLiftForPlatform.scala +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.catnap -package internal - -private[catnap] abstract class FutureLiftForPlatform diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala index 5d29ab0d8..2c1700da2 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala @@ -31,7 +31,7 @@ import scala.concurrent.duration._ object TaskLocalJVMSuite extends SimpleTestSuite { def createShift(ec: ExecutionContext): Task[Unit] = Task.cancelable0 { (_, cb) => - ec.execute(new Runnable { def run() = cb.onSuccess(()) }) + ec.execute(() => cb.onSuccess(())) Task.unit } diff --git a/monix-eval/shared/src/main/scala/monix/eval/Task.scala b/monix-eval/shared/src/main/scala/monix/eval/Task.scala index 80a63e6ad..2802c2260 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Task.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Task.scala @@ -25,12 +25,12 @@ import monix.eval.internal._ import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution._ import monix.execution.annotations.{UnsafeBecauseBlocking, UnsafeBecauseImpure} +import monix.execution.compat.BuildFrom +import monix.execution.compat.internal.newBuilder import monix.execution.internal.Platform.fusionMaxStackDepth import monix.execution.internal.{Newtype1, Platform} import monix.execution.misc.Local -import monix.execution.schedulers.{CanBlock, TracingScheduler, TrampolinedRunnable} -import monix.execution.compat.BuildFrom -import monix.execution.compat.internal.newBuilder +import monix.execution.schedulers.{CanBlock, TracingScheduler} import org.reactivestreams.Publisher import scala.annotation.unchecked.{uncheckedVariance => uV} @@ -4661,9 +4661,8 @@ object Task extends TaskInstancesLevel1 { * trampolined async boundary. */ private[monix] def unsafeStartTrampolined[A](source: Task[A], context: Context, cb: Callback[Throwable, A]): Unit = - context.scheduler.execute(new TrampolinedRunnable { - def run(): Unit = - TaskRunLoop.startFull(source, context, cb, null, null, null, context.frameRef()) + context.scheduler.executeTrampolined(() => { + TaskRunLoop.startFull(source, context, cb, null, null, null, context.frameRef()) }) /** diff --git a/monix-eval/shared/src/main/scala_2.12+/monix/eval/instances/CatsSyncForCoeval.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala similarity index 100% rename from monix-eval/shared/src/main/scala_2.12+/monix/eval/instances/CatsSyncForCoeval.scala rename to monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala index 24e9ed79b..9735803c7 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala @@ -48,10 +48,7 @@ final private[internal] class ForwardCancelable private () { case Active(token) => state.lazySet(finished) // GC purposes - context.execute(new Runnable { - def run() = - Task.unsafeStartNow(token, ctx, cb) - }) + context.execute(() => Task.unsafeStartNow(token, ctx, cb)) } Task.Async(loop) @@ -106,19 +103,17 @@ private[internal] object ForwardCancelable { private val context: ExecutionContext = TrampolineExecutionContext.immediate private def execute(token: CancelToken[Task], stack: List[Callback[Throwable, Unit]])(implicit s: Scheduler): Unit = - context.execute(new Runnable { - def run(): Unit = { - token.runAsync { r => - for (cb <- stack) - try { - cb(r) - } catch { - // $COVERAGE-OFF$ - case NonFatal(e) => s.reportFailure(e) - // $COVERAGE-ON$ - } - } - () + context.execute(() => { + token.runAsync { r => + for (cb <- stack) + try { + cb(r) + } catch { + // $COVERAGE-OFF$ + case NonFatal(e) => s.reportFailure(e) + // $COVERAGE-ON$ + } } + () }) } \ No newline at end of file diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala index 3dae8ffef..4910f127c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala @@ -59,11 +59,9 @@ private[eval] object TaskShift { } try { - ec2.execute(new Runnable { - def run(): Unit = { - context.frameRef.reset() - cb.onSuccess(()) - } + ec2.execute(() => { + context.frameRef.reset() + cb.onSuccess(()) }) } catch { case e: RejectedExecutionException => diff --git a/monix-eval/shared/src/main/scala_2.11/monix/eval/instances/CatsSyncForCoeval.scala b/monix-eval/shared/src/main/scala_2.11/monix/eval/instances/CatsSyncForCoeval.scala deleted file mode 100644 index 80cd8d33c..000000000 --- a/monix-eval/shared/src/main/scala_2.11/monix/eval/instances/CatsSyncForCoeval.scala +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.eval.instances - -import cats.{CoflatMap, Eval, SemigroupK} -import cats.effect.{ExitCase, Sync} -import monix.eval.Coeval - -import scala.util.Try - -/** Cats type class instances for [[monix.eval.Coeval Coeval]]. - * - * As can be seen the implemented type classes are for now - * `cats.effect.Sync` and `CoflatMap`. Notably missing is - * the `Comonad` type class, which `Coeval` should never - * implement. - * - * References: - * - * - [[https://typelevel.org/cats/ typelevel/cats]] - * - [[https://github.com/typelevel/cats-effect typelevel/cats-effect]] - */ -class CatsSyncForCoeval extends Sync[Coeval] with CoflatMap[Coeval] with SemigroupK[Coeval] { - override def pure[A](a: A): Coeval[A] = - Coeval.now(a) - override def delay[A](thunk: => A): Coeval[A] = - Coeval.eval(thunk) - override def suspend[A](fa: => Coeval[A]): Coeval[A] = - Coeval.defer(fa) - override val unit: Coeval[Unit] = - Coeval.now(()) - override def flatMap[A, B](fa: Coeval[A])(f: (A) => Coeval[B]): Coeval[B] = - fa.flatMap(f) - override def flatten[A](ffa: Coeval[Coeval[A]]): Coeval[A] = - ffa.flatten - override def tailRecM[A, B](a: A)(f: (A) => Coeval[Either[A, B]]): Coeval[B] = - Coeval.tailRecM(a)(f) - override def ap[A, B](ff: Coeval[(A) => B])(fa: Coeval[A]): Coeval[B] = - for (f <- ff; a <- fa) yield f(a) - override def map2[A, B, Z](fa: Coeval[A], fb: Coeval[B])(f: (A, B) => Z): Coeval[Z] = - for (a <- fa; b <- fb) yield f(a, b) - override def map[A, B](fa: Coeval[A])(f: (A) => B): Coeval[B] = - fa.map(f) - override def raiseError[A](e: Throwable): Coeval[A] = - Coeval.raiseError(e) - override def handleError[A](fa: Coeval[A])(f: (Throwable) => A): Coeval[A] = - fa.onErrorHandle(f) - override def handleErrorWith[A](fa: Coeval[A])(f: (Throwable) => Coeval[A]): Coeval[A] = - fa.onErrorHandleWith(f) - override def recover[A](fa: Coeval[A])(pf: PartialFunction[Throwable, A]): Coeval[A] = - fa.onErrorRecover(pf) - override def recoverWith[A](fa: Coeval[A])(pf: PartialFunction[Throwable, Coeval[A]]): Coeval[A] = - fa.onErrorRecoverWith(pf) - override def attempt[A](fa: Coeval[A]): Coeval[Either[Throwable, A]] = - fa.attempt - override def catchNonFatal[A](a: => A)(implicit ev: <:<[Throwable, Throwable]): Coeval[A] = - Coeval.eval(a) - override def catchNonFatalEval[A](a: Eval[A])(implicit ev: <:<[Throwable, Throwable]): Coeval[A] = - Coeval.eval(a.value) - override def fromTry[A](t: Try[A])(implicit ev: <:<[Throwable, Throwable]): Coeval[A] = - Coeval.fromTry(t) - override def coflatMap[A, B](fa: Coeval[A])(f: (Coeval[A]) => B): Coeval[B] = - Coeval.now(f(fa)) - override def coflatten[A](fa: Coeval[A]): Coeval[Coeval[A]] = - Coeval.now(fa) - override def bracket[A, B](acquire: Coeval[A])(use: A => Coeval[B])(release: A => Coeval[Unit]): Coeval[B] = - acquire.bracket(use)(release) - override def bracketCase[A, B](acquire: Coeval[A])(use: A => Coeval[B])( - release: (A, ExitCase[Throwable]) => Coeval[Unit]): Coeval[B] = - acquire.bracketCase(use)(release) - override def combineK[A](x: Coeval[A], y: Coeval[A]): Coeval[A] = - x.onErrorHandleWith(_ => y) -} - -/** Default and reusable instance for [[CatsSyncForCoeval]]. - * - * Globally available in scope, as it is returned by - * [[monix.eval.Coeval.catsSync Coeval.catsSync]]. - */ -object CatsSyncForCoeval extends CatsSyncForCoeval diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala index 1ae33c4a1..a1cf99ffc 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala @@ -160,9 +160,7 @@ object TaskClockTimerAndContextShiftSuite extends BaseTestSuite { val s2 = TestScheduler() var wasScheduled = false - val runnable = new Runnable { - override def run(): Unit = wasScheduled = true - } + val runnable: Runnable = () => wasScheduled = true val f = Task.contextShift.evalOn(s2)(Task.deferAction(scheduler => Task(scheduler.execute(runnable)))).runToFuture @@ -225,14 +223,15 @@ object TaskClockTimerAndContextShiftSuite extends BaseTestSuite { test("Task.contextShift(s).evalOn(s2) injects s2 to Task.deferAction") { implicit s => val s2 = TestScheduler() - var wasScheduled = false - val runnable = new Runnable { - override def run(): Unit = wasScheduled = true - } + val runnable: Runnable = () => wasScheduled = true val f = - Task.contextShift(s).evalOn(s2)(Task.deferAction(scheduler => Task(scheduler.execute(runnable)))).runToFuture + Task.contextShift(s).evalOn(s2)( + Task.deferAction { scheduler => + Task(scheduler.execute(runnable)) + } + ).runToFuture assertEquals(f.value, None) s.tick() diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala index 763afb3b2..03bd5e6c1 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala @@ -176,9 +176,7 @@ object TaskLocalSuite extends SimpleTestSuite { testAsync("TaskLocals get restored in Task.create on error") { val dummy = DummyException("dummy") val task = Task.create[Int] { (_, cb) => - ec.execute(new Runnable { - def run() = cb.onError(dummy) - }) + ec.execute(() => cb.onError(dummy)) } val t = for { diff --git a/monix-eval/shared/src/test/scala_2.12+/monix/eval/TypeClassLawsForCoevalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala similarity index 100% rename from monix-eval/shared/src/test/scala_2.12+/monix/eval/TypeClassLawsForCoevalSuite.scala rename to monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala diff --git a/monix-eval/shared/src/test/scala_2.11/monix/eval/TypeClassLawsForCoevalSuite.scala b/monix-eval/shared/src/test/scala_2.11/monix/eval/TypeClassLawsForCoevalSuite.scala deleted file mode 100644 index 4ba7b76f5..000000000 --- a/monix-eval/shared/src/test/scala_2.11/monix/eval/TypeClassLawsForCoevalSuite.scala +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.eval - -import cats.effect.laws.discipline.SyncTests -import cats.kernel.laws.discipline.MonoidTests -import cats.laws.discipline.{CoflatMapTests, SemigroupKTests} - -object TypeClassLawsForCoevalSuite extends BaseLawsSuite { - checkAll("Sync[Coeval]", SyncTests[Coeval].sync[Int, Int, Int]) - - checkAll("CoflatMap[Coeval]", CoflatMapTests[Coeval].coflatMap[Int, Int, Int]) - - checkAll("Monoid[Coeval[Int]]", MonoidTests[Coeval[Int]].monoid) - - checkAll("SemigroupK[Coeval[Int]]", SemigroupKTests[Coeval].semigroupK[Int]) -} diff --git a/monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/CancelableFutureForPlatform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala similarity index 100% rename from monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/CancelableFutureForPlatform.scala rename to monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala diff --git a/monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/FutureUtilsForPlatform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala similarity index 100% rename from monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/FutureUtilsForPlatform.scala rename to monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala index 37f682d5d..81608efb1 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala @@ -18,6 +18,8 @@ package monix.execution.internal.forkJoin import java.lang.Thread.UncaughtExceptionHandler +import java.util.concurrent.{ForkJoinPool, ForkJoinTask, ForkJoinWorkerThread} +import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory private[monix] final class AdaptedForkJoinPool( parallelism: Int, diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala index 4c8c9274d..efaf0d1b7 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala @@ -17,14 +17,16 @@ package monix.execution.internal.forkJoin -private[monix] final class AdaptedForkJoinTask(runnable: Runnable) extends ForkJoinTask[Unit] { +import java.util.concurrent.ForkJoinTask +private[monix] final class AdaptedForkJoinTask(runnable: Runnable) extends ForkJoinTask[Unit] { def setRawResult(u: Unit): Unit = () def getRawResult(): Unit = () def exec(): Boolean = try { - runnable.run(); true + runnable.run() + true } catch { case anything: Throwable => val t = Thread.currentThread diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala index b8dfb2f14..2df272fa8 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala @@ -17,9 +17,12 @@ package monix.execution.internal.forkJoin -import java.util.concurrent.ThreadFactory +import java.util.concurrent.ForkJoinPool.{ForkJoinWorkerThreadFactory, ManagedBlocker} +import java.util.concurrent.{ForkJoinPool, ForkJoinWorkerThread, ThreadFactory} + import monix.execution.atomic.AtomicInt import monix.execution.internal.forkJoin.DynamicWorkerThreadFactory.EmptyBlockContext + import scala.annotation.tailrec import scala.concurrent.{BlockContext, CanAwait} @@ -59,15 +62,12 @@ private[monix] final class DynamicWorkerThreadFactory( def newThread(runnable: Runnable): Thread = if (!reserveThread()) null else - wire(new Thread(new Runnable { - // We have to decrement the current thread count when the thread exits - override def run() = { - try { - runnable.run() - } finally { - deregisterThread() - () - } + wire(new Thread(() => { + try { + runnable.run() + } finally { + deregisterThread() + () } })) diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala index 35379e77d..0af5bd71c 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala @@ -17,13 +17,14 @@ package monix.execution.internal.forkJoin -import java.util.concurrent.ThreadFactory +import java.util.concurrent.{ForkJoinPool, ForkJoinWorkerThread, ThreadFactory} +import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory private[monix] final class StandardWorkerThreadFactory( prefix: String, uncaught: Thread.UncaughtExceptionHandler, - daemonic: Boolean) - extends ThreadFactory with ForkJoinWorkerThreadFactory { + daemonic: Boolean +) extends ThreadFactory with ForkJoinWorkerThreadFactory { def wire[T <: Thread](thread: T): T = { thread.setDaemon(daemonic) diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala index d5ac0733d..26dbe957f 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala @@ -51,15 +51,12 @@ abstract class ExecutorScheduler(e: ExecutorService, r: UncaughtExceptionReporte override final def awaitTermination(timeout: Long, unit: TimeUnit, awaitOn: ExecutionContext): Future[Boolean] = { val p = Promise[Boolean]() - awaitOn.execute(new Runnable { - override def run() = - try blocking { - p.success(e.awaitTermination(timeout, unit)) - () - } catch { - case ex if NonFatal(ex) => - p.failure(ex); () - } + awaitOn.execute(() => try blocking { + p.success(e.awaitTermination(timeout, unit)) + () + } catch { + case ex if NonFatal(ex) => + p.failure(ex); () }) p.future } diff --git a/monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/CancelableFutureForPlatform.scala b/monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/CancelableFutureForPlatform.scala deleted file mode 100644 index f001b9666..000000000 --- a/monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/CancelableFutureForPlatform.scala +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution -package internal - -// Left blank, because we've got nothing specific for Scala 2.11 at this point -private[execution] abstract class CancelableFutureForPlatform \ No newline at end of file diff --git a/monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/forkJoin/package.scala b/monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/forkJoin/package.scala deleted file mode 100644 index d7f92b140..000000000 --- a/monix-execution/jvm/src/main/scala_2.11/monix/execution/internal/forkJoin/package.scala +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal - -/** An abstraction over the `ForkJoinPool` implementation, meant - * to target multiple Scala versions. - */ -package object forkJoin { - private[monix] type ForkJoinPool = - scala.concurrent.forkjoin.ForkJoinPool - private[monix] type ForkJoinWorkerThreadFactory = - scala.concurrent.forkjoin.ForkJoinPool.ForkJoinWorkerThreadFactory - private[monix] type ForkJoinWorkerThread = - scala.concurrent.forkjoin.ForkJoinWorkerThread - private[monix] type ManagedBlocker = - scala.concurrent.forkjoin.ForkJoinPool.ManagedBlocker - private[monix] type ForkJoinTask[V] = - scala.concurrent.forkjoin.ForkJoinTask[V] - - private[monix] object ForkJoinPool { - def managedBlock(blocker: ManagedBlocker): Unit = - scala.concurrent.forkjoin.ForkJoinPool.managedBlock(blocker) - } - - private[monix] def defaultForkJoinWorkerThreadFactory: ForkJoinWorkerThreadFactory = - scala.concurrent.forkjoin.ForkJoinPool.defaultForkJoinWorkerThreadFactory -} diff --git a/monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/forkJoin/package.scala b/monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/forkJoin/package.scala deleted file mode 100644 index ee4fca684..000000000 --- a/monix-execution/jvm/src/main/scala_2.12+/monix/execution/internal/forkJoin/package.scala +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal - -/** An abstraction over the `ForkJoinPool` implementation, - * meant to target multiple Scala versions. - */ -package object forkJoin { - private[monix] type ForkJoinPool = - java.util.concurrent.ForkJoinPool - private[monix] type ForkJoinWorkerThreadFactory = - java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory - private[monix] type ForkJoinWorkerThread = - java.util.concurrent.ForkJoinWorkerThread - private[monix] type ManagedBlocker = - java.util.concurrent.ForkJoinPool.ManagedBlocker - private[monix] type ForkJoinTask[V] = - java.util.concurrent.ForkJoinTask[V] - - private[monix] object ForkJoinPool { - def managedBlock(blocker: ManagedBlocker): Unit = - java.util.concurrent.ForkJoinPool.managedBlock(blocker) - } - - private[monix] def defaultForkJoinWorkerThreadFactory: ForkJoinWorkerThreadFactory = - java.util.concurrent.ForkJoinPool.defaultForkJoinWorkerThreadFactory -} diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala index 751322731..9a14e9491 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala @@ -114,9 +114,7 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { assertEquals(s.executionModel, AlwaysAsyncExecution) val latch = new CountDownLatch(1) - s.execute(new Runnable { - def run(): Unit = latch.countDown() - }) + s.execute(() => latch.countDown()) assert(latch.await(15, TimeUnit.MINUTES), "latch.await") } @@ -197,5 +195,5 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { } def runnableAction(f: => Unit): Runnable = - new Runnable { def run() = f } + () => f } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala index 6f950e335..3792e366e 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala @@ -159,11 +159,7 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self try { val ex = DummyException("dummy") - - scheduler.execute(new Runnable { - override def run() = - throw ex - }) + scheduler.execute(() => throw ex) assert(latch.await(15, TimeUnit.MINUTES), "lastReportedFailureLatch.await") self.synchronized(assertEquals(lastReportedFailure, ex)) @@ -188,10 +184,7 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self scheduler.scheduleOnce( 1, TimeUnit.MILLISECONDS, - new Runnable { - override def run() = - throw ex - }) + () => throw ex) assert(latch.await(15, TimeUnit.MINUTES), "lastReportedFailureLatch.await") self.synchronized(assertEquals(lastReportedFailure, ex)) @@ -204,7 +197,7 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self } def runnableAction(f: => Unit): Runnable = - new Runnable { def run() = f } + () => f } object ComputationSchedulerSuite extends ExecutorSchedulerSuite { diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala index e119206da..38011eb7b 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala @@ -89,11 +89,9 @@ object ScheduleOnceJVMSuite extends SimpleTestSuite { def runTest(sc: Scheduler, threadPrefix: Option[String] = None): Unit = { def runAndGetThread(sc: Scheduler, delayMs: Int): Future[String] = { val p = Promise[String]() - sc.scheduleOnce(delayMs.toLong, MILLISECONDS, new Runnable { - def run(): Unit = { - p.success(Thread.currentThread().getName) - () - } + sc.scheduleOnce(delayMs.toLong, MILLISECONDS, () => { + p.success(Thread.currentThread().getName) + () }) p.future } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala index cb6b7a862..b52d425f4 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala @@ -29,7 +29,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { try { val latch = new CountDownLatch(2) val s = Scheduler(service, ec) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -45,7 +45,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { try { val latch = new CountDownLatch(2) val s = Scheduler(service, ec) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -58,7 +58,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val ec = scala.concurrent.ExecutionContext.Implicits.global val latch = new CountDownLatch(2) val s = Scheduler(ec, UncaughtExceptionReporter(ec.reportFailure)) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -68,7 +68,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val ec = scala.concurrent.ExecutionContext.Implicits.global val latch = new CountDownLatch(2) val s = Scheduler(ec) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -80,7 +80,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { try { val latch = new CountDownLatch(2) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -95,7 +95,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { try { val latch = new CountDownLatch(2) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -108,7 +108,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s: SchedulerService = Scheduler.computation(parallelism = 1) try { val latch = new CountDownLatch(2) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -121,7 +121,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s: SchedulerService = Scheduler.io(name = "monix-tests-io") try { val latch = new CountDownLatch(2) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -134,7 +134,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s: SchedulerService = Scheduler.singleThread(name = "monix-tests-single-thread") try { val latch = new CountDownLatch(2) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") @@ -147,7 +147,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s: SchedulerService = Scheduler.fixedPool(name = "monix-tests-fixed-pool", poolSize = 1) try { val latch = new CountDownLatch(2) - val r = new Runnable { def run() = latch.countDown() } + val r: Runnable = () => latch.countDown() s.execute(r) s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala index 91c85b616..1a725ec7a 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala @@ -24,29 +24,21 @@ object TrampolineExecutionContextSuite extends SimpleTestSuite { val ctx = TrampolineExecutionContext.immediate var effect = 0 - ctx.execute(new Runnable { - def run(): Unit = { - effect += 1 + ctx.execute(() => { + effect += 1 - ctx.execute(new Runnable { - def run(): Unit = { - effect += 1 - } - }) - } + ctx.execute(() => { + effect += 1 + }) }) assertEquals(effect, 2) intercept[NullPointerException] { - ctx.execute(new Runnable { - def run(): Unit = { - ctx.execute(new Runnable { - def run(): Unit = effect += 1 - }) - - throw null - } + ctx.execute(() => { + ctx.execute(() => effect += 1) + + throw null }) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala index 193b994a5..24b0801c0 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala @@ -50,8 +50,8 @@ sealed abstract class Ack extends Future[Ack] with Serializable { } final def onComplete[U](func: Try[Ack] => U)(implicit executor: ExecutionContext): Unit = - executor.execute(new Runnable { - def run(): Unit = { func(AsSuccess); () } + executor.execute(() => { + func(AsSuccess); () }) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index 2adbf1443..83f0a96c9 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -343,10 +343,7 @@ object Callback { } private[monix] def signalErrorTrampolined[E, A](cb: Callback[E, A], e: E): Unit = - TrampolineExecutionContext.immediate.execute(new Runnable { - override def run(): Unit = - cb.onError(e) - }) + TrampolineExecutionContext.immediate.execute(() => cb.onError(e)) /** Functions exposed via [[apply]]. */ final class Builders[E](val ev: Boolean = true) extends AnyVal { diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala index 590271e6e..00d08145a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala @@ -337,8 +337,8 @@ object CancelableFuture extends internal.CancelableFutureForPlatform { def value: Option[Try[A]] = underlying.value def onComplete[U](f: (Try[A]) => U)(implicit executor: ExecutionContext): Unit = - executor.execute(new Runnable { - def run(): Unit = { f(immediate); () } + executor.execute(() => { + f(immediate); () }) } diff --git a/monix-execution/shared/src/main/scala_2.12+/monix/execution/FutureUtils.scala b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala similarity index 94% rename from monix-execution/shared/src/main/scala_2.12+/monix/execution/FutureUtils.scala rename to monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala index 29ae99c40..2c251218a 100644 --- a/monix-execution/shared/src/main/scala_2.12+/monix/execution/FutureUtils.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala @@ -38,9 +38,9 @@ object FutureUtils extends internal.FutureUtilsForPlatform { def timeout[A](source: Future[A], atMost: FiniteDuration)(implicit s: Scheduler): Future[A] = { val err = new TimeoutException val promise = Promise[A]() - val task = s.scheduleOnce(atMost.length, atMost.unit, - new Runnable { - def run() = { promise.tryFailure(err); () } + val task = s.scheduleOnce(atMost.length, atMost.unit, + () => { + promise.tryFailure(err); () }) source.onComplete { r => @@ -69,9 +69,9 @@ object FutureUtils extends internal.FutureUtilsForPlatform { implicit s: Scheduler): Future[A] = { val promise = Promise[Option[Try[A]]]() - val task = s.scheduleOnce(atMost.length, atMost.unit, - new Runnable { - def run() = { promise.trySuccess(None); () } + val task = s.scheduleOnce(atMost.length, atMost.unit, + () => { + promise.trySuccess(None); () }) source.onComplete { r => @@ -125,7 +125,7 @@ object FutureUtils extends internal.FutureUtilsForPlatform { */ def delayedResult[A](delay: FiniteDuration)(result: => A)(implicit s: Scheduler): Future[A] = { val p = Promise[A]() - s.scheduleOnce(delay.length, delay.unit, new Runnable { def run() = p.complete(Try(result)) }) + s.scheduleOnce(delay.length, delay.unit, () => p.complete(Try(result))) p.future } diff --git a/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala index ce65ff28a..2bdd52aa8 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala @@ -18,8 +18,10 @@ package monix.execution import java.util.concurrent.Executor + import monix.execution.internal.RunnableAction -import monix.execution.schedulers.SchedulerCompanionImpl +import monix.execution.schedulers.{SchedulerCompanionImpl, StartAsyncBatchRunnable, TrampolinedRunnable} + import scala.annotation.implicitNotFound import scala.concurrent.ExecutionContext import scala.concurrent.duration.{FiniteDuration, MILLISECONDS, TimeUnit} @@ -302,7 +304,48 @@ object Scheduler extends SchedulerCompanionImpl { val TRACING = Features.flag(2) /** Utilities complementing the `Scheduler` interface. */ - implicit final class Extensions(val source: Scheduler) extends AnyVal with schedulers.ExecuteExtensions { + implicit final class Extensions(val source: Scheduler) extends AnyVal { + /** Schedules the given callback for asynchronous + * execution in the thread-pool. + * + * @param cb the callback to execute asynchronously + */ + def executeAsync(cb: Runnable): Unit = + source.execute(cb) + + /** Schedules the given callback for asynchronous + * execution in the thread-pool, but also indicates the + * start of a + * [[monix.execution.schedulers.TrampolinedRunnable thread-local trampoline]] + * in case the scheduler is a + * [[monix.execution.schedulers.BatchingScheduler BatchingScheduler]]. + * + * This utility is provided as an optimization. If you don't understand + * what this does, then don't worry about it. + * + * On Scala < 2.12 it is described as a macro, so it + * has zero overhead. On Scala 2.12 because of the Java 8 SAM + * types integration, this extension macro is replaced with a + * method that takes a plain `TrampolinedRunnable` as parameter. + * + * @param cb the callback to execute asynchronously + */ + def executeAsyncBatch(cb: TrampolinedRunnable): Unit = { + val r = StartAsyncBatchRunnable(cb, source) + source.execute(r) + } + + /** Schedules the given callback for immediate execution as a + * [[monix.execution.schedulers.TrampolinedRunnable TrampolinedRunnable]]. + * Depending on the execution context, it might + * get executed on the current thread by using an internal + * trampoline, so it is still safe from stack-overflow exceptions. + * + * @param cb the callback to execute asynchronously + */ + def executeTrampolined(cb: TrampolinedRunnable): Unit = + source.execute(cb) + /** Schedules a task to run in the future, after `initialDelay`. * * For example the following schedules a message to be printed to diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/HygieneUtilMacros.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/HygieneUtilMacros.scala index ed6b65ef8..53dae733a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/HygieneUtilMacros.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/HygieneUtilMacros.scala @@ -18,7 +18,6 @@ package monix.execution.misc import scala.reflect.macros.whitebox -import monix.execution.misc.compat.freshTermName /** Utilities for macro-hygiene. */ trait HygieneUtilMacros { @@ -28,7 +27,7 @@ trait HygieneUtilMacros { object util { /** Generates a new term name. Used for macro-hygiene. */ - def name(s: String) = freshTermName(c)(s + "$") + def name(s: String) = c.universe.TermName(c.freshName(s)) /** Generates new term names. Used for macro-hygiene. */ def names(bs: String*) = bs.toList.map(name) diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/InlineMacros.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/InlineMacros.scala index 2be933cbe..e65ef01f6 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/InlineMacros.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/InlineMacros.scala @@ -17,7 +17,6 @@ package monix.execution.misc -import monix.execution.misc.compat.setOrig import scala.reflect.macros.whitebox trait InlineMacros { @@ -48,8 +47,7 @@ trait InlineMacros { case i @ Ident(_) if i.name == symbol => value case tt: TypeTree if tt.original != null => - //super.transform(TypeTree().setOriginal(transform(tt.original))) - super.transform(setOrig(c)(TypeTree(), transform(tt.original))) + super.transform(c.universe.internal.setOriginal(TypeTree(), transform(tt.original))) case _ => super.transform(tree) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala index c9ee250d7..8a88d7a0d 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala @@ -46,11 +46,9 @@ trait ReferenceScheduler extends Scheduler { sub := scheduleOnce( initialDelay, unit, - new Runnable { - def run(): Unit = { - r.run() - loop(delay, delay) - } + () => { + r.run() + loop(delay, delay) }) () } @@ -71,19 +69,17 @@ trait ReferenceScheduler extends Scheduler { sub := scheduleOnce( initialDelayMs, MILLISECONDS, - new Runnable { - def run(): Unit = { - r.run() - - val delay = { - val durationMillis = clockMonotonic(MILLISECONDS) - startedAtMillis - val d = periodMs - durationMillis - if (d >= 0) d else 0 - } - - // Recursive call - loop(delay, periodMs) + () => { + r.run() + + val delay = { + val durationMillis = clockMonotonic(MILLISECONDS) - startedAtMillis + val d = periodMs - durationMillis + if (d >= 0) d else 0 } + + // Recursive call + loop(delay, periodMs) } ) () diff --git a/monix-execution/shared/src/main/scala_2.12+/monix/execution/schedulers/TrampolinedRunnable.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolinedRunnable.scala similarity index 100% rename from monix-execution/shared/src/main/scala_2.12+/monix/execution/schedulers/TrampolinedRunnable.scala rename to monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolinedRunnable.scala diff --git a/monix-execution/shared/src/main/scala_2.11/monix/execution/FutureUtils.scala b/monix-execution/shared/src/main/scala_2.11/monix/execution/FutureUtils.scala deleted file mode 100644 index 015fb3488..000000000 --- a/monix-execution/shared/src/main/scala_2.11/monix/execution/FutureUtils.scala +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution - -import java.util.concurrent.TimeoutException -import scala.util.control.NonFatal -import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.concurrent.duration._ -import scala.concurrent.{ExecutionContext, Future, MonixInternals, Promise} -import scala.util.{Failure, Success, Try} - -/** Utilities for Scala's standard `concurrent.Future`. */ -object FutureUtils { - /** Utility that returns a new Future that either completes with - * the original Future's result or with a TimeoutException in case - * the maximum wait time was exceeded. - * - * @param atMost specifies the maximum wait time until the future is - * terminated with a TimeoutException - * @param s is the Scheduler, needed for completing our internal promise - * @return a new future that will either complete with the result of our - * source or fail in case the timeout is reached. - */ - def timeout[A](source: Future[A], atMost: FiniteDuration)(implicit s: Scheduler): Future[A] = { - val err = new TimeoutException - val promise = Promise[A]() - val task = s.scheduleOnce(atMost.length, atMost.unit, new Runnable { def run() = { promise.tryFailure(err); () } }) - - source.onComplete { r => - // canceling task to prevent waisted CPU resources and memory leaks - // if the task has been executed already, this has no effect - task.cancel() - promise.tryComplete(r) - } - - promise.future - } - - /** Utility that returns a new Future that either completes with - * the original Future's result or after the timeout specified by - * `atMost` it tries to complete with the given `fallback`. - * Whatever `Future` finishes first after the timeout, will win. - * - * @param atMost specifies the maximum wait time until the future is - * terminated with a TimeoutException - * @param fallback the fallback future that gets triggered after timeout - * @param s is the Scheduler, needed for completing our internal promise - * @return a new future that will either complete with the result of our - * source or with the fallback in case the timeout is reached - */ - def timeoutTo[A](source: Future[A], atMost: FiniteDuration, fallback: => Future[A])(implicit - s: Scheduler): Future[A] = { - - val promise = Promise[Option[Try[A]]]() - val task = s.scheduleOnce(atMost.length, atMost.unit, new Runnable { def run() = { promise.trySuccess(None); () } }) - - source.onComplete { r => - // canceling task to prevent waisted CPU resources and memory leaks - // if the task has been executed already, this has no effect - task.cancel() - promise.trySuccess(Some(r)) - () - } - - promise.future.flatMap { - case Some(res) => Future.fromTry(res) - case None => - // evaluate fallback only here to exclude possibility of race condition - // between source and fallback when they are finishing at the same time - fallback - } - } - - /** Utility that lifts a `Future[A]` into a `Future[Try[A]]`, exposing - * error explicitly. - */ - def materialize[A](source: Future[A])(implicit ec: ExecutionContext): Future[Try[A]] = { - if (source.isCompleted) { - Future.successful(source.value.get) - } else { - val p = Promise[Try[A]]() - source.onComplete(p.success)(immediate) - p.future - } - } - - /** Given a mapping functions that operates on successful results as well as - * errors, transforms the source by applying it. - * - * Similar to `Future.transform` from Scala 2.12. - */ - def transform[A, B](source: Future[A], f: Try[A] => Try[B])(implicit ec: ExecutionContext): Future[B] = { - source match { - case ref: CancelableFuture[_] => - // CancelableFuture already implements transform - ref.asInstanceOf[CancelableFuture[A]].transform(f)(ec) - case _ => - val p = Promise[B]() - source.onComplete { result => - val b = - try f(result) - catch { case t if NonFatal(t) => Failure(t) } - p.complete(b) - } - p.future - } - } - - /** Given a mapping functions that operates on successful results - * as well as errors, transforms the source by applying it. - * - * Similar to `Future.transformWith` from Scala 2.12. - */ - def transformWith[A, B](source: Future[A], f: Try[A] => Future[B])(implicit ec: ExecutionContext): Future[B] = { - source match { - case ref: CancelableFuture[_] => - // CancelableFuture already implements transformWith - ref.asInstanceOf[CancelableFuture[A]].transformWith(f)(ec) - case _ => - MonixInternals.transformWith(source, f)(ec) - } - } - - /** Utility that transforms a `Future[Try[A]]` into a `Future[A]`, - * hiding errors, being the opposite of [[materialize]]. - */ - def dematerialize[A](source: Future[Try[A]])(implicit ec: ExecutionContext): Future[A] = { - if (source.isCompleted) - source.value.get match { - case Failure(error) => Future.failed(error) - case Success(value) => - value match { - case Success(success) => Future.successful(success) - case Failure(error) => Future.failed(error) - } - } - else { - val p = Promise[A]() - source.onComplete({ - case Failure(error) => p.failure(error) - case Success(result) => p.complete(result) - })(immediate) - p.future - } - } - - /** Creates a future that completes with the specified `result`, but only - * after the specified `delay`. - */ - def delayedResult[A](delay: FiniteDuration)(result: => A)(implicit s: Scheduler): Future[A] = { - val p = Promise[A]() - s.scheduleOnce(delay.length, delay.unit, new Runnable { def run() = { p.complete(Try(result)); () } }) - p.future - } - - /** Provides extension methods for `Future`. */ - object extensions { - /** Provides utility methods added on Scala's `concurrent.Future` */ - implicit class FutureExtensions[A](val source: Future[A]) extends AnyVal { - /** [[FutureUtils.timeout]] exposed as an extension method. */ - def timeout(atMost: FiniteDuration)(implicit s: Scheduler): Future[A] = - FutureUtils.timeout(source, atMost) - - /** [[FutureUtils.timeoutTo]] exposed as an extension method. */ - def timeoutTo[U >: A](atMost: FiniteDuration, fallback: => Future[U])(implicit s: Scheduler): Future[U] = - FutureUtils.timeoutTo(source, atMost, fallback) - - /** [[FutureUtils.materialize]] exposed as an extension method. */ - def materialize(implicit ec: ExecutionContext): Future[Try[A]] = - FutureUtils.materialize(source) - - /** [[FutureUtils.dematerialize]] exposed as an extension method. */ - def dematerialize[U](implicit ev: A <:< Try[U], ec: ExecutionContext): Future[U] = - FutureUtils.dematerialize(source.asInstanceOf[Future[Try[U]]]) - } - - /** Provides utility methods for Scala's `concurrent.Future` companion object. */ - implicit class FutureCompanionExtensions(val f: Future.type) extends AnyVal { - /** [[FutureUtils.delayedResult]] exposed as an extension method. */ - def delayedResult[A](delay: FiniteDuration)(result: => A)(implicit s: Scheduler): Future[A] = - FutureUtils.delayedResult(delay)(result) - } - } -} diff --git a/monix-execution/shared/src/main/scala_2.11/monix/execution/internal/ScalaConcurrent.scala b/monix-execution/shared/src/main/scala_2.11/monix/execution/internal/ScalaConcurrent.scala deleted file mode 100644 index 1dcd19f33..000000000 --- a/monix-execution/shared/src/main/scala_2.11/monix/execution/internal/ScalaConcurrent.scala +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package scala.concurrent - -import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.util.control.NonFatal -import scala.util.Try - -object MonixInternals { - /** Implements `transformWith` for Scala 2.11. */ - def transformWith[T, S](source: Future[T], f: Try[T] => Future[S])(implicit ec: ExecutionContext): Future[S] = { - import impl.Promise.DefaultPromise - - val p = new DefaultPromise[S]() - source.onComplete { result => - val fb = try f(result) catch { case t if NonFatal(t) => Future.failed(t) } - fb match { - // If possible, link DefaultPromises to avoid space leaks - case dp: DefaultPromise[_] => dp.asInstanceOf[DefaultPromise[S]].linkRootOf(p) - case fut => fut.onComplete(p.complete)(immediate) - } - } - p.future - } -} \ No newline at end of file diff --git a/monix-execution/shared/src/main/scala_2.11/monix/execution/misc/compat.scala b/monix-execution/shared/src/main/scala_2.11/monix/execution/misc/compat.scala deleted file mode 100644 index c0c103d99..000000000 --- a/monix-execution/shared/src/main/scala_2.11/monix/execution/misc/compat.scala +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.misc - -private[execution] object compat { - type Context = scala.reflect.macros.whitebox.Context - - def freshTermName[C <: Context](c: C)(s: String) = - c.universe.TermName(c.freshName(s)) - - def setOrig[C <: Context](c: C)(tt: c.universe.TypeTree, t: c.Tree) = - c.universe.internal.setOriginal(tt, t) -} diff --git a/monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/ExecuteExtensions.scala b/monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/ExecuteExtensions.scala deleted file mode 100644 index fe91efdb5..000000000 --- a/monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/ExecuteExtensions.scala +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.schedulers - -import monix.execution.Scheduler - -/** Defines extension methods for [[Scheduler]] meant for - * executing runnables. - * - * NOTE: these extension methods are only defined as macros - * for Scala < 2.12, because in Scala 2.12 we simply rely on - * its SAM support. - */ -private[execution] trait ExecuteExtensions extends Any { - def source: Scheduler - - /** Schedules the given callback for asynchronous - * execution in the thread-pool. - * - * On Scala < 2.12 it is described as a macro, so it - * has zero overhead, being perfectly equivalent with - * `execute(new Runnable { ... })`. - * - * On Scala 2.12 because of the Java 8 SAM types integration, - * this extension macro is replaced with a method that takes - * a plain `Runnable` as parameter. - * - * @param cb the callback to execute asynchronously - */ - def executeAsync(cb: () => Unit): Unit = - source.execute(new Runnable { def run() = cb() }) - - /** Schedules the given callback for asynchronous - * execution in the thread-pool, but also indicates the - * start of a - * [[monix.execution.schedulers.TrampolinedRunnable thread-local trampoline]] - * in case the scheduler is a - * [[monix.execution.schedulers.BatchingScheduler BatchingScheduler]]. - * - * This utility is provided as an optimization. If you don't understand - * what this does, then don't worry about it. - * - * On Scala < 2.12 it is described as a macro, so it - * has zero overhead. On Scala 2.12 because of the Java 8 SAM - * types integration, this extension macro is replaced with a - * method that takes a plain `TrampolinedRunnable` as parameter. - * - * @param cb the callback to execute asynchronously - */ - def executeAsyncBatch(cb: () => Unit): Unit = { - def r = new TrampolinedRunnable { def run() = cb() } - source.execute(new StartAsyncBatchRunnable(r, source)) - } - - /** Schedules the given callback for immediate execution as a - * [[monix.execution.schedulers.TrampolinedRunnable TrampolinedRunnable]]. - * Depending on the execution context, it might - * get executed on the current thread by using an internal - * trampoline, so it is still safe from stack-overflow exceptions. - * - * On Scala < 2.12 it is described as a macro, so it - * has zero overhead, being perfectly equivalent with - * `execute(new TrampolinedRunnable { ... })`. - * - * On Scala 2.12 because of the Java 8 SAM types integration, - * this extension macro is replaced with a method that takes - * a plain `TrampolinedRunnable` as parameter. - * - * @param cb the callback to execute asynchronously - */ - def executeTrampolined(cb: () => Unit): Unit = - source.execute(new TrampolinedRunnable { def run() = cb() }) -} diff --git a/monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/TrampolinedRunnable.scala b/monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/TrampolinedRunnable.scala deleted file mode 100644 index 6b2a86666..000000000 --- a/monix-execution/shared/src/main/scala_2.11/monix/execution/schedulers/TrampolinedRunnable.scala +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.schedulers - -import scala.concurrent.OnCompleteRunnable - -/** A marker for callbacks that can be batched and executed - * locally (on the current thread) by means of a trampoline - * (if the execution context / scheduler allows it). - * - * Idea was taken from the `scala.concurrent.Future` - * implementation. Credit should be given where due. - * - * DO NOT use unless you know what you're doing. - */ -trait TrampolinedRunnable extends Runnable with OnCompleteRunnable diff --git a/monix-execution/shared/src/main/scala_2.12+/monix/execution/misc/compat.scala b/monix-execution/shared/src/main/scala_2.12+/monix/execution/misc/compat.scala deleted file mode 100644 index c0c103d99..000000000 --- a/monix-execution/shared/src/main/scala_2.12+/monix/execution/misc/compat.scala +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.misc - -private[execution] object compat { - type Context = scala.reflect.macros.whitebox.Context - - def freshTermName[C <: Context](c: C)(s: String) = - c.universe.TermName(c.freshName(s)) - - def setOrig[C <: Context](c: C)(tt: c.universe.TypeTree, t: c.Tree) = - c.universe.internal.setOriginal(tt, t) -} diff --git a/monix-execution/shared/src/main/scala_2.12+/monix/execution/schedulers/ExecuteExtensions.scala b/monix-execution/shared/src/main/scala_2.12+/monix/execution/schedulers/ExecuteExtensions.scala deleted file mode 100644 index 49cd3a7d9..000000000 --- a/monix-execution/shared/src/main/scala_2.12+/monix/execution/schedulers/ExecuteExtensions.scala +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014-2020 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution -package schedulers - -/** Defines extension methods for [[Scheduler]] meant for - * executing runnables. - * - * NOTE: these extension methods are only defined as macros - * for Scala < 2.12, because in Scala 2.12 we simply rely on - * its SAM support. - */ -private[execution] trait ExecuteExtensions extends Any { - def source: Scheduler - - /** Schedules the given callback for asynchronous - * execution in the thread-pool. - * - * On Scala < 2.12 it is described as a macro, so it - * has zero overhead, being perfectly equivalent with - * `execute(new Runnable { ... })`. - * - * On Scala 2.12 because of the Java 8 SAM types integration, - * this extension macro is replaced with a method that takes - * a plain `Runnable` as parameter. - * - * @param cb the callback to execute asynchronously - */ - def executeAsync(cb: Runnable): Unit = - source.execute(cb) - - /** Schedules the given callback for asynchronous - * execution in the thread-pool, but also indicates the - * start of a - * [[monix.execution.schedulers.TrampolinedRunnable thread-local trampoline]] - * in case the scheduler is a - * [[monix.execution.schedulers.BatchingScheduler BatchingScheduler]]. - * - * This utility is provided as an optimization. If you don't understand - * what this does, then don't worry about it. - * - * On Scala < 2.12 it is described as a macro, so it - * has zero overhead. On Scala 2.12 because of the Java 8 SAM - * types integration, this extension macro is replaced with a - * method that takes a plain `TrampolinedRunnable` as parameter. - * - * @param cb the callback to execute asynchronously - */ - def executeAsyncBatch(cb: TrampolinedRunnable): Unit = { - val r = StartAsyncBatchRunnable(cb, source) - source.execute(r) - } - - /** Schedules the given callback for immediate execution as a - * [[monix.execution.schedulers.TrampolinedRunnable TrampolinedRunnable]]. - * Depending on the execution context, it might - * get executed on the current thread by using an internal - * trampoline, so it is still safe from stack-overflow exceptions. - * - * On Scala < 2.12 it is described as a macro, so it - * has zero overhead, being perfectly equivalent with - * `execute(new TrampolinedRunnable { ... })`. - * - * On Scala 2.12 because of the Java 8 SAM types integration, - * this extension macro is replaced with a method that takes - * a plain `TrampolinedRunnable` as parameter. - * - * @param cb the callback to execute asynchronously - */ - def executeTrampolined(cb: TrampolinedRunnable): Unit = - source.execute(cb) -} diff --git a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala index 6b6039f89..51af401a0 100644 --- a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala @@ -21,7 +21,6 @@ import scala.collection.{BuildFrom => ScalaBuildFrom} import scala.collection.mutable object compat { - type BuildFrom[-From, -A, +C] = ScalaBuildFrom[From, A, C] private[monix] object internal { @@ -30,7 +29,8 @@ object compat { def toIterator[X](i: IterableOnce[X]): Iterator[X] = i.iterator def hasDefiniteSize[X](i: IterableOnce[X]): Boolean = i.knownSize >= 0 - def newBuilder[From, A, C](bf: BuildFrom[From, A, C], from: From): mutable.Builder[A, C] = bf.newBuilder(from) + def newBuilder[From, A, C](bf: BuildFrom[From, A, C], from: From): mutable.Builder[A, C] = + bf.newBuilder(from) @inline def toSeq[A](array: Array[AnyRef]): Seq[A] = new scala.collection.immutable.ArraySeq.ofRef(array).asInstanceOf[Seq[A]] diff --git a/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala index e3104141f..aa36a611c 100644 --- a/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala @@ -21,16 +21,15 @@ import scala.collection.generic.CanBuildFrom import scala.collection.mutable object compat { - type BuildFrom[-From, -A, +C] = CanBuildFrom[From, A, C] private[monix] object internal { - type IterableOnce[+X] = scala.collection.GenTraversableOnce[X] def toIterator[X](i: IterableOnce[X]): Iterator[X] = i.toIterator def hasDefiniteSize[X](i: IterableOnce[X]): Boolean = i.hasDefiniteSize - def newBuilder[From, A, C](bf: BuildFrom[From, A, C], from: From): mutable.Builder[A, C] = bf.apply(from) + def newBuilder[From, A, C](bf: BuildFrom[From, A, C], from: From): mutable.Builder[A, C] = + bf.apply(from) @inline def toSeq[A](array: Array[AnyRef]): Seq[A] = new scala.collection.mutable.WrappedArray.ofRef(array).toSeq.asInstanceOf[Seq[A]] diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala index 4885f587e..766010241 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala @@ -329,7 +329,7 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { } def action(f: => Unit): Runnable = - new Runnable { def run() = f } + () => f def delayedResult[A](delay: FiniteDuration, timeout: FiniteDuration)(r: => A)(implicit s: Scheduler) = { val f1 = { diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala index a40f00e97..939129a6a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala @@ -128,14 +128,12 @@ object TracingSchedulerSuite extends SimpleTestSuite { val p = Promise[Int]() val sub = SingleAssignCancelable() - sub := schedule(traced, 1, 1, TimeUnit.SECONDS, new Runnable { - def run(): Unit = { - sum += local1.get + local2.get - count += 1 - if (count >= 3) { - p.success(sum) - sub.cancel() - } + sub := schedule(traced, 1, 1, TimeUnit.SECONDS, () => { + sum += local1.get + local2.get + count += 1 + if (count >= 3) { + p.success(sum) + sub.cancel() } }) diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala index f1e1111aa..325890fd8 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala @@ -26,9 +26,7 @@ class UncaughtExceptionReporterBaseSuite extends TestSuite[Promise[Throwable]] { protected val immediateEC = TrampolineExecutionContext.immediate object Dummy extends Throwable - private[this] val throwRunnable: Runnable = new Runnable { - def run(): Unit = throw Dummy - } + private[this] val throwRunnable: Runnable = () => throw Dummy def setup() = Promise[Throwable]() diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala index 666848cb5..3728a64e9 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala @@ -153,8 +153,8 @@ object OverflowStrategyBackPressuredConcurrencySuite extends BaseConcurrencySuit val buffer = BufferedSubscriber[Int](Subscriber(underlying, s), BackPressure(totalCount)) def loop(n: Int): Unit = - if (n > 0) s.execute(new Runnable { - def run() = { buffer.onNext(n); loop(n - 1) } + if (n > 0) s.execute(() => { + buffer.onNext(n); loop(n - 1) }) else buffer.onComplete() diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala index 9b5ae431b..9960c4209 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala @@ -101,8 +101,8 @@ object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencyS val buffer = buildNewForInt(100000, underlying) def loop(n: Int): Unit = - if (n > 0) s.execute(new Runnable { - def run() = { buffer.onNext(n); loop(n - 1) } + if (n > 0) s.execute(() => { + buffer.onNext(n); loop(n - 1) }) else buffer.onComplete() diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala index b401717d7..53c2044f4 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala @@ -95,8 +95,9 @@ object OverflowStrategyDropNewConcurrencySuite extends BaseConcurrencySuite { val buffer = BufferedSubscriber[Int](Subscriber(underlying, s), DropNew(100000)) def loop(n: Int): Unit = - if (n > 0) s.execute(new Runnable { - def run() = { buffer.onNext(n); loop(n - 1) } + if (n > 0) s.execute(() => { + buffer.onNext(n) + loop(n - 1) }) else buffer.onComplete() diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala index 22309ad50..50d1b588e 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala @@ -76,10 +76,10 @@ object OverflowStrategyFailConcurrencySuite extends BaseConcurrencySuite { val buffer = BufferedSubscriber[Int](Subscriber(underlying, s), Fail(100000)) def loop(n: Int): Unit = - if (n > 0) s.execute(new Runnable { - def run() = { buffer.onNext(n); loop(n - 1) } - }) - else buffer.onComplete() + if (n > 0) + s.execute(() => { buffer.onNext(n); loop(n - 1) }) + else + buffer.onComplete() loop(10000) assert(completed.await(15, TimeUnit.MINUTES), "completed.await should have succeeded") diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala index 7cdbec02a..31669e1e9 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala @@ -110,10 +110,10 @@ object OverflowStrategyUnboundedConcurrencySuite extends TestSuite[SchedulerServ val buffer = BufferedSubscriber[Int](Subscriber(underlying, s), Unbounded) def loop(n: Int): Unit = - if (n > 0) s.execute(new Runnable { - def run() = { buffer.onNext(n); loop(n - 1) } - }) - else buffer.onComplete() + if (n > 0) + s.execute(() => { buffer.onNext(n); loop(n - 1) }) + else + buffer.onComplete() loop(10000) blocking { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala index 214f0c1c1..9a9c37c0a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala @@ -35,7 +35,7 @@ private[reactive] object CancelledConsumer extends Consumer.Sync[Any, Unit] { } // Forcing async boundary to prevent problems - s.execute(new Runnable { def run() = cb.onSuccess(()) }) + s.execute(() => cb.onSuccess(())) (out, AssignableCancelable.alreadyCanceled) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala index bbc5dd542..14e4a6e11 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala @@ -30,20 +30,16 @@ private[reactive] final class MapConsumer[In, R, R2](source: Consumer[In, R], f: def createSubscriber(cb: Callback[Throwable, R2], s: Scheduler): (Subscriber[In], AssignableCancelable) = { val cb1 = new Callback[Throwable, R] { def onSuccess(value: R): Unit = - s.execute(new Runnable { - // Forcing an asynchronous boundary, otherwise - // this isn't a safe operation. - def run(): Unit = { - var streamErrors = true - try { - val r2 = f(value) - streamErrors = false - cb.onSuccess(r2) - } catch { - case ex if NonFatal(ex) => - if (streamErrors) cb.onError(ex) - else s.reportFailure(ex) - } + s.execute(() => { + var streamErrors = true + try { + val r2 = f(value) + streamErrors = false + cb.onSuccess(r2) + } catch { + case ex if NonFatal(ex) => + if (streamErrors) cb.onError(ex) + else s.reportFailure(ex) } }) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala index 4ab337bf3..ba8b52cbf 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala @@ -34,33 +34,29 @@ private[reactive] final class MapTaskConsumer[In, R, R2](source: Consumer[In, R] var isCancelled = false val asyncCallback = new Callback[Throwable, R] { self => def onSuccess(value: R): Unit = - s.execute(new Runnable { - // Forcing async boundary, otherwise we might - // end up with stack-overflows or other problems - def run(): Unit = { - implicit val scheduler = s - // For protecting the contract, as if a call was already made to - // `onSuccess`, then we can't call `onError` - var streamErrors = true - try { - val task = f(value) - streamErrors = false - self.synchronized { - if (!isCancelled) - lastCancelable = task.runAsync(cb) - } - } catch { - case ex if NonFatal(ex) => - if (streamErrors) cb.onError(ex) - else s.reportFailure(ex) + s.execute(() => { + implicit val scheduler = s + // For protecting the contract, as if a call was already made to + // `onSuccess`, then we can't call `onError` + var streamErrors = true + try { + val task = f(value) + streamErrors = false + self.synchronized { + if (!isCancelled) + lastCancelable = task.runAsync(cb) } + } catch { + case ex if NonFatal(ex) => + if (streamErrors) cb.onError(ex) + else s.reportFailure(ex) } }) def onError(ex: Throwable): Unit = { // Forcing async boundary, otherwise we might // end up with stack-overflows or other problems - s.execute(new Runnable { def run(): Unit = cb.onError(ex) }) + s.execute(() => cb.onError(ex)) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala index b9d27d20a..bc3b36faf 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala @@ -36,7 +36,7 @@ private[reactive] final class RaiseErrorConsumer(ex: Throwable) extends Consumer } // Forcing async boundary to prevent problems - s.execute(new Runnable { def run() = cb.onError(ex) }) + s.execute(() => cb.onError(ex)) (out, AssignableCancelable.alreadyCanceled) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala index 50e381777..7b3b3cacc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala @@ -28,11 +28,9 @@ private[reactive] final class DelayExecutionByTimespanObservable[A](source: Obse def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val conn = OrderedCancelable() - val main = out.scheduler.scheduleOnce(timespan.length, timespan.unit, new Runnable { - def run(): Unit = { - conn.orderedUpdate(source.unsafeSubscribeFn(out), order = 2) - () - } + val main = out.scheduler.scheduleOnce(timespan.length, timespan.unit, () => { + conn.orderedUpdate(source.unsafeSubscribeFn(out), order = 2) + () }) conn.orderedUpdate(main, order = 1) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala index fd5aa7e3c..454e016c9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala @@ -49,9 +49,7 @@ private[reactive] final class DelayOnCompleteObservable[A](source: Observable[A] def onComplete(): Unit = if (!isDone) { isDone = true - val scheduled = scheduler.scheduleOnce(delay.length, delay.unit, new Runnable { - def run(): Unit = out.onComplete() - }) + val scheduled = scheduler.scheduleOnce(delay.length, delay.unit, () => out.onComplete()) task.orderedUpdate(scheduled, order = 2) () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala index 3cf4478a0..8204a7503 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala @@ -64,9 +64,7 @@ private[reactive] final class RestartUntilObservable[A](source: Observable[A], p isDone = true // Then we force an asynchronous boundary and retry - out.scheduler.execute(new Runnable { - def run(): Unit = loop(out, subscription) - }) + out.scheduler.execute(() => loop(out, subscription)) // Signal the current upstream to stop. // Current upstream will also be cancel when the diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala index b0114de97..f20b3552d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala @@ -27,11 +27,9 @@ private[reactive] final class SubscribeOnObservable[+A](source: Observable[A], s def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val subscription = SingleAssignCancelable() - s.execute(new Runnable { - def run(): Unit = { - subscription := source.unsafeSubscribeFn(out) - () - } + s.execute(() => { + subscription := source.unsafeSubscribeFn(out) + () }) subscription diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala index 38717f676..5173148fd 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala @@ -208,9 +208,7 @@ object ScanTaskSuite extends BaseOperatorSuite { test("error in task after user cancelled") { implicit s => def delay[A](ex: Throwable): Task[A] = Task.async0 { (sc, cb) => - sc.scheduleOnce(1, TimeUnit.SECONDS, new Runnable { - def run() = cb.onError(ex) - }) + sc.scheduleOnce(1, TimeUnit.SECONDS, () => cb.onError(ex)) () } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala index 99d41d808..6d0a24a78 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala @@ -144,30 +144,28 @@ object IterantFromReactivePublisherSuite extends BaseTestSuite { def request(n: Long): Unit = { if (requested.getAndAdd(n) == 0) - sc.execute(new Runnable { - def run(): Unit = { - var requested = self.requested.get() - var toSend = requested - - while (toSend > 0 && isInRange(index.toLong, until.toLong, step.toLong) && !cancelled.get()) { - s.onNext(index) - index += step - toSend -= 1 - - if (toSend == 0) { - requested = self.requested.subtractAndGet(requested) - toSend = requested - } + sc.execute(() => { + var requested = self.requested.get() + var toSend = requested + + while (toSend > 0 && isInRange(index.toLong, until.toLong, step.toLong) && !cancelled.get()) { + s.onNext(index) + index += step + toSend -= 1 + + if (toSend == 0) { + requested = self.requested.subtractAndGet(requested) + toSend = requested } - - if (!isInRange(index.toLong, until.toLong, step.toLong)) - finish match { - case None => - s.onComplete() - case Some(e) => - s.onError(e) - } } + + if (!isInRange(index.toLong, until.toLong, step.toLong)) + finish match { + case None => + s.onComplete() + case Some(e) => + s.onError(e) + } }) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala index 85e54f16e..620cf05e2 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala @@ -203,35 +203,33 @@ object IterantFromReactiveStreamAsyncSuite extends TestSuite[Scheduler] { def request(n: Long): Unit = { if (requested.getAndAdd(n) == 0) - sc.execute(new Runnable { - def run(): Unit = { - var requested = self.requested.get() - var toSend = requested - var isCanceled = self.cancelled.get() && self.finished.get() - - while (toSend > 0 && isInRange(index.toLong, until.toLong, step.toLong) && !isCanceled) { - s.onNext(index) - index += step - toSend -= 1 - - if (toSend == 0) { - requested = self.requested.subtractAndGet(requested) - toSend = requested - } else if (toSend % 100 == 0) { - isCanceled = self.cancelled.get() - } + sc.execute(() => { + var requested = self.requested.get() + var toSend = requested + var isCanceled = self.cancelled.get() && self.finished.get() + + while (toSend > 0 && isInRange(index.toLong, until.toLong, step.toLong) && !isCanceled) { + s.onNext(index) + index += step + toSend -= 1 + + if (toSend == 0) { + requested = self.requested.subtractAndGet(requested) + toSend = requested + } else if (toSend % 100 == 0) { + isCanceled = self.cancelled.get() } + } - if (!isInRange(index.toLong, until.toLong, step.toLong) && - !isCanceled && - finished.compareAndSet(expect = false, update = true) - ) { - finish match { - case None => - s.onComplete() - case Some(e) => - s.onError(e) - } + if (!isInRange(index.toLong, until.toLong, step.toLong) && + !isCanceled && + finished.compareAndSet(expect = false, update = true) + ) { + finish match { + case None => + s.onComplete() + case Some(e) => + s.onError(e) } } }) diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 88332adc6..c97ad2d00 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -44,6 +44,14 @@ object MimaFilters { exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated"), exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$"), // Fixed observable.takeLast, replaced with TakeLastObservable - exclude[MissingClassProblem]("monix.reactive.internal.operators.TakeLastOperator") + exclude[MissingClassProblem]("monix.reactive.internal.operators.TakeLastOperator"), + // Dropped Scala 2.11 support + exclude[MissingTypesProblem]("monix.execution.Scheduler$Extensions"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$ForkJoinPool$"), + exclude[MissingClassProblem]("monix.execution.schedulers.ExecuteExtensions"), + exclude[MissingClassProblem]("monix.execution.misc.compat"), + exclude[MissingClassProblem]("monix.execution.misc.compat$") ) } From 87d17fdcc2321551d00f6bc8b9b5668437bc373e Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 12 Aug 2020 12:48:05 +0300 Subject: [PATCH 05/69] README simplification (#1233) * README simplification * Add ToC --- CHANGES.md | 6 ++-- README.md | 81 +++++++++++++++++++++++++----------------------------- 2 files changed, 40 insertions(+), 47 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 59cb01a35..6f592b620 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -943,7 +943,7 @@ Bug fixes: Chores: -- [PR #502](https://github.com/monix/monix/pull/502): update SBT to 1.1 +- [PR #502](https://github.com/monix/monix/pull/502): update sbt to 1.1 - [PR #488](https://github.com/monix/monix/pull/488): add note about execution model for `Observable.fromInputStream` - [PR #531](https://github.com/monix/monix/pull/531) @@ -1173,7 +1173,7 @@ Administrative and build changes: 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](https://alexn.org/blog/2017/08/16/automatic-releases-sbt-travis.html) + [Automatic Releases to Maven Central with Travis and sbt](https://alexn.org/blog/2017/08/16/automatic-releases-sbt-travis.html) - [PR #423](https://github.com/monix/monix/pull/423): updates Scala.js to 0.6.20, the final in the series before 1.0.0 @@ -1944,5 +1944,5 @@ List of changes: - [Issue #125](https://github.com/monix/monix/issues/125) - Modify contract of AsyncScheduler, and add a new Scheduler type based entirely on Java's ScheduledExecutor -- Update versions of SBT dependencies +- Update versions of sbt dependencies - Documentation changes (fixed missing argument in Observable docs, add code of conduct mention) diff --git a/README.md b/README.md index 781cfaef7..ca922fc17 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,15 @@ Asynchronous, Reactive Programming for Scala and [Scala.js](http://www.scala-js. **IN-DEVELOPMENT, UNSTABLE BRANCH!** +- [Overview](#overview) +- [Usage](#usage) + - [Library dependency (sbt)](#library-dependency-sbt) + - [Sub-projects](#sub-projects) +- [Documentation](#documentation) +- [Contributing](#contributing) +- [Adopters](#adopters) +- [License](#license) + ## Overview Monix is a high-performance Scala / Scala.js library for composing asynchronous, @@ -15,38 +24,41 @@ event-based programs. It started as a proper implementation of [ReactiveX](http://reactivex.io/), with stronger functional programming influences and designed from the ground up -for back-pressure and made to cleanly interact with Scala's standard library, +for back-pressure and made to interact cleanly with Scala's standard library, compatible out-of-the-box with the [Reactive Streams](http://www.reactive-streams.org/) protocol. It then expanded to include abstractions for suspending side effects -and for resource handling, being one of the parents and implementors of -[cats-effect](https://typelevel.org/cats-effect/). +and for resource handling, and is one of the parents and implementors of +[Cats Effect](https://typelevel.org/cats-effect/). A [Typelevel project](http://typelevel.org/projects/), Monix proudly -exemplifies pure, typeful, functional programming in Scala, while making no -compromise on performance. +exemplifies pure, typeful, functional programming in Scala, while being pragmatic, +and making no compromise on performance. Highlights: -- exposes the kick-ass `Observable`, `Iterant`, `Task` and `Coeval` data types, +- exposes the kick-ass [Observable](https://monix.io/docs/current/reactive/observable.html), + [Iterant](https://monix.io/api/current/monix/tail/Iterant.html), + [Task](https://monix.io/docs/current/eval/task.html) and + [Coeval](https://monix.io/docs/current/eval/coeval.html) data types, along with all the support they need -- modular, only use what you need +- *modular*, split into multiple sub-projects, only use what you need - designed for true asynchronicity, running on both the JVM and [Scala.js](http://scala-js.org) -- really good test coverage, code quality and API documentation +- excellent test coverage, code quality, and API documentation as a primary project policy ## Usage -See **[monix-sample](https://github.com/monix/monix-sample)** for +- Use **[monix-jvm-app-template.g8](https://github.com/monix/monix-jvm-app-template.g8)** +for quickly getting started with a Monix-driven app +- See **[monix-sample](https://github.com/monix/monix-sample)** for a project exemplifying Monix used both on the server and on the client. -### Dependencies - -The packages are published on Maven Central. +### Library dependency (sbt) -For the stable release (compatible with Cats and Cats-Effect 2.x): +For the stable release (compatible with Cats, and Cats-Effect 2.x): ```scala libraryDependencies += "io.monix" %% "monix" % "3.2.2" @@ -54,14 +66,19 @@ libraryDependencies += "io.monix" %% "monix" % "3.2.2" ### Sub-projects -Monix 3.x is modular by design, so you can pick and choose: +Monix 3.x is modular by design. See the [sub-modules graph](https://monix.io/docs/current/intro/usage.html#sub-modules--dependencies-graph): + +Sub-modules graph + +You can pick and choose: -- `monix-catnap` exposes pure abstractions built on top of - the [Cats-Effect](https://typelevel.org/cats-effect/) type classes; - depends on `monix-execution`, Cats 1.x and Cats-Effect - `monix-execution` exposes the low-level execution environment, or more precisely `Scheduler`, `Cancelable`, `Atomic`, `Local`, `CancelableFuture` and `Future` based abstractions from `monix-catnap`. +- `monix-catnap` exposes pure abstractions built on top of + the [Cats-Effect](https://typelevel.org/cats-effect/) type classes; + depends on `monix-execution`, Cats 1.x and Cats-Effect - `monix-eval` exposes `Task`, `Coeval`; depends on `monix-execution` - `monix-reactive` exposes `Observable` for modeling reactive, @@ -71,28 +88,6 @@ Monix 3.x is modular by design, so you can pick and choose: Cats-Effect - `monix` provides all of the above -### Versioning Scheme - -The versioning scheme follows the -[Semantic Versioning](http://semver.org/) (semver) specification, -meaning stable versions have the form `$major.$minor.$patch`, -such that: - -1. `$major` version updates make binary incompatible API changes -2. `$minor` version updates adds functionality in a - backwards-compatible manner, and -3. `$patch` version updates makes backwards-compatible bug fixes - -We publish intermediary versions, automatically, whenever PRs get merged to `master`. -The project has a dynamic version setup, releases are via GitHub Actions with -versions such as `3.2.2+3-1234abcd`, where `3.2.2` is the base version, `+3` represents the -number of commits, the distance from that base version, and `1234abcd` represents the commit's -"sha" (hash) prefix, identifying the commit in GitHub. - -We make NO GUARANTEES for these intermediary versions, but they are pretty high quality, they get - published on Maven Central too, and you can depend on them for testing purposes, or if you - really, really need a new feature that's not published in a stable version yet. - ## Documentation See: @@ -119,12 +114,10 @@ Related: ## Contributing The Monix project welcomes contributions from anybody wishing to -participate. All code or documentation that is provided must be -licensed with the same license that Monix is licensed with (Apache -2.0, see LICENSE.txt). +participate. You must license all code or documentation provided +with the Apache License 2.0, see [LICENSE.txt](./LICENSE.txt). -People are expected to follow the -[Scala Code of Conduct](./CODE_OF_CONDUCT.md) when +You must follow the [Scala Code of Conduct](./CODE_OF_CONDUCT.md) when discussing Monix on GitHub, Gitter channel, or other venues. Feel free to open an issue if you notice a bug, have an idea for a From 3344c51128f825333d96ecd298e0bc188603c522 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 12 Aug 2020 21:07:53 +0300 Subject: [PATCH 06/69] Add Platform.getEnv that works on Node.js too, make CI=true work (#1235) --- .../monix/execution/internal/Platform.scala | 22 ++++++++++++++++++- .../monix/execution/internal/Platform.scala | 10 +++++++-- .../scala/monix/execution/TestUtils.scala | 7 +++--- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala index 38430b99e..c8f2f6c3a 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala @@ -20,9 +20,10 @@ package monix.execution.internal import monix.execution.UncaughtExceptionReporter import monix.execution.exceptions.CompositeException import monix.execution.schedulers.CanBlock - import scala.concurrent.Awaitable import scala.concurrent.duration.Duration +import scala.scalajs.js +import scala.util.control.NonFatal private[monix] object Platform { /** @@ -37,6 +38,25 @@ private[monix] object Platform { */ final val isJVM = false + /** + * Reads environment variable in a platform-specific way. + */ + def getEnv(key: String): Option[String] = { + import js.Dynamic.global + try { + // Node.js specific API, could fail + if (js.typeOf(global.process) == "object" && js.typeOf(global.process.env) == "object") + global.process.env.selectDynamic(key).asInstanceOf[js.UndefOr[String]] + .toOption + .collect { case s: String => s.trim } + .filter(_.nonEmpty) + else + None + } catch { + case NonFatal(_) => None + } + } + /** Recommended batch size used for breaking synchronous loops in * asynchronous batches. When streaming value from a producer to * a synchronous consumer it's recommended to break the streaming diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala index e4daf75f7..74827139e 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala @@ -18,7 +18,6 @@ package monix.execution.internal import monix.execution.schedulers.CanBlock - import scala.concurrent.{Await, Awaitable} import scala.concurrent.duration.Duration import scala.util.Try @@ -36,6 +35,12 @@ private[monix] object Platform { */ final val isJVM = true + /** + * Reads environment variable in a platform-specific way. + */ + def getEnv(key: String): Option[String] = + Option(System.getenv(key)).map(_.trim).filter(_.nonEmpty) + /** Recommended batch size used for breaking synchronous loops in * asynchronous batches. When streaming value from a producer to * a synchronous consumer it's recommended to break the streaming @@ -154,13 +159,14 @@ private[monix] object Platform { * ... * */ - val fusionMaxStackDepth = + val fusionMaxStackDepth = { Option(System.getProperty("monix.environment.fusionMaxStackDepth")) .filter(s => s != null && s.nonEmpty) .flatMap(s => Try(s.toInt).toOption) .filter(_ > 0) .map(_ - 1) .getOrElse(127) + } /** Blocks for the result of `fa`. * diff --git a/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala b/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala index 89ff4be30..4d453729a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala @@ -17,6 +17,7 @@ package monix.execution +import monix.execution.internal.Platform import java.io.{ByteArrayOutputStream, PrintStream} import scala.util.control.NonFatal @@ -24,9 +25,9 @@ import scala.util.control.NonFatal * INTERNAL API — test utilities. */ trait TestUtils { - lazy val isCI = - System.getenv("TRAVIS") == "true" || - System.getenv("CI") == "true" + lazy val isCI = { + Platform.getEnv("CI").map(_.toLowerCase).contains("true") + } /** * Silences `System.err`, only printing the output in case exceptions are From bc2309a7beeb856816d654eb029df64bcf95a4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Gawry=C5=9B?= Date: Thu, 13 Aug 2020 10:25:20 +0200 Subject: [PATCH 07/69] Publish executionShadedJCTools artifacts (#1236) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3dcfe09c9..cf144212b 100644 --- a/build.sbt +++ b/build.sbt @@ -489,7 +489,7 @@ lazy val coreProfile = lazy val coreJVM = project.in(file("monix/jvm")) .configure(coreProfile.jvm) .dependsOn(executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM, javaJVM) - .aggregate(executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM, javaJVM) + .aggregate(executionShadedJCTools, executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM, javaJVM) lazy val coreJS = project.in(file("monix/js")) .configure(coreProfile.js) From bca654e8912449b57ec11e93cca2e4613d4d2810 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2020 11:59:17 +0300 Subject: [PATCH 08/69] Fix publishing of shaded JCTools (#1238) (#1239) Co-authored-by: Alexandru Nedelcu --- .github/workflows/backport.yml | 16 ++++++++++++++++ build.sbt | 4 ---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 000000000..26801ebbe --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,16 @@ +name: Backport +on: + pull_request: + types: + - closed + - labeled + +jobs: + backport: + runs-on: ubuntu-18.04 + name: Backport + steps: + - name: Backport + uses: tibdex/backport@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.sbt b/build.sbt index cf144212b..31053e316 100644 --- a/build.sbt +++ b/build.sbt @@ -327,10 +327,6 @@ lazy val assemblyShadeSettings = Seq( makePomConfiguration := makePomConfiguration.value.withConfigurations(Vector.empty), // package by running assembly packageBin in Compile := ReproducibleBuildsPlugin.postProcessJar((assembly in Compile).value), - // disable publishing the main API jar - Compile / packageDoc / publishArtifact := false, - // disable publishing the main sources jar - Compile / packageSrc / publishArtifact := false ) lazy val unidocSettings = Seq( From e3a7fe64df5e4fb2f2a2646002b9a38c57c4bb1c Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Thu, 13 Aug 2020 11:20:15 +0200 Subject: [PATCH 09/69] Update jctools-core to 3.0.1 (#1237) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 31053e316..2a0f7b5e5 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,7 @@ addCommandAlias("ci-release", ";+publishSigned ;sonatypeBundleRelease") val cats_Version = "2.1.1" val catsEffect_Version = "2.1.4" val fs2_Version = "2.4.0" -val jcTools_Version = "3.0.0" +val jcTools_Version = "3.0.1" val reactiveStreams_Version = "1.0.3" val minitest_Version = "2.8.2" val scalaTest_Version = "3.0.8" From a15dcd1dc2bf6d6a50b368c78df80411905567f4 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Mon, 24 Aug 2020 18:35:06 +0300 Subject: [PATCH 10/69] Update jctools-core to 3.1.0 (#1240) (#1246) Co-authored-by: Scala Steward <43047562+scala-steward@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2a0f7b5e5..5aefba311 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,7 @@ addCommandAlias("ci-release", ";+publishSigned ;sonatypeBundleRelease") val cats_Version = "2.1.1" val catsEffect_Version = "2.1.4" val fs2_Version = "2.4.0" -val jcTools_Version = "3.0.1" +val jcTools_Version = "3.1.0" val reactiveStreams_Version = "1.0.3" val minitest_Version = "2.8.2" val scalaTest_Version = "3.0.8" From ce0a3ce5bc29b074c9d192bac46f3cbb8ae138e5 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Mon, 24 Aug 2020 18:52:31 +0300 Subject: [PATCH 11/69] Backport manual publish (#1248) * Add manual-publish.yml (#1241) * Revert secrets.GITHUB_TOKEN --- .github/scripts/release | 21 +++++ .github/workflows/build.yml | 11 +-- .github/workflows/manual-publish.yml | 54 +++++++++++++ RELEASES.md | 111 --------------------------- build.sbt | 4 +- 5 files changed, 80 insertions(+), 121 deletions(-) create mode 100755 .github/scripts/release create mode 100644 .github/workflows/manual-publish.yml delete mode 100644 RELEASES.md diff --git a/.github/scripts/release b/.github/scripts/release new file mode 100755 index 000000000..da62f331a --- /dev/null +++ b/.github/scripts/release @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +echo "SCALAJS_VERSION=$SCALAJS_VERSION" +git fetch --depth=100 origin +refs/tags/*:refs/tags/* + +if [ "$PUBLISH_STABLE_VERSION" != "true" ]; then + if [[ "$GITHUB_REF" =~ ^v[0-9]+[.][0-9]+[.][0-9]+$ ]]; then + PUBLISH_STABLE_VERSION=true + fi +fi + +echo "GITHUB_REF=$GITHUB_REF" +echo "PUBLISH_STABLE_VERSION=$PUBLISH_STABLE_VERSION" + +if [[ "$PUBLISH_STABLE_VERSION" = "true" ]]; then + echo "Publishing stable version ..." + exec sbt +clean +publishSigned sonatypeBundleRelease +else + echo "Publishing snapshot ..." + exec sbt +clean +publishSigned +fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f4104fe0..b5f735047 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,15 +220,9 @@ jobs: env: PGP_SECRET: ${{ secrets.PGP_SECRET }} - - name: SCALAJS_VERSION=${{ matrix.scalajs }} sbt ci-release + - name: SCALAJS_VERSION=${{ matrix.scalajs }} .github/scripts/release run: | - if [ "$AUTO_PUBLISH_SERIES_4X" = "true" ]; then - echo "SCALAJS_VERSION=$SCALAJS_VERSION" - git fetch --depth=100 origin +refs/tags/*:refs/tags/* - sbt ci-release - else - echo "Skipping due to AUTO_PUBLISH_SERIES_4X=false" - fi + .github/scripts/release env: PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }} PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} @@ -236,4 +230,3 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SCALAJS_VERSION: ${{ matrix.scalajs }} PUBLISH_STABLE_VERSION: false - AUTO_PUBLISH_SERIES_4X: ${{ secrets.AUTO_PUBLISH_SERIES_4X }} diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml new file mode 100644 index 000000000..2b6c22358 --- /dev/null +++ b/.github/workflows/manual-publish.yml @@ -0,0 +1,54 @@ +name: manual-publish + +on: + workflow_dispatch: + inputs: + ref_to_publish: + description: 'Ref (branch or tag)' + required: true + default: 'refs/heads/series/3.x' + stable_version: + description: 'Stable version? (true=staging, false=snapshot)' + required: true + default: "true" + +jobs: + publish: + name: Publish to Sonatype (Request) + strategy: + matrix: + scalajs: ["", 0.6.33, 1.1.1] + + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 100 + ref: ${{ github.event.inputs.ref_to_publish }} + + - uses: olafurpg/setup-scala@v2 + with: + java-version: "adopt@1.8" + + - name: Install GnuPG2 + run: | + ./.github/scripts/setup-pgp + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + + - name: SCALAJS_VERSION=${{ matrix.scalajs }} sbt ci-release + run: | + echo "SCALAJS_VERSION=$SCALAJS_VERSION" + git fetch --depth=100 origin +refs/tags/*:refs/tags/* + if [ "$PUBLISH_STABLE_VERSION" = "true" ]; then + sbt ci-release + else + sbt +clean +publishSigned + fi + env: + PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SCALAJS_VERSION: ${{ matrix.scalajs }} + PUBLISH_STABLE_VERSION: ${{ github.event.inputs.stable_version }} diff --git a/RELEASES.md b/RELEASES.md deleted file mode 100644 index 6e2d565d6..000000000 --- a/RELEASES.md +++ /dev/null @@ -1,111 +0,0 @@ -## Release Process - -This section is for maintainers. - -For the release process you need to activate Git signing, see -[the tutorial on GitHub](https://help.github.com/articles/signing-commits-using-gpg/). - -Also add these to your `$HOME/.sbt/1.0/build.sbt`: - -```scala -credentials += Credentials( - "Sonatype Nexus Repository Manager", - "oss.sonatype.org", - "USERNAME", - "PASSWORD" -) -``` - -You might also need to configure the [sbt-pgp](http://www.scala-sbt.org/sbt-pgp/) -plugin. Even if it's included in `plugins.sbt`, you might want to tune it according -to your local setup. So if it doesn't work out, you can try playing its settings. - -For example you could also try adding these in `$HOME/.sbt/1.0/build.sbt`: - -```scala -useGpg := true -useGpgAgent := true -``` - -Plus if you do that, you'd need to add the plugin globally as well, so -according to the official docs you need to edit -`$HOME/.sbt/1.0/plugins/gpg.sbt` and add something like: - -```scala -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") -``` - -You can then test that you can sign packages locally with: - -``` -sbt +publishLocalSigned -``` - -In order to release a new version, these commands need to be executed: - -``` -VERSION="v3.0.0" - -git tag -s -m "Tagging $VERSION" $VERSION - -git verify-tag $VERSION - -git checkout $VERSION - -sbt release - -git push upstream $VERSION -``` - -Please execute one by one, at each step verify that there haven't been any errors. - -## Cryptographically Verifying Releases - -All release artifacts must be cryptographically signed by a GPG key from one of [the maintainers](https://github.com/monix/monix/graphs/contributors). Every release corresponds to a tag of the form `/v(\d+)\.(\d+)(\.(\d+))?` which is pushed to [the upstream Git repository](https://github.com/monix/monix), and that tag is always signed by the *same* key. - -To locally cryptographically verify the integrity of a release, you should start by verifying the tag itself: - -```bash -$ git verify-tag v3.0.0 -``` - -(replace `v3.0.0` with the version you're checking) - -The output should be something like this: - -``` -gpg: Signature made Mon Jan 29 13:19:48 2018 EET -gpg: using RSA key 971E5587E7EDA30AE2F0C230397C67E28DFD7BB4 -gpg: Good signature from "Alexandru Nedelcu " [ultimate] -gpg: aka "[jpeg image of size 4363]" [ultimate] -``` - -Note the "*using RSA key*" line, which is the signature of the signing key. You can also look at this tag on Github and, if you trust their servers, verify that it is linked to a profile you trust. An even better way of doing this is to visit [Keybase](https://keybase.io) and search for that 8 character signature, since this can be done without trusting any third parties (or rather, without trusting any single third party). - -Once you've verified that the key signature matches someone you would expect to be releasing `monix` artifacts, you should import the key to pin it for subsequent verifications and note that only the 8 characters are needed: - -```bash -$ gpg --recv-keys 8DFD7BB4 -``` - -(replace those eight characters with the signature from above) - -It's always a good exercise to take that primary key fingerprint (all 120 characters) and ensure that it matches the other key sources (e.g. Keybase). It is relatively easy to generate keys which signature collide on the final eight bits. - -Now that you've grabbed the signature of the tag and verified that it correspond to an individual you would *expect* should be pushing `monix` releases, you can move on to verifying the artifacts themselves. - -```bash -sbt check-pgp-signatures -``` - -You will need the [sbt-gpg](http://www.scala-sbt.org/sbt-pgp/index.html) plugin to run this command. It will grab all of the signatures for all of your dependencies and verify them. Each one should indicate either `[OK]` or `[UNTRUSTED(...)]`. Each `UNTRUSTED` artifact will list the signature of the signing key, just as with the tag verification. Since we have already imported the key of the developer who signed the release tag, we should *definitely* see `[OK]` for the `monix-kafka` artifact: - -``` -[info] io.monix : monix_2.12 : 3.0.0 : jar [OK] -``` - -If you do see `UNTRUSTED` (which will happen if you don't import the key), it should look like the following: - -``` -[info] io.monix : monix_2.12 : 3.0.0 : jar [UNTRUSTED(0x2bae5960)] -``` diff --git a/build.sbt b/build.sbt index 5aefba311..09aa7c2dd 100644 --- a/build.sbt +++ b/build.sbt @@ -226,7 +226,9 @@ lazy val sharedSettings = pgpSettings ++ Seq( // -- Settings meant for deployment on oss.sonatype.org publishTo in ThisBuild := sonatypePublishToBundle.value, - isSnapshot in ThisBuild := !(isVersionStable.value && publishStableMonixVersion.value), + isSnapshot in ThisBuild := { + !isVersionStable.value || !publishStableMonixVersion.value + }, dynverSonatypeSnapshots in ThisBuild := !(isVersionStable.value && publishStableMonixVersion.value), sonatypeProfileName in ThisBuild := organization.value, sonatypeSessionName := s"[sbt-sonatype] ${name.value}${customScalaJS_Version.fold("-nojs")(v => s"-sjs$v")}-${version.value}", From 440f0a607a7227225f1224c1e52d0fbbd5bf29b1 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Mon, 24 Aug 2020 19:06:56 +0300 Subject: [PATCH 12/69] Backport FUNDING.yml to series/4.x (#1250) * Experimenting with a FUNDING.yml (#1245) * Update FUNDING (#1249) * Add manual-publish.yml (#1241) --- .github/FUNDING.yml | 6 ++++++ .gitignore | 1 + 2 files changed, 7 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..f97f17ce4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,6 @@ +# https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository + +patreon: alexelcu + +# We need to apply here: https://github.com/sponsors +# github: [alexandru, avasil] diff --git a/.gitignore b/.gitignore index 047e52191..fcc6bff6b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ TAGS .metals .bloop metals.sbt +.vscode From ee0b8b6fb4fea5d15d791880c43a8763c0052f03 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2020 23:13:04 +0300 Subject: [PATCH 13/69] Mention Monix BIO in the readme (#1251) (#1252) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not sure where to put it but I want to include it Co-authored-by: Piotr Gawryś --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca922fc17..ac0a49ac1 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ Highlights: - exposes the kick-ass [Observable](https://monix.io/docs/current/reactive/observable.html), [Iterant](https://monix.io/api/current/monix/tail/Iterant.html), - [Task](https://monix.io/docs/current/eval/task.html) and + [Task](https://monix.io/docs/current/eval/task.html), + [IO[E, A]](https://bio.monix.io/docs/introduction), and [Coeval](https://monix.io/docs/current/eval/coeval.html) data types, along with all the support they need - *modular*, split into multiple sub-projects, only use what you need From 88fdaf67a11bffb8bf7a2d525f7564491574743e Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Thu, 6 May 2021 10:10:07 +0300 Subject: [PATCH 14/69] Fix manual-publish.yml --- .github/workflows/manual-publish.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index dadfb43e0..0a8510eea 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -6,7 +6,7 @@ on: ref_to_publish: description: 'Ref (branch or tag)' required: true - default: 'refs/heads/series/3.x' + default: 'refs/heads/series/4.x' stable_version: description: 'Stable version? (true=staging, false=snapshot)' required: true @@ -15,9 +15,6 @@ on: jobs: publish: name: Publish to Sonatype (Request) - strategy: - matrix: - scalajs: ["", 0.6.33, 1.1.1] runs-on: ubuntu-20.04 steps: @@ -26,7 +23,7 @@ jobs: fetch-depth: 100 ref: ${{ github.event.inputs.ref_to_publish }} - - uses: olafurpg/setup-scala@v2 + - uses: olafurpg/setup-scala@v10 with: java-version: "adopt@1.8" @@ -36,9 +33,8 @@ jobs: env: PGP_SECRET: ${{ secrets.PGP_SECRET }} - - name: SCALAJS_VERSION=${{ matrix.scalajs }} sbt ci-release + - name: sbt ci-release run: | - echo "SCALAJS_VERSION=$SCALAJS_VERSION" git fetch --depth=100 origin +refs/tags/*:refs/tags/* if [ "$PUBLISH_STABLE_VERSION" = "true" ]; then sbt ci-release @@ -50,5 +46,4 @@ jobs: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SCALAJS_VERSION: ${{ matrix.scalajs }} PUBLISH_STABLE_VERSION: ${{ github.event.inputs.stable_version }} From ff7a7b083e78d1eb5c1a5fc51b334d58afb248ed Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Thu, 6 May 2021 14:23:32 +0300 Subject: [PATCH 15/69] Update README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index a45c9c7df..5c0138944 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ Asynchronous, Reactive Programming for Scala and [Scala.js](http://www.scala-js. [![Build](https://github.com/monix/monix/workflows/build/badge.svg?branch=series/4.x)](https://github.com/monix/monix/actions?query=branch%3Aseries%2F4.x+workflow%3Abuild) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix) -**IN-DEVELOPMENT, UNSTABLE BRANCH!** - - [Overview](#overview) - [Usage](#usage) - [Library dependency (sbt)](#library-dependency-sbt) From d68dd0e91da868269164162f7a82a1c5e432a6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Alarc=C3=B3n?= <33580722+paualarco@users.noreply.github.com> Date: Sun, 9 May 2021 22:58:52 +0200 Subject: [PATCH 16/69] Adds discord badge to readme (#1431) * Adds discord badge to readme * Corrects discord invite. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5c0138944..964682ecd 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Asynchronous, Reactive Programming for Scala and [Scala.js](http://www.scala-js.org/). [![Build](https://github.com/monix/monix/workflows/build/badge.svg?branch=series/4.x)](https://github.com/monix/monix/actions?query=branch%3Aseries%2F4.x+workflow%3Abuild) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix) +[![Discord](https://img.shields.io/discord/632277896739946517.svg?label=&logo=discord&logoColor=ffffff&color=404244&labelColor=6A7EC2)](https://discord.gg/wsVZSEx4Nw) - [Overview](#overview) - [Usage](#usage) From 0b7919ea68b34f69ed708e306cb31f2e9d0dd1a3 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Fri, 14 May 2021 14:26:13 +0300 Subject: [PATCH 17/69] Update for Scala 2.13.5, 3.0.0, other dependencies (#1440) --- .github/workflows/build.yml | 24 ++++++-- build.sbt | 56 ++++++++++++------- .../catnap/ConcurrentChannelJVMSuite.scala | 3 +- .../monix/catnap/ConcurrentChannelSuite.scala | 13 ++--- .../scala/monix/eval/TaskBlockingSuite.scala | 2 +- .../monix/eval/internal/TaskMapBoth.scala | 9 +++ .../monix/eval/internal/TaskMemoize.scala | 8 ++- .../scala/monix/eval/CoevalErrorSuite.scala | 2 +- .../scala/monix/eval/TaskErrorSuite.scala | 4 +- .../monix/eval/TaskParTraverseSuite.scala | 2 +- .../cancelables/ChainedCancelable.scala | 10 +++- .../cancelables/ChainedCancelable.scala | 9 +++ .../monix/execution/CancelablePromise.scala | 14 +++++ .../monix/execution/internal/exceptions.scala | 27 +++++++++ .../monix/execution/misc/test/TestBox.scala | 1 + .../execution/misc/InlineMacrosTest.scala | 4 +- .../operators/FlatScanDelayErrorSuite.scala | 3 +- .../operators/GuaranteeCaseSuite.scala | 7 +++ .../operators/MergeDelayErrorManySuite.scala | 3 +- .../operators/MergeDelayErrorOneSuite.scala | 3 +- .../operators/OnErrorRetryIfSuite.scala | 5 +- .../TimeoutOnSlowDownstreamSuite.scala | 5 +- .../TimeoutOnSlowUpstreamSuite.scala | 2 +- .../internal/operators/ZipListSuite.scala | 8 ++- project/plugins.sbt | 6 +- 25 files changed, 172 insertions(+), 58 deletions(-) create mode 100644 monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a25a225f..cf0681386 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: java: [ 8, 11 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.12.13, 2.13.3, 3.0.0-RC3 ] + scala: [ 2.12.13, 2.13.5, 3.0.0 ] env: CI: true @@ -64,8 +64,8 @@ jobs: # crossScalaVersions is determined from it include: - { java: 8, scala: 2.12.13 } - - { java: 8, scala: 2.13.3 } - - { java: 8, scala: 3.0.0-RC3 } + - { java: 8, scala: 2.13.5 } + - { java: 8, scala: 3.0.0 } env: CI: true @@ -116,7 +116,8 @@ jobs: matrix: include: - { java: 8, scala: 2.12.13 } - - { java: 8, scala: 2.13.3 } + - { java: 8, scala: 2.13.5 } + - { java: 8, scala: 3.0.0 } steps: - uses: actions/checkout@v2 @@ -157,7 +158,9 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.13.3 } + - { java: 8, scala: 2.13.5 } + # TODO: enable this after it works! + # - { java: 8, scala: 3.0.0 } steps: - uses: actions/checkout@v2 @@ -191,10 +194,19 @@ jobs: SCALA_VERSION: ${{ matrix.scala }} SBT_COMMAND: unidoc + all_tests: + name: All Tests + needs: [ jvm-tests, js-tests, mima, unidoc ] + runs-on: ubuntu-20.04 + steps: + - name: Ack + run: | + echo "All done." + publish: name: Publish to Sonatype if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x') - needs: [ jvm-tests, js-tests, mima, unidoc ] + needs: [ all_tests ] runs-on: ubuntu-20.04 steps: diff --git a/build.sbt b/build.sbt index 4e10fad8e..8e211b0dd 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,6 @@ import sbt.Keys.version -import sbt.Def +import sbt.{Def, Global, Tags} + import scala.collection.immutable.SortedSet import MonixBuildUtils._ @@ -23,21 +24,21 @@ addCommandAlias("ci-release", ";+publishSigned ;sonatypeBundleRelease") // ------------------------------------------------------------------------------------------------ // Dependencies - Versions -val cats_Version = "2.6.0" -val catsEffect_Version = "2.5.0" +val cats_Version = "2.6.1" +val catsEffect_Version = "2.5.1" val fs2_Version = "2.4.4" val jcTools_Version = "3.3.0" val reactiveStreams_Version = "1.0.3" -val minitest_Version = "2.9.5" -val implicitBox_Version = "0.3.3" -val kindProjector_Version = "0.11.3" +val minitest_Version = "2.9.6" +val implicitBox_Version = "0.3.4" +val kindProjector_Version = "0.12.0" val betterMonadicFor_Version = "0.3.1" -val silencer_Version = "1.7.1" -val scalaCompat_Version = "2.4.3" +val silencer_Version = "1.7.3" +val scalaCompat_Version = "2.4.4" // The Monix version with which we must keep binary compatibility. // https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin -val monixSeries = "3.3.0" +val monixSeries = "3.4.0" // ------------------------------------------------------------------------------------------------ // Dependencies - Libraries @@ -123,19 +124,9 @@ val crossScalaVersionsFromBuildYaml = "Scala versions set in .github/workflows/build.yml as scala_version_XXX" ) -Global / crossScalaVersionsFromBuildYaml := { - val manifest = (ThisBuild / baseDirectory).value / ".github" / "workflows" / "build.yml" - scalaVersionsFromBuildYaml(manifest) -} - lazy val publishStableMonixVersion = settingKey[Boolean]("If it should publish stable versions to Sonatype staging repository, instead of a snapshot") -publishStableMonixVersion in Global := { - sys.env.get("PUBLISH_STABLE_VERSION") - .exists(v => v == "true" || v == "1" || v == "yes") -} - lazy val pgpSettings = { val withHex = sys.env.get("PGP_KEY_HEX").filter(_.nonEmpty) match { case None => Seq.empty @@ -236,14 +227,19 @@ lazy val sharedSettings = pgpSettings ++ Seq( "-sourcepath", file(".").getAbsolutePath.replaceAll("[.]$", "") ), + // Without this setting, the outcome of a test-suite will be printed all at + // once, instead of line by line, as tests are being completed Test / logBuffered := false, + // + // Tries disabling parallel execution in tests (in the same project / task) + Test / parallelExecution := false, // https://github.com/sbt/sbt/issues/2654 incOptions := incOptions.value.withLogRecompileOnMacro(false), // Series/4.x is unpublished. // Delete this after the first release ... - dynverVTagPrefix in ThisBuild := false, + ThisBuild / dynverVTagPrefix := false, // -- Settings meant for deployment on oss.sonatype.org ThisBuild / publishTo := sonatypePublishToBundle.value, @@ -255,7 +251,7 @@ lazy val sharedSettings = pgpSettings ++ Seq( sonatypeSessionName := s"[sbt-sonatype] ${name.value}-${version.value}", // Only on the Series 4.x branch - dynverVTagPrefix in ThisBuild := false, + ThisBuild / dynverVTagPrefix := false, publishMavenStyle := true, Test / publishArtifact := false, @@ -478,6 +474,24 @@ lazy val monix = project.in(file(".")) .aggregate(coreJVM, coreJS) .settings(unidocSettings) .settings( + // + // Reads Scala versions from build.yml + Global / crossScalaVersionsFromBuildYaml := { + val manifest = (ThisBuild / baseDirectory).value / ".github" / "workflows" / "build.yml" + scalaVersionsFromBuildYaml(manifest) + }, + // + // Tries restricting concurrency when running tests + // https://www.scala-sbt.org/1.x/docs/Parallel-Execution.html + Global / concurrentRestrictions += Tags.limit(Tags.Test, 1), + // + // Used in CI when publishing artifacts to Sonatype + Global / publishStableMonixVersion := { + sys.env.get("PUBLISH_STABLE_VERSION") + .exists(v => v == "true" || v == "1" || v == "yes") + }, + // + // Settings for build.sbt management Global / onChangedBuildSource := ReloadOnSourceChanges, Global / excludeLintKeys ++= Set( Compile / gitHubTreeTagOrHash, diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala index 03ac07857..d5a055060 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala @@ -24,6 +24,7 @@ import monix.execution.schedulers.SchedulerService import scala.concurrent.duration._ abstract class ConcurrentChannelJVMSuite(parallelism: Int) extends BaseConcurrentChannelSuite[SchedulerService] { + val taskTimeout = 60.seconds def setup(): SchedulerService = Scheduler.computation( @@ -42,7 +43,7 @@ abstract class ConcurrentChannelJVMSuite(parallelism: Int) extends BaseConcurren else IO.unit testAsync(name) { implicit ec => - repeatTest(f(ec).timeout(60.second), times).unsafeToFuture() + repeatTest(f(ec).timeout(taskTimeout), times).unsafeToFuture() } } diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala index 164a52255..6fb3fb749 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala @@ -58,20 +58,15 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w val boundedConfigForConcurrentSum: Bounded val iterationsCount = { - if (Platform.isJVM) { - // Discriminate CI - if (isCI) - 1000 - else - 10000 - } else { - 100 // JavaScript - } + if (isCI) 50 + else if (Platform.isJVM) 10000 + else 100 } val repeatForFastTests = { if (Platform.isJVM) 1000 else 100 } + val repeatForSlowTests = { if (Platform.isJVM) 50 else 1 } diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala index 9fff05ed8..625452bf7 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala @@ -26,7 +26,7 @@ import scala.concurrent.duration._ object TaskBlockingSuite extends SimpleTestSuite { test("blocking on future should work") { val source1 = Task.evalAsync(100) - val source2 = Task.evalAsync(200).onErrorHandleWith { case e: Exception => Task.raiseError(e) } + val source2 = Task.evalAsync(200).onErrorHandleWith { case e => Task.raiseError(e) } val derived = source1.map { x => val r = Await.result(source2.runToFuture, 10.seconds) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala index 0696f0272..9759d6afd 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala @@ -24,6 +24,7 @@ import monix.execution.Ack.Stop import monix.execution.Scheduler import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.atomic.{Atomic, AtomicAny} +import monix.execution.internal.exceptions.matchError import scala.annotation.tailrec import scala.util.control.NonFatal @@ -113,6 +114,10 @@ private[eval] object TaskMapBoth { // This task has triggered multiple onSuccess calls // violating the protocol. Should never happen. onError(new IllegalStateException(s.toString)) + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } def onError(ex: Throwable): Unit = @@ -137,6 +142,10 @@ private[eval] object TaskMapBoth { // This task has triggered multiple onSuccess calls // violating the protocol. Should never happen. onError(new IllegalStateException(s.toString)) + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } def onError(ex: Throwable): Unit = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala index a29d4f6a6..211808370 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala @@ -23,6 +23,7 @@ import monix.execution.Callback import monix.eval.{Coeval, Task} import monix.execution.Scheduler import monix.execution.atomic.Atomic +import monix.execution.internal.exceptions.matchError import scala.annotation.tailrec import scala.concurrent.{ExecutionContext, Promise} import scala.util.{Failure, Success, Try} @@ -163,7 +164,12 @@ private[eval] object TaskMemoize { // Race condition happened // $COVERAGE-OFF$ cb(ref) - // $COVERAGE-ON$ + // $COVERAGE-ON$ + + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } } } diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala index af691b8e1..6c0403114 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala @@ -140,7 +140,7 @@ object CoevalErrorSuite extends BaseTestSuite { test("Coeval#onErrorHandle should recover") { implicit s => val ex = DummyException("dummy") - val f = Coeval[Int](if (1 == 1) throw ex else 1).onErrorHandle { case _: DummyException => 99 } + val f = Coeval[Int](if (1 == 1) throw ex else 1).onErrorHandle { _ => 99 } assertEquals(f.runTry(), Success(99)) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala index ab0445688..32ce7acbe 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala @@ -182,9 +182,7 @@ object TaskErrorSuite extends BaseTestSuite { test("Task#onErrorHandle should recover") { implicit s => val ex = DummyException("dummy") - val task = Task[Int](if (1 == 1) throw ex else 1).onErrorHandle { - case _: DummyException => 99 - } + val task = Task[Int](if (1 == 1) throw ex else 1).onErrorHandle { _ => 99 } val f = task.runToFuture s.tick() diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala index 85d5f07f3..609d6ff91 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala @@ -110,7 +110,7 @@ object TaskParTraverseSuite extends BaseTestSuite { test("Task.parTraverse should wrap exceptions in the function") { implicit s => val ex = DummyException("dummy") - @nowarn("msg=dead code") + @nowarn val task1 = Task.parTraverse(Seq(0)) { i => if (1 + 1 == 2) throw ex Task.now(i) diff --git a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index 45f6eb35a..c480e5377 100644 --- a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -19,6 +19,7 @@ package monix.execution.cancelables import monix.execution.Cancelable import monix.execution.Cancelable.IsDummy +import monix.execution.internal.exceptions.matchError /** Represents a [[monix.execution.Cancelable]] whose underlying * cancelable reference can be swapped for another. It can @@ -92,7 +93,6 @@ final class ChainedCancelable private (private var stateRef: AnyRef) extends Ass // - Cancelled: if it was cancelled // - _: WeakReference[ChainedCancelable]: in case it was chained // - _: Cancelable: in case it has an underlying reference - override def cancel(): Unit = { val prevRef = stateRef stateRef = Canceled @@ -102,6 +102,10 @@ final class ChainedCancelable private (private var stateRef: AnyRef) extends Ass case ref: Cancelable => ref.cancel() case WeakRef(cc) => if (cc != null) cc.cancel() + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } } @@ -179,6 +183,10 @@ final class ChainedCancelable private (private var stateRef: AnyRef) extends Ass case prev: Cancelable => newRoot := prev () + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index 3bfd1d1f6..ecc8f8aae 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -21,6 +21,7 @@ import java.lang.ref.WeakReference import monix.execution.Cancelable import monix.execution.Cancelable.IsDummy import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.internal.exceptions.matchError /** Represents a [[monix.execution.Cancelable]] whose underlying * cancelable reference can be swapped for another. It can @@ -109,6 +110,10 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext case wr: WeakReference[_] => val cc = wr.get.asInstanceOf[CC] if (cc != null) cc.cancel() + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } } @@ -202,6 +207,10 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext if (cc != null) cc.asInstanceOf[CC].update(newRoot) case prev: Cancelable => newRoot.update(prev) + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } } } diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala index 03fc33f08..fc00e7895 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala @@ -19,6 +19,7 @@ package monix.execution import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.Platform +import monix.execution.internal.exceptions.matchError import monix.execution.atomic.{AtomicAny, PaddingStrategy} import scala.annotation.tailrec @@ -208,6 +209,10 @@ object CancelablePromise { if (!state.compareAndSet(queue, update)) unsafeSubscribe(p) else new IdCancelable(id) CancelableFuture(p.future, cancelable) + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } @tailrec @@ -254,6 +259,10 @@ object CancelablePromise { case p: Promise[A] @unchecked => p.complete(result) () + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } @tailrec def unsafeSubscribe(cb: AnyRef): Cancelable = @@ -266,6 +275,11 @@ object CancelablePromise { val (id, update) = queue.enqueue(cb) if (!state.compareAndSet(queue, update)) unsafeSubscribe(cb) else new IdCancelable(id) + + case other => + // $COVERAGE-OFF$ + matchError(other) + // $COVERAGE-ON$ } private final class IdCancelable(id: Long) extends Cancelable { diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala new file mode 100644 index 000000000..a2515bd82 --- /dev/null +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2014-2021 by The Monix Project Developers. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.internal + +private[monix] object exceptions { + /** + * To use in `case _ =>` branches that are absurd, but needed + * due to the compiler complaining. + */ + def matchError[A](received: A): Nothing = + throw new scala.MatchError(received) +} diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala index ec33a984a..71134cbb7 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala @@ -25,6 +25,7 @@ import scala.reflect.macros.whitebox */ private[execution] final case class TestBox[A](value: A) { def map[B](f: A => B): TestBox[B] = macro TestBox.Macros.mapMacroImpl[A, B] + def collect[B](f: PartialFunction[A, B]): TestBox[B] = macro TestBox.Macros.mapMacroImpl[A, B] } /** Represents a boxed value, to be used in the testing diff --git a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala b/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala index d9dfe4ae4..8a492bec7 100644 --- a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala +++ b/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala @@ -99,14 +99,14 @@ object InlineMacrosTest extends SimpleTestSuite { test("Inline matched partial function") { val box = TestBox(1) - val mapped = box.map { case 1 => 2 } + val mapped = box.collect { case 1 => 2 } assertEquals(mapped, TestBox(2)) } test("Inline unmatched partial function") { val box = TestBox(2) intercept[MatchError] { - box.map { case 1 => 2 } + box.collect { case 1 => 2 } () } () diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala index 67e0fd84d..8352b6802 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala @@ -43,8 +43,9 @@ object FlatScanDelayErrorSuite extends BaseOperatorSuite { val recovered = o.onErrorHandleWith { case composite: CompositeException => val sum = composite.errors.collect { case ex: SomeException => ex.value }.sum - Observable.now(sum) + case other => + Observable.raiseError(other) } val sum = (0 until sourceCount).map(x => (1 to x).sum + 1L).sum * 3 + diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala index 88f4a3f62..a28cd2515 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala @@ -26,6 +26,7 @@ import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.execution.exceptions.{CompositeException, DummyException} import monix.execution.internal.Platform +import monix.execution.internal.exceptions.matchError import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -159,6 +160,8 @@ object GuaranteeCaseSuite extends TestSuite[TestScheduler] { wasThrown match { case CompositeException(list) => assertEquals(list, List(ex1, ex2)) + case other => + matchError(other) } } assertEquals(s.state.lastReportedError, null) @@ -189,6 +192,8 @@ object GuaranteeCaseSuite extends TestSuite[TestScheduler] { wasThrown match { case CompositeException(list) => assertEquals(list, List(ex1, ex2)) + case other => + matchError(other) } } assert(s.state.tasks.isEmpty, "tasks.isEmpty") @@ -423,6 +428,8 @@ object GuaranteeCaseSuite extends TestSuite[TestScheduler] { wasThrown match { case CompositeException(list) => assertEquals(list, List(ex1, ex2)) + case other => + matchError(other) } } assertEquals(s.state.lastReportedError, null) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala index a38eeeda9..854320d65 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala @@ -36,8 +36,9 @@ object MergeDelayErrorManySuite extends BaseOperatorSuite { val recovered = o.onErrorHandleWith { case composite: CompositeException => val sum = composite.errors.collect { case ex: SomeException => ex.value }.sum - Observable.now(sum) + case other => + Observable.raiseError(other) } Sample(recovered, count(sourceCount), sum(sourceCount), waitFirst, waitNext) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala index 6d76c4f42..b76e9ed1b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala @@ -36,8 +36,9 @@ object MergeDelayErrorOneSuite extends BaseOperatorSuite { val recovered = o.onErrorHandleWith { case composite: CompositeException => val sum = composite.errors.collect { case ex: SomeException => ex.value }.sum - Observable.now(sum) + case other => + Observable.raiseError(other) } Sample(recovered, count(sourceCount), sum(sourceCount), waitFirst, waitNext) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala index 2269e003f..96921b797 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala @@ -30,7 +30,10 @@ object OnErrorRetryIfSuite extends BaseOperatorSuite { val o = Observable .range(0L, sourceCount.toLong) .endWithError(ex) - .onErrorRestartIf { case DummyException("expected") => retriesCount.incrementAndGet() <= 3 } + .onErrorRestartIf { + case DummyException("expected") => retriesCount.incrementAndGet() <= 3 + case _ => false + } .onErrorHandle(_ => 10L) val count = sourceCount * 4 + 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala index 1e97f3dcf..ecd9ea785 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala @@ -30,8 +30,9 @@ object TimeoutOnSlowDownstreamSuite extends BaseOperatorSuite { val o = source .timeoutOnSlowDownstream(1.second) .delayOnNext(30.minutes) - .onErrorHandleWith { case DownstreamTimeoutException(_) => Observable.now(20L) } - + .onErrorRecoverWith { + case DownstreamTimeoutException(_) => Observable.now(20L) + } Sample(o, 1, 20, 1.second, 0.seconds) } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala index 37500aa78..de59c4ec7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala @@ -28,7 +28,7 @@ import scala.concurrent.duration._ object TimeoutOnSlowUpstreamSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { val source = Observable.now(sourceCount.toLong).delayOnComplete(1.hour) - val o = source.timeoutOnSlowUpstream(1.second).onErrorHandleWith { + val o = source.timeoutOnSlowUpstream(1.second).onErrorRecoverWith { case UpstreamTimeoutException(_) => Observable.now(20L) } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala index 0993b2fd1..78b4df13a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala @@ -17,7 +17,9 @@ package monix.reactive.internal.operators +import monix.execution.internal.exceptions.matchError import monix.reactive.Observable + import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero @@ -26,6 +28,7 @@ object ZipListSuite extends BaseOperatorSuite { val source = Observable.range(0L, sourceCount.toLong) val o = Observable.zipList(source, source, source, source, source, source).map { case Seq(t1, t2, t3, t4, t5, t6) => t1 + t2 + t3 + t4 + t5 + t6 + case other => matchError(other) } val sum = (sourceCount * (sourceCount - 1)) * 3 @@ -43,7 +46,10 @@ object ZipListSuite extends BaseOperatorSuite { val o4 = Observable.range(0, 10).delayOnNext(1.second) val o5 = Observable.range(0, 10).delayOnNext(1.second) val o6 = Observable.range(0, 10).delayOnNext(1.second) - Observable.zipList(o1, o2, o3, o4, o5, o6).map { case Seq(a1, a2, a3, a4, a5, a6) => a1 + a2 + a3 + a4 + a5 + a6 } + Observable.zipList(o1, o2, o3, o4, o5, o6).map { + case Seq(a1, a2, a3, a4, a5, a6) => a1 + a2 + a3 + a4 + a5 + a6 + case other => matchError(other) + } } Seq(Sample(sample1, 0, 0, 0.seconds, 0.seconds)) diff --git a/project/plugins.sbt b/project/plugins.sbt index 562b1ed60..c027fc53b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,11 +1,11 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.0") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.1") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.9") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.7.3") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.0") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.25") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") From 5708f246e03ce22b353fa67508a9ba1cbb0be125 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Fri, 14 May 2021 16:41:34 +0300 Subject: [PATCH 18/69] Release notes for 3.4.0 (#1446) * Draft 3.4.0 release notes * Re-add Scala 2.12 :) --- CHANGES.md | 32 ++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 987bfead0..96bfcba12 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,35 @@ +## Version 3.4.0 (May 14, 2021) + +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.13` and `3.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.11` and Scala.js `0.6.x` +- Dependency updates: + - Cats `2.6.1` + - Cats-Effect `2.5.1` + - JCTools `3.3.0` +- Adds support for Scala 3 (#1326, #1327, #1328, #1329, #1344, #1323) +- Adds `Observable.whileBusyAggregateEvents` (#1320) +- Fix tracing in `Coeval` and `Task` via 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) + ## Version 3.3.0 (Nov 7, 2020) The release is binary and source compatible with 3.x.x line. diff --git a/README.md b/README.md index 964682ecd..f83675cc7 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ a project exemplifying Monix used both on the server and on the client. For the stable release (compatible with Cats, and Cats-Effect 2.x): ```scala -libraryDependencies += "io.monix" %% "monix" % "3.3.0" +libraryDependencies += "io.monix" %% "monix" % "3.4.0" ``` ### Sub-projects From 1f5d9391781798a637ee0325093ce0350114a83e Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Fri, 14 May 2021 18:03:37 +0300 Subject: [PATCH 19/69] Fix README to mention 3.4 API --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f83675cc7..ea27d6445 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ See: API Documentation: - [Current](https://monix.io/api/current/) -- [3.3](https://monix.io/api/3.3/) +- [3.4](https://monix.io/api/3.4/) - [2.3](https://monix.io/api/2.3/) - [1.2](https://monix.io/api/1.2/) From 3bcd6f6fd76c22d7931c8423cd76b8d6f83397e2 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Tue, 18 May 2021 10:33:19 +0200 Subject: [PATCH 20/69] Update kind-projector to 0.13.0 (#1448) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8e211b0dd..c28d3557a 100644 --- a/build.sbt +++ b/build.sbt @@ -31,7 +31,7 @@ val jcTools_Version = "3.3.0" val reactiveStreams_Version = "1.0.3" val minitest_Version = "2.9.6" val implicitBox_Version = "0.3.4" -val kindProjector_Version = "0.12.0" +val kindProjector_Version = "0.13.0" val betterMonadicFor_Version = "0.3.1" val silencer_Version = "1.7.3" val scalaCompat_Version = "2.4.4" From d770c03719705fbe4cf27835bcfabaafc6050b8f Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Tue, 15 Jun 2021 10:12:06 +0100 Subject: [PATCH 21/69] Add Scaladex badge to show Scala version support (#1467) The badge summarises which versions of Scala are supported by Monix (and what the latest artifact version is for each of those Scala versions). [![monix Scala version support](https://index.scala-lang.org/monix/monix/monix/latest-by-scala-version.svg)](https://index.scala-lang.org/monix/monix/monix) More details on the badge format here: https://github.com/scalacenter/scaladex/pull/660 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ea27d6445..8916e8d1c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Asynchronous, Reactive Programming for Scala and [Scala.js](http://www.scala-js.org/). +[![monix Scala version support](https://index.scala-lang.org/monix/monix/monix/latest-by-scala-version.svg)](https://index.scala-lang.org/monix/monix/monix) + [![Build](https://github.com/monix/monix/workflows/build/badge.svg?branch=series/4.x)](https://github.com/monix/monix/actions?query=branch%3Aseries%2F4.x+workflow%3Abuild) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix) [![Discord](https://img.shields.io/discord/632277896739946517.svg?label=&logo=discord&logoColor=ffffff&color=404244&labelColor=6A7EC2)](https://discord.gg/wsVZSEx4Nw) From ac5cce1774b7ee76564d40edcfe493f7317975f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Podsiad=C5=82o?= <37124721+kpodsiad@users.noreply.github.com> Date: Wed, 11 Aug 2021 12:04:57 +0200 Subject: [PATCH 22/69] Fixed doc typo (#1476) --- .../monix/execution/cancelables/SingleAssignCancelable.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala index 070e98680..aa9411b5b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala @@ -128,7 +128,7 @@ object SingleAssignCancelable { * {{{ * val c = { * val extra = Cancelable(() => println("extra canceled") - * SingleAssignmentCancelable.withExtra(extra) + * SingleAssignmentCancelable.plusOne(extra) * } * * c := Cancelable(() => println("main canceled")) From a43906b8410c167655ebeae4abc5e5a64cce65a2 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sat, 4 Sep 2021 13:05:32 +0200 Subject: [PATCH 23/69] Update kind-projector to 0.13.2 (#1491) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index c28d3557a..98a5868b2 100644 --- a/build.sbt +++ b/build.sbt @@ -31,7 +31,7 @@ val jcTools_Version = "3.3.0" val reactiveStreams_Version = "1.0.3" val minitest_Version = "2.9.6" val implicitBox_Version = "0.3.4" -val kindProjector_Version = "0.13.0" +val kindProjector_Version = "0.13.2" val betterMonadicFor_Version = "0.3.1" val silencer_Version = "1.7.3" val scalaCompat_Version = "2.4.4" From 2e9dc85b9d0722129f49c37148ad0a1c26fadfb0 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sat, 4 Sep 2021 13:19:41 +0200 Subject: [PATCH 24/69] Update scalafmt-core to 3.0.2 (#1490) Co-authored-by: Alexandru Nedelcu --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index aa8cae517..2b0608e38 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "2.7.5" +version = "3.0.2" maxColumn = 120 docstrings = ScalaDoc From d6f504a62d7c2e91ffabe2329c4894882e93174f Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sat, 4 Sep 2021 14:02:28 +0200 Subject: [PATCH 25/69] Update scala3-library, ... to 3.0.2 (#1489) Co-authored-by: Alexandru Nedelcu --- .github/workflows/build.yml | 8 ++++---- monix-java/src/main/scala/monix/java8/eval/package.scala | 4 ++-- .../src/main/scala/monix/java8/execution/package.scala | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf0681386..a11c936fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: java: [ 8, 11 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.12.13, 2.13.5, 3.0.0 ] + scala: [ 2.12.13, 2.13.5, 3.0.2 ] env: CI: true @@ -65,7 +65,7 @@ jobs: include: - { java: 8, scala: 2.12.13 } - { java: 8, scala: 2.13.5 } - - { java: 8, scala: 3.0.0 } + - { java: 8, scala: 3.0.2 } env: CI: true @@ -117,7 +117,7 @@ jobs: include: - { java: 8, scala: 2.12.13 } - { java: 8, scala: 2.13.5 } - - { java: 8, scala: 3.0.0 } + - { java: 8, scala: 3.0.2 } steps: - uses: actions/checkout@v2 @@ -160,7 +160,7 @@ jobs: include: - { java: 8, scala: 2.13.5 } # TODO: enable this after it works! - # - { java: 8, scala: 3.0.0 } + # - { java: 8, scala: 3.0.2 } steps: - uses: actions/checkout@v2 diff --git a/monix-java/src/main/scala/monix/java8/eval/package.scala b/monix-java/src/main/scala/monix/java8/eval/package.scala index 848e3639b..bd89c7dfa 100644 --- a/monix-java/src/main/scala/monix/java8/eval/package.scala +++ b/monix-java/src/main/scala/monix/java8/eval/package.scala @@ -34,7 +34,7 @@ package object eval { /** * DEPRECATED — switch to Scala 2.12+ and [[monix.eval.Task.from Task.from]]. */ - @deprecated("Switch to Scala 2.12+ and Task.from", "3.0.0") + @deprecated("Switch to Scala 2.12+ and Task.from", "3.0.2") def fromCompletableFuture[A](cf: CompletableFuture[A]): Task[A] = { // $COVERAGE-OFF$ convert(cf) @@ -44,7 +44,7 @@ package object eval { /** * DEPRECATED — switch to Scala 2.12+ and [[monix.eval.Task.from Task.from]]. */ - @deprecated("Switch to Scala 2.12+ and Task.from", "3.0.0") + @deprecated("Switch to Scala 2.12+ and Task.from", "3.0.2") def deferCompletableFutureAction[A](f: Scheduler => CompletableFuture[A]): Task[A] = { // $COVERAGE-OFF$ Task.deferAction { sc => diff --git a/monix-java/src/main/scala/monix/java8/execution/package.scala b/monix-java/src/main/scala/monix/java8/execution/package.scala index 0699d4dd6..a8fd2da0b 100644 --- a/monix-java/src/main/scala/monix/java8/execution/package.scala +++ b/monix-java/src/main/scala/monix/java8/execution/package.scala @@ -36,7 +36,7 @@ package object execution { * DEPRECATED — switch to Scala 2.12+ and * [[monix.execution.CancelableFuture.fromJavaCompletable CancelableFuture.fromJavaCompletable]]. */ - @deprecated("Switch to Scala 2.12+ and CancelableFuture.fromJavaCompletable", "3.0.0") + @deprecated("Switch to Scala 2.12+ and CancelableFuture.fromJavaCompletable", "3.0.2") def asScala(implicit ec: ExecutionContext): CancelableFuture[A] = { // $COVERAGE-OFF$ CancelableFuture.async(cb => { @@ -69,7 +69,7 @@ package object execution { * DEPRECATED — switch to Scala 2.12+ and * [[monix.execution.FutureUtils.toJavaCompletable FutureUtils.toJavaCompletable]]. */ - @deprecated("Switch to Scala 2.12+ and FutureUtils.toJavaCompletable", "3.0.0") + @deprecated("Switch to Scala 2.12+ and FutureUtils.toJavaCompletable", "3.0.2") def asJava(implicit ec: ExecutionContext): CompletableFuture[A] = { // $COVERAGE-OFF$ val cf = new CompletableFuture[A]() From 4823272430ed9cc80e86db592ee9567ae118b6b3 Mon Sep 17 00:00:00 2001 From: Jorge Date: Thu, 4 Nov 2021 07:34:34 -0700 Subject: [PATCH 26/69] Adds Netflix to the list of monix adopters (#1511) When I joined, the Notebooks team started to use Monix and all the backend systems for our next-generation tooling uses Monix. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8916e8d1c..b438e3196 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ Submit a PR ❤️ - [Eloquentix](http://eloquentix.com/) - [Hypefactors](https://www.hypefactors.com) - [Iterators](https://www.iteratorshq.com) +- [Netflix](https://netflix.com) - [Sony Electronics](https://www.sony.com) - [Tinkoff](https://tinkoff.ru) - [Zalando](https://www.zalando.com) From 0f5bbde05c5b5522339c8d53de6b8179f938245a Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Thu, 4 Nov 2021 22:50:16 +0100 Subject: [PATCH 27/69] Update scala-collection-compat to 2.5.0 (#1470) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Piotr Gawryś --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 98a5868b2..9f1a0bc91 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,7 @@ val implicitBox_Version = "0.3.4" val kindProjector_Version = "0.13.2" val betterMonadicFor_Version = "0.3.1" val silencer_Version = "1.7.3" -val scalaCompat_Version = "2.4.4" +val scalaCompat_Version = "2.5.0" // The Monix version with which we must keep binary compatibility. // https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin From 09ad30644fc4aa6081dce96976ee4c4e29666015 Mon Sep 17 00:00:00 2001 From: Roman Janusz Date: Fri, 26 Nov 2021 11:57:35 +0100 Subject: [PATCH 28/69] Add AVSystem to list of adopters (#1516) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b438e3196..62feb280a 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ Submit a PR ❤️ - [Abacus](https://abacusfi.com) - [Agoda](https://www.agoda.com) +- [AVSystem](https://www.avsystem.com) - [commercetools](https://commercetools.com) - [Coya](https://www.coya.com/) - [E.ON Connecting Energies](https://www.eon.com/) From 1e439b542753c0a7e8298a9424a0792b79626296 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 7 May 2022 21:51:04 +0300 Subject: [PATCH 29/69] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea27d6445..28be5177f 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ a project exemplifying Monix used both on the server and on the client. For the stable release (compatible with Cats, and Cats-Effect 2.x): ```scala -libraryDependencies += "io.monix" %% "monix" % "3.4.0" +libraryDependencies += "io.monix" %% "monix" % "3.4.1" ``` ### Sub-projects From aab517310d0c090bfaeac89dfd948c0a5543464b Mon Sep 17 00:00:00 2001 From: Gabriele Petronella Date: Wed, 10 Nov 2021 17:31:19 +0100 Subject: [PATCH 30/69] Only include JCTools in executionShadedJCTools (#1514) Currently JCTools accidentally brings in scala-collection-compat, this change makes sure that only JCTools is included and nothing else) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9f1a0bc91..facfb1941 100644 --- a/build.sbt +++ b/build.sbt @@ -536,7 +536,7 @@ lazy val executionShadedJCTools = project.in(file("monix-execution/shaded/jctool .settings(assemblyShadeSettings) .settings( description := "Monix Execution Shaded JCTools is a shaded version of JCTools library. See: https://github.com/JCTools/JCTools", - libraryDependencies += jcToolsLib % "optional;provided", + libraryDependencies := Seq(jcToolsLib % "optional;provided"), // https://github.com/sbt/sbt-assembly#shading assembly / assemblyShadeRules := Seq( ShadeRule.rename("org.jctools.**" -> "monix.execution.internal.jctools.@1") From 82fa8f6a2b4c1ae0fb6c49ae2c08f7df9a269768 Mon Sep 17 00:00:00 2001 From: Roman Janusz Date: Wed, 13 Apr 2022 09:15:05 +0200 Subject: [PATCH 31/69] Trampoline.trampolineContext no longer ignores its parent BlockContext (#1544) --- .../execution/schedulers/TrampolineExecutionContext.scala | 4 ++-- .../main/scala/monix/execution/internal/Trampoline.scala | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index 36e0e40b2..907d65879 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -127,7 +127,7 @@ object TrampolineExecutionContext { private final class JVMOptimalTrampoline extends Trampoline { override def startLoop(runnable: Runnable, ec: ExecutionContext): Unit = { val parentContext = localContext.get() - localContext.set(trampolineContext(ec)) + localContext.set(trampolineContext(parentContext, ec)) try { super.startLoop(runnable, ec) } finally { @@ -138,7 +138,7 @@ object TrampolineExecutionContext { private class JVMNormalTrampoline extends Trampoline { override def startLoop(runnable: Runnable, ec: ExecutionContext): Unit = { - BlockContext.withBlockContext(trampolineContext(ec)) { + BlockContext.withBlockContext(trampolineContext(BlockContext.current, ec)) { super.startLoop(runnable, ec) } } diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala index d93655b40..0e2ace1df 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala @@ -75,13 +75,17 @@ private[execution] class Trampoline { if (next ne null) immediateLoop(next, ec) } - protected final def trampolineContext(ec: ExecutionContext): BlockContext = + protected final def trampolineContext(parentContext: BlockContext, ec: ExecutionContext): BlockContext = new BlockContext { def blockOn[T](thunk: => T)(implicit permission: CanAwait): T = { // In case of blocking, execute all scheduled local tasks on // a separate thread, otherwise we could end up with a dead-lock forkTheRest(ec) - thunk + if (parentContext ne null) { + parentContext.blockOn(thunk) + } else { + thunk + } } } } From 23f2276f57c6c5253a81a3ff23ccb1d0976792d0 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 7 May 2022 09:40:40 +0300 Subject: [PATCH 32/69] Update dependencies (#1554) --- .github/workflows/build.yml | 18 ++++++------ build.sbt | 28 ++++++++++--------- .../monix/catnap/CircuitBreakerSuite.scala | 4 +-- .../scala/monix/catnap/SemaphoreSuite.scala | 2 +- .../eval/CoevalLikeConversionsSuite.scala | 2 +- .../monix/eval/TaskConversionsSuite.scala | 2 +- .../monix/eval/TaskLikeConversionsSuite.scala | 2 +- .../ObservableLikeConversionsSuite.scala | 2 +- .../IterantToReactivePublisherSuite.scala | 2 +- project/plugins.sbt | 24 ++++++++-------- 10 files changed, 44 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a11c936fd..ef0099df0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: java: [ 8, 11 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.12.13, 2.13.5, 3.0.2 ] + scala: [ 2.12.15, 2.13.8, 3.1.2 ] env: CI: true @@ -63,9 +63,9 @@ jobs: # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it include: - - { java: 8, scala: 2.12.13 } - - { java: 8, scala: 2.13.5 } - - { java: 8, scala: 3.0.2 } + - { java: 8, scala: 2.12.15 } + - { java: 8, scala: 2.13.8 } + - { java: 8, scala: 3.1.2 } env: CI: true @@ -115,9 +115,9 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.12.13 } - - { java: 8, scala: 2.13.5 } - - { java: 8, scala: 3.0.2 } + - { java: 8, scala: 2.12.15 } + - { java: 8, scala: 2.13.8 } + - { java: 8, scala: 3.1.2 } steps: - uses: actions/checkout@v2 @@ -158,9 +158,9 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.13.5 } + - { java: 8, scala: 2.13.8 } # TODO: enable this after it works! - # - { java: 8, scala: 3.0.2 } + # - { java: 8, scala: 3.1.2 } steps: - uses: actions/checkout@v2 diff --git a/build.sbt b/build.sbt index facfb1941..31c757ae5 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,6 @@ import sbt.{Def, Global, Tags} import scala.collection.immutable.SortedSet import MonixBuildUtils._ - val benchmarkProjects = List( "benchmarksPrev", "benchmarksNext" @@ -24,17 +23,17 @@ addCommandAlias("ci-release", ";+publishSigned ;sonatypeBundleRelease") // ------------------------------------------------------------------------------------------------ // Dependencies - Versions -val cats_Version = "2.6.1" -val catsEffect_Version = "2.5.1" -val fs2_Version = "2.4.4" +val cats_Version = "2.7.0" +val catsEffect_Version = "2.5.4" +val fs2_Version = "2.5.11" val jcTools_Version = "3.3.0" val reactiveStreams_Version = "1.0.3" val minitest_Version = "2.9.6" val implicitBox_Version = "0.3.4" val kindProjector_Version = "0.13.2" val betterMonadicFor_Version = "0.3.1" -val silencer_Version = "1.7.3" -val scalaCompat_Version = "2.5.0" +val silencer_Version = "1.7.8" +val scalaCompat_Version = "2.7.0" // The Monix version with which we must keep binary compatibility. // https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin @@ -185,7 +184,7 @@ lazy val sharedSettings = pgpSettings ++ Seq( ), // Turning off fatal warnings for doc generation - Compile / doc / scalacOptions ~= filterConsoleScalacOptions, + Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude, // Silence everything in auto-generated files scalacOptions ++= { if (isDotty.value) @@ -322,10 +321,9 @@ lazy val doNotPublishArtifactSettings = Seq( ) lazy val assemblyShadeSettings = Seq( - assembly / assemblyOption := (assembly / assemblyOption).value.copy( - includeScala = false, - includeBin = false - ), + assembly / assemblyOption := (assembly / assemblyOption).value + .withIncludeScala(false) + .withIncludeBin(false), // for some weird reason the "assembly" task runs tests by default assembly / test := {}, // prevent cyclic task dependencies, see https://github.com/sbt/sbt-assembly/issues/365 @@ -367,14 +365,18 @@ lazy val unidocSettings = Seq( lazy val sharedJSSettings = Seq( coverageExcludedFiles := ".*", - // Use globally accessible (rather than local) source paths in JS source maps scalacOptions ++= { if (isDotty.value) Seq() else { val l = (LocalRootProject / baseDirectory).value.toURI.toString val g = s"https://raw.githubusercontent.com/monix/monix/${gitHubTreeTagOrHash.value}/" - Seq(s"-P:scalajs:mapSourceURI:$l->$g") + Seq( + // Use globally accessible (rather than local) source paths in JS source maps + s"-P:scalajs:mapSourceURI:$l->$g", + // Silence ExecutionContext.global warning + "-P:scalajs:nowarnGlobalExecutionContext", + ) } } ) diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala index 3f53a1e87..538a57e3a 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala @@ -97,7 +97,7 @@ object CircuitBreakerSuite extends TestSuite[TestScheduler] { .unsafeRunSync() def loop(n: Int, acc: Int): IO[Int] = - IO.shift *> IO.suspend { + IO.shift *> IO.defer { if (n > 0) circuitBreaker.protect(loop(n - 1, acc + 1)) else @@ -138,7 +138,7 @@ object CircuitBreakerSuite extends TestSuite[TestScheduler] { .unsafeRunSync() def loop(n: Int, acc: Int): IO[Int] = - IO.suspend { + IO.defer { if (n > 0) circuitBreaker.protect(loop(n - 1, acc + 1)) else diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala index c8cc89dc2..b8105d442 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala @@ -160,7 +160,7 @@ object SemaphoreSuite extends TestSuite[TestScheduler] { val count = if (Platform.isJVM) 10000 else 50 val allReleased = Promise[Unit]() - val task = semaphore.withPermit(IO.suspend { + val task = semaphore.withPermit(IO.defer { allReleased.completeWith(semaphore.awaitAvailable(available).unsafeToFuture()) val futures = for (i <- 0 until count) yield { diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala index 7e8a7340b..6caa60830 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala @@ -65,7 +65,7 @@ object CoevalLikeConversionsSuite extends SimpleTestSuite { test("Coeval.from(SyncIO) for errors") { var effect = false val dummy = DummyException("dummy") - val source = SyncIO.suspend[Int] { effect = true; SyncIO.raiseError(dummy) } + val source = SyncIO.defer[Int] { effect = true; SyncIO.raiseError(dummy) } val conv = Coeval.from(source) assert(!effect) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala index d812d30d2..ea57f335a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala @@ -433,7 +433,7 @@ object TaskConversionsSuite extends BaseTestSuite { override def asyncF[A](k: ((Either[Throwable, A]) => Unit) => CIO[Unit]): CIO[A] = CIO(IO.asyncF(cb => k(cb).io)) override def suspend[A](thunk: => CIO[A]): CIO[A] = - CIO(IO.suspend(thunk.io)) + CIO(IO.defer(thunk.io)) override def flatMap[A, B](fa: CIO[A])(f: (A) => CIO[B]): CIO[B] = CIO(fa.io.flatMap(a => f(a).io)) override def tailRecM[A, B](a: A)(f: (A) => CIO[Either[A, B]]): CIO[B] = diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala index 13a121629..1d67dcc00 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala @@ -154,7 +154,7 @@ object TaskLikeConversionsSuite extends BaseTestSuite { test("Task.from(SyncIO) for errors") { implicit s => var effect = false val dummy = DummyException("dummy") - val source = SyncIO.suspend[Int] { effect = true; SyncIO.raiseError(dummy) } + val source = SyncIO.defer[Int] { effect = true; SyncIO.raiseError(dummy) } val conv = Task.from(source) assert(!effect) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala index 18169a500..7b667a9d4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala @@ -179,7 +179,7 @@ object ObservableLikeConversionsSuite extends BaseTestSuite { test("Observable.from(SyncIO) for errors") { implicit s => var effect = false val dummy = DummyException("dummy") - val source = SyncIO.suspend[Int] { effect = true; SyncIO.raiseError(dummy) } + val source = SyncIO.defer[Int] { effect = true; SyncIO.raiseError(dummy) } val conv = Observable.from(source) assert(!effect) diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala index 78b248312..e575f2bff 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala @@ -378,7 +378,7 @@ object IterantToReactivePublisherSuite extends BaseTestSuite { def asyncF[A](k: ((Either[Throwable, A]) => Unit) => IO[Unit]): IO[A] = IO.asyncF(k) def suspend[A](thunk: => IO[A]): IO[A] = - IO.suspend(thunk) + IO.defer(thunk) def flatMap[A, B](fa: IO[A])(f: (A) => IO[B]): IO[B] = fa.flatMap(f) def tailRecM[A, B](a: A)(f: (A) => IO[Either[A, B]]): IO[B] = diff --git a/project/plugins.sbt b/project/plugins.sbt index c027fc53b..87a949525 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,15 +1,15 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.9.1") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") -addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.9") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.0") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") -addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.25") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") +addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") +addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.30") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") +addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.12") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") From 38f2ce41096c8331e20ec309a800a03a4f15b268 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 7 May 2022 10:56:59 +0300 Subject: [PATCH 33/69] Change PGP key --- .github/env/pgp-secret | 1 + .github/scripts/setup-pgp | 17 +++++------------ .github/workflows/backport.yml | 16 ---------------- .github/workflows/build.yml | 2 -- .github/workflows/manual-publish.yml | 2 -- 5 files changed, 6 insertions(+), 32 deletions(-) create mode 100644 .github/env/pgp-secret delete mode 100644 .github/workflows/backport.yml diff --git a/.github/env/pgp-secret b/.github/env/pgp-secret new file mode 100644 index 000000000..e82dfe1d0 --- /dev/null +++ b/.github/env/pgp-secret @@ -0,0 +1 @@ +LS0tLS1CRUdJTiBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQoKbFFXR0JHSjJJVXdCREFETHJKU0VvUlMxRmJoQ09FNkRvNDh4OEZhSDhwTzNadmdpdDJiUXRYQy9ueEI3eTNrMApzdVF0bUZ4eHRkQTRFQjFSa2piQ3RqWkw1c0EvM3V6UzFKUmdjQzE1TExwUUNXeDA5UklEc0NFbjBvWnEweVllCllGWXVCNmpHcWFQcFJrV2hVZG95N0VWZjUzZDZ1Y2duTEhtREp5STFFVnQ5WmhLZmhKSFR0a2JKcWpVOVdFcXMKV3BxMzJVZm1FdlVSbEp6N2R6QTl0UHhycGVpQUc2QmF5b3NpSmZENVFOVGpJRFNueXFOUEhsN1NycmF0TEFSdwo1MWF1QXJleW9Td0ZRamZHRTBYczYxVjI4TkpOQmJOMmQ0M0c0Y1BHalJ4cDY0MGpHRzZXalJlQVRaUUg1SHJhCkxXeHhhcVNWRUV6OUtzMW9LYjhLRks5NXpJV0QxTmtsdHRjSFpOT2VmWG1McjVaeHJBclRlU2NwcXBKaUZxZWYKbHhyRjNVVUZuSm1FZjc5OFA4OWpyRFRYQjBMVXNZMGwzVEtndExIKy9yQTFibHRqbFFTQ1hyODZ2QVVWTVkyZAo4Um9tbmhjUng0QnBPcXpQcUhQZlFuZW82anlOUGNkMys1VnBXbmJXNTVIYjZ0SWM0NmJGMUI4b09HMy9ISVVyClRzbC93RENldk9RNGNBRUFFUUVBQWY0SEF3TEZqQ0JDT0NKUTN1c3hiSGhQQUhIWEhRUnFVNUR1aEdRUEtGSHYKQnhoK1h6ZXo2R3pJV3BzeG1oYURwcUpSSmplSGwrWlBpeXA5VkRvOGVMVkhIZGFEQ1RRQ0t5OHp1L3FtMXpTVApQS3d0dWVReVR5L2g1Q2Evei96YTVjVXVxdjZYYXZqT2puY1ZSdi9LQkUzVk92bWg4Um83KythQ3dVSjF1OWNxCkpLZ3BsWmd2cC9iNWYrUzEraVB6d284amdlYURTa2dRK2l3NEN1YzFDZHhwZ2N5anZneHVkaW94aURQZFhyb1MKOFVhWGxERi9OazkxNFhXZGg0OW5CRXdzV28zRUs4UUxGTFJxaHZOdVowK2VjVFd6N1A5Rk4rYnZKSXNxdjFTbApmenFNd2U2cDRsanc3eWZqRWFUWFFDdnhkS2xKdnBMWEVpZWdzSmdqc3lld1NTMnYxa1Y1N0ZLTGF2MTBqNEtqClFuYjlaakN5ZVB5VXdZeTg0ZTYybjhyVGdnTDY4czNScmlBWk1BUU4zMWZKWWRWODc5SWdabVllRWNtUThTUkYKRGtpUmZ0ZUFRRk5XVWtVOUdITXQweXFHbzNhSnF4ajVZSHl2MDFJTWh6MHM0eFZjTStxSWdiRHZ1MlE4blVmZQo1d1NSa0pwTnNVbVAyY3BZTXJTdnQ3VTIvK0dOUTVSZTV6cGdJbFBWRWdiUzFqTjlvR1BnOGhMUk1jamxBKzV1CmZCcjlDZktYVFZzSFQrSDF3SXRWWmtJU0hldlQ5Vlo1QlRQQVlIVEFkS284T2RvdGU4OW8zMURTZ3lITWNJZ2QKTFY0a0Y1UC94aUQ5SXIyR1RNTWFTd3lOR3g1bUZzUEpYWGw5WTRnZmY1UWdCa00vb2IvU1Z6MTFKNjJaV29xagpVWWl2RDFYakdnYjEyYy9SSW9DeElFcGJiYXBjOVcxK20xVXBJWnArNXVObDNNeVVpSFlna1FFR1phQUN5bTd3Cmxxdi9hTGRReEdFd1pCUmlXSnoyKzVMMlU4dENERWRLRzR2VXhvSHNnS2s2dFNmTW9PU2cxa1pVaWgvQ3Jwd0IKclAvVURWMmhLOE4vaDVBQ1RCeVJMdldFQlZoMnBJSHc5MFlpRzZQK0VOUjN4ZzZtWWNWZHUyaVgvazhFT2hDdQpWOU5JWDNrKzQxakxHeHdUcS9XRE1lYXAreFArNkZZTmJIYU13a29mL2ZPZE9WQktTS3lDUW04NEhlRS9JWkRwCmVFSnZYVXJiTyt1dUhFVmFjRnpWK2xDRkovYWd3ZFVCd2U1R1lQRkY4bzlVV2hTZ0tFc2JqKzdvSFZCYkJCMFMKeDgxZGZqVmYxa2ZkQ3IwY3E5cDdOTmZBRXlSTzBMWiszUkdFRGNsbVhqSUdnWlZVRTJ2MzkwMjlURGZSZi9lZgo1WERsalpjZENGNEJkcGtxUDArVlBvZHN4R2ozTmRNMEVTNmtPOUhKYnJEcVFhblJWYnBRbTZHbURQbHdMZml2CjdXM0U5NjJKN3R5cVdrdjVXMHBQR3Q5TkFIYWl3RmU4bDFmTlplcGxBaEx4akVjRmpCRVZlSlE4SCtKR1hBMncKVWs2Q0NIT1hkY3F5ZW1DV3RZSm9nRDQ5V0o1SVdhY2N6aVRQSnZycEtjYW1ud0pjd1FWdjNnV0NudnRVSjVFcwp0ZkhJWjNvNHhERWg4d25BcitaMVdlZ3JCd2NhaGU4dUh2ZXZjbWVucGxaclJXUUMvbDNtWmFVWTFJb2lvcE1jCnRQZEFKVU5mTkpHRDB6aXhBSUNDdVkzSUxHaXZRaUdZbnJRa1RXOXVhWGdnVFdGcGJuUmhhVzVsY25NZ1BHTnYKYm5SaFkzUkFiVzl1YVhndWFXOCtpUUhVQkJNQkNBQStGaUVFS0RmNlhFdW1hU3EzSDJBSjgzWnU5VDV3RmJrRgpBbUoySVV3Q0d3TUZDUVBDWndBRkN3a0lCd0lHRlFvSkNBc0NCQllDQXdFQ0hnRUNGNEFBQ2drUTgzWnU5VDV3CkZibkp6UXdBclczditRT0Zqai96NE5zcWtpNkhHNWR3TVF1OEp2WUlQVVg1bHk5SWx3elM3STFyb29sRU96MmYKZzlSSXUrSnBrYWJjUmhSNUdiZGNhMzExRGFyVVdIdW9pQm40SkV6ZkxuNG4vVDhmZk9yTDRQbmJ6UndvcTdFUgpmOVF2UWxtcXN6N0xFZ2Z5UURYbGNvcVk1RndUOEExd0tTcnliRE1MUHVXRmd0eCszb2hacWIxejdJTXgrUnc0Cnh4NGdVNmJsb09YbDJ3TDNGSGtJdVJLT21nRWNUVjJzYkNtYjFzNTZzODBLcjV0R29LcCsxbml4Qkl5YlhjN0EKWVBpc0hCZGxXWE93cTdzS0pacG1XQkNMRHl3L2xCV0pVSjFCZUhHQ0hlMDU0a0xKWWNmTEdaUWNtLzBYR3VMTgo4bjB0UFRyeXJIOUpWNFdPNHlkRUxtMUQzZTZUQlovSGhOcHZ6OWdUNHp1NmNldXU5ajJsNmlMSGFybmo2ZC9vCm5ZZmZqZmhOdy9OcjhPZDFIK1RWZEdWREhQVHZITFpkazk3RHp0dk9jYUtlVHNLN3k2Z3owQlhBcXpDcGRVMEYKMmsyR3pERmd3M1hHc0lWeDZTTWRnQWpYUUxpY0RBTmM0SDgzTGxLQngydHl1OEhNMTNheXBRQ1NVWCtUSnM5cwpoczlwRDdMc25RV0dCR0oySVV3QkRBREtpWmZuVjVKMndWRDJyWnkyS3lOTXZmU1E2Y2FNdFV2aDkxRkRhRlMwCmdKVGUrT2VOMXFpcWIrcHdGK0dFQlRlL0tGVFhrUTJKd3FzK0xHZUx4VzllSFRZaVAzUDJyV1czSnRidTluK0gKVWkrYnZWMnFBVC9WMXRxVjcvbURlbFpxRE0rMGJqMUxiZlE5MGdqVDRPVVdxRm1SYlpTb0xMbm05YVowbm91QQpkeE1RUkZLd0pJYXRCVUZRai9SMkY5SUZWVnlhY2UrclVqZmREOUJac1B4dUFQcnRCb21MSVRXTTRiQVNDT0ZICmN2RE9YdEd4d1grU3JxV0NjUnRTblc1dGZjbVRqU3lDTlNtdERjelU2MjNVSUFtMloyaTRJcTdnb3ZFZHBCUmUKeExrb0RHZFBQWGJGWDNUbktjbmhzcnJEdFJXMU02YklZMmw5Z1JpMjBBMk8weko2MmN1clNhRUIzLytDZzFLTApyMjBnVDNPd0E3VzhBMW9ZZHpEdjROZXRHME85cFVQNEpRQ09aVWtVZDVvS3FkOVdWM3IvTXZpbEUxdmVGTUdzCk84RG5uUDlXN2liOGpzR0lmclJXRklyck1TaE1tNEhkRmMyN0EzVWMwbW94WmFTOEdJZVVvMysyRTBLZ2UxZnYKYXVvaElUTTk5cWpHb1lBaUZUNDBqVjhBRVFFQUFmNEhBd0xtdGJMdmpacitST3NLcExtQ3R2K05OQjRlK3NvSQprVm1IYzNQeEtHYnpNVXdmNjJJU0Z5cEwxQ0tqaFlWZ3orbjJ0bHltVU5EWW9lckxsSytzQ0lpT0l6SnJsMnlWClhNeHRTd2RldnhRMXUybnV6WXZTVFBZTU5ocm8zVEhTRTY5K1FlTXZEd3RqbjRKcFpNZUd4dEVMUFY2UHZJVS8KNk14WWp2NHFib0JTekZ1ZllURm0vWFpHRjRsME5MM3VIREQrczh3LzNIZjNpYmJjOGpHZnRva3p5L0VLcmhwKwp4cEROUjlRWCtoTmQ3NVUrVEUzbW0yelRoSklFUVFPbG1obzJKaDdGdWlySWc5Q3dNM2x1Z0tSMmxUQXZIQjkrClkvNFQyNS9RdHBJTWszZTYzdGdJaXltcjlURGFLcWxEK0xMYjFWdkxGVTlJWko0cXpialVJNk44NlczSm14ZXgKMUt5d1ZBeWtYOVd2YzFDNjBybXk0anVUY0FJRmZNN0FZeHlpbG9rWENsSVQ3dDJzM0d3VVdmcEU1SmFGUnUyeApYRTZob25QdU9nRzNaYkhHcTg5R0hRd2Y4WWZWNHlCQ0NZOWo2ejFKdU9iVjhneWpTVHNvdTVMY3F1N1cwVmxjCno0empPWnEybmFRUTd1WE9iRXBMRUpuT3luY2RWcEVMVTRzcVVpQitsU3NGdFE4SEYrb0crWi9EZHViNndpR2sKSWJRakc4SkdtbVg3OHpvcXRxM05kZjVsNkZVNGhVbmNXOVhBdGNOWmtuaXJVdlI0VGZWN0wyZG5JeVdzbS8yQQpaTmNKZTVkeGhXSDFwekx6MlJ5QXY0QW9VOS80ZmJVN2hMTE1XOVUzNUhsNmkyd2hyVER5b2JkUExoVDdlNXIrCmkyU0tOTHcvcHBISjVRMnJQVDB5OXdkcnhiUiszM090dTlodDY1REFoWXdZOStPWGJlbzdUajdPMnZISHBrNDgKNHBhL3ZaNzh0dXdRUjVXdGpldU1OTkpIalF4Vk1vUklOaTh0TzZaTjRPU1NIUzJFWUZ5Q0JTdVM2VW1QR1NZMgplVkdPSlgzL1g2U092Sk1VU0lqNjRCdzd1bmE1UUtGWXZuWTVnaHVPQitFUk5NNXFLYUk0clQrY1ZQbWtzblF1ClAwZ25qc1RGdnBRdk43OGsxQ3NuNmYzZHhEaGdhVlZCbkVvenUrSVFqWFlBQXZJQzZTOEN4WFg2dkdac21CTC8KdDFNVk1SdTB2dmcva1d3OG1STm8yNzUxZEtMYUlDSmxGdWY0SkVNN1g3eVhUU3JRUGtWbWFRcmR3UEgzSkdNaAowZDRpRzduQUFpU0VJOFJpRVlhVENDK2MvKzJJZ2RITmpHQWxJaGZ2U1MyVGwvOTRVb3h1bzYyUnhZanJCQnpDClNidTJjY1lyZmRZZTNac1pxb25rY3FXeVNuVW42Ky9vQXlybE80YW0zYzFacXRHdGxaMnRtbEowd3ZOU05kL3UKeE1jQ1g3S3JHU3l2Y3g3SGtVOWpqd3JpQU5zOTlZME4zWFJKcktRS1lNWTFPa01YYmViWm9obDVHRW9FOGFybwpGWXhCMEg5OG9OTUJQWmdvRXpXT3pCSXNUNnlPL1B4cEV2WHVUS0JTdGc2N3FjT3oxTU1kai9TTk00dEk1czY0Cmc5VSsrNnFkcEl1dDJ5RTd6dE9CT1N3Sm5Va1U5eDhLZEgvUkNPRGdxU3E2RURjNWJObENyaVFTazVyYlcrZTUKMDE2dlNqVUZpQlVtMUF5R1JISkF1SzlQSTVKVDlwOHR1V2l6cm5TbWJZa0J2QVFZQVFnQUpoWWhCQ2czK2x4TApwbWtxdHg5Z0NmTjJidlUrY0JXNUJRSmlkaUZNQWhzTUJRa0R3bWNBQUFvSkVQTjJidlUrY0JXNWNTQUwvMUtmCk93UnExaUl4SEhHUmRzV3JoaUUwSVJKbndoZi9INlY4YkN3a20rekJIcmM5QXVqNXF0aHF4U1M0cSt2YVUrdlUKZVZQMnpBenRoeXJPaFpEZVpERm56aFQ0UEhLMkhmOUR3WXdkcDl5SXZvd1BzYlV4K1UwZEwyb0lwMEI1VG1GQgoxWGdQY3U4blBGd25hZW9FVmxTUW9OVi9aa3hhU1RHYUhrSVZDcmk5OFJLYmh1ZG5XdndpU1dLbWpseElNczYvCllxN1J3UHFJL3VFY0hZN3lYcnY0N1pJLzVQTUJJMUlYTHNoSmtCenR4WHVPU29vQUZTUUt2bHN5TnhEZzFGNmMKL2RiZXFsSGxueVppNzBDWVkrcWEzWE9wTm81UkM2TFpnZ1FRK3RxcTN4NEg4alVka2JpektsendmMzE5TXFTeApETk13a2MzbjV5bmwzL0FtN2ZEd041RklxYjQ1SzRzOVorYjhGcWYrZWR0K0FHQXFMeVQ0NThJUGc0VXRubnQwCmF4RklQaDVDQzZ4SkpvMnorVkplM0RIcEk1KzgxcmNKWGpZci9FOHgyYUtOMkNZL3cweGNncGFmbE1MN0wzeTgKVTM4TGNZemFscjhNT2NzQ2plbnRHU2RnaDMxbzNPNnlxRm1DcmM2QnRGeU5QVnk4ZVFXeGpKbEMzQzhaZFE9PQo9NmswRgotLS0tLUVORCBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQo= diff --git a/.github/scripts/setup-pgp b/.github/scripts/setup-pgp index 5119ba3fd..1fdf04d64 100755 --- a/.github/scripts/setup-pgp +++ b/.github/scripts/setup-pgp @@ -1,23 +1,16 @@ #!/usr/bin/env bash -if [ -z "$PGP_SECRET" ]; then - echo "ERROR: PGP_SECRET is not set!" >&2 - exit 1 +cd "$(dirname $0)/../../" || exit 1 +if ! [ -f "./.github/env/pgp-secret" ]; then + echo "ERROR: malformed project directory!" >&2 + exit 2 fi sudo apt-get update && sudo apt-get -y install gnupg2 - -echo "Creating directory ~/.gnupg" mkdir ~/.gnupg && chmod 700 ~/.gnupg - -echo "Updating ~/.gnupg/gpg.conf" echo use-agent >> ~/.gnupg/gpg.conf echo pinentry-mode loopback >> ~/.gnupg/gpg.conf echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf chmod 600 ~/.gnupg/* - -echo "Reloading agent (via gpg-connect-agent)" echo RELOADAGENT | gpg-connect-agent - -echo "Importing PGP_SECRET" -echo $PGP_SECRET | base64 --decode | gpg --import --no-tty --batch --yes +cat "./.github/env/pgp-secret" | base64 --decode | gpg --import --no-tty --batch --yes diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index 26801ebbe..000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Backport -on: - pull_request: - types: - - closed - - labeled - -jobs: - backport: - runs-on: ubuntu-18.04 - name: Backport - steps: - - name: Backport - uses: tibdex/backport@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef0099df0..c617ec3fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -221,8 +221,6 @@ jobs: - name: Install GnuPG2 run: | ./.github/scripts/setup-pgp - env: - PGP_SECRET: ${{ secrets.PGP_SECRET }} - name: .github/scripts/release run: | diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index 0a8510eea..ffb83e1dc 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -30,8 +30,6 @@ jobs: - name: Install GnuPG2 run: | ./.github/scripts/setup-pgp - env: - PGP_SECRET: ${{ secrets.PGP_SECRET }} - name: sbt ci-release run: | From b2afd335dcf61edd3e0872ebffa7299eff567a72 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 7 May 2022 19:52:25 +0300 Subject: [PATCH 34/69] Prepare for 3.4.1 --- CHANGES.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 96bfcba12..1a82057d4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,25 @@ +## Version 3.4.1 (May 7, 2022) + +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.trampolineContext` no 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) + ## Version 3.4.0 (May 14, 2021) The release is binary and source compatible with 3.x series, and was cross-built for the following Scala and ScalaJS versions: From a0d2ea69caca13d9d6268588c418595931414cfd Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 7 May 2022 21:17:43 +0300 Subject: [PATCH 35/69] Update PGP key --- .github/env/pgp-secret | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/env/pgp-secret b/.github/env/pgp-secret index e82dfe1d0..945e846ea 100644 --- a/.github/env/pgp-secret +++ b/.github/env/pgp-secret @@ -1 +1 @@ -LS0tLS1CRUdJTiBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQoKbFFXR0JHSjJJVXdCREFETHJKU0VvUlMxRmJoQ09FNkRvNDh4OEZhSDhwTzNadmdpdDJiUXRYQy9ueEI3eTNrMApzdVF0bUZ4eHRkQTRFQjFSa2piQ3RqWkw1c0EvM3V6UzFKUmdjQzE1TExwUUNXeDA5UklEc0NFbjBvWnEweVllCllGWXVCNmpHcWFQcFJrV2hVZG95N0VWZjUzZDZ1Y2duTEhtREp5STFFVnQ5WmhLZmhKSFR0a2JKcWpVOVdFcXMKV3BxMzJVZm1FdlVSbEp6N2R6QTl0UHhycGVpQUc2QmF5b3NpSmZENVFOVGpJRFNueXFOUEhsN1NycmF0TEFSdwo1MWF1QXJleW9Td0ZRamZHRTBYczYxVjI4TkpOQmJOMmQ0M0c0Y1BHalJ4cDY0MGpHRzZXalJlQVRaUUg1SHJhCkxXeHhhcVNWRUV6OUtzMW9LYjhLRks5NXpJV0QxTmtsdHRjSFpOT2VmWG1McjVaeHJBclRlU2NwcXBKaUZxZWYKbHhyRjNVVUZuSm1FZjc5OFA4OWpyRFRYQjBMVXNZMGwzVEtndExIKy9yQTFibHRqbFFTQ1hyODZ2QVVWTVkyZAo4Um9tbmhjUng0QnBPcXpQcUhQZlFuZW82anlOUGNkMys1VnBXbmJXNTVIYjZ0SWM0NmJGMUI4b09HMy9ISVVyClRzbC93RENldk9RNGNBRUFFUUVBQWY0SEF3TEZqQ0JDT0NKUTN1c3hiSGhQQUhIWEhRUnFVNUR1aEdRUEtGSHYKQnhoK1h6ZXo2R3pJV3BzeG1oYURwcUpSSmplSGwrWlBpeXA5VkRvOGVMVkhIZGFEQ1RRQ0t5OHp1L3FtMXpTVApQS3d0dWVReVR5L2g1Q2Evei96YTVjVXVxdjZYYXZqT2puY1ZSdi9LQkUzVk92bWg4Um83KythQ3dVSjF1OWNxCkpLZ3BsWmd2cC9iNWYrUzEraVB6d284amdlYURTa2dRK2l3NEN1YzFDZHhwZ2N5anZneHVkaW94aURQZFhyb1MKOFVhWGxERi9OazkxNFhXZGg0OW5CRXdzV28zRUs4UUxGTFJxaHZOdVowK2VjVFd6N1A5Rk4rYnZKSXNxdjFTbApmenFNd2U2cDRsanc3eWZqRWFUWFFDdnhkS2xKdnBMWEVpZWdzSmdqc3lld1NTMnYxa1Y1N0ZLTGF2MTBqNEtqClFuYjlaakN5ZVB5VXdZeTg0ZTYybjhyVGdnTDY4czNScmlBWk1BUU4zMWZKWWRWODc5SWdabVllRWNtUThTUkYKRGtpUmZ0ZUFRRk5XVWtVOUdITXQweXFHbzNhSnF4ajVZSHl2MDFJTWh6MHM0eFZjTStxSWdiRHZ1MlE4blVmZQo1d1NSa0pwTnNVbVAyY3BZTXJTdnQ3VTIvK0dOUTVSZTV6cGdJbFBWRWdiUzFqTjlvR1BnOGhMUk1jamxBKzV1CmZCcjlDZktYVFZzSFQrSDF3SXRWWmtJU0hldlQ5Vlo1QlRQQVlIVEFkS284T2RvdGU4OW8zMURTZ3lITWNJZ2QKTFY0a0Y1UC94aUQ5SXIyR1RNTWFTd3lOR3g1bUZzUEpYWGw5WTRnZmY1UWdCa00vb2IvU1Z6MTFKNjJaV29xagpVWWl2RDFYakdnYjEyYy9SSW9DeElFcGJiYXBjOVcxK20xVXBJWnArNXVObDNNeVVpSFlna1FFR1phQUN5bTd3Cmxxdi9hTGRReEdFd1pCUmlXSnoyKzVMMlU4dENERWRLRzR2VXhvSHNnS2s2dFNmTW9PU2cxa1pVaWgvQ3Jwd0IKclAvVURWMmhLOE4vaDVBQ1RCeVJMdldFQlZoMnBJSHc5MFlpRzZQK0VOUjN4ZzZtWWNWZHUyaVgvazhFT2hDdQpWOU5JWDNrKzQxakxHeHdUcS9XRE1lYXAreFArNkZZTmJIYU13a29mL2ZPZE9WQktTS3lDUW04NEhlRS9JWkRwCmVFSnZYVXJiTyt1dUhFVmFjRnpWK2xDRkovYWd3ZFVCd2U1R1lQRkY4bzlVV2hTZ0tFc2JqKzdvSFZCYkJCMFMKeDgxZGZqVmYxa2ZkQ3IwY3E5cDdOTmZBRXlSTzBMWiszUkdFRGNsbVhqSUdnWlZVRTJ2MzkwMjlURGZSZi9lZgo1WERsalpjZENGNEJkcGtxUDArVlBvZHN4R2ozTmRNMEVTNmtPOUhKYnJEcVFhblJWYnBRbTZHbURQbHdMZml2CjdXM0U5NjJKN3R5cVdrdjVXMHBQR3Q5TkFIYWl3RmU4bDFmTlplcGxBaEx4akVjRmpCRVZlSlE4SCtKR1hBMncKVWs2Q0NIT1hkY3F5ZW1DV3RZSm9nRDQ5V0o1SVdhY2N6aVRQSnZycEtjYW1ud0pjd1FWdjNnV0NudnRVSjVFcwp0ZkhJWjNvNHhERWg4d25BcitaMVdlZ3JCd2NhaGU4dUh2ZXZjbWVucGxaclJXUUMvbDNtWmFVWTFJb2lvcE1jCnRQZEFKVU5mTkpHRDB6aXhBSUNDdVkzSUxHaXZRaUdZbnJRa1RXOXVhWGdnVFdGcGJuUmhhVzVsY25NZ1BHTnYKYm5SaFkzUkFiVzl1YVhndWFXOCtpUUhVQkJNQkNBQStGaUVFS0RmNlhFdW1hU3EzSDJBSjgzWnU5VDV3RmJrRgpBbUoySVV3Q0d3TUZDUVBDWndBRkN3a0lCd0lHRlFvSkNBc0NCQllDQXdFQ0hnRUNGNEFBQ2drUTgzWnU5VDV3CkZibkp6UXdBclczditRT0Zqai96NE5zcWtpNkhHNWR3TVF1OEp2WUlQVVg1bHk5SWx3elM3STFyb29sRU96MmYKZzlSSXUrSnBrYWJjUmhSNUdiZGNhMzExRGFyVVdIdW9pQm40SkV6ZkxuNG4vVDhmZk9yTDRQbmJ6UndvcTdFUgpmOVF2UWxtcXN6N0xFZ2Z5UURYbGNvcVk1RndUOEExd0tTcnliRE1MUHVXRmd0eCszb2hacWIxejdJTXgrUnc0Cnh4NGdVNmJsb09YbDJ3TDNGSGtJdVJLT21nRWNUVjJzYkNtYjFzNTZzODBLcjV0R29LcCsxbml4Qkl5YlhjN0EKWVBpc0hCZGxXWE93cTdzS0pacG1XQkNMRHl3L2xCV0pVSjFCZUhHQ0hlMDU0a0xKWWNmTEdaUWNtLzBYR3VMTgo4bjB0UFRyeXJIOUpWNFdPNHlkRUxtMUQzZTZUQlovSGhOcHZ6OWdUNHp1NmNldXU5ajJsNmlMSGFybmo2ZC9vCm5ZZmZqZmhOdy9OcjhPZDFIK1RWZEdWREhQVHZITFpkazk3RHp0dk9jYUtlVHNLN3k2Z3owQlhBcXpDcGRVMEYKMmsyR3pERmd3M1hHc0lWeDZTTWRnQWpYUUxpY0RBTmM0SDgzTGxLQngydHl1OEhNMTNheXBRQ1NVWCtUSnM5cwpoczlwRDdMc25RV0dCR0oySVV3QkRBREtpWmZuVjVKMndWRDJyWnkyS3lOTXZmU1E2Y2FNdFV2aDkxRkRhRlMwCmdKVGUrT2VOMXFpcWIrcHdGK0dFQlRlL0tGVFhrUTJKd3FzK0xHZUx4VzllSFRZaVAzUDJyV1czSnRidTluK0gKVWkrYnZWMnFBVC9WMXRxVjcvbURlbFpxRE0rMGJqMUxiZlE5MGdqVDRPVVdxRm1SYlpTb0xMbm05YVowbm91QQpkeE1RUkZLd0pJYXRCVUZRai9SMkY5SUZWVnlhY2UrclVqZmREOUJac1B4dUFQcnRCb21MSVRXTTRiQVNDT0ZICmN2RE9YdEd4d1grU3JxV0NjUnRTblc1dGZjbVRqU3lDTlNtdERjelU2MjNVSUFtMloyaTRJcTdnb3ZFZHBCUmUKeExrb0RHZFBQWGJGWDNUbktjbmhzcnJEdFJXMU02YklZMmw5Z1JpMjBBMk8weko2MmN1clNhRUIzLytDZzFLTApyMjBnVDNPd0E3VzhBMW9ZZHpEdjROZXRHME85cFVQNEpRQ09aVWtVZDVvS3FkOVdWM3IvTXZpbEUxdmVGTUdzCk84RG5uUDlXN2liOGpzR0lmclJXRklyck1TaE1tNEhkRmMyN0EzVWMwbW94WmFTOEdJZVVvMysyRTBLZ2UxZnYKYXVvaElUTTk5cWpHb1lBaUZUNDBqVjhBRVFFQUFmNEhBd0xtdGJMdmpacitST3NLcExtQ3R2K05OQjRlK3NvSQprVm1IYzNQeEtHYnpNVXdmNjJJU0Z5cEwxQ0tqaFlWZ3orbjJ0bHltVU5EWW9lckxsSytzQ0lpT0l6SnJsMnlWClhNeHRTd2RldnhRMXUybnV6WXZTVFBZTU5ocm8zVEhTRTY5K1FlTXZEd3RqbjRKcFpNZUd4dEVMUFY2UHZJVS8KNk14WWp2NHFib0JTekZ1ZllURm0vWFpHRjRsME5MM3VIREQrczh3LzNIZjNpYmJjOGpHZnRva3p5L0VLcmhwKwp4cEROUjlRWCtoTmQ3NVUrVEUzbW0yelRoSklFUVFPbG1obzJKaDdGdWlySWc5Q3dNM2x1Z0tSMmxUQXZIQjkrClkvNFQyNS9RdHBJTWszZTYzdGdJaXltcjlURGFLcWxEK0xMYjFWdkxGVTlJWko0cXpialVJNk44NlczSm14ZXgKMUt5d1ZBeWtYOVd2YzFDNjBybXk0anVUY0FJRmZNN0FZeHlpbG9rWENsSVQ3dDJzM0d3VVdmcEU1SmFGUnUyeApYRTZob25QdU9nRzNaYkhHcTg5R0hRd2Y4WWZWNHlCQ0NZOWo2ejFKdU9iVjhneWpTVHNvdTVMY3F1N1cwVmxjCno0empPWnEybmFRUTd1WE9iRXBMRUpuT3luY2RWcEVMVTRzcVVpQitsU3NGdFE4SEYrb0crWi9EZHViNndpR2sKSWJRakc4SkdtbVg3OHpvcXRxM05kZjVsNkZVNGhVbmNXOVhBdGNOWmtuaXJVdlI0VGZWN0wyZG5JeVdzbS8yQQpaTmNKZTVkeGhXSDFwekx6MlJ5QXY0QW9VOS80ZmJVN2hMTE1XOVUzNUhsNmkyd2hyVER5b2JkUExoVDdlNXIrCmkyU0tOTHcvcHBISjVRMnJQVDB5OXdkcnhiUiszM090dTlodDY1REFoWXdZOStPWGJlbzdUajdPMnZISHBrNDgKNHBhL3ZaNzh0dXdRUjVXdGpldU1OTkpIalF4Vk1vUklOaTh0TzZaTjRPU1NIUzJFWUZ5Q0JTdVM2VW1QR1NZMgplVkdPSlgzL1g2U092Sk1VU0lqNjRCdzd1bmE1UUtGWXZuWTVnaHVPQitFUk5NNXFLYUk0clQrY1ZQbWtzblF1ClAwZ25qc1RGdnBRdk43OGsxQ3NuNmYzZHhEaGdhVlZCbkVvenUrSVFqWFlBQXZJQzZTOEN4WFg2dkdac21CTC8KdDFNVk1SdTB2dmcva1d3OG1STm8yNzUxZEtMYUlDSmxGdWY0SkVNN1g3eVhUU3JRUGtWbWFRcmR3UEgzSkdNaAowZDRpRzduQUFpU0VJOFJpRVlhVENDK2MvKzJJZ2RITmpHQWxJaGZ2U1MyVGwvOTRVb3h1bzYyUnhZanJCQnpDClNidTJjY1lyZmRZZTNac1pxb25rY3FXeVNuVW42Ky9vQXlybE80YW0zYzFacXRHdGxaMnRtbEowd3ZOU05kL3UKeE1jQ1g3S3JHU3l2Y3g3SGtVOWpqd3JpQU5zOTlZME4zWFJKcktRS1lNWTFPa01YYmViWm9obDVHRW9FOGFybwpGWXhCMEg5OG9OTUJQWmdvRXpXT3pCSXNUNnlPL1B4cEV2WHVUS0JTdGc2N3FjT3oxTU1kai9TTk00dEk1czY0Cmc5VSsrNnFkcEl1dDJ5RTd6dE9CT1N3Sm5Va1U5eDhLZEgvUkNPRGdxU3E2RURjNWJObENyaVFTazVyYlcrZTUKMDE2dlNqVUZpQlVtMUF5R1JISkF1SzlQSTVKVDlwOHR1V2l6cm5TbWJZa0J2QVFZQVFnQUpoWWhCQ2czK2x4TApwbWtxdHg5Z0NmTjJidlUrY0JXNUJRSmlkaUZNQWhzTUJRa0R3bWNBQUFvSkVQTjJidlUrY0JXNWNTQUwvMUtmCk93UnExaUl4SEhHUmRzV3JoaUUwSVJKbndoZi9INlY4YkN3a20rekJIcmM5QXVqNXF0aHF4U1M0cSt2YVUrdlUKZVZQMnpBenRoeXJPaFpEZVpERm56aFQ0UEhLMkhmOUR3WXdkcDl5SXZvd1BzYlV4K1UwZEwyb0lwMEI1VG1GQgoxWGdQY3U4blBGd25hZW9FVmxTUW9OVi9aa3hhU1RHYUhrSVZDcmk5OFJLYmh1ZG5XdndpU1dLbWpseElNczYvCllxN1J3UHFJL3VFY0hZN3lYcnY0N1pJLzVQTUJJMUlYTHNoSmtCenR4WHVPU29vQUZTUUt2bHN5TnhEZzFGNmMKL2RiZXFsSGxueVppNzBDWVkrcWEzWE9wTm81UkM2TFpnZ1FRK3RxcTN4NEg4alVka2JpektsendmMzE5TXFTeApETk13a2MzbjV5bmwzL0FtN2ZEd041RklxYjQ1SzRzOVorYjhGcWYrZWR0K0FHQXFMeVQ0NThJUGc0VXRubnQwCmF4RklQaDVDQzZ4SkpvMnorVkplM0RIcEk1KzgxcmNKWGpZci9FOHgyYUtOMkNZL3cweGNncGFmbE1MN0wzeTgKVTM4TGNZemFscjhNT2NzQ2plbnRHU2RnaDMxbzNPNnlxRm1DcmM2QnRGeU5QVnk4ZVFXeGpKbEMzQzhaZFE9PQo9NmswRgotLS0tLUVORCBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQo= +LS0tLS1CRUdJTiBQR1AgUFJJVkFURSBLRVkgQkxPQ0stLS0tLQoKbFFXR0JHSjJJVXdCREFETHJKU0VvUlMxRmJoQ09FNkRvNDh4OEZhSDhwTzNadmdpdDJiUXRYQy9ueEI3eTNrMApzdVF0bUZ4eHRkQTRFQjFSa2piQ3RqWkw1c0EvM3V6UzFKUmdjQzE1TExwUUNXeDA5UklEc0NFbjBvWnEweVllCllGWXVCNmpHcWFQcFJrV2hVZG95N0VWZjUzZDZ1Y2duTEhtREp5STFFVnQ5WmhLZmhKSFR0a2JKcWpVOVdFcXMKV3BxMzJVZm1FdlVSbEp6N2R6QTl0UHhycGVpQUc2QmF5b3NpSmZENVFOVGpJRFNueXFOUEhsN1NycmF0TEFSdwo1MWF1QXJleW9Td0ZRamZHRTBYczYxVjI4TkpOQmJOMmQ0M0c0Y1BHalJ4cDY0MGpHRzZXalJlQVRaUUg1SHJhCkxXeHhhcVNWRUV6OUtzMW9LYjhLRks5NXpJV0QxTmtsdHRjSFpOT2VmWG1McjVaeHJBclRlU2NwcXBKaUZxZWYKbHhyRjNVVUZuSm1FZjc5OFA4OWpyRFRYQjBMVXNZMGwzVEtndExIKy9yQTFibHRqbFFTQ1hyODZ2QVVWTVkyZAo4Um9tbmhjUng0QnBPcXpQcUhQZlFuZW82anlOUGNkMys1VnBXbmJXNTVIYjZ0SWM0NmJGMUI4b09HMy9ISVVyClRzbC93RENldk9RNGNBRUFFUUVBQWY0SEF3STRZWEVhaGxKSnZldC96dHU5enJwckROODJYcFREdXVHMHN6MTYKQkJROHlXcnpEOU5TZVpqWlZmNTkxQXJ1RG1OMm56blBTeGtCOVZJbTBFRlIzQWQ4dXN0SlZZL3docktWKzZpagpQb1ROa2hwQzNFK0IyaWR1MzI1RUlxc3g2a2JOajBGUWxEM3ZnTDA5VmdVTHQ3cEVKR2d6UjFxMERObU5vQ3FUCnZxWEFRMlFPQ0oxcEloQlVSaFR2MFVmaUFqY1ZCWjFTeWFPWUowc1hzbU5EVlZ5MzBmTm5QVEpLdzBqbnpjTHIKTm1pTzI1WlYwMXhyTjV0OUhGUHQ1anBLRml2RGM0dnpjV2RSN3EyOHNVc1Rla0d2V0ZTSUZRakxvYXBiV3g1WQpyaytqWFBXZVB0OFBsU05laEtzVStDeXIweGFqZklwdlhleUgwSDNrWGhWK0p5SDJ4anNBZ2hDT0xtRGNCc2RSCldvb0theGhKbDVUNk44YmJRUFVlZEFzRE1ySTB3b1VsQWJqdk9HZnVuN2tmUWRRV3M5T3psUnpFaStYN3UxSkoKdGZscmZOcWkvWUFlMDIxMUs3cXQ4N1RUQzdpZC8vWUFwekNMM1VHT1NReGpoemxqdEFhQ2lnZCtkRUZsUXB4SgpCVzJ0eGt3U3MyaHU1Kzg1ZUVHaTlwaTBFb3BJUVFpam5OcjhOS2ZjMUhFekdBZVlpYy9VMmhEQTZaanp1NVFXCm50aVBOV0JTU3J2elhOMkhUWTNpeFVBQS9IalZXSndwM1h3ZlBMclNYcDhBMEpsR2RUaXRSOGNWRVRLak5XSVIKVVJFQStXamJUcmVYWlIxVzArVjlBNHNHKzU1Znpaa3Z2dGtxbUh5RjgzWlBEbGNsYndCRGhHQVlGL2gzV0I4Qgo4dFRYY2RIekNkSXNndHd5aEQwQU41U3hTQ0hPQktyNERLNTJoZmltdDlsTU9TWVdwditKMXJsdlBPQVV1ZmN6CjJCNHJHWGliSWg0NEVDVHB2Zlp5U1NDZWhGY2dUb1p0ekU5TWNKaWFCTTFlbTVDN2U0SjlTOXMzaVc4YjZFQ2UKQmIxdm5BSXpJR005RXNqZittczgzS3ZQcWt2bzd4ZVcxQ244M1RJV2JMM2d4d0R2eEhOQy9EUEpBVTFNOTgwSApVZXRYNHBrQzRWanV1TDRpMnZ4K0dmclRiRytjZ0MzbjVEVGtkRTlyQ2J3UmVpa1MxOWc2YU85d2dVVURUdEM5CkJ0TlRESTBDV0hSOElYdHlRVlRLYXo4RC9RdDVwb3o3VmRRZHl3TUh6YUs2WnAwU21rcFFNT0gvdFkzUlZ6b28KSHFJMzgwb3dLU2g4QmY2Q3VrdWtqakFzaHRpczFNNUhQSERrNXljK3prVzlYTUJBL0VCcU5oSU5TQ1NodEx0Rgp0RmFqM2hnSU0vS1NTSFN3a3NyNDEzeEE3NE14T09MVllDOVdyVmFWZzJEaUF3TmhrUGs0cHNZd3A4ZEFha2pPCjRYOFJhZWhtWlRsUWMxTTJVRlg2blpVVnNETXkzNktITFE2dGx3Wkg1TFNvTU9QRkRBUUpRcDBtc1lLTXJtTWQKNW5xTmhEbkNhVWJNdWJpTDFwVUJDY2hRMlhrTVN6ZnZzcSttaE5jRWtyY2hzWTI2YWk1SExjL1JpSjh3cU1PYgpIQms3dHpLQWpOdHRUSlBEY2M5cG15NHJuSTZpNHdab1VkaDVnQkJMZVN1TlM1NVpCS1ErTzNraVJBQjFrclUyCmpoSndFQmhRenRnUDZNQ0swQ3gyQ1creDlhKytBcnNidTdRa1RXOXVhWGdnVFdGcGJuUmhhVzVsY25NZ1BHTnYKYm5SaFkzUkFiVzl1YVhndWFXOCtpUUhPQkJNQkNBQTRBaHNEQlFzSkNBY0NCaFVLQ1FnTEFnUVdBZ01CQWg0QgpBaGVBRmlFRUtEZjZYRXVtYVNxM0gyQUo4M1p1OVQ1d0Zia0ZBbUoydGswQUNna1E4M1p1OVQ1d0ZibE9XQXYvCllOcEVFWndQQUJISEFTVCtnN2F0cFdhb05xVmVrZmFPaStDMEQ5NC8xdkdrU0lETkNXWVhQd09DVFFwdlRHVjgKTEEyZ2E5cWNkajhmOTJ5eDBvNUM2c01Jc0tST2JzVlRTaC9jT1JZTk4rTm1ybTNNajgzdXBIc2pJRlYzOG1RZAp6RXhvdFBIOTVpeUtQV2VuMEpoTGhGRjJsalZCczl3M3MvZk5ITkpjNUQ2WnlCL3Aycks2MmRla3dRNVM4Zkk5CllTSm9neW1GVlBRT25vaVlKY1I3VFFrU2k3MFlwWTVjQWdQRGtHUnYxOFlVRW1RLzJrRVBWb1Ewa1hPMERNR1kKMkFQaElPVjhVWU1rU2o4N0FTaU9lMDY5eFZBRkJ6MWhJYWt0TTY1d2xTTDdkZDR3UlhUbmJwN0VxWnlvcXA1MgpNR0FiQ21LVnVJclJiRmwzU2ZmYzhpSVVhWFZrU3czZVVJZjhBOXFPNThTN3NjZW4yZHVSNy8vaUlmZGt0VzNICjNjQUhnYmhyTS9IQkd4VUlBbTlUZzUyM0p4YWdFNTBldUlwcHRIU0tyRGdEMDZDVTJaWVpkSlRKU2orMmMrMkoKWUpxUW9GZ1ZxUW8vRTN1SkE1QVYwL1F6VFdacEdyTytIbDRBV3M2bWk1TmJEa29yRGhodlZrMCtDbnlPNXd1ZgowZGkvMkwwQkVBQUJBUUFBQUFBQUFBQUFBQUFBQVAvWS8rQUFFRXBHU1VZQUFRRUFBRWdBU0FBQS8rRUFURVY0CmFXWUFBRTFOQUNvQUFBQUlBQUdIYVFBRUFBQUFBUUFBQUJvQUFBQUFBQU9nQVFBREFBQUFBUUFCQUFDZ0FnQUUKQUFBQUFRQUFBUHFnQXdBRUFBQUFBUUFBQVBvQUFBQUEvKzBBT0ZCb2IzUnZjMmh2Y0NBekxqQUFPRUpKVFFRRQpBQUFBQUFBQU9FSkpUUVFsQUFBQUFBQVExQjJNMlk4QXNnVHBnQW1ZN1BoQ2Z2L0NBQkVJQVBvQStnTUJJZ0FDCkVRRURFUUgveEFBZkFBQUJCUUVCQVFFQkFRQUFBQUFBQUFBREFnUUJCUUFHQndnSkNndi94QURERUFBQkF3TUMKQkFNRUJnUUhCZ1FJQm5NQkFnQURFUVFTSVFVeEV5SVFCa0ZSTWhSaGNTTUhnU0NSUWhXaFVqT3hKR0l3RnNGeQowVU9TTklJSTRWTkFKV01YTmZDVGM2SlFSTEtEOFNaVU5tU1VkTUpnMG9TakdIRGlKMFUzWmJOVmRhU1Z3NFh5CjAwWjJnT05IVm1hMENRb1pHaWdwS2pnNU9raEpTbGRZV1ZwbmFHbHFkM2g1ZW9hSGlJbUtrSmFYbUptYW9LV20KcDZpcHFyQzF0cmU0dWJyQXhNWEd4OGpKeXREVTFkYlgyTm5hNE9UbDV1Zm82ZXJ6OVBYMjkvajUrdi9FQUI4QgpBQU1CQVFFQkFRRUJBUUVBQUFBQUFBRUNBQU1FQlFZSENBa0tDLy9FQU1NUkFBSUNBUU1EQXdJREJRSUZBZ1FFCmh3RUFBaEVERUJJaEJDQXhRUk1GTUNJeVVSUkFCak1qWVVJVmNWSTBnVkFra2FGRHNSWUhZalZUOE5FbFlNRkUKNFhMeEY0SmpObkFtUlZTU0o2TFNDQWtLR0JrYUtDa3FOemc1T2taSFNFbEtWVlpYV0ZsYVpHVm1aMmhwYW5OMApkWFozZUhsNmdJT0VoWWFIaUltS2tKT1VsWmFYbUptYW9LT2twYWFucUttcXNMS3p0TFcydDdpNXVzREN3OFRGCnhzZkl5Y3JRMDlUVjF0ZlkyZHJnNHVQazVlYm42T25xOHZQMDlmYjMrUG42LzlzQVF3QU1EQXdNREF3VURBd1UKSFJRVUZCMG5IUjBkSFNjeEp5Y25KeWN4T3pFeE1URXhNVHM3T3pzN096czdSMGRIUjBkSFUxTlRVMU5kWFYxZApYVjFkWFYxZC85c0FRd0VPRHc4WUZoZ29GaFlvWVVJMlFtRmhZV0ZoWVdGaFlXRmhZV0ZoWVdGaFlXRmhZV0ZoCllXRmhZV0ZoWVdGaFlXRmhZV0ZoWVdGaFlXRmhZV0ZoWVdGaC85b0FEQU1CQUFJUkF4RUFBQUhsTnRXMjFiYlYKdHRXMjFiYlZzZTBaV0ZrYmI1MWxmMFkxUFA1NHp4MDIyQjIycmJhdHRxMjJyYmF0dHEyMnJiYXR0cTJsK1F5cwozaXRzOXR0RTIycmJhczJjNEdpQjBqSExTcHkwWlB0dFcyMWJiVnR0VzIxYmJWdG50TXJqcExtdVJSYVZmVGp0CnN5N2JWdHRXMjFiYlZ0dFNhMjB5dHprWDlWam8xMnlOdHRXMjFiYlZpdWUrSW91a1ZnZHRxcTZMcHVaM3kyMjAKVGJhdHNXSXRiVm9oN1lqYmF0c3FrNndHcHFhdSt3Ym05YVZtR2tiWUhiYXVnNnJsZWgyeXROdGpydHRTT1M3RApsZGN3TzJoTkZ0eVdXdzBhdVp5bmMzMGxJNjFLME51alBvMVdhdWJWaTdYZ2RVMnpJM043YnB3MUJmMEdXZ3R0CmpwdHRYUVhGTys2Y2VuMjNOdHR0VzU3b2FaMXBHeW11eWVpNEp1YlhiYXRXV2JVam1LNTdYOU9YYnZxUzc1dGQKdGdjTW1yanNVWFhocUMvb01uRnRzZE50cTZBd1NkV0hZUzJjOHUyMjBkWDJEWWpoVWJkQ2RsYWM5MFBPKzJ3TwpTclZ3alI0ejZNNzNxZUk3Zko5dGtPMjFjNHh0cW5weDFCZjBDTUxiWTZiYlYwQkJrNjhMNnpvN3ptMTIyVnRFCjZ2UEIyRmZ1bHgxL0JkN20yMnlIYmF1UXArazV2WkYraCtjOTJwZWJiTnR0cXJhRHFPWDN5MUJmMEFJdHRqcHQKdFhRRUdUcndkOU55UFc0NlR0c24yMnJsS0xxdVYxV2ZRL08rMkZaYmJOdHRxcWVONy9nTkYzWGNqMEJ1bzIyVApiYlZISWRoeSt1YmFndjZBd3R0anB0dFhRRUdUcnczVTh0MEdiV08ydzEyMnF1NGYwVHp2UmQxL0tkTXkzKzJ4CjAyMnFQUFBST0hjVjF4VDIraWRsb25EVGJhdFFYOVE2MHRCZjBEcUxiWTZiYlYwQkJrNjhOYlZMMVQwbTI1dHQKdHEzbjNvUEZzRzFxekowWTloa3E1ZDl0cTNLZFhRa2N6WnRIZlRsMVI2Nng1dGR0Z2N4ZkNJNU9ndjZEVkJiYgpIVGJhdWdJeGZkV0dJUEVkamdOK1hkL3FGczY5UHp6WWJCRzIxejZaM1Z1K2JaenFWcVIwbGRUcFlOMWJiWjI5CjF6ZlNjK3UyeVB0dFhKYzUwZk5hSWpiWnZ0dFdjdHRDOVB6ajNaTGhLRjZwdHREYmF0dHFXamF0dHEyMnJiYWkKZGJ4M1Y0Nkd5T2F5MHY4QWs2TWRURzFiYlZ0dFcyMWJiVXF5cThSMGMwRnB2bTcyenB0dFcyMWJiVnR0VzJERQp6bm5HdUdqeG50bSsyMWJiVnR0VzIxYmJWdHRXMjFiYlU2dEtHWFhvOVYyVzJhdHN5N2JWa3NxM04zakdOanB0CnNEdHRXMjFiYlZ0dFcyMWJiVnR0VzIxYmJWdHRXV2pWYXY4QW0zR3VkbFZoeU50c3JiYlZ0dFcyMWJiVnR0VzIKMWYvYUFBZ0JBUUFCQlFMK2VSQ1ZNUnBBWEErSCtxMHhxVzBSSlQ5eFNFcWE0VkovMVFFbFRSQ0IvTUxpU3BxUQpwSCtwVVFNQUQrYlhDQ3lDbi9VTUZuSksxUXBoVi9Pa0F0Y0Ivbm9vSkpqQlpSeGRyb2RYOCtwQ1Z0Y1NrL3pTCkVLa01HM2dNQUFkcm9kUCtvVnhKVTFJVW43NklTWEZHaENmdVRpc1gza29VcHB0UzFDaXZ1MHEwMjYxT2FQbG4Kc3VCOFB1cDltRTFpKzRSVWRvb3hJZmRRL2RVTVF4anZPS1NzYXE5MGZ1cVdMZUlNQUR0ZERUdXYyL3VKOW0xUApUOTJRVVc3Vlg4WSs3ZERxYTFVSU5SOXk0Rll1Ni9iKzRuMmJVOWYzYmtVa1VhQ0pXTW4zYm9kREpxYmRXVVAzCkZDcWU2L2IrNG4yWVRTVDd0MEhJZTBaeVI5eVlWalVhQjJLcXgvZFdLTDdMOXY3aWZaR2grN2Npc2FqVXUwVlcKRDdoMUV2RjJLdXY3dHdLUzlsKzM5eFBzdUUxais1TUt4ZHJCV24zYmdVbWRzckdmN3QwTmV5L2IrNG4yWGFubworNm9ZcWRrcWszM2IwVW1hVFE4ZnUzSTZPeS9iKzRuMlhhbnErN2RKeG5jS3NaZnUzNDcyNnNvZnVUQ3NmWmZ0Ci9jVDdMZ05KZnUzNCtrN0lPU2Z1WG9yQjJzVlZpKzRkZTYvYis0bjJXRFEvZHZ4MGRyUldVSDNKazVSZHJCWFYKOTJVVWthL2IrNG4yZTBSckg5eTdUbEIyc3RFZmRXTVZPejBrKzdjajZScjl2N2lmWjdXeCtqKzRzWkphUlZWcwpldjd0Mk1aM0gwZmV1aG8xKzM5eFBzOXJVNi9kbUdNc1FjUnBKOTIvSFdnVlU0aldQN2x3S3hOZnQvY1Q3UGFBCjBsKzdlcHBPa1VEQnFQdVg2Zm80aDJ0ajlIOXhZcWhyOXY3aWZaN0pORmZkdlVWWDJoTlkvdVhTY29BS0IycDEKKzZvVVV2Mi91UnlwcDNRcXNhcmlOTE55dDg2Vjh5UmxSUGUxUFNxVkNHcTZabmxMNXNqeldlOEJwTDkyNldsRQpwTlQ5MUVpa3RNaVZkcW4rWXFSL01KTkZkNUpZNGhQZnJYL05JbUlZVUZmNmhqTlVFaEluM0JxVXBaL213U0dpCmQ4ZjUvd0I5VEZITFBKTWY1OUsxSmFKVXEvbkZMU2hybFVyL0FGSWlWU1dsYVYvekJJUzF6RS82b1JNUXdRcjcKcTV3eVNmOEFWUUpTMFRBOWx5cFMxTFVyL1Z5U2NQOEFVSC8vMmdBSUFRTVJBVDhCN2pKSlJMNmhLWmRvbDlJKwplOEZFdTI5WmRsZGxJa2c2eDg2elE3UnBMd2gyalErTklhanpyTHdqVW83WWR4MEhZTlplV0haSHgyRFVvMW13CjdJYWxHcFJyTmgyUTFMZk9wVHJMd3c3QjUxUGFVYUZocWRMZHdUTFFIaDNCMzZSOGF4SFlZL1JoOUFoTWUrTWYKcEdLUnFJdGZWTVVENkgvLzJnQUlBUUlSQVQ4QjdoQWxFUUU0L3dBa2l2cGdXeGgyRUp4L2w5S1Bqdk1RVXdJNwphMXgrT3dFSHMzRHdtRnBqV3MvR3VObDRkNWJjZm5UZVcyUG5USnFmR3NQS2RZK1VwODltVHVIblNYbnNuNTFqCjRjbW9aK2V5ZXNmRFBYSDRjbW9jbXNmRFBXREx4cmpjbW9jbmpXQ1J4ckJyV0hseWFobDQxaTF4ckh5aFBuUU8KVFVIU24yeWpIb1J5KzJYMjlNbm5XWjQxdEdUOC9vNVBvQ1ZJbmZmT1YvU2pNaEVnZFpUL0FDU2IrckdhWkUvUQovOW9BQ0FFQkFBWS9BdjU3WFIwbzZvLzFacDkzVjZhLzZvb0gxZnpPditwYXFkQi9OOUxvZjlRMVBTbDRwL25xCkY5UDg5MEQ3WFU5U3V3UCtvTlg2L3dBMWlnVkx5bTErRG9PNFArb3ROSHI5K3FuOUdLZmRQMytrUHJMSSs5bzkKZEdBTy9UOTRNZmRJN2tWcFIrMC9OOE81N0FIemZ0UFU5dE93UDNEOTBNajd4SGI1L2VCN0Q0T3YzVDl3L2RESQorOTgreVZmSDcxZTZmdWtmY1AzUXg5NEYwN0JYcVB1bnVVK2grOFIzUDNRNi9lK1hjZkQ3dEhUc1Urbys4ZTUrCjZPdys2b2ZEdXBQM2xENDlrL2VCN243bzdVKzhSNmRxZW8rOVgxSFlIMGRmdTE3bjdvN0VmZVYyU2ZqOTVLdTYKVDhQdW51ZnVqc1B2QlhxTzRWNi9kK1hlbm9mdTA3bjdvN1YrOGxYb2U2Zmg5MVErSGRTZnZIc2Z1anVEOTFYZgpIN3hUNkh0WDdQdlY3SDdvNzA5UHVsUHIzcDYvZVYySDNnZXgrNk81SDNsRDR1ckIrOGxYcU80UDN6OTBkeDk3CjV1bmF2M1FyMExyMnA2ZmRJN0g3bzdnL2VRcnVQdXFkT3hIM2lHZnU0blQ3Z1U5TlhwbytMOW92VTl5SHFYMGgKOFg3VDFQY2ZlTHIvQUROUDVqVCtZQis1VlpvOFkra2ZyL211clY2ZjZoQmRWYVBHSDhYa28xUDg1VVByL3dCUQpZalZUcXMvNmcwZXVuODVyL3FiVCtZcVgwLzZvNm5VZmQ2WFUvd0NxcWg5WGIxZXYrcmovQUtoLy84UUFNeEFCCkFBTUFBZ0lDQWdJREFRRUFBQUlMQVJFQUlURkJVV0Z4Z1pHaHNjSHcwUkRoOFNBd1FGQmdjSUNRb0xEQTBPRC8KMmdBSUFRRUFBVDhoL3dEenRMQ3dUWCtncUtoei93RFMrSVo1dWp5K2Yvd0F3Ym9ZZi9wRFVNM1UyK0x4eC84QQpqMGVIemVNWjUvOEEwUUZZS2owK3FiREIvd0RsYzQzVXkrSzlESC82REQvTVA5RmEva2VmL3dBNDJHYURkbmlvCm1QOEErYkhzTzF4WVA1eDQrai9rSG1uL0FPZ2NZM3pkVXgvK1ZMUjZMQnJMdzRvSVlEby83SjRyL3dEb1dwcFcKYy9mL0FPT0p5S0hBQ1QvK0g0RHYvd0NQa3hyTmc5RjlNc2YvQUloS0JOM3NmZEZoTW4vRUVob081OVZGUThuLwpBT0g5WXZ4WFAvdys1RC91elFUZk12eFFlVlhpL3dBOXZHSC9BRDVodi9DSW9sRmgvd0RGTzl2UVQ4MGVDSHgvCno0dXgvd0RnL1ovL0FBL3JGazhWL3dEeGZKMy9BRDZSVC84QUY4ekkvd0NZTDJvRU95Zi9BTVB3RGY4QThIN1AKL3dDSDlZc0hrbi80dEh3bXlMZlJnLzhBeFNId2YrVERabjZqOGY4QTRmZGgvd0RnL1ovL0FBL3JGay91UHovKwpMOTJYaS80OVBELytHRCtwc3ovei9KQ2Yvd0FYb3QvNyt6LytIOVlxZzhLTWduZi9BT0hSOHBzaS93RElwN0gvCkFPRVNlVlVlbi9rWHZINC8vRjhnMy92N1AvNGYxai9rbjlSK1Avd3dWNWY5K0pvLy9rSEpoNVkvUC80dm01SC8KQUg5bi93REQrc2Y4a1hnLy9oU1NHKzRTZjgrWVIvOEFpK01EL3dBaDN0TkVBTy8vQU1NeDhIL3Y3UDhBK0g5WQovd0NSZWFmL0FJb0I1MzgvODlYai93REZuOHgvMzZPZmovOEFEQi9YL2YyZi93QVA2eC96NWJuL0FPS0gvRUgvCkFEamI2V0QvQVBobG55SC9BTE0vNUgvOElnK1ZTRlBIL1AyZi93QVA2eC95SjhHYWJ2OEErR2YxRDgvOS9BSDQKL3dEdyt5MS8yTHpTZngvK0tMKy8rZnMvL2gvV1ArL0RYLzRmZ1cvai91bnczOC8vQUllYjdXRC9BSmo4L3dEOApTTDJIL1AyZi93QVA2eC8yYjJQL0FNUHBZbDR5eFJZbjRQOEE4WHlyZnovemsrTnZPLzhBNGYxUC9uN1Avd0NICjlZLzc4M0ovL0Y2VFY1UHJmbXIvQVBGSDZoK0xBSC9QaHIvOE14NjMvbjdQL3dDSDlZLzc4d3ovQVBGSlBpUDkKV0RvWVpzQjVILzRadjhRM0ovNW05ai84UHVvLzUrei9BUGgvV1A4QXZvbC8vRjloRC8zNHZuLzRZbDRKL0ZpLworUDNQL3dERjZwYit6LzhBaFVOUi93RGdKSjZ1WnI2cnVKKzFXNzJiL1plVG41LzdKNHIvQURmUEhncS83NzRSCjhXWHRVa0svZi9mbUdmOEE0dGRsZWl6WGwvOEFpeGVUeGVKeDhmOEFGQVRoMS84QWtCa1VUei8rUjZwZi93QUgKKzk1WlA1V2xuWC84bkh3L2RLbHovd0RvUHM0cnhnSGJSSkdmZitpdVZKMi8vbUl5UTBIUHlvZ2szLzhBUEkraQovRjBpOEhYL0FPZ0l5N2lhZi9tYzQzeGNIZzhmL29tRHllTHpqZkgvQU9RZExGeE1ubTg4L3dENk5NYVhFMmVhCmRMUC9BT0JRMW9NMzdyc3Mvd0Q2VTVMRnhNdm1qT2x4VFY1MW5qLzlPQUkvL29QLzJnQU1Bd0VBQWhFREVRQUEKRVBQUFBQUE4vT2RmUFBQUFBQUFBQTnJ2L3dEL0FPUTg4ODg4ODg0Z2MvOEEvd0QvQVA4QTdsUFBQUE9RQU52LwpBUGpuL3dENzNJMjg4N0FBanVEekR0VHhVLzhBdlBMQUFCZ2lBRnFZd0FQUHZQTGd3RWNZd0VFZ0FBSFB2UFBJCndFRWdBQUc0d0FOZnZQUEpBQUVod0FPb2dBRWZ2UFBPUUFIZndBSk5pQUJQdlBQT2dBRnBRQUYzQ2dFZnZQUGIKUlJSUDR5MjN5d0FHdlBMOE5QOEEvd0RmL3dEL0FNOGl4enp6enk3ei93RC9BUDhBL3dBMmM4ODg4ODg4OFl5Lwo3anM4ODg4ODg4ODg4OHN2L3dEUFBQUFBQUC9FQURNUkFRRUJBQU1BQVFJRkJRRUJBQUVCQ1FFQUVTRXhFRUZSCllTQng4SkdCb2JIUndlSHhNRUJRWUhDQWtLQ3d3TkRnLzlvQUNBRURFUUUvRVB4QVNzcDNDUFgvQU13TzVYcjgKQXAxZlYvOEFsM2ZqVTZnZndnZUQwOC9nVWN2NE41c2hBOWVyME9tT3ZOOWlBT293YTMySUE2anE4N1BxejBaeApQVG94K1k2OWJzK3ZjTzgrRFRQT25vWnhkZlJpdXo2OXkwZXQwOTdmZ2ptN1ByM0xqUGUzNFR0Nk9CdXo2OXk1Cno4RGdEOEJaNloyZlh1ZUQ4QmVkOWVwOHkwSHdhWmRuMEk4K1lPV2FGTTg0Q3pTUHA0L1NDK29QZDlHZnYvOEEKQmRuL0FNQWU1RDhRYjFJY3YveUJsTy9WZTRCMS93RFV1eUUvK0gvLzJnQUlBUUlSQVQ4US93RGhHRTh4RmovOAoxNlFuTCtBRXhtT1ltZjhBeDYveDl4Y3grRllhK3JwNnVkeW1INEJIREh5SnUzcDR2cjVTU0pMN3NwN2xrZXArCnJLZTJlQjg2bnAzUHJ5OHVQVmdaUnhlanB0MVBUcVRIUEhnZkJpOTNlWWVucHVwNzBJWS9SMDJITytyUkhwOWYKUzZudlFqeVBxZzQzMWNaSGZUNVM2bnZRajI5WEdXemZWemthRTllRzZudlFqcjlmTjhIcWg0amlQRmlOMVBTVAppVFlhNEVKTU9yNCt3aElZN3ZnejJLUFJEcGZGRFBqL0FPQjZmL2czU1BnL2lVT1dIZ2YvQUM0QzZqMFRpTHlmCi9vTS9ULzhBSFAvYUFBZ0JBUUFCUHhEL0FQT2d2dmVYNEszQWp6T3JVSlNUeTUrbXZEVWNqLzhBcGJYQjJYRmcKNGU5L1IvOEFnMlFlazVQdXlIMXZKOG4vQU9rU0VMMVladlU0UDkwQVFJRC9BUEhMQTliK3l2Y25RY2YvQUtJQwpCVjRDd2F3OE9mdnhZT1BSL3dEbElCQ1I2YktON25IL0FKWlNGNy8vQUVHSE0zWHFmcytlS0x5d0hZcFA5LzhBCjUwSEE5MlJmM09mcnpVRUlUa2YvQU0zaml2UVAzL1JZSnhiQmgvdzEvd0NSbDQvc2YvZi9BTkFBK29PYklmTW4KWHlmL0FKUVJhNkg4K0N3Z2NrMlBsNytxZVEwQVFIMS8zNDIveWY4QW4vNkZLL01uRDhsaFdIUTRmL3hpb2wwRApsUDZwZlNZNVpPVjVmL3d3enNINE0vOEE0MEk5aUdmbml4UUQ4aitlTDd0dndmOEE4VTJpZWdsc0VKK1IrS2xBClRLK1IzL2lJUkhrYklQTHk0K211VGhJVC93REQvbHZGbkR5SmZUSC9BT0VuZTQvSlVSaDVNLzR6VUJ3bVJZODAKN3g5UDkzK2F3UDRLN0pLZC93Q3lnQ0NBNlA4QW1kNGorUi92L2tVZ00vRXNYeXIvQUI4MG5KK0lQOTNkVy9acwphTDZSL3dBbEoyZmtmK2YvQUlQM1A4Ly9BSWY4dDR2enQvU2YrZjhBNHV2d2NmRHAvd0FqaFA4QUFkUDQvd0R4ClErUWZnLzhBdi9FYnpSOXh5OFJ4RDdKLy9ETE80L2cvL2cvYy93QS8vaC95M2kvS0g5ai9BTy8vQUlwWHFIOVAKNnZtemcrN3NXVFBpWWYxLytMMG4vcy81N3RmMVp0WlNmNXgvWC80ZmVlZmt2ei8zOXovUC93Q0gvTGVMNDJaUAowLzhBeGIvNUhOMEg1YkthYzBRdjlnZi9BSWZPeEI5YlprY3VIMy95UXVadm9mOEEzLzhBRjc0VDZuUCsvdWY1Ci93RHcvd0NXOFZRT1VKOVUrTkFUNy84QXd6bmlmMC91K0NaejQvNU5YTC9DeWZwLy9DYTNBVDgxQWZNNStlUCsKVGU0SDJYL3Yvd0NLY2RFL1NQNi83KzUvbi84QUQvbHZIL1BLWkorbi93Q0ZlZEtIeUVuL0FHUmp3UDJRL3dBZgovaVJMeVQ0ZFA1LzU0cVovU1A1Ly9GRDVaK0cvMy8zOXovUC9BT0gvQUMzai9ubC85YWYvQUlRVFFTR3F2eitFClkvNXArUHNEZjYvL0FCZW4vaU0vci9pYzZBZlRONHlBSjhQL0FPSDE1L3ZQKy91ZjUvOEF3LzVieC96d2tiK0gKL3dCLy9GNEdZZnBQL0pCd0EvRGorbi84V2Y2Vis0VCtQK3lDeXdYemordi9BTVBsUFg0Myt2OEF2N24rZi93Lwo1YngveVFkSi9JLy9BQlE1eEI5ci93Qi80S2djbWxFemo4b1Qvd0RoaFBuOTdEL1AvWkRkYjhBZjkvOEE0UlU0CkNQM1dkNVNQMS96OXovUC9BT0gvQUMzai9pRjhsK0RVQUhEdi93Q0dGT3o2RC96L0FMc3VaUDdaK3Y4QThQWXIKQStRay9kbi9BSk1UeG43Ui9mOEErTHBQbWZlLzgvYy96LzhBaC95M2ovc25jcEg1TS84QXd3SHNoKzB2Ni82NQpmbEg0di9QL0FNS0FSNGFqblA0Qmovamx1Ry9rZjdqL0FQRkRlRy9qUCtmdWY1Ly9BQS81YngvMlc3S2ZUdjhBCitFWFA5b1JVVkxreXpueE12d1gzNi9rMy93REZDZW1INkg5LzhsQXhZdm1ab2dCdy93RDRaL0NYOHQvci9uN24KK2Y4QThQOEFsdkgvQUdId1Q4R1A3LzhBeGRPa0w0V1M1dDhQN3Z3dEg3ei9BUEZIcHlMNVgvdDhlR3YxL3dBOApsSkg1TS84QXd5bnpQMmorL3dEbjduK2Yvd0FQK1c4Zjk5ZG4rUi8rS0p6UHRmOEE0dm5ZTitXb1I1R2Z4U1A0CkIvUC9BT0dEL0UvQS93QmhZV2RzSDEveVc3S2ZUdjhBK0gyeWg4eC96OXovQUQvK0gvTGVQK3VCMVA0YUlrbmYKL3dDSERNajZFSi8yZGRpWDB4LytGQ2lVRDloL2krb2o5LzhBSS9QQWZXZjMvd0RoNXlxdDNuNGIrNS9uL3dERApnSUFGNFl2T24vU0JBbVY5WTJRUjhIRDgxOURQeS8xK3F6S1h4Qi9CWGtma1VvSUhpUy96L3dCK2N2OEFEL3l5CndhUFkvcXBZQVBMbjlIKzcvU1FLOHo4dGFFbkVWRC8yT2RGL0kvOEF4RWlJRDJTbmZpeU9STlkrZi94UTRmYS8KcnhjOSsxejllZjhBaTFIaWxoOWYva01sSEVNVC93RGtLZDFQNGFidi9ZQngwY3I0T1d3Qld6eWZmWDErYWlVbApkVi8vQUNCUmtzQjg1MC8zWS9CK3o1UC9BTkI5TXMvTVUycFNwQVhUSnhEbjlueS9pOHVKRWwvL0FEREtnN0xBCkZENGNmWlRqZ2VFLy9QS1NvZ0hBbWRmNkxNeURod2ZCL2ovK2daSUhZOE5oZnVlSDRmOEE4dzdrNkRteXdmVy8KdC84QTBTRVQ3MzlOTTR1eTUvOEF5SVNCWll2YzVmOEFWVlVxVjcvL0FFWVNFaE95d2hlcHovN1lTQjYvL0FBbwpBY3JaRTVlWEgxNXN2QzkvL3BVdEM5V0VQMU9QdnhRQWtqd2xrRzlKd2ZMVWZxRGovd0RUbGdobUQ1Zi9BTkIvCi85bUpBYzRFRXdFSUFEZ0NHd01GQ3drSUJ3SUdGUW9KQ0FzQ0JCWUNBd0VDSGdFQ0Y0QVdJUVFvTi9wY1M2WnAKS3JjZllBbnpkbTcxUG5BVnVRVUNZbmEyVGdBS0NSRHpkbTcxUG5BVnVkZUFDLzlJYlMyeTlvek54NTBTdG02VQpXY1JkMXY1d1owb1liNURsUkEyd3kzOFRyYktpVWdmd28rZ21vVnFxakRIcXluSCtjZjFTZmFBMkdiRHFGU05oCkRrSDc1ODVROHNCQWpXUktsUGVTYmhpVWg3R0E5RUFsV25kc0hGc2hTeWw4S3dtamhOQ2VRNUpKR3VYUHgyek0KL082dDNTV3NyYVFtaVlIZmdWRWU4MXdmV0NZWFZaQzVuY0JEL0xvQ1k4bDFjVWJKcTNUNGIxN2owekp0WDVyUApBc0VvMjN0UlJ0dGhVejhVczFmd2dTNjlOaTlVeWcvMUNRbnZucEpCVWFpYndaNUw4OFFZRFBjTzhjN3cwOWdVCmd0UHFmYlBKUkoyY1loeE9KWVorRHFmMnVlMUJzWk5TeVduUVcyNnJudWUzWXZZaDJxa0hvNS80K2FjbE5zYU4KMnBWK0IrSnJCeGdnd0ZWUDg4MmhaUkZTTUd0anZwcERndlpYbjl2SkFrZE55Ykh2Znk1bER1MXUxYVBwc1pkVwora0lpQ0ZRRHY5SXBianJzWFZiKytENHVaRUttQVBXa0tRdWYwN1k1bllTYUQ5K0YrL0EzalNET2puamQrS2gvCmtrR1N0cEZYYTV4LzU5YXdsbTlrL2MvbHZTd3dMTUNtbHBsRnYyQzMveTRsTEdhZEJZWUVZblloVEFFTUFNcUoKbCtkWGtuYkJVUGF0bkxZckkweTk5SkRweG95MVMrSDNVVU5vVkxTQWxONzQ1NDNXcUtwdjZuQVg0WVFGTjc4bwpWTmVSRFluQ3F6NHNaNHZGYjE0ZE5pSS9jL2F0WmJjbTF1NzJmNGRTTDV1OVhhb0JQOVhXMnBYditZTjZWbW9NCno3UnVQVXR0OUQzU0NOUGc1UmFvV1pGdGxLZ3N1ZWIxcG5TZWk0QjNFeEJFVXJBa2hxMEZRVkNQOUhZWDBnVlYKWEpweDc2dFNOOTBQMEZtdy9HNEErdTBHaVlzaE5ZemhzQklJNFVkeThNNWUwYkhCZjVLdXBZSnhHMUtkYm0xOQp5Wk9OTElJMUthME56TlRyYmRRZ0NiWm5hTGdpcnVDaThSMmtGRjdFdVNnTVowODlkc1ZmZE9jcHllR3l1c08xCkZiVXpwc2hqYVgyQkdMYlFEWTdUTW5yWnk2dEpvUUhmLzRLRFVvdXZiU0JQYzdBRHRid0RXaGgzTU8vZzE2MGIKUTcybFEvZ2xBSTVsU1JSM21ncXAzMVpYZXY4eStLVVRXOTRVd2F3N3dPZWMvMWJ1SnZ5T3dZaCt0RllVaXVzeApLRXliZ2QwVnpic0RkUnpTYWpGbHBMd1loNVNqZjdZVFFxQjdWKzlxNmlFaE16MzJxTWFoZ0NJVlBqU05Yd0FSCkFRQUIvZ2NEQXZQd3g1cFFRb0EvNjk0eHdXbUM3bndXZW1hd084eUhHUW4raktBK212NHpYZ1kwMzI0ZmtZVzQKNHZHSTVMNWptanFqNVN5K2REa3RKSmhUOC80WGNIeEUwUlYrYkZhb1JjbTVMK2xDRjhTb0pMUUVRdDdsaUFNMAo4L2RrQll1OXowb2F6blVaVUUrdGYvaFZJYjBsWUhHeXhpZzZXcTltNlRwWm4xdmN5TGpRTmttYnA4RWhMVDMrCjlRVkhmRFEyeW9HMWVGamN4UXRxR2tZckNDUk9UQmt6WjhPZjdwK2dyS1VkNHBQZXl6NE1uaXBxUkxTbE5QS1QKTG1KdzJiMFB1ZzRWYm9CTWVzY3dPbHhZQndiUGZwWWlxYTJlNmdYbGgrMG56cXA1ZnFyZWx4TE94MEtQcG1FbQpMYVZGMWFSZzRRcEJGdStmdGh3TlArblhnaWtFSGpZcTFmVi9HQ2ZPMWJ0UEU0YU9ra29EdUd4cXNhS2pCbTl5ClZseDN1ZG9lM0svQ08wK3ZiUmtxZmJxMVgxd3dGbDdLU2tISDhZSk5EanhLZFkzbGlZd256MFhhZ1QvK0krWUMKRTgzZGx0UXZoeDZzTSt2bXdTdENIcllLaEV2dG1ybGl6WVl5bTA1NVRNQmFPVjIrT3lLVk14RHNHb3cyempISAo0cTUzelpUdXRDVnRTNGRSbnB6eFZ6ZWlWcHRhZDgvdU5nbFpRaHlqeEFGaFJWaGptR0pkK29hRE5iWWthaUx5CkxEUEp3UE9ma0xYdVFrSmFERDRYUi91RFE1dmZOTE5uZUJjNHJQTncyOGFsWGRTcElMUStQTis5UVZPTnIxWTYKaUlnWFF4YjFpODBTc21odzhJOWZ1U0Z1eis2Y1pWR2NNbjQ5bng5bUxJRC9ieDRSWmxuQWVjZVpmcVozVFRUSQo5b042dmd0YTNvVjV2YzdUSkZiSU1JbGZGY0NQeFNOZUc1T2ZkTlNtcHo5aFZrWDd3bkNyeFoxSkRtTXdHUVA3ClBiR1ppMmlycEJFM3NSUmoyQVhNVkRrdlZjU2NHMXBIbHlVMElIS0hXcVg1UWJORm9nUFl6NVVIOEFsQS9ZZjgKZE1zOVhSSy9KUTJPUFd4Q3h4UXRWMmFaUm9CWHkvTEZoViszWHJxck51OUwvWnREUFFkZjFOUmhOaXRWeFEwSQpzeERUbWZzbCtWOHAvSmUyV1RCdnIyWEJSUmlFRU9pTy8vbWtCaWNEeFN6bGlHSmJJYjRabnlNT0NNNFV1R21PCjVFNWZVS0RKREFrdkFra08vbGxsRDkvVnZxR0xFTEEwSnZROER6cmpVaDdweDV0ZFRUV3p2RXV1NUpsZ01xSWUKbGliRll0YVVvU3hxUUhWT2F1L04rTzVHTXRFWDJXUjNOLzFvYTczQk55VXRYeUxwYXJORTBhcnNZZkZnaWNUUwpROEhUM2tkQzE0emxJY3V4MDUzY1ZlZG11NTBFNTJ1SGF2cEtUUnJBVnYvdnF5UTNSMjA3b1kwbERwL2syTklYCnhLbXNBTHdhajFuYzM0TGxnd1g4emVmODFjK2Y3RTg2TUJHU1B3aDdUajNtK3RSdnRsNzF1S2plc2ZONFB6VlYKdHN1V3JVd2hzdUU5bEhFUDZIYmlMSDZZYmtmMUlPK0pNOG1QbzVDNDVURFVRSnhQY0F5Y1hTeGNKM3g2UGZITQozRGUybGR4SGtNME1oc0RkaFUrV0duOW5Fb1prTVY2MWp5ZWRlOWhmVXhlckxVa0hlUUROUlVZMHRUU1NncVBvCnFpTGxxdXJJa1VEQWZMUUlpUUcyQkJnQkNBQWdBaHNNRmlFRUtEZjZYRXVtYVNxM0gyQUo4M1p1OVQ1d0Zia0YKQW1KMnRtY0FDZ2tRODNadTlUNXdGYm1xNHd3QWtHb09NcGVZMUtSaGN2eEk1cGJXY0xlRWIxZkppYnpPeDJVMwpQU3lMcnlpWTljdTdTS3d5TTJMaUlpWStKN1JyOGxKY204MkExWDF2N2dQL3hKNGpRSHNPbjJXY0ZzSFEyL1V4Cm1GWXRNM055V3Z3SE1TQ0ZUa3hyWXNjdDk2N0FpVEJyZnhCampmbHkySDFMbXR6R1Z6YjVpbmNiNmZoVDUzSU4KM0pXZWg1VUZWSEJmU0FiVHRrZGFKWERyTmJRTXZ1UTNDWExDVHVxY0NHSGF1aFA2c1VGdGw3N2RCMnp2NWhPYgplK09BUjVKaTUrZnU5d0s4ZXZOR2ZXVS9nQVpsTjRSUWxwV2pzRFNPcGg0eFN1M1VQUEJsa29XcDl3K0NrNHBvCjNLejRwaW1ER1JyYmU3aUpCbmJwQXIxa3FST09RMUJaU1liNGhTa2sxTWpKT056L3dEQUVKaExCbWIzWXUweGkKME1rd3pTQlJBTzl6Tkc2VE9xZXUvSlcwRUllUjdTdWd1K2FJWlNkcmZuVVhyUHNzZGZsUi9MRkpQUVJZaWpJLwpYVFd6RnlUUVZqWHVQNTJBYkdKNG1UeEl5Ums0aXVZN0VjUEErNTRYTEV5WnhtLzVHWWNRTE9aQ2ppU3pwZlhTCnloSkR4b3NNdjhZeUl5a04wZ3MyTFRPVVBSZ0cKPTAyQzIKLS0tLS1FTkQgUEdQIFBSSVZBVEUgS0VZIEJMT0NLLS0tLS0K From 81f2775e1c3b7cb45f5312db7df66797c45e7be4 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Mon, 9 May 2022 10:52:08 +0300 Subject: [PATCH 36/69] Add .scala-steward.conf --- .scala-steward.conf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .scala-steward.conf diff --git a/.scala-steward.conf b/.scala-steward.conf new file mode 100644 index 000000000..7200b4799 --- /dev/null +++ b/.scala-steward.conf @@ -0,0 +1,6 @@ +pullRequests.frequency = "7 days" + +#updates.pin = [ +# { groupId = "org.typelevel", artifactId="cats-effect", version = "2." }, +# { groupId = "org.typelevel", artifactId="cats-effect-laws", version = "2." }, +#] From a8f417753e64dd1c0c98fcc818b9c061c121cdd4 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 9 May 2022 10:34:06 +0200 Subject: [PATCH 37/69] Update sbt-git to 2.0.0 (#1557) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 87a949525..7b90d2580 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.30") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2") +addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.12") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") From 5d732eefadbbea1281968a39b183dc57bd43c5a2 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 9 May 2022 14:33:54 +0200 Subject: [PATCH 38/69] Update snakeyaml to 1.30 in series/4.x (#1571) --- project/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.sbt b/project/build.sbt index 514eff67d..d2f41845d 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1 +1 @@ -libraryDependencies += "org.yaml" % "snakeyaml" % "1.28" +libraryDependencies += "org.yaml" % "snakeyaml" % "1.30" From d2f8ed1592299064eb6e3832ba8ec18764100678 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sun, 15 May 2022 14:15:14 +0300 Subject: [PATCH 39/69] Make Scalafmt mandatory in build (#1573) --- .github/workflows/build.yml | 60 +- .github/workflows/manual-publish.yml | 3 + .scalafmt.conf | 82 ++- build.sbt | 352 ++++++---- .../internal/FutureLiftForPlatform.scala | 10 +- .../catnap/CatsEffectIssue380Suite.scala | 2 +- .../catnap/ConcurrentChannelJVMSuite.scala | 2 +- .../monix/catnap/FutureLiftJava8Suite.scala | 7 +- .../scala/monix/catnap/MVarJVMSuite.scala | 2 +- .../monix/catnap/SemaphoreJVMSuite.scala | 4 +- .../main/scala/monix/catnap/CancelableF.scala | 2 +- .../scala/monix/catnap/CircuitBreaker.scala | 51 +- .../monix/catnap/ConcurrentChannel.scala | 28 +- .../scala/monix/catnap/ConcurrentQueue.scala | 35 +- .../main/scala/monix/catnap/ConsumerF.scala | 2 +- .../main/scala/monix/catnap/FutureLift.scala | 10 +- .../src/main/scala/monix/catnap/MVar.scala | 35 +- .../scala/monix/catnap/SchedulerEffect.scala | 2 +- .../main/scala/monix/catnap/Semaphore.scala | 30 +- .../cancelables/BooleanCancelableF.scala | 2 +- .../cancelables/SingleAssignCancelableF.scala | 5 +- .../monix/catnap/internal/AsyncUtils.scala | 2 +- .../catnap/internal/ParallelApplicative.scala | 2 +- .../monix/catnap/internal/QueueHelpers.scala | 11 +- .../CancelableFutureCatsInstances.scala | 9 +- .../monix/catnap/CircuitBreakerSuite.scala | 6 +- .../monix/catnap/ConcurrentChannelSuite.scala | 41 +- .../monix/catnap/ConcurrentQueueSuite.scala | 10 +- .../scala/monix/catnap/FutureLiftSuite.scala | 41 +- .../monix/catnap/MVarConcurrentSuite.scala | 48 +- .../test/scala/monix/catnap/Overrides.scala | 2 +- .../scala/monix/catnap/SemaphoreSuite.scala | 6 +- .../catnap/TestSchedulerEffectSuite.scala | 2 +- .../SingleAssignCancelableFSuite.scala | 2 +- ...ypeClassLawsForCancelableFutureSuite.scala | 6 +- .../eval/internal/TaskRunSyncUnsafe.scala | 11 +- .../eval/TaskAsyncAutoShiftJVMSuite.scala | 6 +- .../scala/monix/eval/TaskBlockingSuite.scala | 2 +- .../eval/TaskCallbackSafetyJVMSuite.scala | 32 +- .../scala/monix/eval/TaskIssue993Suite.scala | 2 +- .../eval/TaskLikeConversionsJava8Suite.scala | 4 +- .../scala/monix/eval/TaskLocalJVMSuite.scala | 9 +- .../eval/TaskRejectedExecutionSuite.scala | 2 +- ...peClassLawsForTaskRunSyncUnsafeSuite.scala | 8 +- .../src/main/scala/monix/eval/Coeval.scala | 41 +- .../main/scala/monix/eval/CoevalLift.scala | 2 +- .../main/scala/monix/eval/CoevalLike.scala | 2 +- .../src/main/scala/monix/eval/Task.scala | 102 +-- .../src/main/scala/monix/eval/TaskLike.scala | 2 +- .../src/main/scala/monix/eval/TaskLocal.scala | 3 +- .../eval/instances/CatsAsyncForTask.scala | 5 +- .../eval/instances/CatsBaseForTask.scala | 2 +- .../eval/instances/CatsEffectForTask.scala | 5 +- .../eval/instances/CatsMonadToMonoid.scala | 2 +- .../eval/instances/CatsParallelForTask.scala | 4 +- .../eval/instances/CatsSyncForCoeval.scala | 9 +- .../monix/eval/internal/CoevalBracket.scala | 6 +- .../eval/internal/CoevalDeprecated.scala | 2 +- .../monix/eval/internal/CoevalRunLoop.scala | 14 +- .../internal/CoevalStackTracedContext.scala | 4 +- .../monix/eval/internal/CoevalTracing.scala | 2 +- .../monix/eval/internal/ForkedRegister.scala | 2 +- .../eval/internal/ForwardCancelable.scala | 4 +- .../monix/eval/internal/FrameIndexRef.scala | 2 +- .../scala/monix/eval/internal/LazyVal.scala | 2 +- .../eval/internal/StackTracedContext.scala | 2 +- .../monix/eval/internal/TaskBracket.scala | 20 +- .../eval/internal/TaskCancellation.scala | 12 +- .../monix/eval/internal/TaskConnection.scala | 4 +- .../internal/TaskConnectionComposite.scala | 9 +- .../eval/internal/TaskConnectionRef.scala | 8 +- .../monix/eval/internal/TaskConversions.scala | 4 +- .../monix/eval/internal/TaskCreate.scala | 10 +- .../monix/eval/internal/TaskDeprecated.scala | 16 +- .../monix/eval/internal/TaskDoOnCancel.scala | 2 +- .../monix/eval/internal/TaskEffect.scala | 11 +- .../monix/eval/internal/TaskExecuteOn.scala | 2 +- .../eval/internal/TaskExecuteWithModel.scala | 4 +- .../internal/TaskExecuteWithOptions.scala | 2 +- .../monix/eval/internal/TaskFromFuture.scala | 5 +- .../monix/eval/internal/TaskMapBoth.scala | 20 +- .../monix/eval/internal/TaskMemoize.scala | 18 +- .../monix/eval/internal/TaskParSequence.scala | 9 +- .../eval/internal/TaskParSequenceN.scala | 2 +- .../internal/TaskParSequenceUnordered.scala | 13 +- .../monix/eval/internal/TaskRaceList.scala | 2 +- .../eval/internal/TaskRestartCallback.scala | 4 +- .../monix/eval/internal/TaskRunLoop.scala | 77 ++- .../internal/TaskRunToFutureWithLocal.scala | 22 +- .../monix/eval/internal/TaskSequence.scala | 3 +- .../scala/monix/eval/internal/TaskShift.scala | 4 +- .../scala/monix/eval/internal/TaskSleep.scala | 2 +- .../scala/monix/eval/internal/TaskStart.scala | 4 +- .../internal/TaskToReactivePublisher.scala | 2 +- .../monix/eval/internal/TracedAsync.scala | 5 +- .../eval/internal/UnsafeCancelUtils.scala | 11 +- .../src/main/scala/monix/eval/package.scala | 5 +- .../monix/eval/tracing/CoevalEvent.scala | 1 - .../monix/eval/tracing/CoevalTrace.scala | 2 +- .../monix/eval/tracing/PrintingOptions.scala | 10 +- .../scala/monix/eval/tracing/TaskTrace.scala | 2 +- .../test/scala/monix/eval/BaseLawsSuite.scala | 22 +- .../scala/monix/eval/CoevalBracketSuite.scala | 4 +- .../monix/eval/CoevalCatsConversions.scala | 2 +- .../monix/eval/CoevalConversionsKSuite.scala | 2 +- .../scala/monix/eval/CoevalErrorSuite.scala | 2 +- .../monix/eval/CoevalEvalAlwaysSuite.scala | 2 +- .../monix/eval/CoevalEvalOnceSuite.scala | 2 +- .../scala/monix/eval/CoevalFlatMapSuite.scala | 2 +- .../monix/eval/CoevalGuaranteeSuite.scala | 4 +- .../eval/CoevalLikeConversionsSuite.scala | 2 +- .../eval/CoevalMemoizeOnSuccessSuite.scala | 2 +- .../scala/monix/eval/CoevalMiscSuite.scala | 2 +- .../scala/monix/eval/CoevalNowSuite.scala | 2 +- .../scala/monix/eval/CoevalRunSuite.scala | 2 +- .../test/scala/monix/eval/TaskAppSuite.scala | 2 +- .../scala/monix/eval/TaskAsyncSuite.scala | 2 +- .../scala/monix/eval/TaskBracketSuite.scala | 28 +- .../monix/eval/TaskCallbackSafetySuite.scala | 47 +- .../monix/eval/TaskCancelableSuite.scala | 2 +- .../monix/eval/TaskCancellationSuite.scala | 2 +- .../TaskClockTimerAndContextShiftSuite.scala | 4 +- .../eval/TaskCoevalDoOnFinishSuite.scala | 2 +- .../monix/eval/TaskConnectionSuite.scala | 10 +- .../monix/eval/TaskConversionsKSuite.scala | 2 +- .../monix/eval/TaskConversionsSuite.scala | 9 +- .../scala/monix/eval/TaskCreateSuite.scala | 2 +- .../monix/eval/TaskDeferActionSuite.scala | 2 +- .../scala/monix/eval/TaskDelaySuite.scala | 2 +- .../monix/eval/TaskDoOnCancelSuite.scala | 2 +- .../monix/eval/TaskEffectInstanceSuite.scala | 2 +- .../scala/monix/eval/TaskErrorSuite.scala | 2 +- .../monix/eval/TaskEvalAlwaysSuite.scala | 2 +- .../scala/monix/eval/TaskEvalAsyncSuite.scala | 2 +- .../scala/monix/eval/TaskEvalOnceSuite.scala | 2 +- .../eval/TaskExecuteWithModelSuite.scala | 2 +- .../scala/monix/eval/TaskFlatMapSuite.scala | 4 +- .../monix/eval/TaskFromEitherSuite.scala | 4 +- .../monix/eval/TaskFromFutureSuite.scala | 6 +- .../scala/monix/eval/TaskGuaranteeSuite.scala | 7 +- .../test/scala/monix/eval/TaskLiftSuite.scala | 6 +- .../monix/eval/TaskLikeConversionsSuite.scala | 6 +- .../scala/monix/eval/TaskLocalSuite.scala | 7 +- .../scala/monix/eval/TaskMapBothSuite.scala | 2 +- .../eval/TaskMemoizeOnSuccessSuite.scala | 2 +- .../scala/monix/eval/TaskMemoizeSuite.scala | 2 +- .../test/scala/monix/eval/TaskMiscSuite.scala | 4 +- .../test/scala/monix/eval/TaskNowSuite.scala | 2 +- .../eval/TaskOrCoevalTransformWithSuite.scala | 2 +- .../scala/monix/eval/TaskOverloadsSuite.scala | 2 +- .../monix/eval/TaskParSequenceNSuite.scala | 4 +- .../monix/eval/TaskParSequenceSuite.scala | 10 +- .../eval/TaskParSequenceUnorderedSuite.scala | 10 +- .../monix/eval/TaskParTraverseSuite.scala | 4 +- .../eval/TaskParTraverseUnorderedSuite.scala | 8 +- .../scala/monix/eval/TaskParZipSuite.scala | 2 +- .../test/scala/monix/eval/TaskRaceSuite.scala | 28 +- .../scala/monix/eval/TaskRunAsyncSuite.scala | 2 +- .../scala/monix/eval/TaskSequenceSuite.scala | 8 +- .../scala/monix/eval/TaskTimedSuite.scala | 2 +- .../scala/monix/eval/TaskToFutureSuite.scala | 2 +- .../scala/monix/eval/TaskTraverseSuite.scala | 2 +- .../eval/TypeClassLawsForCoevalSuite.scala | 2 +- .../eval/TypeClassLawsForTaskSuite.scala | 4 +- ...ypeClassLawsForTaskWithCallbackSuite.scala | 10 +- .../tracing/StackTracedContextSuite.scala | 2 +- .../execution/atomic/AtomicBuilder.scala | 3 +- .../execution/atomic/AtomicNumberAny.scala | 3 +- .../cancelables/ChainedCancelable.scala | 6 +- .../LowLevelConcurrentQueueBuilders.scala | 4 +- .../execution/schedulers/AsyncScheduler.scala | 4 +- .../monix/execution/schedulers/CanBlock.scala | 3 +- .../schedulers/SchedulerCompanionImpl.scala | 2 +- .../schedulers/StandardContext.scala | 12 +- .../TrampolineExecutionContext.scala | 2 +- .../monix/execution/atomic/Atomic.scala | 9 +- .../monix/execution/atomic/AtomicNumber.scala | 2 +- .../monix/execution/atomic/Atomic.scala | 3 +- .../internal/AsyncSchedulerJSSuite.scala | 6 +- .../monix/execution/atomic/AtomicAny.scala | 8 +- .../execution/atomic/AtomicBoolean.scala | 9 +- .../monix/execution/atomic/AtomicByte.scala | 12 +- .../monix/execution/atomic/AtomicChar.scala | 12 +- .../monix/execution/atomic/AtomicDouble.scala | 10 +- .../monix/execution/atomic/AtomicFloat.scala | 10 +- .../monix/execution/atomic/AtomicInt.scala | 8 +- .../monix/execution/atomic/AtomicLong.scala | 16 +- .../execution/atomic/AtomicNumberAny.scala | 11 +- .../monix/execution/atomic/AtomicShort.scala | 12 +- .../cancelables/ChainedCancelable.scala | 6 +- .../CancelableFutureForPlatform.scala | 4 +- .../internal/FutureUtilsForPlatform.scala | 4 +- .../monix/execution/internal/Platform.scala | 2 +- .../internal/ScheduledExecutors.scala | 2 +- .../collection/queues/FromCircularQueue.scala | 2 +- .../queues/FromMessagePassingQueue.scala | 2 +- .../LowLevelConcurrentQueueBuilders.scala | 4 +- .../forkJoin/AdaptedForkJoinPool.scala | 6 +- .../forkJoin/DynamicWorkerThreadFactory.scala | 10 +- .../StandardWorkerThreadFactory.scala | 2 +- .../execution/schedulers/AsyncScheduler.scala | 13 +- .../monix/execution/schedulers/CanBlock.scala | 3 +- .../monix/execution/schedulers/Defaults.scala | 5 +- .../schedulers/ExecutorScheduler.scala | 58 +- .../schedulers/SchedulerCompanionImpl.scala | 34 +- .../TrampolineExecutionContext.scala | 2 +- .../monix/execution/atomic/Atomic.scala | 12 +- .../monix/execution/atomic/Atomic.scala | 3 +- .../scala/monix/execution/AckJVMSuite.scala | 2 +- .../execution/CallbackSafetyJVMSuite.scala | 32 +- .../execution/CancelableFutureJVMSuite.scala | 2 +- .../CompletableFutureConversionsSuite.scala | 6 +- .../monix/execution/FutureUtilsJVMSuite.scala | 10 +- .../atomic/ConcurrentAtomicNumberSuite.scala | 386 +++++++---- .../atomic/ConcurrentAtomicSuite.scala | 419 ++++++++---- .../monix/execution/misc/LocalJVMSuite.scala | 20 +- .../schedulers/AsyncSchedulerJVMSuite.scala | 14 +- .../schedulers/ExecutorSchedulerSuite.scala | 17 +- .../JVMUncaughtExceptionReporterSuite.scala | 2 +- .../schedulers/ScheduleOnceJVMSuite.scala | 14 +- .../ScheduledExecutorToSchedulerSuite.scala | 7 +- .../TestSchedulerCompanionSuite.scala | 4 +- .../src/main/scala/monix/execution/Ack.scala | 21 +- .../scala/monix/execution/AsyncQueue.scala | 20 +- .../monix/execution/AsyncSemaphore.scala | 4 +- .../main/scala/monix/execution/AsyncVar.scala | 2 +- .../main/scala/monix/execution/Callback.scala | 8 +- .../monix/execution/CancelableFuture.scala | 100 +-- .../monix/execution/CancelablePromise.scala | 10 +- .../main/scala/monix/execution/Features.scala | 2 +- .../scala/monix/execution/FutureUtils.scala | 23 +- .../scala/monix/execution/Scheduler.scala | 5 +- .../execution/UncaughtExceptionReporter.scala | 3 +- .../cancelables/AssignableCancelable.scala | 2 +- .../cancelables/CompositeCancelable.scala | 4 +- .../cancelables/MultiAssignCancelable.scala | 2 +- .../cancelables/OrderedCancelable.scala | 4 +- .../cancelables/SerialCancelable.scala | 2 +- .../cancelables/SingleAssignCancelable.scala | 3 +- .../cancelables/StackedCancelable.scala | 2 +- .../APIContractViolationException.scala | 2 +- .../execution/internal/AttemptCallback.scala | 2 +- .../monix/execution/internal/Constants.scala | 2 +- .../execution/internal/GenericSemaphore.scala | 3 +- .../monix/execution/internal/GenericVar.scala | 6 +- .../monix/execution/internal/Trampoline.scala | 2 +- .../collection/ChunkedArrayQueue.scala | 4 +- .../internal/collection/LinkedMap.scala | 6 +- .../monix/execution/internal/exceptions.scala | 2 +- .../scala/monix/execution/internal/math.scala | 2 +- .../monix/execution/misc/CanBindLocals.scala | 13 +- .../schedulers/ReferenceScheduler.scala | 9 +- .../schedulers/SchedulerService.scala | 6 +- .../execution/schedulers/TestScheduler.scala | 15 +- .../schedulers/TracingScheduler.scala | 2 +- .../schedulers/TracingSchedulerService.scala | 4 +- .../schedulers/TrampolineScheduler.scala | 4 +- .../scala_2.13+/monix/execution/compat.scala | 2 +- .../monix/execution/misc/InlineMacros.scala | 18 +- .../monix/execution/misc/Local.scala | 3 +- .../monix/execution/misc/test/TestBox.scala | 2 +- .../scala_3.0/monix/execution/compat.scala | 14 +- .../monix/execution/misc/Local.scala | 9 +- .../test/scala/monix/execution/AckSuite.scala | 6 +- .../monix/execution/AsyncQueueSuite.scala | 7 +- .../monix/execution/AsyncSemaphoreSuite.scala | 6 +- .../scala/monix/execution/BaseLawsSuite.scala | 6 +- .../scala/monix/execution/CallbackSuite.scala | 7 +- .../execution/CancelableFutureSuite.scala | 9 +- .../execution/CancelablePromiseSuite.scala | 2 +- .../monix/execution/CancelableSuite.scala | 2 +- .../scala/monix/execution/FeaturesSuite.scala | 8 +- .../monix/execution/FutureUtilsSuite.scala | 14 +- .../scala/monix/execution/TestUtils.scala | 2 +- .../execution/atomic/AtomicNumberSuite.scala | 387 +++++++---- .../execution/atomic/GenericAtomicSuite.scala | 634 ++++++++++++------ .../cancelables/StackedCancelableSuite.scala | 6 +- .../monix/execution/misc/LocalSuite.scala | 2 +- .../rstreams/SubscriptionSuite.scala | 2 +- .../schedulers/ExecutionModelSuite.scala | 2 +- .../schedulers/ReferenceSchedulerSuite.scala | 4 +- .../schedulers/TestSchedulerSuite.scala | 18 +- .../schedulers/TracingSchedulerSuite.scala | 24 +- .../schedulers/TrampolineSchedulerSuite.scala | 2 +- .../UncaughtExceptionReporterSuite.scala | 4 +- .../execution/misc/InlineMacrosTest.scala | 2 +- .../main/scala/monix/java8/eval/package.scala | 6 +- .../scala/monix/java8/execution/package.scala | 8 +- ...tractBackPressuredBufferedSubscriber.scala | 85 +-- .../observers/buffers/BuildersImpl.scala | 11 +- .../buffers/SyncBufferedSubscriber.scala | 35 +- .../internal/operators/Deflate.scala | 2 +- .../internal/operators/DeflateOperator.scala | 2 +- .../internal/operators/GunzipOperator.scala | 8 +- .../internal/operators/GzipOperator.scala | 2 +- .../internal/operators/InflateOperator.scala | 6 +- .../monix/reactive/compression/package.scala | 2 +- ...tractBackPressuredBufferedSubscriber.scala | 16 +- .../BackPressuredBufferedSubscriber.scala | 7 +- .../buffers/BatchedBufferedSubscriber.scala | 7 +- .../observers/buffers/BuildersImpl.scala | 11 +- .../observers/buffers/ConcurrentQueue.scala | 2 +- .../buffers/DropNewBufferedSubscriber.scala | 17 +- .../buffers/EvictingBufferedSubscriber.scala | 24 +- .../buffers/SimpleBufferedSubscriber.scala | 27 +- .../monix/reactive/BaseConcurrencySuite.scala | 4 +- .../monix/reactive/SerializableSuite.scala | 4 +- .../compression/DeflateOperatorSuite.scala | 6 +- .../compression/DeflateTestUtils.scala | 2 +- .../compression/GunzipOperatorSuite.scala | 5 +- .../compression/GzipIntegrationTest.scala | 4 +- .../compression/GzipOperatorSuite.scala | 3 +- .../reactive/compression/GzipTestsUtils.scala | 4 +- .../compression/InflateOperatorSuite.scala | 2 +- .../LoadBalanceConsumerConcurrencySuite.scala | 2 +- .../operators/ConcatMapConcurrencySuite.scala | 4 +- .../operators/FlatScanConcurrencySuite.scala | 4 +- .../MapParallelOrderedConcurrencySuite.scala | 2 +- ...MapParallelUnorderedConcurrencySuite.scala | 2 +- .../operators/MapTaskConcurrencySuite.scala | 4 +- .../operators/ScanTaskConcurrencySuite.scala | 4 +- .../reactive/issues/Issue1167Suite.scala | 9 +- .../monix/reactive/issues/Issue908Suite.scala | 11 +- ...trategyBackPressuredConcurrencySuite.scala | 8 +- ...tegyDropNewAndSignalConcurrencySuite.scala | 73 +- ...rflowStrategyDropNewConcurrencySuite.scala | 8 +- ...OverflowStrategyFailConcurrencySuite.scala | 10 +- ...lowStrategyUnboundedConcurrencySuite.scala | 8 +- .../ReplaySubjectConcurrencySuite.scala | 4 +- .../main/scala/monix/reactive/Consumer.scala | 4 +- .../scala/monix/reactive/Observable.scala | 168 +++-- .../scala/monix/reactive/ObservableLike.scala | 8 +- .../main/scala/monix/reactive/Observer.scala | 15 +- .../src/main/scala/monix/reactive/Pipe.scala | 11 +- .../instances/CatsProfunctorForSubject.scala | 2 +- .../builders/AsyncStateActionObservable.scala | 25 +- .../BufferedIteratorAsObservable.scala | 14 +- .../builders/CharsReaderObservable.scala | 12 +- .../builders/CombineLatest2Observable.scala | 8 +- .../builders/CombineLatest3Observable.scala | 7 +- .../builders/CombineLatest4Observable.scala | 7 +- .../builders/CombineLatest5Observable.scala | 7 +- .../builders/CombineLatest6Observable.scala | 7 +- .../CombineLatestListObservable.scala | 4 +- .../internal/builders/ConsObservable.scala | 6 +- .../internal/builders/CreateObservable.scala | 10 +- .../internal/builders/DeferObservable.scala | 4 +- .../builders/ExecuteWithModelObservable.scala | 2 +- .../builders/FirstStartedObservable.scala | 11 +- .../builders/FutureAsObservable.scala | 6 +- .../builders/InputStreamObservable.scala | 12 +- .../builders/Interleave2Observable.scala | 9 +- .../IntervalFixedDelayObservable.scala | 8 +- .../IntervalFixedRateObservable.scala | 8 +- .../builders/IteratorAsObservable.scala | 12 +- .../builders/LinesReaderObservable.scala | 14 +- .../MergePrioritizedListObservable.scala | 14 +- .../builders/PaginateEvalObservable.scala | 40 +- .../builders/PaginateObservable.scala | 8 +- .../PipeThroughSelectorObservable.scala | 8 +- .../internal/builders/RangeObservable.scala | 12 +- .../builders/ReactiveObservable.scala | 2 +- .../builders/RepeatEvalObservable.scala | 10 +- .../builders/RepeatOneObservable.scala | 12 +- .../builders/RepeatedValueObservable.scala | 6 +- .../builders/ResourceCaseObservable.scala | 6 +- .../builders/StateActionObservable.scala | 8 +- .../builders/TailRecMObservable.scala | 10 +- .../builders/UnfoldEvalObservable.scala | 35 +- .../internal/builders/UnfoldObservable.scala | 8 +- .../builders/UnsafeCreateObservable.scala | 4 +- .../internal/builders/Zip2Observable.scala | 6 +- .../internal/builders/Zip3Observable.scala | 9 +- .../internal/builders/Zip4Observable.scala | 9 +- .../internal/builders/Zip5Observable.scala | 9 +- .../internal/builders/Zip6Observable.scala | 9 +- .../consumers/CancelledConsumer.scala | 2 +- .../internal/consumers/CompleteConsumer.scala | 5 +- .../consumers/ContraMapConsumer.scala | 2 +- .../internal/consumers/CreateConsumer.scala | 12 +- .../consumers/FirstNotificationConsumer.scala | 7 +- .../internal/consumers/FoldLeftConsumer.scala | 4 +- .../consumers/FoldLeftTaskConsumer.scala | 40 +- .../consumers/ForeachAsyncConsumer.scala | 25 +- .../internal/consumers/ForeachConsumer.scala | 4 +- .../consumers/FromObserverConsumer.scala | 6 +- .../internal/consumers/HeadConsumer.scala | 5 +- .../consumers/HeadOptionConsumer.scala | 5 +- .../consumers/LoadBalanceConsumer.scala | 47 +- .../internal/consumers/MapTaskConsumer.scala | 27 +- .../consumers/RaiseErrorConsumer.scala | 2 +- .../consumers/TransformInputConsumer.scala | 6 +- .../ObservableDeprecatedBuilders.scala | 5 +- .../ObservableDeprecatedMethods.scala | 6 +- .../operators/AsyncBoundaryOperator.scala | 2 +- .../BufferIntrospectiveObservable.scala | 2 +- .../operators/BufferSlidingOperator.scala | 2 +- .../operators/BufferTimedObservable.scala | 11 +- .../operators/BufferWhileOperator.scala | 2 +- .../BufferWithSelectorObservable.scala | 12 +- .../internal/operators/CollectOperator.scala | 4 +- .../operators/CollectWhileOperator.scala | 2 +- .../operators/ConcatMapIterableOperator.scala | 2 +- .../operators/ConcatMapObservable.scala | 13 +- .../internal/operators/ConcatObservable.scala | 2 +- .../operators/DebounceObservable.scala | 8 +- .../operators/DelayBySelectorObservable.scala | 8 +- .../operators/DelayByTimespanObservable.scala | 8 +- .../DelayExecutionByTimespanObservable.scala | 12 +- .../DelayExecutionWithTriggerObservable.scala | 2 +- .../operators/DelayOnCompleteObservable.scala | 2 +- .../operators/DematerializeOperator.scala | 2 +- .../DistinctUntilChangedByKeyOperator.scala | 2 +- .../DistinctUntilChangedOperator.scala | 2 +- .../operators/DoOnEarlyStopOperator.scala | 2 +- .../operators/DoOnSubscribeObservable.scala | 23 +- .../operators/DoOnTerminateOperator.scala | 27 +- .../DownstreamTimeoutObservable.scala | 8 +- .../operators/DropByPredicateOperator.scala | 2 +- .../DropByPredicateWithIndexOperator.scala | 2 +- .../operators/DropByTimespanObservable.scala | 4 +- .../operators/DropUntilObservable.scala | 6 +- .../internal/operators/DumpObservable.scala | 2 +- .../internal/operators/EchoObservable.scala | 8 +- .../operators/ExecuteOnObservable.scala | 4 +- .../internal/operators/FilterOperator.scala | 2 +- .../operators/FlatScanObservable.scala | 13 +- .../operators/FoldLeftObservable.scala | 4 +- .../operators/FoldWhileLeftObservable.scala | 8 +- .../internal/operators/GroupByOperator.scala | 12 +- .../operators/GuaranteeCaseObservable.scala | 8 +- .../operators/IntersperseObservable.scala | 6 +- .../operators/MapAccumulateObservable.scala | 6 +- .../MapParallelOrderedObservable.scala | 14 +- .../MapParallelUnorderedObservable.scala | 16 +- .../operators/MapTaskObservable.scala | 5 +- .../operators/MaterializeOperator.scala | 2 +- .../operators/MergeMapObservable.scala | 21 +- .../operators/ObserveOnObservable.scala | 6 +- .../OnCancelTriggerErrorObservable.scala | 4 +- .../OnErrorRecoverWithObservable.scala | 2 +- .../OnErrorRetryCountedObservable.scala | 2 +- .../operators/OnErrorRetryIfObservable.scala | 2 +- .../operators/PipeThroughObservable.scala | 4 +- .../internal/operators/ReduceOperator.scala | 2 +- .../operators/RepeatSourceObservable.scala | 6 +- .../operators/RestartUntilObservable.scala | 2 +- .../internal/operators/ScanObservable.scala | 2 +- .../operators/ScanTaskObservable.scala | 5 +- .../operators/SearchByOrderOperator.scala | 2 +- .../operators/SubscribeOnObservable.scala | 2 +- .../operators/SwitchIfEmptyObservable.scala | 2 +- .../operators/SwitchMapObservable.scala | 8 +- .../operators/TakeLastObservable.scala | 42 +- .../TakeLeftByTimespanObservable.scala | 2 +- .../operators/TakeUntilObservable.scala | 4 +- .../operators/ThrottleFirstOperator.scala | 2 +- .../operators/ThrottleLastObservable.scala | 10 +- .../operators/ThrottleLatestObservable.scala | 18 +- .../operators/UpstreamTimeoutObservable.scala | 8 +- .../WhileBusyAggregateEventsOperator.scala | 25 +- ...WhileBusyDropEventsAndSignalOperator.scala | 2 +- .../WhileBusyDropEventsOperator.scala | 2 +- .../operators/WithLatestFromObservable.scala | 8 +- .../ReactiveSubscriberAsMonixSubscriber.scala | 17 +- .../SubscriberAsReactiveSubscriber.scala | 11 +- .../subscribers/ForeachSubscriber.scala | 4 +- .../internal/util/PromiseCounter.scala | 2 +- .../observables/ChainedObservable.scala | 2 +- .../observables/CombineObservable.scala | 8 +- .../observables/ConnectableObservable.scala | 14 +- .../observables/GroupedObservable.scala | 7 +- .../observables/RefCountObservable.scala | 2 +- .../observers/BufferedSubscriber.scala | 9 +- .../CacheUntilConnectSubscriber.scala | 11 +- .../observers/ConnectableSubscriber.scala | 8 +- .../reactive/observers/SafeSubscriber.scala | 4 +- .../monix/reactive/observers/Subscriber.scala | 9 +- .../reactive/subjects/AsyncSubject.scala | 4 +- .../reactive/subjects/BehaviorSubject.scala | 9 +- .../reactive/subjects/ConcurrentSubject.scala | 26 +- .../reactive/subjects/PublishSubject.scala | 7 +- .../subjects/PublishToOneSubject.scala | 8 +- .../reactive/subjects/ReplaySubject.scala | 9 +- .../monix/reactive/subjects/Subject.scala | 4 +- .../scala/monix/reactive/subjects/Var.scala | 4 +- .../scala/monix/reactive/BaseTestSuite.scala | 8 +- .../ObservableLikeConversionsSuite.scala | 10 +- .../TypeClassLawsForConsumerSuite.scala | 2 +- .../TypeClassLawsForObservableSuite.scala | 9 +- .../consumers/CancelConsumerSuite.scala | 2 +- .../consumers/CompleteConsumerSuite.scala | 4 +- .../consumers/ContramapConsumerSuite.scala | 2 +- .../FirstNotificationConsumerSuite.scala | 4 +- .../consumers/FoldLeftConsumerSuite.scala | 4 +- .../consumers/FoldLeftTaskConsumerSuite.scala | 13 +- .../consumers/ForeachAsyncConsumerSuite.scala | 16 +- .../consumers/ForeachConsumerSuite.scala | 4 +- .../ForeachParallelAsyncConsumerSuite.scala | 10 +- .../ForeachParallelConsumerSuite.scala | 4 +- .../consumers/FromObserverConsumerSuite.scala | 10 +- .../consumers/HeadConsumerSuite.scala | 7 +- .../consumers/HeadOptionConsumerSuite.scala | 4 +- .../consumers/ListConsumerSuite.scala | 4 +- .../consumers/LoadBalanceConsumerSuite.scala | 14 +- .../reactive/consumers/MapConsumerSuite.scala | 2 +- .../consumers/MapEvalConsumerSuite.scala | 2 +- .../consumers/MapTaskConsumerSuite.scala | 6 +- .../consumers/RaiseErrorConsumerSuite.scala | 2 +- .../TransformInputConsumerSuite.scala | 2 +- .../AsyncStateActionObservableSuite.scala | 2 +- .../builders/BracketObservableSuite.scala | 2 +- .../BufferedIteratorAsObservableSuite.scala | 14 +- .../builders/CatsConversionsSuite.scala | 2 +- .../builders/CharsReaderObservableSuite.scala | 11 +- .../builders/EmptyObservableSuite.scala | 2 +- .../builders/ErrorObservableSuite.scala | 2 +- .../builders/EvalAlwaysObservableSuite.scala | 2 +- .../builders/EvalObservableSuite.scala | 2 +- .../builders/EvalOnceObservableSuite.scala | 2 +- .../ExecuteAsyncObservableSuite.scala | 4 +- .../FirstStartedObservableSuite.scala | 2 +- .../FromResourceObservableSuite.scala | 2 +- .../builders/FutureAsObservableSuite.scala | 2 +- .../builders/InputStreamObservableSuite.scala | 12 +- .../builders/IntervalObservableSuite.scala | 2 +- .../builders/IterableAsObservableSuite.scala | 4 +- .../builders/IteratorAsObservableSuite.scala | 2 +- .../builders/LinesReaderObservableSuite.scala | 6 +- .../builders/NeverObservableSuite.scala | 2 +- .../builders/NowObservableSuite.scala | 6 +- .../PaginateEvalObservableSuite.scala | 11 +- .../builders/PaginateObservableSuite.scala | 4 +- .../builders/RangeObservableSuite.scala | 4 +- .../internal/builders/RepeatEvalFSuite.scala | 2 +- .../RepeatedValueObservableSuite.scala | 2 +- .../ResourceCaseObservableSuite.scala | 19 +- .../builders/StateActionObservableSuite.scala | 2 +- .../builders/UnfoldEvalObservableSuite.scala | 8 +- .../builders/UnfoldObservableSuite.scala | 6 +- .../UnsafeCreateObservableSuite.scala | 6 +- .../operators/BaseOperatorSuite.scala | 6 +- .../operators/BufferIntrospectiveSuite.scala | 2 +- .../operators/BufferSlidingDropSuite.scala | 3 +- .../operators/BufferSlidingOverlapSuite.scala | 3 +- .../operators/BufferSlidingSuite.scala | 2 +- .../operators/BufferTimedOrCountedSuite.scala | 9 +- .../internal/operators/BufferTimedSuite.scala | 7 +- .../operators/BufferTumblingSuite.scala | 4 +- .../operators/BufferWhileInclusiveSuite.scala | 4 +- .../internal/operators/BufferWhileSuite.scala | 4 +- .../operators/BufferWithSelectorSuite.scala | 2 +- .../internal/operators/CollectSuite.scala | 4 +- .../operators/CollectWhileSuite.scala | 4 +- .../operators/CombineLatest2Suite.scala | 2 +- .../operators/ConcatCancellationSuite.scala | 2 +- .../operators/ConcatDelayErrorsSuite.scala | 7 +- .../internal/operators/ConcatManySuite.scala | 5 +- .../operators/ConcatMapIterableSuite.scala | 4 +- .../internal/operators/ConcatOneSuite.scala | 12 +- .../internal/operators/DebounceSuite.scala | 3 +- .../operators/DelayExecutionSuite.scala | 2 +- .../operators/DelayExecutionWithSuite.scala | 2 +- .../operators/DelayOnCompleteSuite.scala | 2 +- .../operators/DematerializeSuite.scala | 2 +- .../operators/DoOnEarlyStopSuite.scala | 2 +- .../operators/DoOnSubscribeSuite.scala | 4 +- .../internal/operators/DropUntilSuite.scala | 2 +- .../internal/operators/DumpSuite.scala | 2 +- .../operators/EchoRepeatedSuite.scala | 2 +- .../operators/EndWithErrorSuite.scala | 2 +- .../operators/ExecuteOnObservableSuite.scala | 4 +- .../internal/operators/ExecuteOnSuite.scala | 2 +- .../internal/operators/FilterNotSuite.scala | 4 +- .../internal/operators/FilterSuite.scala | 4 +- .../operators/FlatScanDelayErrorSuite.scala | 5 +- .../operators/FoldWhileObservableSuite.scala | 4 +- .../internal/operators/GroupBySuite.scala | 4 +- .../operators/GuaranteeCaseSuite.scala | 6 +- .../internal/operators/Interleave2Suite.scala | 2 +- .../internal/operators/IntersperseSuite.scala | 2 +- .../operators/MapParallelOrderedSuite.scala | 9 +- .../operators/MapParallelUnorderedSuite.scala | 7 +- .../internal/operators/MapSuite.scala | 4 +- .../internal/operators/MapTaskSuite.scala | 6 +- .../internal/operators/MaterializeSuite.scala | 4 +- .../internal/operators/MaxBySuite.scala | 2 +- .../internal/operators/MaxSuite.scala | 2 +- .../operators/MergeDelayErrorManySuite.scala | 2 +- .../operators/MergeDelayErrorOneSuite.scala | 2 +- .../internal/operators/MergeManySuite.scala | 2 +- .../internal/operators/MergeOneSuite.scala | 4 +- .../operators/MergePrioritizedListSuite.scala | 6 +- .../internal/operators/MinBySuite.scala | 2 +- .../internal/operators/MinSuite.scala | 2 +- .../operators/MiscCompleteSuite.scala | 2 +- .../operators/MiscDefaultIfEmptySuite.scala | 2 +- .../internal/operators/MiscFailedSuite.scala | 2 +- .../ObservableOpsReturningTaskSuite.scala | 6 +- .../internal/operators/ObserveOnSuite.scala | 2 +- .../operators/OnCancelTriggerErrorSuite.scala | 9 +- .../operators/OnErrorRetryCountedSuite.scala | 2 +- .../operators/OnErrorRetryIfSuite.scala | 2 +- .../internal/operators/PipeThroughSuite.scala | 2 +- .../operators/PublishSelectorSuite.scala | 2 +- .../internal/operators/SampleOnceSuite.scala | 2 +- .../internal/operators/ScanMapSuite.scala | 2 +- .../TakeByPredicateInclusiveSuite.scala | 4 +- .../operators/TakeByPredicateSuite.scala | 4 +- .../operators/TakeByTimespanSuite.scala | 4 +- .../internal/operators/TakeLeftSuite.scala | 4 +- .../operators/TakeUntilObservableSuite.scala | 4 +- .../operators/TakeWhileNotCanceledSuite.scala | 3 +- .../operators/ThrottleLatestSuite.scala | 20 +- .../TimeoutOnSlowUpstreamSuite.scala | 5 +- .../internal/operators/TransformerSuite.scala | 8 +- .../operators/UncancelableSuite.scala | 2 +- ...hileBusyAggregateEventsOperatorSuite.scala | 15 +- ...BusyDropEventsAndSignalOverflowSuite.scala | 2 +- .../operators/WhileBusyDropEventsSuite.scala | 2 +- .../internal/operators/Zip2Suite.scala | 2 +- .../MonixSubscriberAsReactiveSuite.scala | 4 +- .../rstreams/ObservableIsPublisherSuite.scala | 2 +- .../rstreams/PublisherIsObservableSuite.scala | 18 +- .../subscribers/ObservableForeachSuite.scala | 4 +- .../ConnectableObservableSuite.scala | 2 +- .../observables/RefCountObservableSuite.scala | 2 +- .../observers/ContramapObserverSuite.scala | 4 +- .../observers/ContramapSubscriberSuite.scala | 2 +- .../observers/DumpObserverSuite.scala | 2 +- .../observers/ObserverFeedSuite.scala | 4 +- ...flowStrategyBackPressureBatchedSuite.scala | 10 +- .../OverflowStrategyBackPressureSuite.scala | 10 +- ...lowStrategyClearBufferAndSignalSuite.scala | 92 +-- .../OverflowStrategyClearBufferSuite.scala | 6 +- ...verflowStrategyDropNewAndSignalSuite.scala | 71 +- .../OverflowStrategyDropNewSuite.scala | 10 +- ...verflowStrategyDropOldAndSignalSuite.scala | 89 ++- .../OverflowStrategyDropOldSuite.scala | 6 +- .../observers/OverflowStrategyFailSuite.scala | 7 +- .../OverflowStrategyUnboundedSuite.scala | 27 +- .../observers/SafeSubscriberSuite.scala | 4 +- .../observers/StoppedObserverSuite.scala | 2 +- .../observers/SubscriberFeedSuite.scala | 2 +- .../reactive/subjects/AsyncSubjectSuite.scala | 2 +- .../subjects/BaseConcurrentSubjectSuite.scala | 2 +- .../reactive/subjects/BaseSubjectSuite.scala | 4 +- .../subjects/BehaviorSubjectSuite.scala | 2 +- .../ConcurrentAsyncSubjectSuite.scala | 2 +- .../ConcurrentBehaviorSubjectSuite.scala | 2 +- .../ConcurrentPublishSubjectSuite.scala | 2 +- .../subjects/ProfunctorSubjectSuite.scala | 2 +- .../subjects/PublishSubjectSuite.scala | 2 +- .../subjects/ReplaySubjectSuite.scala | 2 +- .../src/main/scala/monix/tail/Iterant.scala | 68 +- .../scala/monix/tail/IterantBuilders.scala | 42 +- .../scala/monix/tail/batches/ArrayBatch.scala | 4 +- .../monix/tail/batches/ArrayCursor.scala | 4 +- .../monix/tail/batches/BatchCursor.scala | 2 +- .../monix/tail/internal/IterantAttempt.scala | 29 +- .../monix/tail/internal/IterantBuffer.scala | 11 +- .../tail/internal/IterantCompleteL.scala | 6 +- .../monix/tail/internal/IterantConcat.scala | 2 +- .../monix/tail/internal/IterantConsume.scala | 10 +- .../IterantDistinctUntilChanged.scala | 2 +- .../monix/tail/internal/IterantDrop.scala | 2 +- .../monix/tail/internal/IterantDropLast.scala | 2 +- .../tail/internal/IterantDropWhile.scala | 2 +- .../internal/IterantDropWhileWithIndex.scala | 2 +- .../monix/tail/internal/IterantDump.scala | 50 +- .../monix/tail/internal/IterantFilter.scala | 2 +- .../tail/internal/IterantFoldLeftL.scala | 6 +- .../tail/internal/IterantFoldRightL.scala | 6 +- .../tail/internal/IterantFoldWhileLeftL.scala | 10 +- .../tail/internal/IterantFromConsumer.scala | 8 +- .../IterantFromReactivePublisher.scala | 9 +- .../tail/internal/IterantHeadOptionL.scala | 6 +- .../tail/internal/IterantInterleave.scala | 8 +- .../tail/internal/IterantIntersperse.scala | 93 +-- .../internal/IterantIntervalAtFixedRate.scala | 5 +- .../IterantIntervalWithFixedDelay.scala | 8 +- .../monix/tail/internal/IterantLiftMap.scala | 5 +- .../monix/tail/internal/IterantMap.scala | 2 +- .../monix/tail/internal/IterantMapBatch.scala | 2 +- .../internal/IterantOnErrorHandleWith.scala | 41 +- .../tail/internal/IterantPushToChannel.scala | 9 +- .../monix/tail/internal/IterantReduce.scala | 6 +- .../monix/tail/internal/IterantRepeat.scala | 4 +- .../tail/internal/IterantRetryIfEmpty.scala | 2 +- .../monix/tail/internal/IterantScan.scala | 2 +- .../monix/tail/internal/IterantTail.scala | 2 +- .../monix/tail/internal/IterantTake.scala | 17 +- .../tail/internal/IterantTakeEveryNth.scala | 2 +- .../monix/tail/internal/IterantTakeLast.scala | 4 +- .../tail/internal/IterantTakeWhile.scala | 15 +- .../internal/IterantTakeWhileWithIndex.scala | 15 +- .../internal/IterantToReactivePublisher.scala | 23 +- .../monix/tail/internal/IterantUncons.scala | 2 +- .../monix/tail/internal/IterantZipMap.scala | 26 +- .../tail/internal/IterantZipWithIndex.scala | 45 +- .../scala/monix/tail/internal/package.scala | 2 +- .../scala/monix/tail/ArbitraryInstances.scala | 15 +- .../test/scala/monix/tail/BaseLawsSuite.scala | 2 +- .../monix/tail/BatchCursorEmptySuite.scala | 2 +- .../scala/monix/tail/BatchCursorSuite.scala | 4 +- .../scala/monix/tail/BatchEmptySuite.scala | 2 +- .../test/scala/monix/tail/BatchSuite.scala | 4 +- .../monix/tail/IntervalIntervalSuite.scala | 11 +- .../scala/monix/tail/IterantBasicSuite.scala | 4 +- .../scala/monix/tail/IterantBufferSuite.scala | 2 +- .../monix/tail/IterantChannelSuite.scala | 8 +- .../monix/tail/IterantCollectSuite.scala | 2 +- .../monix/tail/IterantCompleteLSuite.scala | 15 +- .../scala/monix/tail/IterantConcatSuite.scala | 4 +- .../monix/tail/IterantDropLastSuite.scala | 2 +- .../scala/monix/tail/IterantDropSuite.scala | 4 +- .../tail/IterantDropWhileIndexSuite.scala | 2 +- .../monix/tail/IterantDropWhileSuite.scala | 2 +- .../scala/monix/tail/IterantDumpSuite.scala | 6 +- .../scala/monix/tail/IterantFilterSuite.scala | 2 +- .../monix/tail/IterantFlatMapSuite.scala | 4 +- .../monix/tail/IterantFoldLeftSuite.scala | 25 +- .../monix/tail/IterantFoldRightSuite.scala | 2 +- .../tail/IterantFoldWhileLeftSuite.scala | 38 +- .../tail/IterantFromIndexedSeqSuite.scala | 2 +- .../monix/tail/IterantFromIterableSuite.scala | 2 +- .../monix/tail/IterantFromListSuite.scala | 2 +- .../IterantFromReactivePublisherSuite.scala | 10 +- .../IterantFromReactiveStreamAsyncSuite.scala | 11 +- .../tail/IterantFromStateActionSuite.scala | 6 +- .../monix/tail/IterantHeadOptionSuite.scala | 19 +- .../monix/tail/IterantLastOptionSuite.scala | 19 +- .../monix/tail/IterantLiftMapSuite.scala | 2 +- .../monix/tail/IterantMapBatchSuite.scala | 10 +- .../monix/tail/IterantMapEvalSuite.scala | 4 +- .../scala/monix/tail/IterantMapSuite.scala | 4 +- .../monix/tail/IterantOnErrorSuite.scala | 40 +- .../scala/monix/tail/IterantReduceSuite.scala | 15 +- .../scala/monix/tail/IterantRepeatSuite.scala | 7 +- .../monix/tail/IterantResourceSuite.scala | 5 +- .../monix/tail/IterantRetryIfEmptySuite.scala | 5 +- .../monix/tail/IterantScanEvalSuite.scala | 3 +- .../scala/monix/tail/IterantStatesSuite.scala | 4 +- .../tail/IterantSwitchIfEmptySuite.scala | 8 +- .../scala/monix/tail/IterantTailSuite.scala | 2 +- .../monix/tail/IterantTakeEveryNthSuite.scala | 2 +- .../monix/tail/IterantTakeLastSuite.scala | 2 +- .../scala/monix/tail/IterantTakeSuite.scala | 4 +- .../monix/tail/IterantTakeWhileSuite.scala | 4 +- .../tail/IterantTakeWhileWithIndexSuite.scala | 8 +- .../IterantToReactivePublisherSuite.scala | 7 +- .../scala/monix/tail/IterantZipMapSuite.scala | 17 +- .../monix/tail/IterantZipWithIndexSuite.scala | 4 +- .../monix/tail/ThrowExceptionBatch.scala | 2 +- project/MimaFilters.scala | 24 +- project/MonixBuildUtils.scala | 14 +- project/plugins.sbt | 2 +- 757 files changed, 5106 insertions(+), 3577 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c617ec3fa..6769ff8ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,6 +111,10 @@ jobs: mima: name: Mima / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} runs-on: ubuntu-20.04 + + env: + CI: true + strategy: fail-fast: false matrix: @@ -151,9 +155,60 @@ jobs: SCALA_VERSION: ${{ matrix.scala }} SBT_COMMAND: mimaReportBinaryIssues + scalafmt: + name: Scalafmt / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} + runs-on: ubuntu-20.04 + + env: + CI: true + + strategy: + fail-fast: false + matrix: + include: + - { java: 11, scala: 2.12.15 } + - { java: 11, scala: 2.13.8 } + - { java: 11, scala: 3.1.2 } + + steps: + - uses: actions/checkout@v2 + - uses: olafurpg/setup-scala@v10 + with: + java-version: "adopt@1.${{ matrix.java }}" + + - name: Cache ivy2 + uses: actions/cache@v1 + with: + path: ~/.ivy2/cache + key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Cache coursier (linux) + if: contains(runner.os, 'linux') + uses: actions/cache@v1 + with: + path: ~/.cache/coursier/v1 + key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Cache sbt + uses: actions/cache@v1 + with: + path: ~/.sbt + key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: sbt scalafmtCheckAll + run: | + ./.github/scripts/exec-sbt-command + env: + SCALA_VERSION: ${{ matrix.scala }} + SBT_COMMAND: scalafmtCheckAll + unidoc: name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} runs-on: ubuntu-20.04 + + env: + CI: true + strategy: fail-fast: false matrix: @@ -196,7 +251,7 @@ jobs: all_tests: name: All Tests - needs: [ jvm-tests, js-tests, mima, unidoc ] + needs: [ jvm-tests, js-tests, mima, scalafmt, unidoc ] runs-on: ubuntu-20.04 steps: - name: Ack @@ -208,6 +263,9 @@ jobs: if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x') needs: [ all_tests ] + env: + CI: true + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index ffb83e1dc..d5da0c1f9 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -16,6 +16,9 @@ jobs: publish: name: Publish to Sonatype (Request) + env: + CI: true + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.scalafmt.conf b/.scalafmt.conf index 2b0608e38..e40e7acdc 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,67 +1,61 @@ -version = "3.0.2" - -maxColumn = 120 -docstrings = ScalaDoc +version = "3.5.2" +runner.dialect = scala213source3 project.git = true preset = default -# Alignment is cool, until we have to view diffs and solve merge conflicts align.preset = none +align.tokens = [ + {code = "<-"}, +] -# If true, the margin character | is aligned with the opening triple quote string literals -assumeStandardLibraryStripMargin = true +fileOverride { + "glob:**/src/main/scala_3.0/**" { + runner.dialect = scala3 + }, + "glob:**/*.sbt" { + align.tokens = [ + {code = "<-"}, + {code = "="}, + {code = "%", owners = [{regex = "Term.ApplyInfix"}]}, + {code = "%%", owners = [{regex = "Term.ApplyInfix"}]} + ] + }, + "glob:**/project/*.scala" { + align.tokens = [ + {code = "<-"}, + {code = "="}, + {code = "%", owners = [{regex = "Term.ApplyInfix"}]}, + {code = "%%", owners = [{regex = "Term.ApplyInfix"}]} + ] + } +} -#From scalafmt website: -#see: http://scalameta.org/scalafmt/#includeCurlyBraceInSelectChains -includeCurlyBraceInSelectChains = false +docstrings.style = keep +maxColumn = 120 rewrite.rules = [ SortImports, AvoidInfix, ] +spaces.inImportCurlyBraces = true +includeNoParensInSelectChains = false +trailingCommas = preserve + continuationIndent { callSite = 2 defnSite = 2 extendSite = 2 } -danglingParentheses = false - -newlines { - alwaysBeforeTopLevelStatements = false - sometimesBeforeColonInMethodReturnType = true - penalizeSingleSelectMultiArgList = false - alwaysBeforeElseAfterCurlyIf = false - neverInResultType = false -} - -spaces { - afterKeywordBeforeParen = true -} - -binPack { - parentConstructors = true - literalArgumentLists = true -} - optIn { - breaksInsideChains = false - breakChainOnFirstMethodDot = true - configStyleArguments = true - blankLineBeforeDocstring = true + forceBlankLineBeforeDocstring = false } -runner { - optimizer { - # Set to -1 to disable. Number of characters needed to trigger "config-style" formatting - # see: http://scalameta.org/scalafmt/#runner.optimizer.forceConfigStyleOnOffset - forceConfigStyleOnOffset = 150 - - # minimum number of func arguments before config-style (look at top of file) is enabled - forceConfigStyleMinArgCount = 2 - } +newlines { + source = keep + afterCurlyLambdaParams = preserve + beforeCurlyLambdaParams = multilineWithCaseOnly + topLevelBodyIfMinStatements = [] } - -lineEndings=preserve diff --git a/build.sbt b/build.sbt index 31c757ae5..579e567ac 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ import sbt.Keys.version -import sbt.{Def, Global, Tags} +import sbt.{ Def, Global, Tags } import scala.collection.immutable.SortedSet import MonixBuildUtils._ @@ -14,26 +14,41 @@ val jvmTests = List( "tracingTests" ).map(_ + "/test").mkString(" ;") -addCommandAlias("ci-all", ";ci-jvm ;ci-js ;ci-meta") -addCommandAlias("ci-js", ";clean ;coreJS/Test/compile ;coreJS/test ;coreJS/package") -addCommandAlias("ci-jvm", ";clean ;coreJVM/Test/compile ;coreJVM/test ;coreJVM/package ;tracingTests/test") -addCommandAlias("ci-meta", ";mimaReportBinaryIssues ;unidoc") -addCommandAlias("ci-release", ";+publishSigned ;sonatypeBundleRelease") +addCommandAlias( + "ci-all", + ";ci-jvm ;ci-js ;ci-meta" +) +addCommandAlias( + "ci-js", + ";clean ;coreJS/Test/compile ;coreJS/test ;coreJS/package" +) +addCommandAlias( + "ci-jvm", + ";clean ;coreJVM/Test/compile ;coreJVM/test ;coreJVM/package ;tracingTests/test" +) +addCommandAlias( + "ci-meta", + ";mimaReportBinaryIssues ;unidoc" +) +addCommandAlias( + "ci-release", + ";+publishSigned ;sonatypeBundleRelease" +) // ------------------------------------------------------------------------------------------------ // Dependencies - Versions -val cats_Version = "2.7.0" -val catsEffect_Version = "2.5.4" -val fs2_Version = "2.5.11" -val jcTools_Version = "3.3.0" -val reactiveStreams_Version = "1.0.3" -val minitest_Version = "2.9.6" -val implicitBox_Version = "0.3.4" -val kindProjector_Version = "0.13.2" +val cats_Version = "2.7.0" +val catsEffect_Version = "2.5.4" +val fs2_Version = "2.5.11" +val jcTools_Version = "3.3.0" +val reactiveStreams_Version = "1.0.3" +val minitest_Version = "2.9.6" +val implicitBox_Version = "0.3.4" +val kindProjector_Version = "0.13.2" val betterMonadicFor_Version = "0.3.1" -val silencer_Version = "1.7.8" -val scalaCompat_Version = "2.7.0" +val silencer_Version = "1.7.8" +val scalaCompat_Version = "2.7.0" // The Monix version with which we must keep binary compatibility. // https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin @@ -97,17 +112,23 @@ lazy val silencerCompilerPlugin = "com.github.ghik" % "silencer-plugin" % silencer_Version cross CrossVersion.full lazy val macroDependencies = - libraryDependencies ++= (if (isDotty.value) Seq() else Seq( - scalaReflectLib.value % Provided, - scalaCompilerLib.value % Provided -)) + Seq( + libraryDependencies ++= ( + if (isDotty.value) Seq() + else + Seq( + scalaReflectLib.value % Provided, + scalaCompilerLib.value % Provided + ) + ) + ) lazy val testDependencies = Seq( testFrameworks := Seq(new TestFramework("minitest.runner.Framework")), libraryDependencies ++= Seq( - minitestLib.value % Test, - catsLawsLib.value % Test, - catsEffectLawsLib.value % Test, + minitestLib.value % Test, + catsLawsLib.value % Test, + catsEffectLawsLib.value % Test ) ) @@ -150,7 +171,6 @@ lazy val sharedSettings = pgpSettings ++ Seq( scalaVersion := crossScalaVersionsFromBuildYaml.value.head.value, // Value extracted from .github/workflows/build.yml crossScalaVersions := crossScalaVersionsFromBuildYaml.value.toIndexedSeq.map(_.value), - gitHubTreeTagOrHash := { val ver = s"v${version.value}" if (isSnapshot.value) @@ -167,7 +187,7 @@ lazy val sharedSettings = pgpSettings ++ Seq( case _ => Seq.empty } }, - */ + */ // Disabled from the sbt-tpolecat set Compile / scalacOptions --= Seq( @@ -192,7 +212,6 @@ lazy val sharedSettings = pgpSettings ++ Seq( else Seq("-P:silencer:pathFilters=.*[/]src_managed[/].*") }, - scalacOptions --= { if (isDotty.value) Seq("-Xfatal-warnings") @@ -211,9 +230,8 @@ lazy val sharedSettings = pgpSettings ++ Seq( compilerPlugin(silencerCompilerPlugin) ) }, - libraryDependencies ++= Seq( - scalaCollectionCompatLib.value % "provided;optional", + scalaCollectionCompatLib.value % "provided;optional" ), // ScalaDoc settings autoAPIMappings := true, @@ -223,7 +241,8 @@ lazy val sharedSettings = pgpSettings ++ Seq( // absolute path of the source file, the absolute path of that file // will be put into the FILE_SOURCE variable, which is // definitely not what we want. - "-sourcepath", file(".").getAbsolutePath.replaceAll("[.]$", "") + "-sourcepath", + file(".").getAbsolutePath.replaceAll("[.]$", "") ), // Without this setting, the outcome of a test-suite will be printed all at @@ -251,43 +270,41 @@ lazy val sharedSettings = pgpSettings ++ Seq( // Only on the Series 4.x branch ThisBuild / dynverVTagPrefix := false, - publishMavenStyle := true, Test / publishArtifact := false, pomIncludeRepository := { _ => false }, // removes optional dependencies licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), homepage := Some(url("https://monix.io")), - headerLicense := Some(HeaderLicense.Custom( - """|Copyright (c) 2014-2021 by The Monix Project Developers. - |See the project homepage at: https://monix.io - | - |Licensed under the Apache License, Version 2.0 (the "License"); - |you may not use this file except in compliance with the License. - |You may obtain a copy of the License at - | - | http://www.apache.org/licenses/LICENSE-2.0 - | - |Unless required by applicable law or agreed to in writing, software - |distributed under the License is distributed on an "AS IS" BASIS, - |WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - |See the License for the specific language governing permissions and - |limitations under the License.""" - .stripMargin)), - + headerLicense := Some(HeaderLicense.Custom(""" + |Copyright (c) 2014-2021 by The Monix Project Developers. + |See the project homepage at: https://monix.io + | + |Licensed under the Apache License, Version 2.0 (the "License"); + |you may not use this file except in compliance with the License. + |You may obtain a copy of the License at + | + | http://www.apache.org/licenses/LICENSE-2.0 + | + |Unless required by applicable law or agreed to in writing, software + |distributed under the License is distributed on an "AS IS" BASIS, + |WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + |See the License for the specific language governing permissions and + |limitations under the License.""".trim.stripMargin)), scmInfo := Some( ScmInfo( url("https://github.com/monix/monix"), "scm:git@github.com:monix/monix.git" - )), - + ) + ), developers := List( Developer( - id="alexelcu", - name="Alexandru Nedelcu", - email="noreply@alexn.org", - url=url("https://alexn.org") - )) + id = "alexelcu", + name = "Alexandru Nedelcu", + email = "noreply@alexn.org", + url = url("https://alexn.org") + ) + ) ) lazy val sharedSourcesSettings = Seq( @@ -299,15 +316,15 @@ lazy val sharedSourcesSettings = Seq( } ) -def scalaPartV = Def setting (CrossVersion partialVersion scalaVersion.value) +def scalaPartV = Def.setting(CrossVersion.partialVersion(scalaVersion.value)) lazy val crossVersionSourcesSettings: Seq[Setting[_]] = Seq(Compile, Test).map { sc => (sc / unmanagedSourceDirectories) ++= { (sc / unmanagedSourceDirectories).value.flatMap { dir => scalaPartV.value match { case Some((2, 12)) => Seq(new File(dir.getPath + "_2.13-"), new File(dir.getPath + "_3.0-")) - case Some((3, _)) => Seq(new File(dir.getPath + "_3.0")) - case _ => Seq(new File(dir.getPath + "_2.13+"), new File(dir.getPath + "_3.0-")) + case Some((3, _)) => Seq(new File(dir.getPath + "_3.0")) + case _ => Seq(new File(dir.getPath + "_2.13+"), new File(dir.getPath + "_3.0-")) } } } @@ -336,7 +353,7 @@ lazy val assemblyShadeSettings = Seq( // prevent original dependency to be added to pom as runtime dep makePomConfiguration := makePomConfiguration.value.withConfigurations(Vector.empty), // package by running assembly - Compile / packageBin := ReproducibleBuildsPlugin.postProcessJar((Compile / assembly).value), + Compile / packageBin := ReproducibleBuildsPlugin.postProcessJar((Compile / assembly).value) ) lazy val unidocSettings = Seq( @@ -344,11 +361,10 @@ lazy val unidocSettings = Seq( inProjects(executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM), // Exclude monix.*.internal from ScalaDoc - ScalaUnidoc / unidoc / sources ~= (_ filterNot { file => + ScalaUnidoc / unidoc / sources ~= (_.filterNot { file => // Exclude all internal Java files from documentation - file.getCanonicalPath matches "^.*monix.+?internal.*?\\.java$" + file.getCanonicalPath.matches("^.*monix.+?internal.*?\\.java$") }), - ScalaUnidoc / unidoc / scalacOptions += "-Xfatal-warnings", ScalaUnidoc / unidoc / scalacOptions --= @@ -375,7 +391,7 @@ lazy val sharedJSSettings = Seq( // Use globally accessible (rather than local) source paths in JS source maps s"-P:scalajs:mapSourceURI:$l->$g", // Silence ExecutionContext.global warning - "-P:scalajs:nowarnGlobalExecutionContext", + "-P:scalajs:nowarnGlobalExecutionContext" ) } } @@ -404,19 +420,25 @@ def baseSettingsAndPlugins(publishArtifacts: Boolean): Project ⇒ Project = case "coverage" => pr case _ => pr.disablePlugins(scoverage.ScoverageSbtPlugin) } + val isCI = sys.env.getOrElse("SBT_PROFILE", "").contains("ci") || + sys.env.get("CI").exists(v => v == "true" || v == "1" || v == "yes") + withCoverage .enablePlugins(AutomateHeaderPlugin) .settings(sharedSettings) .settings(if (publishArtifacts) Seq.empty else doNotPublishArtifactSettings) - .settings(filterOutMultipleDependenciesFromGeneratedPomXml( - "groupId" -> "org.scoverage".r :: Nil, - "groupId" -> "org.typelevel".r :: "artifactId" -> "simulacrum".r :: Nil, - )) + .settings(scalafmtOnCompile := !isCI) + .settings( + filterOutMultipleDependenciesFromGeneratedPomXml( + "groupId" -> "org.scoverage".r :: Nil, + "groupId" -> "org.typelevel".r :: "artifactId" -> "simulacrum".r :: Nil + ) + ) } def monixSubModule( projectName: String, - publishArtifacts: Boolean, + publishArtifacts: Boolean ): Project => Project = pr => { pr.configure(baseSettingsAndPlugins(publishArtifacts = publishArtifacts)) .enablePlugins(ReproducibleBuildsPlugin) @@ -429,7 +451,7 @@ def jvmModule( projectName: String, withMimaChecks: Boolean, withDocTests: Boolean, - publishArtifacts: Boolean, + publishArtifacts: Boolean ): Project => Project = pr => { pr.configure(monixSubModule(projectName, publishArtifacts = publishArtifacts)) @@ -448,29 +470,31 @@ def jsProfile(projectName: String, publishArtifacts: Boolean): Project => Projec def crossModule( projectName: String, - withMimaChecks: Boolean = true, - withDocTests: Boolean = true, - publishArtifacts: Boolean = true, - crossSettings: Seq[sbt.Def.SettingsDefinition] = Nil): MonixCrossModule = { + withMimaChecks: Boolean = true, + withDocTests: Boolean = true, + publishArtifacts: Boolean = true, + crossSettings: Seq[sbt.Def.SettingsDefinition] = Nil +): MonixCrossModule = { MonixCrossModule( jvm = jvmModule( - projectName = projectName, - withMimaChecks = withMimaChecks, - withDocTests = withDocTests, + projectName = projectName, + withMimaChecks = withMimaChecks, + withDocTests = withDocTests, publishArtifacts = publishArtifacts - ).andThen(_.settings(crossSettings:_*)), + ).andThen(_.settings(crossSettings: _*)), js = jsProfile( - projectName = projectName, + projectName = projectName, publishArtifacts = publishArtifacts - ).andThen(_.settings(crossSettings:_*)) + ).andThen(_.settings(crossSettings: _*)) ) } // ------------------------------------------------------------------------------------------------ // Projects -lazy val monix = project.in(file(".")) +lazy val monix = project + .in(file(".")) .configure(baseSettingsAndPlugins(publishArtifacts = false)) .enablePlugins(ScalaUnidocPlugin) .aggregate(coreJVM, coreJS) @@ -489,7 +513,8 @@ lazy val monix = project.in(file(".")) // // Used in CI when publishing artifacts to Sonatype Global / publishStableMonixVersion := { - sys.env.get("PUBLISH_STABLE_VERSION") + sys.env + .get("PUBLISH_STABLE_VERSION") .exists(v => v == "true" || v == "1" || v == "yes") }, // @@ -497,7 +522,7 @@ lazy val monix = project.in(file(".")) Global / onChangedBuildSource := ReloadOnSourceChanges, Global / excludeLintKeys ++= Set( Compile / gitHubTreeTagOrHash, - Compile / coverageExcludedFiles, + Compile / coverageExcludedFiles ), // https://github.com/lightbend/mima/pull/289 ThisBuild / mimaFailOnNoPrevious := false @@ -508,19 +533,22 @@ lazy val monix = project.in(file(".")) lazy val coreProfile = crossModule( - projectName = "monix", + projectName = "monix", withMimaChecks = false, - withDocTests = false, + withDocTests = false, crossSettings = Seq( description := "Root project for Monix, a library for asynchronous programming in Scala. See: https://monix.io" - )) + ) + ) -lazy val coreJVM = project.in(file("monix/jvm")) +lazy val coreJVM = project + .in(file("monix/jvm")) .configure(coreProfile.jvm) .dependsOn(executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM, javaJVM) .aggregate(executionShadedJCTools, executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM, javaJVM) -lazy val coreJS = project.in(file("monix/js")) +lazy val coreJS = project + .in(file("monix/js")) .configure(coreProfile.js) .dependsOn(executionJS, catnapJS, evalJS, tailJS, reactiveJS) .aggregate(executionJS, catnapJS, evalJS, tailJS, reactiveJS) @@ -528,20 +556,24 @@ lazy val coreJS = project.in(file("monix/js")) // -------------------------------------------- // monix-internal-jctools (shaded lib) -lazy val executionShadedJCTools = project.in(file("monix-execution/shaded/jctools")) - .configure(jvmModule( - projectName = "monix-internal-jctools", - withMimaChecks = false, - withDocTests = false, - publishArtifacts = true - )) +lazy val executionShadedJCTools = project + .in(file("monix-execution/shaded/jctools")) + .configure( + jvmModule( + projectName = "monix-internal-jctools", + withMimaChecks = false, + withDocTests = false, + publishArtifacts = true + ) + ) .settings(assemblyShadeSettings) .settings( description := "Monix Execution Shaded JCTools is a shaded version of JCTools library. See: https://github.com/JCTools/JCTools", libraryDependencies := Seq(jcToolsLib % "optional;provided"), // https://github.com/sbt/sbt-assembly#shading assembly / assemblyShadeRules := Seq( - ShadeRule.rename("org.jctools.**" -> "monix.execution.internal.jctools.@1") + ShadeRule + .rename("org.jctools.**" -> "monix.execution.internal.jctools.@1") .inLibrary("org.jctools" % "jctools-core" % jcTools_Version % "optional;provided") .inAll ) @@ -552,20 +584,23 @@ lazy val executionShadedJCTools = project.in(file("monix-execution/shaded/jctool lazy val executionProfile = crossModule( - projectName = "monix-execution", + projectName = "monix-execution", withDocTests = false, crossSettings = Seq( description := "Sub-module of Monix, exposing low-level primitives for dealing with async execution. See: https://monix.io", libraryDependencies += implicitBoxLib.value - )) + ) + ) -lazy val executionJVM = project.in(file("monix-execution/jvm")) +lazy val executionJVM = project + .in(file("monix-execution/jvm")) .configure(executionProfile.jvm) .settings(macroDependencies) .dependsOn(executionShadedJCTools) .settings(libraryDependencies += reactiveStreamsLib) -lazy val executionJS = project.in(file("monix-execution/js")) +lazy val executionJS = project + .in(file("monix-execution/js")) .configure(executionProfile.js) .settings(macroDependencies) @@ -578,13 +613,16 @@ lazy val catnapProfile = crossSettings = Seq( description := "Sub-module of Monix, exposing pure abstractions built on top of the Cats-Effect type classes. See: https://monix.io", libraryDependencies += catsEffectLib.value - )) + ) + ) -lazy val catnapJVM = project.in(file("monix-catnap/jvm")) +lazy val catnapJVM = project + .in(file("monix-catnap/jvm")) .configure(catnapProfile.jvm) .dependsOn(executionJVM % "compile->compile; test->test") -lazy val catnapJS = project.in(file("monix-catnap/js")) +lazy val catnapJS = project + .in(file("monix-catnap/js")) .configure(catnapProfile.js) .dependsOn(executionJS % "compile->compile; test->test") @@ -596,14 +634,17 @@ lazy val evalProfile = projectName = "monix-eval", crossSettings = Seq( description := "Sub-module of Monix, exposing Task and Coeval, for suspending side-effects. See: https://monix.io" - )) + ) + ) -lazy val evalJVM = project.in(file("monix-eval/jvm")) +lazy val evalJVM = project + .in(file("monix-eval/jvm")) .configure(evalProfile.jvm) .dependsOn(executionJVM % "compile->compile; test->test") .dependsOn(catnapJVM) -lazy val evalJS = project.in(file("monix-eval/js")) +lazy val evalJS = project + .in(file("monix-eval/js")) .configure(evalProfile.js) .dependsOn(executionJS % "compile->compile; test->test") .dependsOn(catnapJS) @@ -616,14 +657,17 @@ lazy val tailProfile = projectName = "monix-tail", crossSettings = Seq( description := "Sub-module of Monix, exposing Iterant for purely functional pull based streaming. See: https://monix.io" - )) + ) + ) -lazy val tailJVM = project.in(file("monix-tail/jvm")) +lazy val tailJVM = project + .in(file("monix-tail/jvm")) .configure(tailProfile.jvm) .dependsOn(evalJVM % "test->test") .dependsOn(catnapJVM) -lazy val tailJS = project.in(file("monix-tail/js")) +lazy val tailJS = project + .in(file("monix-tail/js")) .configure(tailProfile.js) .dependsOn(evalJS % "test->test") .dependsOn(catnapJS) @@ -636,53 +680,66 @@ lazy val reactiveProfile = projectName = "monix-reactive", crossSettings = Seq( description := "Sub-module of Monix, exposing the Observable pattern for modeling of reactive streams. See: https://monix.io" - )) + ) + ) -lazy val reactiveJVM = project.in(file("monix-reactive/jvm")) +lazy val reactiveJVM = project + .in(file("monix-reactive/jvm")) .configure(reactiveProfile.jvm) .dependsOn(executionJVM, evalJVM % "compile->compile; test->test") -lazy val reactiveJS = project.in(file("monix-reactive/js")) +lazy val reactiveJS = project + .in(file("monix-reactive/js")) .configure(reactiveProfile.js) .dependsOn(executionJS, evalJS % "compile->compile; test->test") // -------------------------------------------- // monix-java -lazy val javaJVM = project.in(file("monix-java")) - .configure(jvmModule( - projectName = "monix-java", - withMimaChecks = true, - withDocTests = true, - publishArtifacts = true - )) +lazy val javaJVM = project + .in(file("monix-java")) + .configure( + jvmModule( + projectName = "monix-java", + withMimaChecks = true, + withDocTests = true, + publishArtifacts = true + ) + ) .dependsOn(executionJVM % "provided->compile; test->test") .dependsOn(evalJVM % "provided->compile; test->test") // -------------------------------------------- // monix-reactive-tests (not published) -lazy val reactiveTests = project.in(file("reactiveTests")) - .configure(monixSubModule( - "monix-reactive-tests", - publishArtifacts = false - )) +lazy val reactiveTests = project + .in(file("reactiveTests")) + .configure( + monixSubModule( + "monix-reactive-tests", + publishArtifacts = false + ) + ) .dependsOn(reactiveJVM, tailJVM) .settings( libraryDependencies ++= Seq( reactiveStreamsTCKLib % Test - )) + ) + ) // -------------------------------------------- // monix-tracing-tests (not published) lazy val FullTracingTest = config("fulltracing").extend(Test) -lazy val tracingTests = project.in(file("tracingTests")) - .configure(monixSubModule( - "monix-tracing-tests", - publishArtifacts = false - )) +lazy val tracingTests = project + .in(file("tracingTests")) + .configure( + monixSubModule( + "monix-tracing-tests", + publishArtifacts = false + ) + ) .dependsOn(evalJVM % "compile->compile; test->test") .configs(FullTracingTest) .settings(testFrameworks := Seq(new TestFramework("minitest.runner.Framework"))) @@ -709,44 +766,49 @@ lazy val tracingTests = project.in(file("tracingTests")) lazy val benchmarksScalaVersions = Def.setting { - crossScalaVersionsFromBuildYaml.value - .toIndexedSeq + crossScalaVersionsFromBuildYaml.value.toIndexedSeq .filter(v => !v.value.startsWith("3.")) .map(_.value) } -lazy val benchmarksPrev = project.in(file("benchmarks/vprev")) +lazy val benchmarksPrev = project + .in(file("benchmarks/vprev")) .enablePlugins(JmhPlugin) - .configure(monixSubModule( - "monix-benchmarks-prev", - publishArtifacts = false - )) + .configure( + monixSubModule( + "monix-benchmarks-prev", + publishArtifacts = false + ) + ) .settings( // Disable Scala 3 (Dotty) scalaVersion := benchmarksScalaVersions.value.head, crossScalaVersions := benchmarksScalaVersions.value, libraryDependencies ++= Seq( - "io.monix" %% "monix" % "3.3.0", - "dev.zio" %% "zio-streams" % "1.0.0", - "co.fs2" %% "fs2-core" % fs2_Version, + "io.monix" %% "monix" % "3.3.0", + "dev.zio" %% "zio-streams" % "1.0.0", + "co.fs2" %% "fs2-core" % fs2_Version, "com.typesafe.akka" %% "akka-stream" % "2.6.9" ) ) -lazy val benchmarksNext = project.in(file("benchmarks/vnext")) +lazy val benchmarksNext = project + .in(file("benchmarks/vnext")) .enablePlugins(JmhPlugin) - .configure(monixSubModule( - projectName = "monix-benchmarks-next", - publishArtifacts = false - )) + .configure( + monixSubModule( + projectName = "monix-benchmarks-next", + publishArtifacts = false + ) + ) .dependsOn(reactiveJVM, tailJVM) .settings( // Disable Scala 3 (Dotty) scalaVersion := benchmarksScalaVersions.value.head, crossScalaVersions := benchmarksScalaVersions.value, libraryDependencies ++= Seq( - "dev.zio" %% "zio-streams" % "1.0.0", - "co.fs2" %% "fs2-core" % fs2_Version, + "dev.zio" %% "zio-streams" % "1.0.0", + "co.fs2" %% "fs2-core" % fs2_Version, "com.typesafe.akka" %% "akka-stream" % "2.6.9" ) ) diff --git a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala index 4b337cf9b..9838d8d4a 100644 --- a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala +++ b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala @@ -18,9 +18,9 @@ package monix.catnap package internal -import java.util.concurrent.{CancellationException, CompletableFuture, CompletionException} +import java.util.concurrent.{ CancellationException, CompletableFuture, CompletionException } import java.util.function.BiFunction -import cats.effect.{Async, Concurrent} +import cats.effect.{ Async, Concurrent } private[catnap] abstract class FutureLiftForPlatform { /** @@ -51,7 +51,8 @@ private[catnap] abstract class FutureLiftForPlatform { * and [[javaCompletableToAsync]]. */ def javaCompletableToConcurrentOrAsync[F[_], A](fa: F[CompletableFuture[A]])( - implicit F: Concurrent[F] OrElse Async[F]): F[A] = { + implicit F: Concurrent[F] OrElse Async[F] + ): F[A] = { F.unify match { case ref: Concurrent[F] @unchecked => javaCompletableToConcurrent(fa)(ref) @@ -65,7 +66,8 @@ private[catnap] abstract class FutureLiftForPlatform { * or `Async` data type. */ implicit def javaCompletableLiftForConcurrentOrAsync[F[_]]( - implicit F: Concurrent[F] OrElse Async[F]): FutureLift[F, CompletableFuture] = { + implicit F: Concurrent[F] OrElse Async[F] + ): FutureLift[F, CompletableFuture] = { F.unify match { case ref: Concurrent[F] @unchecked => diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala index 0e3e06b6e..9639da0b0 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala @@ -22,7 +22,7 @@ import minitest.SimpleTestSuite import cats.effect.IO import cats.implicits._ import monix.execution.atomic.Atomic -import scala.concurrent.{CancellationException, ExecutionContext} +import scala.concurrent.{ CancellationException, ExecutionContext } import scala.concurrent.duration._ object CatsEffectIssue380Suite extends SimpleTestSuite { diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala index d5a055060..4b606ffc6 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala @@ -19,7 +19,7 @@ package monix.catnap import cats.effect.IO import monix.execution.BufferCapacity.Bounded -import monix.execution.{BufferCapacity, Scheduler} +import monix.execution.{ BufferCapacity, Scheduler } import monix.execution.schedulers.SchedulerService import scala.concurrent.duration._ diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala index 5dcd39e9e..2300585ef 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala @@ -18,13 +18,13 @@ package monix.catnap import java.util.concurrent.CompletableFuture -import cats.effect.{Async, Concurrent, ContextShift, IO} +import cats.effect.{ Async, Concurrent, ContextShift, IO } import minitest.TestSuite import monix.catnap.syntax._ import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object FutureLiftJava8Suite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -94,7 +94,8 @@ object FutureLiftJava8Suite extends TestSuite[TestScheduler] { val p = Promise[Int]() val cancel = convertConcurrent(IO(future)).unsafeRunCancelable(r => - p.complete(r match { case Right(a) => Success(a); case Left(e) => Failure(e) })) + p.complete(r match { case Right(a) => Success(a); case Left(e) => Failure(e) }) + ) s.tick() assertEquals(p.future.value, None) diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala index 0e6ce88de..fe3f59f6a 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala @@ -23,7 +23,7 @@ import cats.implicits._ import cats.effect._ import cats.effect.concurrent.Deferred import minitest.TestSuite -import monix.execution.{Scheduler, TestUtils} +import monix.execution.{ Scheduler, TestUtils } import monix.execution.schedulers.SchedulerService import scala.concurrent.CancellationException diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala index 61ba921d2..50dedb21e 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala @@ -20,10 +20,10 @@ package monix.catnap import java.util.concurrent.atomic.AtomicBoolean import cats.effect.concurrent.Deferred -import cats.effect.{ContextShift, IO, Timer} +import cats.effect.{ ContextShift, IO, Timer } import cats.implicits._ import minitest.TestSuite -import monix.execution.{Scheduler, TestUtils} +import monix.execution.{ Scheduler, TestUtils } import monix.execution.schedulers.SchedulerService import scala.concurrent.CancellationException diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala index cb203177e..796773b7f 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala @@ -18,7 +18,7 @@ package monix.catnap import cats.Applicative -import cats.effect.{CancelToken, Sync} +import cats.effect.{ CancelToken, Sync } import cats.syntax.either._ import monix.catnap.cancelables.BooleanCancelableF import monix.execution.annotations.UnsafeBecauseImpure diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala index e4135d17f..0c7ebf5d0 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala @@ -17,12 +17,12 @@ package monix.catnap -import cats.effect.{Async, Clock, Concurrent, ExitCase, Sync} +import cats.effect.{ Async, Clock, Concurrent, ExitCase, Sync } import cats.implicits._ import monix.execution.CancelablePromise import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.atomic.{Atomic, AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ Atomic, AtomicAny, PaddingStrategy } import monix.execution.exceptions.ExecutionRejectedException import monix.execution.internal.Constants import scala.annotation.tailrec @@ -203,7 +203,8 @@ final class CircuitBreaker[F[_]] private ( onRejected: F[Unit], onClosed: F[Unit], onHalfOpen: F[Unit], - onOpen: F[Unit])(implicit F: Sync[F], clock: Clock[F]) { + onOpen: F[Unit] +)(implicit F: Sync[F], clock: Clock[F]) { require(_maxFailures >= 0, "maxFailures >= 0") require(_exponentialBackoffFactor >= 1, "exponentialBackoffFactor >= 1") @@ -357,7 +358,8 @@ final class CircuitBreaker[F[_]] private ( task: F[A], resetTimeout: FiniteDuration, await: CancelablePromise[Unit], - lastStartedAt: Timestamp): F[A] = + lastStartedAt: Timestamp + ): F[A] = F.bracketCase(onHalfOpen)(_ => task) { (_, exit) => exit match { case ExitCase.Canceled => @@ -417,7 +419,8 @@ final class CircuitBreaker[F[_]] private ( ExecutionRejectedException( "Rejected because the CircuitBreaker is in the Open state, " + s"attempting to close in $expiresInMillis millis" - )) + ) + ) } } } @@ -429,7 +432,8 @@ final class CircuitBreaker[F[_]] private ( F.raiseError( ExecutionRejectedException( "Rejected because the CircuitBreaker is in the HalfOpen state" - )) + ) + ) } } @@ -457,7 +461,8 @@ final class CircuitBreaker[F[_]] private ( onRejected = onRejected, onClosed = onClosed, onHalfOpen = onHalfOpen, - onOpen = onOpen) + onOpen = onOpen + ) } /** Returns a new circuit breaker that wraps the state of the source @@ -484,7 +489,8 @@ final class CircuitBreaker[F[_]] private ( onRejected = onRejected, onClosed = onClosed, onHalfOpen = onHalfOpen, - onOpen = onOpen) + onOpen = onOpen + ) } /** Returns a new circuit breaker that wraps the state of the source @@ -512,7 +518,8 @@ final class CircuitBreaker[F[_]] private ( onRejected = onRejected, onClosed = onClosed, onHalfOpen = onHalfOpen, - onOpen = onOpen) + onOpen = onOpen + ) } /** Returns a new circuit breaker that wraps the state of the source @@ -539,7 +546,8 @@ final class CircuitBreaker[F[_]] private ( onRejected = onRejected, onClosed = onClosed, onHalfOpen = onHalfOpen, - onOpen = onOpen) + onOpen = onOpen + ) } } @@ -706,7 +714,8 @@ object CircuitBreaker extends CircuitBreakerDocs { onHalfOpen = onHalfOpen, onOpen = onOpen, padding = padding - )) + ) + ) } /** Unsafe builder, an alternative to [[of CircuitBreaker[F].of]] for @@ -747,7 +756,8 @@ object CircuitBreaker extends CircuitBreakerDocs { onRejected = onRejected, onClosed = onClosed, onHalfOpen = onHalfOpen, - onOpen = onOpen)(F, clock) + onOpen = onOpen + )(F, clock) } } @@ -812,8 +822,8 @@ object CircuitBreaker extends CircuitBreakerDocs { final class Open private ( val startedAt: Timestamp, val resetTimeout: FiniteDuration, - private[catnap] val awaitClose: CancelablePromise[Unit]) - extends State { + private[catnap] val awaitClose: CancelablePromise[Unit] + ) extends State { /** The timestamp in milliseconds since the epoch, specifying * when the `Open` state is to transition to [[HalfOpen]]. @@ -826,8 +836,8 @@ object CircuitBreaker extends CircuitBreakerDocs { override def equals(other: Any): Boolean = other match { case that: Open => startedAt == that.startedAt && - resetTimeout == that.resetTimeout && - awaitClose == that.awaitClose + resetTimeout == that.resetTimeout && + awaitClose == that.awaitClose case _ => false } @@ -843,7 +853,8 @@ object CircuitBreaker extends CircuitBreakerDocs { private[catnap] def apply( startedAt: Timestamp, resetTimeout: FiniteDuration, - awaitClose: CancelablePromise[Unit]): Open = + awaitClose: CancelablePromise[Unit] + ): Open = new Open(startedAt, resetTimeout, awaitClose) /** Implements the pattern matching protocol. */ @@ -883,13 +894,13 @@ object CircuitBreaker extends CircuitBreakerDocs { */ final class HalfOpen private ( val resetTimeout: FiniteDuration, - private[catnap] val awaitClose: CancelablePromise[Unit]) - extends State { + private[catnap] val awaitClose: CancelablePromise[Unit] + ) extends State { override def equals(other: Any): Boolean = other match { case that: HalfOpen => resetTimeout == that.resetTimeout && - awaitClose == that.awaitClose + awaitClose == that.awaitClose case _ => false } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala index 13a82091c..25b4933da 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala @@ -18,18 +18,18 @@ package monix.catnap import cats.implicits._ -import cats.effect.{Concurrent, ContextShift, Resource} +import cats.effect.{ Concurrent, ContextShift, Resource } import monix.catnap.internal.QueueHelpers -import monix.execution.BufferCapacity.{Bounded, Unbounded} -import monix.execution.ChannelType.{MultiConsumer, MultiProducer} -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} +import monix.execution.BufferCapacity.{ Bounded, Unbounded } +import monix.execution.ChannelType.{ MultiConsumer, MultiProducer } +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.atomic.AtomicAny import monix.execution.atomic.PaddingStrategy.LeftRight128 -import monix.execution.internal.collection.{LowLevelConcurrentQueue => LowLevelQueue} -import monix.execution.internal.{Constants, Platform} -import monix.execution.{CancelablePromise, ChannelType} +import monix.execution.internal.collection.{ LowLevelConcurrentQueue => LowLevelQueue } +import monix.execution.internal.{ Constants, Platform } +import monix.execution.{ CancelablePromise, ChannelType } -import scala.annotation.{switch, tailrec} +import scala.annotation.{ switch, tailrec } import scala.collection.mutable.ArrayBuffer /** @@ -777,7 +777,8 @@ object ConcurrentChannel { if (!hasCapacity) { assert(producersAwait ne null, "producersAwait ne null (Bug!)") val offerWait = F.asyncF[Ack](cb => - helpers.sleepThenRepeat(producersAwait, () => tryPushToOurQueue(elem), pushFilter, pushManyMap, cb)) + helpers.sleepThenRepeat(producersAwait, () => tryPushToOurQueue(elem), pushFilter, pushManyMap, cb) + ) offerWait.flatMap { case Continue => loop(cursor) case Stop => helpers.stopF @@ -796,7 +797,8 @@ object ConcurrentChannel { producersAwait: AtomicAny[CancelablePromise[Unit]], consumersAwait: AtomicAny[CancelablePromise[Unit]], isFinished: () => Option[E], - helpers: Helpers[F])(implicit F: Concurrent[F], cs: ContextShift[F]) + helpers: Helpers[F] + )(implicit F: Concurrent[F], cs: ContextShift[F]) extends ConsumerF[F, E, A] { @tailrec @@ -857,7 +859,8 @@ object ConcurrentChannel { pullFilter, pullMap.asInstanceOf[Either[E, A] => Either[E, A]], cb - )) + ) + ) case value => F.pure(value) } @@ -921,7 +924,8 @@ object ConcurrentChannel { pullFilter, pullMap.asInstanceOf[Either[E, Seq[A]] => Either[E, Seq[A]]], cb - )) + ) + ) } } } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala index 2feb5054e..9f94fc00a 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala @@ -17,17 +17,17 @@ package monix.catnap -import cats.effect.{Concurrent, ContextShift} +import cats.effect.{ Concurrent, ContextShift } import cats.implicits._ import monix.catnap.internal.QueueHelpers -import monix.execution.BufferCapacity.{Bounded, Unbounded} +import monix.execution.BufferCapacity.{ Bounded, Unbounded } import monix.execution.ChannelType.MPMC -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.atomic.AtomicAny import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.internal.Constants -import monix.execution.internal.collection.{LowLevelConcurrentQueue => LowLevelQueue} -import monix.execution.{BufferCapacity, CancelablePromise, ChannelType} +import monix.execution.internal.collection.{ LowLevelConcurrentQueue => LowLevelQueue } +import monix.execution.{ BufferCapacity, CancelablePromise, ChannelType } import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer @@ -209,7 +209,7 @@ final class ConcurrentQueue[F[_], A] private ( def poll: F[A] = pollRef private[this] val pollRef = F.defer[A] { val happy = tryPollUnsafe() - //noinspection ForwardReference + // noinspection ForwardReference if (happy != null) F.pure(happy) else @@ -271,7 +271,7 @@ final class ConcurrentQueue[F[_], A] private ( * so it must be called from the same thread(s) that call [[poll]]. */ def clear: F[Unit] = clearRef - //noinspection ForwardReference + // noinspection ForwardReference private[this] val clearRef = F.delay { queue.clear() notifyProducers() @@ -440,7 +440,8 @@ object ConcurrentQueue { * @param F $concurrentParam */ def unbounded[F[_], A]( - chunkSizeHint: Option[Int] = None)(implicit F: Concurrent[F], cs: ContextShift[F]): F[ConcurrentQueue[F, A]] = + chunkSizeHint: Option[Int] = None + )(implicit F: Concurrent[F], cs: ContextShift[F]): F[ConcurrentQueue[F, A]] = withConfig(Unbounded(chunkSizeHint), MPMC) /** @@ -458,8 +459,10 @@ object ConcurrentQueue { */ @UnsafeProtocol def withConfig[F[_], A](capacity: BufferCapacity, channelType: ChannelType)( - implicit F: Concurrent[F], - cs: ContextShift[F]): F[ConcurrentQueue[F, A]] = { + implicit + F: Concurrent[F], + cs: ContextShift[F] + ): F[ConcurrentQueue[F, A]] = { F.delay(unsafe(capacity, channelType)) } @@ -485,8 +488,10 @@ object ConcurrentQueue { @UnsafeProtocol @UnsafeBecauseImpure def unsafe[F[_], A](capacity: BufferCapacity, channelType: ChannelType = MPMC)( - implicit F: Concurrent[F], - cs: ContextShift[F]): ConcurrentQueue[F, A] = { + implicit + F: Concurrent[F], + cs: ContextShift[F] + ): ConcurrentQueue[F, A] = { new ConcurrentQueue[F, A](capacity, channelType)(F, cs) } @@ -511,14 +516,16 @@ object ConcurrentQueue { * @see documentation for [[ConcurrentQueue.withConfig]] */ def withConfig[A](capacity: BufferCapacity, channelType: ChannelType = MPMC)( - implicit cs: ContextShift[F]): F[ConcurrentQueue[F, A]] = + implicit cs: ContextShift[F] + ): F[ConcurrentQueue[F, A]] = ConcurrentQueue.withConfig(capacity, channelType)(F, cs) /** * @see documentation for [[ConcurrentQueue.unsafe]] */ def unsafe[A](capacity: BufferCapacity, channelType: ChannelType = MPMC)( - implicit cs: ContextShift[F]): ConcurrentQueue[F, A] = + implicit cs: ContextShift[F] + ): ConcurrentQueue[F, A] = ConcurrentQueue.unsafe(capacity, channelType)(F, cs) } } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala index b0e6021fe..3d978d96e 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala @@ -16,7 +16,7 @@ */ package monix.catnap -import monix.execution.{BufferCapacity, ChannelType} +import monix.execution.{ BufferCapacity, ChannelType } import monix.execution.atomic.PaddingStrategy /** diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala index 8fdfa8357..872546af3 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala @@ -18,11 +18,11 @@ package monix.catnap import cats.~> -import cats.effect.{Async, Concurrent} +import cats.effect.{ Async, Concurrent } import monix.execution.CancelableFuture import monix.execution.internal.AttemptCallback import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.concurrent.{Future => ScalaFuture} +import scala.concurrent.{ Future => ScalaFuture } /** * A type class for conversions from [[scala.concurrent.Future]] or @@ -145,7 +145,8 @@ object FutureLift extends internal.FutureLiftForPlatform { * if the given `Future` is such an instance. */ def scalaToConcurrentOrAsync[F[_], MF[T] <: ScalaFuture[T], A](fa: F[MF[A]])( - implicit F: Concurrent[F] OrElse Async[F]): F[A] = { + implicit F: Concurrent[F] OrElse Async[F] + ): F[A] = { F.unify match { case ref: Concurrent[F] @unchecked => @@ -161,7 +162,8 @@ object FutureLift extends internal.FutureLiftForPlatform { * any `Concurrent` or `Async` data type. */ implicit def scalaFutureLiftForConcurrentOrAsync[F[_], MF[T] <: ScalaFuture[T]]( - implicit F: Concurrent[F] OrElse Async[F]): FutureLift[F, MF] = { + implicit F: Concurrent[F] OrElse Async[F] + ): FutureLift[F, MF] = { F.unify match { case ref: Concurrent[F] @unchecked => diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala index 93e578720..bbdccef2f 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala @@ -17,8 +17,8 @@ package monix.catnap -import cats.effect.concurrent.{Ref, MVar2 => CatsMVar} -import cats.effect.{Async, Concurrent, ContextShift} +import cats.effect.concurrent.{ MVar2 => CatsMVar, Ref } +import cats.effect.{ Async, Concurrent, ContextShift } import monix.catnap.internal.AsyncUtils import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding @@ -207,8 +207,10 @@ object MVar { * Builds an [[MVar]] instance with an `initial` value. */ def of[F[_], A](initial: A, ps: PaddingStrategy = NoPadding)( - implicit F: Concurrent[F] OrElse Async[F], - cs: ContextShift[F]): F[MVar[F, A]] = { + implicit + F: Concurrent[F] OrElse Async[F], + cs: ContextShift[F] + ): F[MVar[F, A]] = { F.fold( implicit F => F.delay(new MVar(new ConcurrentImpl(Some(initial), ps))), @@ -220,7 +222,8 @@ object MVar { * Builds an empty [[MVar]] instance. */ def empty[F[_], A]( - ps: PaddingStrategy = NoPadding)(implicit F: Concurrent[F] OrElse Async[F], cs: ContextShift[F]): F[MVar[F, A]] = { + ps: PaddingStrategy = NoPadding + )(implicit F: Concurrent[F] OrElse Async[F], cs: ContextShift[F]): F[MVar[F, A]] = { F.fold( implicit F => F.delay(new MVar(new ConcurrentImpl(None, ps))), @@ -317,9 +320,10 @@ object MVar { } private final class AsyncImpl[F[_], A](initial: Option[A], ps: PaddingStrategy)( - implicit val F: Async[F], - val cs: ContextShift[F]) - extends GenericVar[A, F[Unit]](initial, ps) with Impl[F, A] { + implicit + val F: Async[F], + val cs: ContextShift[F] + ) extends GenericVar[A, F[Unit]](initial, ps) with Impl[F, A] { protected def create[T](k: (Either[Throwable, T] => Unit) => F[Unit]): F[T] = AsyncUtils.cancelable(k) @@ -330,9 +334,10 @@ object MVar { } private final class ConcurrentImpl[F[_], A](initial: Option[A], ps: PaddingStrategy)( - implicit val F: Concurrent[F], - val cs: ContextShift[F]) - extends GenericVar[A, F[Unit]](initial, ps) with Impl[F, A] { + implicit + val F: Concurrent[F], + val cs: ContextShift[F] + ) extends GenericVar[A, F[Unit]](initial, ps) with Impl[F, A] { protected def create[T](k: (Either[Throwable, T] => Unit) => F[Unit]): F[T] = F.cancelable(k) @@ -343,7 +348,7 @@ object MVar { override def swap(newValue: A): F[A] = F.continual(take) { - case Left(t) => F.raiseError(t) + case Left(t) => F.raiseError(t) case Right(oldValue) => F.as(put(newValue), oldValue) } @@ -353,18 +358,18 @@ object MVar { override def modify[B](f: A => F[(A, B)]): F[B] = F.bracket(Ref[F].of[Option[A]](None)) { signal => F.flatMap(F.continual[A, A](take) { - case Left(t) => F.raiseError(t) + case Left(t) => F.raiseError(t) case Right(a) => F.as(signal.set(Some(a)), a) }) { a => F.continual[(A, B), B](f(a)) { - case Left(t) => F.raiseError(t) + case Left(t) => F.raiseError(t) case Right((newA, b)) => F.as(signal.set(Some(newA)), b) } } } { signal => F.flatMap(signal.get) { case Some(a) => put(a) - case None => F.unit + case None => F.unit } } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala b/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala index c24f2800d..1c3b5389f 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala @@ -23,7 +23,7 @@ import monix.execution.Scheduler import monix.execution.internal.AttemptCallback.RunnableTick import scala.concurrent.ExecutionContext -import scala.concurrent.duration.{FiniteDuration, TimeUnit} +import scala.concurrent.duration.{ FiniteDuration, TimeUnit } object SchedulerEffect { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala index 1ec2ac721..ee66f0f33 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala @@ -17,10 +17,10 @@ package monix.catnap -import cats.effect.{Async, CancelToken, Concurrent, ContextShift} +import cats.effect.{ Async, CancelToken, Concurrent, ContextShift } import monix.catnap.internal.AsyncUtils import monix.execution.Callback -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericSemaphore @@ -67,9 +67,10 @@ import scala.concurrent.Promise * from FS2. */ final class Semaphore[F[_]] private (provisioned: Long, ps: PaddingStrategy)( - implicit F: Concurrent[F] OrElse Async[F], - cs: ContextShift[F]) - extends cats.effect.concurrent.Semaphore[F] { + implicit + F: Concurrent[F] OrElse Async[F], + cs: ContextShift[F] +) extends cats.effect.concurrent.Semaphore[F] { private[this] implicit val F0: Async[F] = F.unify @@ -232,8 +233,10 @@ object Semaphore { * async boundaries after successful `acquire` operations, for safety */ def apply[F[_]](provisioned: Long, ps: PaddingStrategy = NoPadding)( - implicit F: Concurrent[F] OrElse Async[F], - cs: ContextShift[F]): F[Semaphore[F]] = { + implicit + F: Concurrent[F] OrElse Async[F], + cs: ContextShift[F] + ): F[Semaphore[F]] = { F.unify.delay(new Semaphore[F](provisioned, ps)) } @@ -257,8 +260,10 @@ object Semaphore { */ @UnsafeBecauseImpure def unsafe[F[_]](provisioned: Long, ps: PaddingStrategy = NoPadding)( - implicit F: Concurrent[F] OrElse Async[F], - cs: ContextShift[F]): Semaphore[F] = + implicit + F: Concurrent[F] OrElse Async[F], + cs: ContextShift[F] + ): Semaphore[F] = new Semaphore[F](provisioned, ps) implicit final class DeprecatedExtensions[F[_]](val source: Semaphore[F]) extends AnyVal { @@ -274,10 +279,11 @@ object Semaphore { } private final class Impl[F[_]](provisioned: Long, ps: PaddingStrategy)( - implicit F: Concurrent[F] OrElse Async[F], + implicit + F: Concurrent[F] OrElse Async[F], F0: Async[F], - cs: ContextShift[F]) - extends GenericSemaphore[F[Unit]](provisioned, ps) { + cs: ContextShift[F] + ) extends GenericSemaphore[F[Unit]](provisioned, ps) { val available: F[Long] = F0.delay(unsafeAvailable()) val count: F[Long] = F0.delay(unsafeCount()) diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala index 507425fd0..fc0debc35 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala @@ -19,7 +19,7 @@ package monix.catnap package cancelables import cats.Applicative -import cats.effect.{CancelToken, Sync} +import cats.effect.{ CancelToken, Sync } import monix.catnap.CancelableF import monix.catnap.CancelableF.Empty import monix.execution.annotations.UnsafeBecauseImpure diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala index 3a37140ef..0e85ecc5b 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala @@ -17,7 +17,7 @@ package monix.catnap.cancelables -import cats.effect.{CancelToken, Sync} +import cats.effect.{ CancelToken, Sync } import monix.catnap.CancelableF import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.atomic.Atomic @@ -87,7 +87,8 @@ final class SingleAssignCancelableF[F[_]] private (extra: CancelableF[F])(implic private def raiseError: F[Unit] = F.raiseError { new IllegalStateException( "Cannot assign to SingleAssignmentCancelableF " + - "as it was already assigned once") + "as it was already assigned once" + ) } } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala index 2d07cdf58..d41b4dcde 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala @@ -18,7 +18,7 @@ package monix.catnap.internal import cats.implicits._ -import cats.effect.{Async, ExitCase} +import cats.effect.{ Async, ExitCase } import monix.catnap.FutureLift import monix.execution.Callback import scala.concurrent.Promise diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala index c44328443..2b61c497f 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala @@ -17,7 +17,7 @@ package monix.catnap.internal -import cats.{CommutativeApplicative, Parallel} +import cats.{ CommutativeApplicative, Parallel } /** Given a `cats.Parallel` instance for a type `F[_]`, builds * a parallel `cats.CommutativeApplicative[F]` out of it. diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala index aa5b9e317..8bd01ddac 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala @@ -18,7 +18,7 @@ package monix.catnap package internal -import cats.effect.{Concurrent, ContextShift} +import cats.effect.{ Concurrent, ContextShift } import monix.execution.CancelablePromise import monix.execution.atomic.AtomicAny import monix.execution.internal.Constants @@ -34,7 +34,8 @@ private[catnap] class QueueHelpers[F[_]](implicit F: Concurrent[F], cs: ContextS f: () => T, filter: T => Boolean, map: T => U, - cb: Either[Throwable, U] => Unit)(implicit F: Concurrent[F]): F[Unit] = { + cb: Either[Throwable, U] => Unit + )(implicit F: Concurrent[F]): F[Unit] = { // Registering intention to sleep via promise state.get() match { @@ -55,7 +56,8 @@ private[catnap] class QueueHelpers[F[_]](implicit F: Concurrent[F], cs: ContextS f: () => T, filter: T => Boolean, map: T => U, - cb: Either[Throwable, U] => Unit)(p: CancelablePromise[Unit])(implicit F: Concurrent[F]): F[Unit] = { + cb: Either[Throwable, U] => Unit + )(p: CancelablePromise[Unit])(implicit F: Concurrent[F]): F[Unit] = { // Async boundary, for fairness reasons; also creates a full // memory barrier between the promise registration and what follows @@ -77,7 +79,8 @@ private[catnap] class QueueHelpers[F[_]](implicit F: Concurrent[F], cs: ContextS f: () => T, filter: T => Boolean, map: T => U, - cb: Either[Throwable, U] => Unit)(implicit F: Concurrent[F]): F[Unit] = { + cb: Either[Throwable, U] => Unit + )(implicit F: Concurrent[F]): F[Unit] = { // Trying to read val value = f() diff --git a/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala b/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala index d743db18f..da23db36b 100644 --- a/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala +++ b/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala @@ -16,11 +16,11 @@ */ package monix.execution -import cats.{CoflatMap, Eval, Monad, MonadError, StackSafeMonad} +import cats.{ CoflatMap, Eval, Monad, MonadError, StackSafeMonad } import monix.execution.CancelableFuture.Pure -import scala.concurrent.{ExecutionContext, Future} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ ExecutionContext, Future } +import scala.util.{ Failure, Success, Try } /** Implementation of Cats type classes for the * [[CancelableFuture]] data type. @@ -55,7 +55,8 @@ final class CancelableFutureCatsInstances(implicit ec: ExecutionContext) override def recover[A](fa: CancelableFuture[A])(pf: PartialFunction[Throwable, A]): CancelableFuture[A] = fa.recover(pf) override def recoverWith[A](fa: CancelableFuture[A])( - pf: PartialFunction[Throwable, CancelableFuture[A]]): CancelableFuture[A] = + pf: PartialFunction[Throwable, CancelableFuture[A]] + ): CancelableFuture[A] = fa.recoverWith(pf) override def catchNonFatal[A](a: => A)(implicit ev: Throwable <:< Throwable): CancelableFuture[A] = CancelableFuture(Future(a), Cancelable.empty) diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala index 538a57e3a..1bcc5cc03 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala @@ -20,12 +20,12 @@ package monix.catnap import cats.effect._ import cats.implicits._ import minitest.TestSuite -import monix.catnap.CircuitBreaker.{Closed, Open} -import monix.execution.exceptions.{DummyException, ExecutionRejectedException} +import monix.catnap.CircuitBreaker.{ Closed, Open } +import monix.execution.exceptions.{ DummyException, ExecutionRejectedException } import monix.execution.schedulers.TestScheduler import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CircuitBreakerSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala index 6fb3fb749..84ad11fe1 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala @@ -17,15 +17,15 @@ package monix.catnap -import cats.effect.{ContextShift, IO, Timer} +import cats.effect.{ ContextShift, IO, Timer } import cats.implicits._ import minitest.TestSuite -import monix.execution.BufferCapacity.{Bounded, Unbounded} -import monix.execution.ChannelType.{MPMC, MPSC, SPMC, SPSC} +import monix.execution.BufferCapacity.{ Bounded, Unbounded } +import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } import monix.execution.exceptions.APIContractViolationException import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import monix.execution.{BufferCapacity, Scheduler, TestUtils} +import monix.execution.{ BufferCapacity, Scheduler, TestUtils } import scala.concurrent.TimeoutException import scala.concurrent.duration._ @@ -395,7 +395,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pull; MPMC; producers=4, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pull; MPMC; producers=4, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 4, @@ -420,7 +421,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pull; SPMC; producers=1, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pull; SPMC; producers=1, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 1, @@ -445,7 +447,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pull; MPMC; producers=4, consumers=1, workers=4, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pull; MPMC; producers=4, consumers=1, workers=4, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 4, @@ -470,7 +473,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pull; MPSC; producers=4, consumers=4, workers=1, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pull; MPSC; producers=4, consumers=4, workers=1, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 4, @@ -495,7 +499,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pull; SPSC; producers=1, consumers=1, workers=1, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pull; SPSC; producers=1, consumers=1, workers=1, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 1, @@ -520,7 +525,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pullMany; MPMC; producers=4, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pullMany; MPMC; producers=4, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 4, @@ -545,7 +551,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pullMany; SPMC; producers=1, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pullMany; SPMC; producers=1, consumers=4, workers=4, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 1, @@ -570,7 +577,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pullMany; MPMC; producers=4, consumers=1, workers=4, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pullMany; MPMC; producers=4, consumers=1, workers=4, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 4, @@ -595,7 +603,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pullMany; MPSC; producers=4, consumers=4, workers=1, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pullMany; MPSC; producers=4, consumers=4, workers=1, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 4, @@ -620,7 +629,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w } testIO( - s"concurrent sum via consumer.pullMany; SPSC; producers=1, consumers=1, workers=1, capacity=$boundedConfigForConcurrentSum") { + s"concurrent sum via consumer.pullMany; SPSC; producers=1, consumers=1, workers=1, capacity=$boundedConfigForConcurrentSum" + ) { implicit ec => testConcurrentSum( producers = 1, @@ -650,7 +660,8 @@ abstract class BaseConcurrentChannelSuite[S <: Scheduler] extends TestSuite[S] w workersPerConsumer: Int, capacity: BufferCapacity, count: Int, - pullMany: Boolean)(implicit ec: Scheduler): IO[Unit] = { + pullMany: Boolean + )(implicit ec: Scheduler): IO[Unit] = { val channelType = if (producers > 1) { diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala index 9822a110b..8d26e195b 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala @@ -19,12 +19,12 @@ package monix.catnap import java.util.concurrent.atomic.AtomicLong -import cats.effect.{ContextShift, IO, Timer} +import cats.effect.{ ContextShift, IO, Timer } import cats.implicits._ import minitest.TestSuite -import monix.execution.BufferCapacity.{Bounded, Unbounded} -import monix.execution.ChannelType.{MPMC, MPSC, SPMC, SPSC} -import monix.execution.{BufferCapacity, ChannelType, Scheduler} +import monix.execution.BufferCapacity.{ Bounded, Unbounded } +import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } +import monix.execution.{ BufferCapacity, ChannelType, Scheduler } import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler @@ -128,7 +128,7 @@ abstract class BaseConcurrentQueueSuite[S <: Scheduler] extends TestSuite[S] { if (n > 0) queue.poll.flatMap { a => consumer(n - 1, acc.enqueue(a)) - } + } else IO.pure(acc.foldLeft(0L)(_ + _)) diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala index b0be56c47..97c6f769d 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala @@ -17,14 +17,14 @@ package monix.catnap -import cats.effect.{Async, ContextShift, IO} +import cats.effect.{ Async, ContextShift, IO } import minitest.TestSuite import monix.catnap.syntax._ import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.execution.{Cancelable, CancelableFuture} -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import monix.execution.{ Cancelable, CancelableFuture } +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } object FutureLiftSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -106,9 +106,12 @@ object FutureLiftSuite extends TestSuite[TestScheduler] { test("F.delay(future).futureLift for Concurrent[F] data types") { implicit s => var wasCanceled = 0 - val io = IO(CancelableFuture[Int](CancelableFuture.never, Cancelable { () => - wasCanceled += 1 - })).futureLift + val io = IO(CancelableFuture[Int]( + CancelableFuture.never, + Cancelable { () => + wasCanceled += 1 + } + )).futureLift val p = Promise[Int]() val token = io.unsafeRunCancelable { @@ -126,10 +129,14 @@ object FutureLiftSuite extends TestSuite[TestScheduler] { val source = Promise[Int]() val io = FutureLift[IO, CancelableFuture].apply( IO( - CancelableFuture[Int](source.future, Cancelable { () => - wasCanceled += 1 - }) - )) + CancelableFuture[Int]( + source.future, + Cancelable { () => + wasCanceled += 1 + } + ) + ) + ) val p = Promise[Int]() val token = io.unsafeRunCancelable { @@ -158,10 +165,14 @@ object FutureLiftSuite extends TestSuite[TestScheduler] { def mkInstance[F[_]](implicit F: Async[F]): F[Int] = FutureLift[F, CancelableFuture].apply( F.delay( - CancelableFuture[Int](source.future, Cancelable { () => - wasCanceled += 1 - }) - )) + CancelableFuture[Int]( + source.future, + Cancelable { () => + wasCanceled += 1 + } + ) + ) + ) val io = mkInstance[IO] val p = Promise[Int]() diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala index e29881ec2..035dbff80 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala @@ -17,8 +17,8 @@ package monix.catnap -import cats.effect.concurrent.{Deferred, Ref} -import cats.effect.{ContextShift, IO, Timer} +import cats.effect.concurrent.{ Deferred, Ref } +import cats.effect.{ ContextShift, IO, Timer } import cats.implicits._ import minitest.SimpleTestSuite import monix.execution.Scheduler @@ -35,11 +35,11 @@ object MVarConcurrentSuite extends BaseMVarSuite { testAsync("swap is cancelable on take") { val task = for { - mVar <- empty[Int] + mVar <- empty[Int] finished <- Deferred.uncancelable[IO, Int] - fiber <- mVar.swap(20).flatMap(finished.complete).start - _ <- fiber.cancel - _ <- mVar.put(10) + fiber <- mVar.swap(20).flatMap(finished.complete).start + _ <- fiber.cancel + _ <- mVar.put(10) fallback = IO.sleep(100.millis) *> mVar.take v <- IO.race(finished.get, fallback) } yield v @@ -51,11 +51,11 @@ object MVarConcurrentSuite extends BaseMVarSuite { testAsync("modify is cancelable on take") { val task = for { - mVar <- empty[Int] + mVar <- empty[Int] finished <- Deferred.uncancelable[IO, String] - fiber <- mVar.modify(n => IO.pure((n * 2, n.show))).flatMap(finished.complete).start - _ <- fiber.cancel - _ <- mVar.put(10) + fiber <- mVar.modify(n => IO.pure((n * 2, n.show))).flatMap(finished.complete).start + _ <- fiber.cancel + _ <- mVar.put(10) fallback = IO.sleep(100.millis) *> mVar.take v <- IO.race(finished.get, fallback) } yield v @@ -67,12 +67,12 @@ object MVarConcurrentSuite extends BaseMVarSuite { testAsync("modify is cancelable on f") { val task = for { - mVar <- empty[Int] + mVar <- empty[Int] finished <- Deferred.uncancelable[IO, String] - fiber <- mVar.modify(n => IO.never *> IO.pure((n * 2, n.show))).flatMap(finished.complete).start - _ <- mVar.put(10) - _ <- IO.sleep(10.millis) - _ <- fiber.cancel + fiber <- mVar.modify(n => IO.never *> IO.pure((n * 2, n.show))).flatMap(finished.complete).start + _ <- mVar.put(10) + _ <- IO.sleep(10.millis) + _ <- fiber.cancel fallback = IO.sleep(100.millis) *> mVar.take v <- IO.race(finished.get, fallback) } yield v @@ -92,13 +92,13 @@ object MVarAsyncSuite extends BaseMVarSuite { testAsync("put; take; modify; put") { val task = for { - mVar <- empty[Int] - _ <- mVar.put(10) - _ <- mVar.take + mVar <- empty[Int] + _ <- mVar.put(10) + _ <- mVar.take fiber <- mVar.modify(n => IO.pure((n * 2, n.toString))).start - _ <- mVar.put(20) - s <- fiber.join - v <- mVar.take + _ <- mVar.put(20) + s <- fiber.join + v <- mVar.take } yield (s, v) for (r <- task.unsafeToFuture()) yield { @@ -109,10 +109,10 @@ object MVarAsyncSuite extends BaseMVarSuite { testAsync("modify replaces the original value of the mvar on error") { val error = new Exception("Boom!") val task = for { - mVar <- empty[Int] - _ <- mVar.put(10) + mVar <- empty[Int] + _ <- mVar.put(10) finished <- Deferred.uncancelable[IO, String] - e <- mVar.modify(_ => IO.raiseError(error)).attempt + e <- mVar.modify(_ => IO.raiseError(error)).attempt fallback = IO.sleep(100.millis) *> mVar.take v <- IO.race(finished.get, fallback) } yield (e, v) diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala b/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala index cc14ff873..08e4bb46a 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala @@ -17,7 +17,7 @@ package monix.catnap -import cats.effect.{Async, ExitCase, IO, Sync} +import cats.effect.{ Async, ExitCase, IO, Sync } object Overrides { diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala index b8105d442..87c4f9182 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala @@ -17,13 +17,13 @@ package monix.catnap -import cats.effect.{ContextShift, IO} +import cats.effect.{ ContextShift, IO } import cats.implicits._ import minitest.TestSuite import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import scala.concurrent.{ExecutionContext, Promise} -import scala.util.{Random, Success} +import scala.concurrent.{ ExecutionContext, Promise } +import scala.util.{ Random, Success } object SemaphoreSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala index 3429d6441..6c60a2a0c 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala @@ -17,7 +17,7 @@ package monix.catnap -import cats.effect.{ContextShift, IO} +import cats.effect.{ ContextShift, IO } import minitest.TestSuite import monix.execution.schedulers.TestScheduler diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala index 4b05ff48c..b6398505a 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala @@ -20,7 +20,7 @@ package cancelables import cats.effect.IO import minitest.SimpleTestSuite -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } object SingleAssignCancelableFSuite extends SimpleTestSuite { test("cancel") { diff --git a/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala b/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala index 70bf36f37..a36231372 100644 --- a/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala @@ -16,12 +16,12 @@ */ package monix.execution -import cats.laws.discipline.{CoflatMapTests, MonadErrorTests} -import cats.{Eval, Monad, MonadError} +import cats.laws.discipline.{ CoflatMapTests, MonadErrorTests } +import cats.{ Eval, Monad, MonadError } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TypeClassLawsForCancelableFutureSuite extends BaseLawsSuite { checkAllAsync("CoflatMap[CancelableFuture]") { implicit ec => diff --git a/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala b/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala index 1faba574f..7d70d9058 100644 --- a/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala +++ b/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala @@ -20,17 +20,17 @@ package monix.eval.internal import java.util.concurrent.TimeoutException import java.util.concurrent.locks.AbstractQueuedSynchronizer -import monix.eval.Task.{Async, Context, Error, Eval, FlatMap, Map, Now, Suspend, Trace} +import monix.eval.Task.{ Async, Context, Error, Eval, FlatMap, Map, Now, Suspend, Trace } import monix.eval.internal.TaskRunLoop._ import monix.eval.Task -import monix.eval.internal.TracingPlatform.{enhancedExceptions, isStackTracing} +import monix.eval.internal.TracingPlatform.{ enhancedExceptions, isStackTracing } import monix.eval.tracing.TaskEvent -import monix.execution.{Callback, Scheduler} +import monix.execution.{ Callback, Scheduler } import monix.execution.internal.collection.ChunkedArrayStack import scala.annotation.nowarn import scala.concurrent.blocking -import scala.concurrent.duration.{Duration, FiniteDuration} +import scala.concurrent.duration.{ Duration, FiniteDuration } import scala.util.control.NonFatal private[eval] object TaskRunSyncUnsafe { @@ -153,7 +153,8 @@ private[eval] object TaskRunSyncUnsafe { opts: Task.Options, bFirst: Bind, bRest: CallStack, - tracingCtx: StackTracedContext): A = { + tracingCtx: StackTracedContext + ): A = { val latch = new OneShotLatch val cb = new BlockingCallback[Any](latch) diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala index a7523cd4e..d568b082c 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala @@ -22,10 +22,10 @@ import java.util.concurrent.CountDownLatch import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.SchedulerService -import monix.execution.{Cancelable, CancelableFuture, ExecutionModel, Scheduler} +import monix.execution.{ Cancelable, CancelableFuture, ExecutionModel, Scheduler } import scala.concurrent.duration._ -import scala.concurrent.{blocking, ExecutionContext, Future} +import scala.concurrent.{ blocking, ExecutionContext, Future } object TaskAsyncAutoShiftJVMSuite extends TestSuite[SchedulerService] { private val ThreadName = "test-thread" @@ -872,7 +872,7 @@ object TaskAsyncAutoShiftJVMSuite extends TestSuite[SchedulerService] { } } - ///... + /// ... testAsync("Task.asyncF(register) should shift back if register forks") { s => implicit val s2: Scheduler = Scheduler.global diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala index 625452bf7..4139d864b 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala @@ -20,7 +20,7 @@ package monix.eval import minitest.SimpleTestSuite import monix.execution.Scheduler.Implicits.global -import scala.concurrent.{Await, TimeoutException} +import scala.concurrent.{ Await, TimeoutException } import scala.concurrent.duration._ object TaskBlockingSuite extends SimpleTestSuite { diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala index e2a75ac71..28f39ab9f 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala @@ -17,15 +17,15 @@ package monix.eval -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import minitest.SimpleTestSuite -import monix.execution.exceptions.{CallbackCalledMultipleTimesException, DummyException} +import monix.execution.exceptions.{ CallbackCalledMultipleTimesException, DummyException } import monix.execution.schedulers.SchedulerService -import monix.execution.{Callback, Scheduler, TestUtils} +import monix.execution.{ Callback, Scheduler, TestUtils } import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskCallbackSafetyJVMSuite extends SimpleTestSuite with TestUtils { val WORKERS = 10 @@ -47,14 +47,16 @@ object TaskCallbackSafetyJVMSuite extends SimpleTestSuite with TestUtils { runConcurrentCallbackTest(f => Task.cancelable { cb => f(cb); Task(()) - }) + } + ) } test("Task.cancelable0 has a safe callback") { runConcurrentCallbackTest(f => Task.cancelable0 { (_, cb) => f(cb); Task(()) - }) + } + ) } def runConcurrentCallbackTest(create: (Callback[Throwable, Int] => Unit) => Task[Int]): Unit = { @@ -92,13 +94,16 @@ object TaskCallbackSafetyJVMSuite extends SimpleTestSuite with TestUtils { run(cb => try cb.onSuccess(1) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb(Right(1)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb(Success(1)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) val dummy = DummyException("dummy") @@ -108,13 +113,16 @@ object TaskCallbackSafetyJVMSuite extends SimpleTestSuite with TestUtils { run(cb => try cb.onError(dummy) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb(Left(dummy)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb(Failure(dummy)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) } def runConcurrently(sc: Scheduler)(f: => Unit): Unit = { diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala index 3a0cddaa1..e7f18d4d9 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala @@ -18,7 +18,7 @@ package monix.eval import minitest.SimpleTestSuite -import monix.execution.{ExecutionModel, Scheduler} +import monix.execution.{ ExecutionModel, Scheduler } import monix.execution.schedulers.SchedulerService import monix.execution.misc.Local import scala.concurrent.Await diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala index 993d4d5dc..51b795cef 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala @@ -23,7 +23,7 @@ import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskLikeConversionsJava8Suite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -72,4 +72,4 @@ object TaskLikeConversionsJava8Suite extends TestSuite[TestScheduler] { s.tick() assertEquals(f.value, None) } -} \ No newline at end of file +} diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala index 6d97b9098..2113e5cbc 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala @@ -23,12 +23,12 @@ import cats.syntax.foldable._ import minitest.SimpleTestSuite import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.exceptions.DummyException -import monix.execution.{ExecutionModel, Scheduler} +import monix.execution.{ ExecutionModel, Scheduler } import monix.execution.misc.Local import monix.execution.schedulers.TracingScheduler import monix.execution.cancelableFutureCatsInstances -import scala.concurrent.{Await, ExecutionContext, Future, Promise} +import scala.concurrent.{ Await, ExecutionContext, Future, Promise } import scala.concurrent.duration._ object TaskLocalJVMSuite extends SimpleTestSuite { @@ -476,7 +476,8 @@ object TaskLocalJVMSuite extends SimpleTestSuite { val local = Local(0) for { - _ <- Task(local.update(1)).flatMap(_ => Task.raiseError(DummyException("boom"))).runToFuture.recover{ case _ => ()} + _ <- + Task(local.update(1)).flatMap(_ => Task.raiseError(DummyException("boom"))).runToFuture.recover { case _ => () } i1 <- Future(local.get) i2 <- Local.isolate { Future(local.update(i1 + 1)) @@ -545,7 +546,7 @@ object TaskLocalJVMSuite extends SimpleTestSuite { val t1 = for { i1 <- Task(local.get) - _ <- Task.sleep(10.millis) + _ <- Task.sleep(10.millis) i2 <- Task(local.get) } yield assertEquals(i1, i2) diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala index 28903d7e6..f0be607c5 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala @@ -21,7 +21,7 @@ import java.util.concurrent.RejectedExecutionException import minitest.SimpleTestSuite import monix.execution.Scheduler import monix.execution.Scheduler.Implicits.global -import scala.concurrent.{Await, ExecutionContext, Future} +import scala.concurrent.{ Await, ExecutionContext, Future } import scala.concurrent.duration._ object TaskRejectedExecutionSuite extends SimpleTestSuite { diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala index 5c46d8c1a..71d7ab3be 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala @@ -17,13 +17,13 @@ package monix.eval -import cats.effect.{ContextShift, IO} +import cats.effect.{ ContextShift, IO } import cats.effect.laws.discipline._ import cats.kernel.laws.discipline.MonoidTests -import cats.laws.discipline.{ApplicativeTests, CoflatMapTests, ParallelTests} -import cats.{Applicative, Eq} +import cats.laws.discipline.{ ApplicativeTests, CoflatMapTests, ParallelTests } +import cats.{ Applicative, Eq } import monix.eval.instances.CatsParallelForTask -import monix.execution.{Scheduler, TestUtils, UncaughtExceptionReporter} +import monix.execution.{ Scheduler, TestUtils, UncaughtExceptionReporter } import scala.concurrent.ExecutionContext.global import scala.concurrent.duration._ diff --git a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala index 123b919e1..ec701fdf2 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala @@ -17,21 +17,21 @@ package monix.eval -import cats.effect.{ExitCase, Sync} +import cats.effect.{ ExitCase, Sync } import cats.kernel.Semigroup -import cats.{Monoid, ~>} -import monix.eval.instances.{CatsMonadToMonoid, CatsMonadToSemigroup, CatsSyncForCoeval} +import cats.{ ~>, Monoid } +import monix.eval.instances.{ CatsMonadToMonoid, CatsMonadToSemigroup, CatsSyncForCoeval } import monix.eval.internal._ -import monix.eval.internal.TracingPlatform.{isCachedStackTracing, isFullStackTracing} +import monix.eval.internal.TracingPlatform.{ isCachedStackTracing, isFullStackTracing } import monix.eval.tracing.CoevalEvent import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.compat.BuildFrom import monix.execution.compat.internal.newBuilder -import scala.annotation.unchecked.{uncheckedVariance => uV} +import scala.annotation.unchecked.{ uncheckedVariance => uV } import scala.collection.mutable import scala.util.control.NonFatal -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } /** `Coeval` represents lazy computations that can execute synchronously. * @@ -702,7 +702,7 @@ sealed abstract class Coeval[+A] extends (() => A) with Serializable { self => } else if (isFullStackTracing) { CoevalTracing.uncached() } else { - null + null } Map(this, f, trace) @@ -863,7 +863,8 @@ sealed abstract class Coeval[+A] extends (() => A) with Serializable { self => final def onErrorRestart(maxRetries: Long): Coeval[A] = self.onErrorHandleWith(ex => if (maxRetries > 0) self.onErrorRestart(maxRetries - 1) - else Error(ex)) + else Error(ex) + ) /** Creates a new coeval that in case of error will retry executing the * source again and again, until it succeeds. @@ -1153,7 +1154,8 @@ object Coeval extends CoevalInstancesLevel0 { * It's a simple version of [[traverse]]. */ def sequence[A, M[X] <: Iterable[X]](sources: M[Coeval[A]])( - implicit bf: BuildFrom[M[Coeval[A]], A, M[A]]): Coeval[M[A]] = { + implicit bf: BuildFrom[M[Coeval[A]], A, M[A]] + ): Coeval[M[A]] = { val init = eval(newBuilder(bf, sources)) val r = sources.foldLeft(init)((acc, elem) => acc.zipMap(elem)(_ += _)) r.map(_.result()) @@ -1165,7 +1167,8 @@ object Coeval extends CoevalInstancesLevel0 { * It's a generalized version of [[sequence]]. */ def traverse[A, B, M[X] <: Iterable[X]](sources: M[A])(f: A => Coeval[B])( - implicit bf: BuildFrom[M[A], B, M[B]]): Coeval[M[B]] = { + implicit bf: BuildFrom[M[A], B, M[B]] + ): Coeval[M[B]] = { val init = eval(newBuilder(bf, sources)) val r = sources.foldLeft(init)((acc, elem) => acc.zipMap(f(elem))(_ += _)) r.map(_.result()) @@ -1292,7 +1295,8 @@ object Coeval extends CoevalInstancesLevel0 { * }}} */ def map4[A1, A2, A3, A4, R](fa1: Coeval[A1], fa2: Coeval[A2], fa3: Coeval[A3], fa4: Coeval[A4])( - f: (A1, A2, A3, A4) => R): Coeval[R] = { + f: (A1, A2, A3, A4) => R + ): Coeval[R] = { for (a1 <- fa1; a2 <- fa2; a3 <- fa3; a4 <- fa4) yield f(a1, a2, a3, a4) @@ -1323,7 +1327,8 @@ object Coeval extends CoevalInstancesLevel0 { * }}} */ def map5[A1, A2, A3, A4, A5, R](fa1: Coeval[A1], fa2: Coeval[A2], fa3: Coeval[A3], fa4: Coeval[A4], fa5: Coeval[A5])( - f: (A1, A2, A3, A4, A5) => R): Coeval[R] = { + f: (A1, A2, A3, A4, A5) => R + ): Coeval[R] = { for (a1 <- fa1; a2 <- fa2; a3 <- fa3; a4 <- fa4; a5 <- fa5) yield f(a1, a2, a3, a4, a5) @@ -1360,7 +1365,8 @@ object Coeval extends CoevalInstancesLevel0 { fa3: Coeval[A3], fa4: Coeval[A4], fa5: Coeval[A5], - fa6: Coeval[A6])(f: (A1, A2, A3, A4, A5, A6) => R): Coeval[R] = { + fa6: Coeval[A6] + )(f: (A1, A2, A3, A4, A5, A6) => R): Coeval[R] = { for (a1 <- fa1; a2 <- fa2; a3 <- fa3; a4 <- fa4; a5 <- fa5; a6 <- fa6) yield f(a1, a2, a3, a4, a5, a6) @@ -1379,7 +1385,8 @@ object Coeval extends CoevalInstancesLevel0 { fa1: Coeval[A1], fa2: Coeval[A2], fa3: Coeval[A3], - fa4: Coeval[A4]): Coeval[(A1, A2, A3, A4)] = + fa4: Coeval[A4] + ): Coeval[(A1, A2, A3, A4)] = map4(fa1, fa2, fa3, fa4)((a1, a2, a3, a4) => (a1, a2, a3, a4)) /** Pairs five [[Coeval]] instances. */ @@ -1388,7 +1395,8 @@ object Coeval extends CoevalInstancesLevel0 { fa2: Coeval[A2], fa3: Coeval[A3], fa4: Coeval[A4], - fa5: Coeval[A5]): Coeval[(A1, A2, A3, A4, A5)] = + fa5: Coeval[A5] + ): Coeval[(A1, A2, A3, A4, A5)] = map5(fa1, fa2, fa3, fa4, fa5)((a1, a2, a3, a4, a5) => (a1, a2, a3, a4, a5)) /** Pairs six [[Coeval]] instances. */ @@ -1398,7 +1406,8 @@ object Coeval extends CoevalInstancesLevel0 { fa3: Coeval[A3], fa4: Coeval[A4], fa5: Coeval[A5], - fa6: Coeval[A6]): Coeval[(A1, A2, A3, A4, A5, A6)] = + fa6: Coeval[A6] + ): Coeval[(A1, A2, A3, A4, A5, A6)] = map6(fa1, fa2, fa3, fa4, fa5, fa6)((a1, a2, a3, a4, a5, a6) => (a1, a2, a3, a4, a5, a6)) /** diff --git a/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala b/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala index c71055eb4..56536b3f1 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala @@ -17,7 +17,7 @@ package monix.eval -import cats.{~>, Eval} +import cats.{ ~>, Eval } import cats.effect._ import scala.annotation.implicitNotFound diff --git a/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala b/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala index 9a809592b..fc5f72ee7 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala @@ -18,7 +18,7 @@ package monix.eval import cats.effect.SyncIO -import cats.{~>, Eval} +import cats.{ ~>, Eval } import scala.util.Try /** A lawless type class that provides conversions to [[Coeval]]. diff --git a/monix-eval/shared/src/main/scala/monix/eval/Task.scala b/monix-eval/shared/src/main/scala/monix/eval/Task.scala index 79b82f281..ad8203a21 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Task.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Task.scala @@ -17,27 +17,27 @@ package monix.eval -import cats.effect.{Fiber => _, _} -import cats.{CommutativeApplicative, Monoid, Semigroup, ~>} +import cats.effect.{ Fiber => _, _ } +import cats.{ ~>, CommutativeApplicative, Monoid, Semigroup } import monix.catnap.FutureLift import monix.eval.instances._ import monix.eval.internal._ -import monix.eval.tracing.{TaskEvent, TaskTrace} -import monix.eval.internal.TracingPlatform.{isCachedStackTracing, isFullStackTracing} +import monix.eval.tracing.{ TaskEvent, TaskTrace } +import monix.eval.internal.TracingPlatform.{ isCachedStackTracing, isFullStackTracing } import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution._ -import monix.execution.annotations.{UnsafeBecauseBlocking, UnsafeBecauseImpure} -import monix.execution.internal.{Newtype1, Platform} +import monix.execution.annotations.{ UnsafeBecauseBlocking, UnsafeBecauseImpure } +import monix.execution.internal.{ Newtype1, Platform } import monix.execution.misc.Local -import monix.execution.schedulers.{CanBlock, TracingScheduler, TrampolinedRunnable} +import monix.execution.schedulers.{ CanBlock, TracingScheduler, TrampolinedRunnable } import monix.execution.compat.BuildFrom import monix.execution.compat.internal.newBuilder import org.reactivestreams.Publisher -import scala.annotation.unchecked.{uncheckedVariance => uV} -import scala.concurrent.duration.{Duration, FiniteDuration, NANOSECONDS, TimeUnit} -import scala.concurrent.{ExecutionContext, Future, TimeoutException} -import scala.util.{Failure, Success, Try} +import scala.annotation.unchecked.{ uncheckedVariance => uV } +import scala.concurrent.duration.{ Duration, FiniteDuration, NANOSECONDS, TimeUnit } +import scala.concurrent.{ ExecutionContext, Future, TimeoutException } +import scala.util.{ Failure, Success, Try } /** `Task` represents a specification for a possibly lazy or * asynchronous computation, which when executed will produce an `A` @@ -1088,7 +1088,8 @@ sealed abstract class Task[+A] extends Serializable with TaskDeprecated.BinCompa @UnsafeBecauseImpure @UnsafeBecauseBlocking final def runSyncUnsafeOpt(timeout: Duration = Duration.Inf)( - implicit s: Scheduler, + implicit + s: Scheduler, opts: Options, permit: CanBlock ): A = { @@ -3620,7 +3621,8 @@ object Task extends TaskInstancesLevel1 { * It's a generalized version of [[sequence]]. */ def traverse[A, B, M[X] <: Iterable[X]](in: M[A])(f: A => Task[B])( - implicit bf: BuildFrom[M[A], B, M[B]]): Task[M[B]] = + implicit bf: BuildFrom[M[A], B, M[B]] + ): Task[M[B]] = TaskSequence.traverse(in, f)(bf) /** @@ -3661,7 +3663,6 @@ object Task extends TaskInstancesLevel1 { */ def raiseUnless(cond: Boolean)(e: => Throwable): Task[Unit] = Task.unless(cond)(Task.raiseError(e)) - /** Executes the given sequence of tasks in parallel, non-deterministically * gathering their results, returning a task that will signal the sequence * of results once all tasks are finished. @@ -3747,7 +3748,9 @@ object Task extends TaskInstancesLevel1 { * * @see [[parTraverseN]] for a version that limits parallelism. */ - def parTraverse[A, B, M[X] <: Iterable[X]](in: M[A])(f: A => Task[B])(implicit bf: BuildFrom[M[A], B, M[B]]): Task[M[B]] = + def parTraverse[A, B, M[X] <: Iterable[X]](in: M[A])(f: A => Task[B])(implicit + bf: BuildFrom[M[A], B, M[B]] + ): Task[M[B]] = Task.eval(in.map(f)).flatMap(col => TaskParSequence[B, M](col, () => newBuilder(bf, in))) /** Given a `Iterable[A]` and a function `A => Task[B]`, @@ -3939,7 +3942,8 @@ object Task extends TaskInstancesLevel1 { * See [[Task.parMap4]] for parallel processing. */ def map4[A1, A2, A3, A4, R](fa1: Task[A1], fa2: Task[A2], fa3: Task[A3], fa4: Task[A4])( - f: (A1, A2, A3, A4) => R): Task[R] = { + f: (A1, A2, A3, A4) => R + ): Task[R] = { for (a1 <- fa1; a2 <- fa2; a3 <- fa3; a4 <- fa4) yield f(a1, a2, a3, a4) @@ -3976,7 +3980,8 @@ object Task extends TaskInstancesLevel1 { * See [[Task.parMap5]] for parallel processing. */ def map5[A1, A2, A3, A4, A5, R](fa1: Task[A1], fa2: Task[A2], fa3: Task[A3], fa4: Task[A4], fa5: Task[A5])( - f: (A1, A2, A3, A4, A5) => R): Task[R] = { + f: (A1, A2, A3, A4, A5) => R + ): Task[R] = { for (a1 <- fa1; a2 <- fa2; a3 <- fa3; a4 <- fa4; a5 <- fa5) yield f(a1, a2, a3, a4, a5) @@ -4019,7 +4024,8 @@ object Task extends TaskInstancesLevel1 { fa3: Task[A3], fa4: Task[A4], fa5: Task[A5], - fa6: Task[A6])(f: (A1, A2, A3, A4, A5, A6) => R): Task[R] = { + fa6: Task[A6] + )(f: (A1, A2, A3, A4, A5, A6) => R): Task[R] = { for (a1 <- fa1; a2 <- fa2; a3 <- fa3; a4 <- fa4; a5 <- fa5; a6 <- fa6) yield f(a1, a2, a3, a4, a5, a6) @@ -4127,7 +4133,8 @@ object Task extends TaskInstancesLevel1 { * See [[Task.map4]] for sequential processing. */ def parMap4[A1, A2, A3, A4, R](fa1: Task[A1], fa2: Task[A2], fa3: Task[A3], fa4: Task[A4])( - f: (A1, A2, A3, A4) => R): Task[R] = { + f: (A1, A2, A3, A4) => R + ): Task[R] = { val fa123 = parZip3(fa1, fa2, fa3) parMap2(fa123, fa4) { case ((a1, a2, a3), a4) => f(a1, a2, a3, a4) } } @@ -4166,7 +4173,8 @@ object Task extends TaskInstancesLevel1 { * See [[Task.map5]] for sequential processing. */ def parMap5[A1, A2, A3, A4, A5, R](fa1: Task[A1], fa2: Task[A2], fa3: Task[A3], fa4: Task[A4], fa5: Task[A5])( - f: (A1, A2, A3, A4, A5) => R): Task[R] = { + f: (A1, A2, A3, A4, A5) => R + ): Task[R] = { val fa1234 = parZip4(fa1, fa2, fa3, fa4) parMap2(fa1234, fa5) { case ((a1, a2, a3, a4), a5) => f(a1, a2, a3, a4, a5) } } @@ -4211,7 +4219,8 @@ object Task extends TaskInstancesLevel1 { fa3: Task[A3], fa4: Task[A4], fa5: Task[A5], - fa6: Task[A6])(f: (A1, A2, A3, A4, A5, A6) => R): Task[R] = { + fa6: Task[A6] + )(f: (A1, A2, A3, A4, A5, A6) => R): Task[R] = { val fa12345 = parZip5(fa1, fa2, fa3, fa4, fa5) parMap2(fa12345, fa6) { case ((a1, a2, a3, a4, a5), a6) => f(a1, a2, a3, a4, a5, a6) } } @@ -4234,7 +4243,8 @@ object Task extends TaskInstancesLevel1 { fa2: Task[A2], fa3: Task[A3], fa4: Task[A4], - fa5: Task[A5]): Task[(A1, A2, A3, A4, A5)] = + fa5: Task[A5] + ): Task[(A1, A2, A3, A4, A5)] = parMap5(fa1, fa2, fa3, fa4, fa5)((a1, a2, a3, a4, a5) => (a1, a2, a3, a4, a5)) /** Pairs six [[Task]] instances using [[parMap6]]. */ @@ -4244,7 +4254,8 @@ object Task extends TaskInstancesLevel1 { fa3: Task[A3], fa4: Task[A4], fa5: Task[A5], - fa6: Task[A6]): Task[(A1, A2, A3, A4, A5, A6)] = + fa6: Task[A6] + ): Task[(A1, A2, A3, A4, A5, A6)] = parMap6(fa1, fa2, fa3, fa4, fa5, fa6)((a1, a2, a3, a4, a5, a6) => (a1, a2, a3, a4, a5, a6)) /** @@ -4306,8 +4317,10 @@ object Task extends TaskInstancesLevel1 { * the usage of `cats.effect.Concurrent`, since [[TaskLift]] is lawless. */ def liftToConcurrent[F[_]]( - implicit F: cats.effect.Concurrent[F], - eff: cats.effect.ConcurrentEffect[Task]): (Task ~> F) = + implicit + F: cats.effect.Concurrent[F], + eff: cats.effect.ConcurrentEffect[Task] + ): (Task ~> F) = TaskLift.toConcurrent[F] /** @@ -4500,7 +4513,8 @@ object Task extends TaskInstancesLevel1 { */ private[eval] final class CreatePartiallyApplied[A](val dummy: Boolean = true) extends AnyVal { def apply[CancelationToken](register: (Scheduler, Callback[Throwable, A]) => CancelationToken)( - implicit B: AsyncBuilder[CancelationToken]): Task[A] = + implicit B: AsyncBuilder[CancelationToken] + ): Task[A] = B.create(register) } @@ -4582,7 +4596,8 @@ object Task extends TaskInstancesLevel1 { options: Options, connection: TaskConnection, frameRef: FrameIndexRef, - stackTracedContext: StackTracedContext) { + stackTracedContext: StackTracedContext + ) { val scheduler: Scheduler = { if (options.localContextPropagation && !schedulerRef.features.contains(Scheduler.TRACING)) TracingScheduler(schedulerRef) @@ -4615,7 +4630,12 @@ object Task extends TaskInstancesLevel1 { def apply(scheduler: Scheduler, options: Options): Context = apply(scheduler, options, TaskConnection(), new StackTracedContext) - def apply(scheduler: Scheduler, options: Options, connection: TaskConnection, stackTracedContext: StackTracedContext): Context = { + def apply( + scheduler: Scheduler, + options: Options, + connection: TaskConnection, + stackTracedContext: StackTracedContext + ): Context = { val em = scheduler.executionModel val frameRef = FrameIndexRef(em) new Context(scheduler, options, connection, frameRef, stackTracedContext) @@ -4626,7 +4646,8 @@ object Task extends TaskInstancesLevel1 { private[eval] final case class Now[A](value: A) extends Task[A] { // Optimization to avoid the run-loop override def runAsyncOptF( - cb: Either[Throwable, A] => Unit)(implicit s: Scheduler, opts: Task.Options): CancelToken[Task] = { + cb: Either[Throwable, A] => Unit + )(implicit s: Scheduler, opts: Task.Options): CancelToken[Task] = { if (s.executionModel != AlwaysAsyncExecution) { Callback.callSuccess(cb, value) Task.unit @@ -4652,7 +4673,8 @@ object Task extends TaskInstancesLevel1 { // Optimization to avoid the run-loop override def runAsyncUncancelableOpt(cb: Either[Throwable, A] => Unit)( - implicit s: Scheduler, + implicit + s: Scheduler, opts: Options ): Unit = { if (s.executionModel != AlwaysAsyncExecution) @@ -4670,7 +4692,8 @@ object Task extends TaskInstancesLevel1 { private[eval] final case class Error[A](e: Throwable) extends Task[A] { // Optimization to avoid the run-loop override def runAsyncOptF( - cb: Either[Throwable, A] => Unit)(implicit s: Scheduler, opts: Task.Options): CancelToken[Task] = { + cb: Either[Throwable, A] => Unit + )(implicit s: Scheduler, opts: Task.Options): CancelToken[Task] = { if (s.executionModel != AlwaysAsyncExecution) { Callback.callError(cb, e) Task.unit @@ -4700,7 +4723,8 @@ object Task extends TaskInstancesLevel1 { // Optimization to avoid the run-loop override def runAsyncUncancelableOpt(cb: Either[Throwable, A] => Unit)( - implicit s: Scheduler, + implicit + s: Scheduler, opts: Options ): Unit = { if (s.executionModel != AlwaysAsyncExecution) @@ -4748,8 +4772,8 @@ object Task extends TaskInstancesLevel1 { trampolineBefore: Boolean = false, trampolineAfter: Boolean = true, restoreLocals: Boolean = true, - trace: AnyRef = null) - extends Task[A] + trace: AnyRef = null + ) extends Task[A] /** For changing the context for the rest of the run-loop. * @@ -4758,8 +4782,8 @@ object Task extends TaskInstancesLevel1 { private[monix] final case class ContextSwitch[A]( source: Task[A], modify: Context => Context, - restore: (A, Throwable, Context, Context) => Context) - extends Task[A] + restore: (A, Throwable, Context, Context) => Context + ) extends Task[A] private[monix] final case class Trace[A](source: Task[A], trace: TaskEvent) extends Task[A] @@ -4932,8 +4956,10 @@ private[eval] abstract class TaskInstancesLevel0 extends TaskParallelNewtype { * to be available in scope */ implicit def catsEffect( - implicit s: Scheduler, - opts: Task.Options = Task.defaultOptions): CatsConcurrentEffectForTask = { + implicit + s: Scheduler, + opts: Task.Options = Task.defaultOptions + ): CatsConcurrentEffectForTask = { new CatsConcurrentEffectForTask } diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala index 79c19669f..8ae59980a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala @@ -18,7 +18,7 @@ package monix.eval import cats.effect._ -import cats.{~>, Eval} +import cats.{ ~>, Eval } import monix.catnap.FutureLift import monix.execution.CancelablePromise diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala index 5ce4c8a96..3b1469d1c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala @@ -283,7 +283,8 @@ object TaskLocal { if (!ctx.options.localContextPropagation) { throw new APIContractViolationException( "Support for TaskLocal usage isn't active! " + - "See documentation at: https://monix.io/api/current/monix/eval/TaskLocal.html") + "See documentation at: https://monix.io/api/current/monix/eval/TaskLocal.html" + ) } ctx } diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala index 425667549..cdb02e1a2 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala @@ -18,7 +18,7 @@ package monix.eval package instances -import cats.effect.{Async, CancelToken, Concurrent, ExitCase} +import cats.effect.{ Async, CancelToken, Concurrent, ExitCase } import monix.eval.internal.TaskCreate /** Cats type class instance of [[monix.eval.Task Task]] @@ -40,7 +40,8 @@ class CatsAsyncForTask extends CatsBaseForTask with Async[Task] { override def bracket[A, B](acquire: Task[A])(use: A => Task[B])(release: A => Task[Unit]): Task[B] = acquire.bracket(use)(release) override def bracketCase[A, B](acquire: Task[A])(use: A => Task[B])( - release: (A, ExitCase[Throwable]) => Task[Unit]): Task[B] = + release: (A, ExitCase[Throwable]) => Task[Unit] + ): Task[B] = acquire.bracketCase(use)(release) override def asyncF[A](k: (Either[Throwable, A] => Unit) => Task[Unit]): Task[A] = Task.asyncF(k) diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala index 3c15b6dd1..3cef5381e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala @@ -17,7 +17,7 @@ package monix.eval.instances -import cats.{CoflatMap, Eval, MonadError, SemigroupK} +import cats.{ CoflatMap, Eval, MonadError, SemigroupK } import monix.eval.Task import scala.util.Try diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala index 4e56132c5..7ed256f98 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala @@ -18,7 +18,7 @@ package monix.eval package instances -import cats.effect.{Fiber => _, _} +import cats.effect.{ Fiber => _, _ } import monix.eval.internal.TaskEffect import monix.execution.Scheduler @@ -59,7 +59,8 @@ class CatsEffectForTask(implicit s: Scheduler, opts: Task.Options) extends CatsB override def bracket[A, B](acquire: Task[A])(use: A => Task[B])(release: A => Task[Unit]): Task[B] = F.bracket(acquire)(use)(release) override def bracketCase[A, B](acquire: Task[A])(use: A => Task[B])( - release: (A, ExitCase[Throwable]) => Task[Unit]): Task[B] = + release: (A, ExitCase[Throwable]) => Task[Unit] + ): Task[B] = F.bracketCase(acquire)(use)(release) } diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala index 98648d1da..ce247edf0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala @@ -17,7 +17,7 @@ package monix.eval.instances -import cats.{Monad, Monoid, Semigroup} +import cats.{ Monad, Monoid, Semigroup } /** Given that `A` has a `cats.Semigroup` implementation, this * builds a `Semigroup[F[A]]` instance for any `F[_]` data type diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala index 8fda97be1..5148b0013 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala @@ -17,7 +17,7 @@ package monix.eval.instances -import cats.{Applicative, CommutativeApplicative, Monad, Parallel, ~>} +import cats.{ ~>, Applicative, CommutativeApplicative, Monad, Parallel } import monix.eval.Task /** `cats.Parallel` type class instance for [[monix.eval.Task Task]]. @@ -49,7 +49,7 @@ object CatsParallelForTask extends CatsParallelForTask { private[eval] object NondetApplicative extends CommutativeApplicative[Task.Par] { import Task.Par.unwrap - import Task.Par.{apply => par} + import Task.Par.{ apply => par } override def ap[A, B](ff: Task.Par[A => B])(fa: Task.Par[A]): Task.Par[B] = par(Task.mapBoth(unwrap(ff), unwrap(fa))(_(_))) diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala index 7bff92131..7beaeb6dc 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala @@ -17,8 +17,8 @@ package monix.eval.instances -import cats.{CoflatMap, Eval, SemigroupK} -import cats.effect.{ExitCase, Sync, SyncEffect} +import cats.{ CoflatMap, Eval, SemigroupK } +import cats.effect.{ ExitCase, Sync, SyncEffect } import monix.eval.Coeval import scala.util.Try @@ -81,7 +81,8 @@ class CatsSyncForCoeval extends SyncEffect[Coeval] with CoflatMap[Coeval] with S override def bracket[A, B](acquire: Coeval[A])(use: A => Coeval[B])(release: A => Coeval[Unit]): Coeval[B] = acquire.bracket(use)(release) override def bracketCase[A, B](acquire: Coeval[A])(use: A => Coeval[B])( - release: (A, ExitCase[Throwable]) => Coeval[Unit]): Coeval[B] = + release: (A, ExitCase[Throwable]) => Coeval[Unit] + ): Coeval[B] = acquire.bracketCase(use)(release) override def combineK[A](x: Coeval[A], y: Coeval[A]): Coeval[A] = x.onErrorHandleWith(_ => y) @@ -94,4 +95,4 @@ class CatsSyncForCoeval extends SyncEffect[Coeval] with CoflatMap[Coeval] with S * Globally available in scope, as it is returned by * [[monix.eval.Coeval.catsSync Coeval.catsSync]]. */ -object CatsSyncForCoeval extends CatsSyncForCoeval \ No newline at end of file +object CatsSyncForCoeval extends CatsSyncForCoeval diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala index ab35f8925..8fdc85dd0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala @@ -29,7 +29,8 @@ private[eval] object CoevalBracket { def either[A, B]( acquire: Coeval[A], use: A => Coeval[B], - release: (A, Either[Throwable, B]) => Coeval[Unit]): Coeval[B] = { + release: (A, Either[Throwable, B]) => Coeval[Unit] + ): Coeval[B] = { acquire.flatMap { a => val next = @@ -45,7 +46,8 @@ private[eval] object CoevalBracket { def exitCase[A, B]( acquire: Coeval[A], use: A => Coeval[B], - release: (A, ExitCase[Throwable]) => Coeval[Unit]): Coeval[B] = { + release: (A, ExitCase[Throwable]) => Coeval[Unit] + ): Coeval[B] = { acquire.flatMap { a => val next = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala index e49301976..f8395ee8d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala @@ -19,7 +19,7 @@ package monix.eval package internal import cats.Eval -import cats.effect.{IO, SyncIO} +import cats.effect.{ IO, SyncIO } /** * Extension methods describing deprecated `Task` operations. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala index 35007135c..881246954 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala @@ -18,10 +18,10 @@ package monix.eval.internal import monix.eval.Coeval -import monix.eval.Coeval.{Always, Eager, Error, FlatMap, Map, Now, Suspend, Trace} -import monix.eval.tracing.{CoevalEvent, CoevalTrace} +import monix.eval.Coeval.{ Always, Eager, Error, FlatMap, Map, Now, Suspend, Trace } +import monix.eval.tracing.{ CoevalEvent, CoevalTrace } import monix.execution.internal.collection.ChunkedArrayStack -import monix.eval.internal.TracingPlatform.{enhancedExceptions, isStackTracing} +import monix.eval.internal.TracingPlatform.{ enhancedExceptions, isStackTracing } import scala.reflect.NameTransformer import scala.util.control.NonFatal @@ -43,7 +43,7 @@ private[eval] object CoevalRunLoop { while (true) { current match { - case bind@FlatMap(fa, bindNext, _) => + case bind @ FlatMap(fa, bindNext, _) => if (isStackTracing) { val trace = bind.trace if (tracingCtx eq null) tracingCtx = new CoevalStackTracedContext @@ -195,10 +195,12 @@ private[eval] object CoevalRunLoop { case (methodSite, callSite) => val op = NameTransformer.decode(methodSite.getMethodName) - new StackTraceElement(op + " @ " + callSite.getClassName, + new StackTraceElement( + op + " @ " + callSite.getClassName, callSite.getMethodName, callSite.getFileName, - callSite.getLineNumber) + callSite.getLineNumber + ) } .toArray ex.setStackTrace(prefix ++ suffix) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala index 6379567ea..ea24895cf 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala @@ -17,7 +17,7 @@ package monix.eval.internal -import monix.eval.tracing.{CoevalEvent, CoevalTrace} +import monix.eval.tracing.{ CoevalEvent, CoevalTrace } import monix.eval.internal.TracingPlatform.traceBufferLogSize import monix.execution.internal.RingBuffer @@ -36,4 +36,4 @@ private[eval] final class CoevalStackTracedContext { def getStackTraces(): List[CoevalEvent.StackTrace] = events.toList.collect { case ev: CoevalEvent.StackTrace => ev } -} \ No newline at end of file +} diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala index 1d6954d80..8c18e9a25 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala @@ -57,4 +57,4 @@ private[eval] object CoevalTracing { */ private[this] val frameCache: ConcurrentHashMap[Class[_], CoevalEvent] = new ConcurrentHashMap() -} \ No newline at end of file +} diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala index c1f272acd..e001563c8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala @@ -18,7 +18,7 @@ package monix.eval.internal import monix.execution.Callback -import monix.eval.Task.{Async, Context, ContextSwitch, FlatMap, Map} +import monix.eval.Task.{ Async, Context, ContextSwitch, FlatMap, Map } import monix.eval.Task import scala.annotation.tailrec import scala.runtime.AbstractFunction2 diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala index 779ad7de6..8418614ea 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala @@ -22,7 +22,7 @@ import java.util.concurrent.atomic.AtomicReference import cats.effect.CancelToken import monix.eval.Task import monix.execution.schedulers.TrampolineExecutionContext -import monix.execution.{Callback, Scheduler} +import monix.execution.{ Callback, Scheduler } import scala.annotation.tailrec import scala.concurrent.ExecutionContext @@ -116,4 +116,4 @@ private[internal] object ForwardCancelable { } () }) -} \ No newline at end of file +} diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala index a33d4a1c3..7405945ac 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala @@ -19,7 +19,7 @@ package monix.eval package internal import monix.execution.ExecutionModel -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, BatchedExecution, SynchronousExecution} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } import monix.execution.misc.ThreadLocal /** Internal API — A reference that boxes a `FrameIndex` possibly diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala index 4f0dae902..dd0408a61 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala @@ -18,7 +18,7 @@ package monix.eval.internal import monix.eval.Coeval -import monix.eval.Coeval.{Error, Now} +import monix.eval.Coeval.{ Error, Now } import scala.util.control.NonFatal /** `LazyVal` boxes a function and memoizes its result on its first invocation, diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala index c6c1f8098..91dc98d2a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala @@ -17,7 +17,7 @@ package monix.eval.internal -import monix.eval.tracing.{TaskEvent, TaskTrace} +import monix.eval.tracing.{ TaskEvent, TaskTrace } import monix.eval.internal.TracingPlatform.traceBufferLogSize import monix.execution.internal.RingBuffer diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala index 9a3f5ac5d..43e07f67a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala @@ -18,8 +18,8 @@ package monix.eval.internal import cats.effect.ExitCase -import cats.effect.ExitCase.{Canceled, Completed, Error} -import monix.eval.Task.{Context, ContextSwitch} +import cats.effect.ExitCase.{ Canceled, Completed, Error } +import monix.eval.Task.{ Context, ContextSwitch } import monix.execution.Callback import monix.eval.Task import monix.execution.atomic.Atomic @@ -88,7 +88,8 @@ private[monix] object TaskBracket { def either[A, B]( acquire: Task[A], use: A => Task[B], - release: (A, Either[Option[Throwable], B]) => Task[Unit]): Task[B] = { + release: (A, Either[Option[Throwable], B]) => Task[Unit] + ): Task[B] = { TracedAsync( new StartE(acquire, use, release), @@ -102,8 +103,8 @@ private[monix] object TaskBracket { private final class StartE[A, B]( acquire: Task[A], use: A => Task[B], - release: (A, Either[Option[Throwable], B]) => Task[Unit]) - extends BaseStart(acquire, use) { + release: (A, Either[Option[Throwable], B]) => Task[Unit] + ) extends BaseStart(acquire, use) { def makeReleaseFrame(ctx: Context, value: A) = new ReleaseFrameE(ctx, value, release) @@ -141,8 +142,8 @@ private[monix] object TaskBracket { private final class StartCase[A, B]( acquire: Task[A], use: A => Task[B], - release: (A, ExitCase[Throwable]) => Task[Unit]) - extends BaseStart(acquire, use) { + release: (A, ExitCase[Throwable]) => Task[Unit] + ) extends BaseStart(acquire, use) { def makeReleaseFrame(ctx: Context, value: A) = new ReleaseFrameCase(ctx, value, release) @@ -254,7 +255,10 @@ private[monix] object TaskBracket { private final def unsafeApply(b: B): Task[B] = { if (waitsForResult.compareAndSet(expect = true, update = false)) - releaseOnSuccess(a, b).redeemWith(ex => Task(p.success(())).flatMap(_ => Task.raiseError(ex)), _ => Task{p.success(()); b}) + releaseOnSuccess(a, b).redeemWith( + ex => Task(p.success(())).flatMap(_ => Task.raiseError(ex)), + _ => Task { p.success(()); b } + ) else Task.never diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala index a59e00775..162ed6786 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala @@ -19,9 +19,9 @@ package monix.eval package internal import cats.effect.CancelToken -import monix.eval.Task.{Async, Context} -import monix.execution.{Callback, Scheduler} -import monix.execution.atomic.{Atomic, AtomicBoolean} +import monix.eval.Task.{ Async, Context } +import monix.execution.{ Callback, Scheduler } +import monix.execution.atomic.{ Atomic, AtomicBoolean } import monix.execution.schedulers.TrampolinedRunnable private[eval] object TaskCancellation { @@ -91,14 +91,16 @@ private[eval] object TaskCancellation { conn: TaskConnection, conn2: TaskConnection, cb: Callback[Throwable, A], - e: Throwable): CancelToken[Task] = { + e: Throwable + ): CancelToken[Task] = { Task.suspend { if (waitsForResult.getAndSet(false)) conn2.cancel.map { _ => conn.tryReactivate() cb.onError(e) - } else + } + else Task.unit } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala index b843e76c9..16b7cdf70 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala @@ -20,8 +20,8 @@ package internal import cats.effect.CancelToken import monix.catnap.CancelableF -import monix.execution.atomic.{Atomic, PaddingStrategy} -import monix.execution.{Cancelable, Scheduler} +import monix.execution.atomic.{ Atomic, PaddingStrategy } +import monix.execution.{ Cancelable, Scheduler } import scala.annotation.tailrec import scala.concurrent.Promise diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala index ed5e64058..9f93f6587 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala @@ -20,10 +20,10 @@ package monix.eval.internal import cats.effect.CancelToken import monix.catnap.CancelableF import monix.eval.Task -import monix.eval.internal.TaskConnectionComposite.{Active, Cancelled, State} -import monix.execution.{Cancelable, Scheduler} +import monix.eval.internal.TaskConnectionComposite.{ Active, Cancelled, State } +import monix.execution.{ Cancelable, Scheduler } import monix.execution.atomic.PaddingStrategy.LeftRight128 -import monix.execution.atomic.{Atomic, AtomicAny} +import monix.execution.atomic.{ Atomic, AtomicAny } import scala.annotation.tailrec @@ -73,7 +73,8 @@ private[eval] final class TaskConnectionComposite private (stateRef: AtomicAny[S @tailrec private def addAny(ref: AnyRef /* CancelToken[Task] | CancelableF[Task] | Cancelable */ )( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { stateRef.get() match { case Cancelled => diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala index 7bf762e6c..3a4cfb19e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala @@ -20,7 +20,7 @@ package internal import cats.effect.CancelToken import monix.catnap.CancelableF -import monix.execution.{Cancelable, Scheduler} +import monix.execution.{ Cancelable, Scheduler } import monix.execution.atomic.Atomic import scala.annotation.tailrec @@ -41,7 +41,8 @@ private[eval] final class TaskConnectionRef extends CancelableF[Task] { @tailrec private def unsafeSet(ref: AnyRef /* CancelToken[Task] | CancelableF[Task] | Cancelable */ )( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { if (!state.compareAndSet(Empty, IsActive(ref))) { state.get() match { @@ -87,7 +88,8 @@ private[eval] final class TaskConnectionRef extends CancelableF[Task] { private def raiseError(): Nothing = { throw new IllegalStateException( "Cannot assign to SingleAssignmentCancelable, " + - "as it was already assigned once") + "as it was already assigned once" + ) } private[this] val state = Atomic(Empty: State) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala index 1776618b0..1c41c283f 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala @@ -23,7 +23,7 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.Scheduler import monix.execution.schedulers.TrampolinedRunnable -import org.reactivestreams.{Publisher, Subscriber} +import org.reactivestreams.{ Publisher, Subscriber } import monix.execution.rstreams.SingleAssignSubscription import scala.util.control.NonFatal @@ -159,7 +159,7 @@ private[eval] object TaskConversions { implicit val sc = ctx.scheduler val conn = ctx.connection val cancelable = TaskConnectionRef() - conn push cancelable.cancel + conn.push(cancelable.cancel) val syncIO = F.runCancelable(fa)(new CreateCallback[A](conn, cb)) cancelable := fromEffect(syncIO.unsafeRunSync(): F[Unit]) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala index 0fe10a715..67463119e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala @@ -19,14 +19,14 @@ package monix.eval.internal import java.util.concurrent.RejectedExecutionException -import cats.effect.{CancelToken, IO} +import cats.effect.{ CancelToken, IO } import monix.eval.Task.Context -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.AtomicInt import monix.execution.exceptions.CallbackCalledMultipleTimesException import monix.execution.internal.Platform -import monix.execution.schedulers.{StartAsyncBatchRunnable, TrampolinedRunnable} -import monix.execution.{Callback, Cancelable, Scheduler, UncaughtExceptionReporter} +import monix.execution.schedulers.{ StartAsyncBatchRunnable, TrampolinedRunnable } +import monix.execution.{ Callback, Cancelable, Scheduler, UncaughtExceptionReporter } import scala.util.control.NonFatal @@ -149,7 +149,7 @@ private[eval] object TaskCreate { implicit val s = ctx.scheduler val conn = ctx.connection val cancelable = TaskConnectionRef() - conn push cancelable.cancel + conn.push(cancelable.cancel) val cbProtected = new CallbackForCreate(ctx, shouldPop = true, cb) try { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala index 3bd9b0ef8..353a116c4 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala @@ -18,14 +18,14 @@ package monix.eval package internal -import cats.effect.{ConcurrentEffect, IO} +import cats.effect.{ ConcurrentEffect, IO } import monix.eval.Task.Options import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.compat.BuildFrom -import monix.execution.{Callback, Cancelable, CancelableFuture, Scheduler} +import monix.execution.{ Callback, Cancelable, CancelableFuture, Scheduler } import scala.annotation.unchecked.uncheckedVariance -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } private[eval] object TaskDeprecated { /** @@ -355,7 +355,8 @@ private[eval] object TaskDeprecated { fa2: Task[A2], fa3: Task[A3], fa4: Task[A4], - fa5: Task[A5]): Task[(A1, A2, A3, A4, A5)] = { + fa5: Task[A5] + ): Task[(A1, A2, A3, A4, A5)] = { // $COVERAGE-OFF$ Task.parZip5(fa1, fa2, fa3, fa4, fa5) // $COVERAGE-ON$ @@ -369,7 +370,8 @@ private[eval] object TaskDeprecated { fa3: Task[A3], fa4: Task[A4], fa5: Task[A5], - fa6: Task[A6]): Task[(A1, A2, A3, A4, A5, A6)] = { + fa6: Task[A6] + ): Task[(A1, A2, A3, A4, A5, A6)] = { // $COVERAGE-OFF$ Task.parZip6(fa1, fa2, fa3, fa4, fa5, fa6) // $COVERAGE-ON$ @@ -443,7 +445,9 @@ private[eval] object TaskDeprecated { /** DEPRECATED — renamed to [[Task.parTraverse]] */ @deprecated("Use parTraverse", "3.2.0") - def wander[A, B, M[X] <: Iterable[X]](in: M[A])(f: A => Task[B])(implicit bf: BuildFrom[M[A], B, M[B]]): Task[M[B]] = { + def wander[A, B, M[X] <: Iterable[X]](in: M[A])(f: A => Task[B])(implicit + bf: BuildFrom[M[A], B, M[B]] + ): Task[M[B]] = { // $COVERAGE-OFF$ Task.parTraverse(in)(f) // $COVERAGE-ON$ diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala index dab2d809d..e9bc493f0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala @@ -17,7 +17,7 @@ package monix.eval.internal -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import monix.execution.Callback import monix.eval.Task import monix.execution.exceptions.CallbackCalledMultipleTimesException diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala index 20116c827..a9e37d6dd 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala @@ -18,7 +18,7 @@ package monix.eval package internal -import cats.effect.{CancelToken, IO, SyncIO} +import cats.effect.{ CancelToken, IO, SyncIO } import monix.execution.Callback import monix.execution.Scheduler import monix.execution.internal.AttemptCallback.noop @@ -34,7 +34,8 @@ private[eval] object TaskEffect { * `cats.effect.Effect#runAsync` */ def runAsync[A](fa: Task[A])(cb: Either[Throwable, A] => IO[Unit])( - implicit s: Scheduler, + implicit + s: Scheduler, opts: Task.Options ): SyncIO[Unit] = SyncIO { execute(fa, cb) @@ -45,14 +46,16 @@ private[eval] object TaskEffect { * `cats.effect.ConcurrentEffect#runCancelable` */ def runCancelable[A](fa: Task[A])(cb: Either[Throwable, A] => IO[Unit])( - implicit s: Scheduler, + implicit + s: Scheduler, opts: Task.Options ): SyncIO[CancelToken[Task]] = SyncIO { execute(fa, cb) } private def execute[A](fa: Task[A], cb: Either[Throwable, A] => IO[Unit])( - implicit s: Scheduler, + implicit + s: Scheduler, opts: Task.Options ): CancelToken[Task] = { fa.runAsyncOptF(new Callback[Throwable, A] { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala index dab763e0e..dd20f13f8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala @@ -17,7 +17,7 @@ package monix.eval.internal -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import java.util.concurrent.RejectedExecutionException import monix.execution.Callback import monix.eval.Task diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala index fb5278426..c9a6ef5a0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala @@ -19,9 +19,9 @@ package monix.eval.internal import monix.execution.Callback import monix.eval.Task -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import monix.execution.ExecutionModel -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, BatchedExecution, SynchronousExecution} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } private[eval] object TaskExecuteWithModel { /** diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala index 98a667e78..6199c0c29 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala @@ -18,7 +18,7 @@ package monix.eval.internal import monix.eval.Task -import monix.eval.Task.{Context, ContextSwitch, Options} +import monix.eval.Task.{ Context, ContextSwitch, Options } private[eval] object TaskExecuteWithOptions { /** diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala index ac1437775..bea085975 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala @@ -23,7 +23,7 @@ import monix.eval.Task import monix.execution.cancelables.SingleAssignCancelable import scala.util.control.NonFatal import monix.execution.schedulers.TrampolinedRunnable -import scala.concurrent.{ExecutionContext, Future} +import scala.concurrent.{ ExecutionContext, Future } import scala.util.Try private[eval] object TaskFromFuture { @@ -134,7 +134,8 @@ private[eval] object TaskFromFuture { } private def trampolinedCB[A](cb: Callback[Throwable, A], conn: TaskConnection)( - implicit ec: ExecutionContext): Try[A] => Unit = { + implicit ec: ExecutionContext + ): Try[A] => Unit = { new (Try[A] => Unit) with TrampolinedRunnable { private[this] var value: Try[A] = _ diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala index 9759d6afd..d0c540fd5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala @@ -23,7 +23,7 @@ import monix.eval.Task import monix.execution.Ack.Stop import monix.execution.Scheduler import monix.execution.atomic.PaddingStrategy.LeftRight128 -import monix.execution.atomic.{Atomic, AtomicAny} +import monix.execution.atomic.{ Atomic, AtomicAny } import monix.execution.internal.exceptions.matchError import scala.annotation.tailrec import scala.util.control.NonFatal @@ -33,7 +33,13 @@ private[eval] object TaskMapBoth { * Implementation for `Task.mapBoth`. */ def apply[A1, A2, R](fa1: Task[A1], fa2: Task[A2])(f: (A1, A2) => R): Task[R] = { - TracedAsync(new Register(fa1, fa2, f), trampolineBefore = true, trampolineAfter = true, restoreLocals = true, traceKey = f) + TracedAsync( + new Register(fa1, fa2, f), + trampolineBefore = true, + trampolineAfter = true, + restoreLocals = true, + traceKey = f + ) } // Implementing Async's "start" via `ForkedStart` in order to signal @@ -45,7 +51,8 @@ private[eval] object TaskMapBoth { /* For signaling the values after the successful completion of both tasks. */ def sendSignal(mainConn: TaskConnection, cb: Callback[Throwable, R], a1: A1, a2: A2)( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { var streamErrors = true try { @@ -67,7 +74,8 @@ private[eval] object TaskMapBoth { mainConn: TaskConnection, state: AtomicAny[AnyRef], cb: Callback[Throwable, R], - ex: Throwable)(implicit s: Scheduler): Unit = { + ex: Throwable + )(implicit s: Scheduler): Unit = { // Guarding the contract of the callback, as we cannot send an error // if an error has already happened because of the other task @@ -117,7 +125,7 @@ private[eval] object TaskMapBoth { case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } def onError(ex: Throwable): Unit = @@ -145,7 +153,7 @@ private[eval] object TaskMapBoth { case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } def onError(ex: Throwable): Unit = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala index 211808370..770e4d465 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala @@ -17,16 +17,16 @@ package monix.eval.internal -import monix.eval.Task.{Context, Error, Now} +import monix.eval.Task.{ Context, Error, Now } import monix.eval.internal.TaskRunLoop.startFull import monix.execution.Callback -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.internal.exceptions.matchError import scala.annotation.tailrec -import scala.concurrent.{ExecutionContext, Promise} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ ExecutionContext, Promise } +import scala.util.{ Failure, Success, Try } private[eval] object TaskMemoize { /** @@ -45,7 +45,8 @@ private[eval] object TaskMemoize { new Register(source, cacheErrors), trampolineBefore = false, trampolineAfter = true, - restoreLocals = true) + restoreLocals = true + ) } /** Registration function, used in `Task.Async`. */ @@ -120,7 +121,8 @@ private[eval] object TaskMemoize { * that will receive the result once the task is complete. */ private def registerListener(p: Promise[A], context: Context, cb: Callback[Throwable, A])( - implicit ec: ExecutionContext): Unit = { + implicit ec: ExecutionContext + ): Unit = { p.future.onComplete { r => // Listener is cancelable: we simply ensure that the result isn't streamed @@ -164,12 +166,12 @@ private[eval] object TaskMemoize { // Race condition happened // $COVERAGE-OFF$ cb(ref) - // $COVERAGE-ON$ + // $COVERAGE-ON$ case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala index dde1d54e1..0f93b3380 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala @@ -18,7 +18,7 @@ package monix.eval.internal import cats.effect.CancelToken -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import monix.execution.Callback import monix.eval.Task import monix.execution.Scheduler @@ -46,8 +46,8 @@ private[eval] object TaskParSequence { // a full async boundary! private final class Register[A, M[X] <: Iterable[X]]( in: Iterable[Task[A]], - makeBuilder: () => mutable.Builder[A, M[A]]) - extends ForkedRegister[M[A]] { + makeBuilder: () => mutable.Builder[A, M[A]] + ) extends ForkedRegister[M[A]] { def apply(context: Context, finalCallback: Callback[Throwable, M[A]]): Unit = { // We need a monitor to synchronize on, per evaluation! @@ -66,7 +66,8 @@ private[eval] object TaskParSequence { // MUST BE synchronized by `lock`! // MUST NOT BE called if isActive == false! def maybeSignalFinal(mainConn: TaskConnection, finalCallback: Callback[Throwable, M[A]])( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { completed += 1 if (completed >= tasksCount) { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala index f1d6d543e..8ce7ce93a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala @@ -21,7 +21,7 @@ import cats.effect.ExitCase import cats.effect.concurrent.Deferred import monix.catnap.ConcurrentQueue import monix.eval.Task -import monix.execution.{BufferCapacity, ChannelType} +import monix.execution.{ BufferCapacity, ChannelType } private[eval] object TaskParSequenceN { /** diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala index 649dde245..1b42245a0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala @@ -18,11 +18,11 @@ package monix.eval.internal import cats.effect.CancelToken -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import monix.execution.Callback import monix.eval.Task import monix.execution.Scheduler -import monix.execution.atomic.{Atomic, AtomicAny} +import monix.execution.atomic.{ Atomic, AtomicAny } import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.compat.internal.toIterator @@ -54,7 +54,8 @@ private[eval] object TaskParSequenceUnordered { ref: AtomicAny[State[A]], currentState: State[A], mainConn: TaskConnection, - finalCallback: Callback[Throwable, List[A]])(implicit s: Scheduler): Unit = { + finalCallback: Callback[Throwable, List[A]] + )(implicit s: Scheduler): Unit = { currentState match { case State.Active(list, 0) => @@ -76,7 +77,8 @@ private[eval] object TaskParSequenceUnordered { stateRef: AtomicAny[State[A]], mainConn: TaskConnection, ex: Throwable, - finalCallback: Callback[Throwable, List[A]])(implicit s: Scheduler): Unit = { + finalCallback: Callback[Throwable, List[A]] + )(implicit s: Scheduler): Unit = { val currentState = stateRef.getAndSet(State.Complete) if (currentState != State.Complete) { @@ -92,7 +94,8 @@ private[eval] object TaskParSequenceUnordered { stateRef: AtomicAny[State[A]], count: Int, conn: TaskConnection, - finalCallback: Callback[Throwable, List[A]])(implicit s: Scheduler): Unit = { + finalCallback: Callback[Throwable, List[A]] + )(implicit s: Scheduler): Unit = { stateRef.get() match { case current @ State.Initializing(_, _) => diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala index 80e23b6a5..804840487 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala @@ -21,7 +21,7 @@ import cats.effect.CancelToken import monix.catnap.CancelableF import monix.execution.Callback import monix.eval.Task -import monix.execution.atomic.{Atomic, PaddingStrategy} +import monix.execution.atomic.{ Atomic, PaddingStrategy } private[eval] object TaskRaceList { /** diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala index de492d71e..181132d0f 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala @@ -17,8 +17,8 @@ package monix.eval.internal -import monix.eval.Task.{Context, Error, Now} -import monix.eval.internal.TaskRunLoop.{startFull, Bind, CallStack} +import monix.eval.Task.{ Context, Error, Now } +import monix.eval.internal.TaskRunLoop.{ startFull, Bind, CallStack } import monix.eval.Task import monix.execution.Callback import monix.execution.misc.Local diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala index ce88cd6b3..a246b61c4 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala @@ -19,15 +19,15 @@ package monix.eval.internal import cats.effect.CancelToken import monix.eval.Task -import monix.eval.Task.{Async, Context, ContextSwitch, Error, Eval, FlatMap, Map, Now, Suspend, Trace} +import monix.eval.Task.{ Async, Context, ContextSwitch, Error, Eval, FlatMap, Map, Now, Suspend, Trace } import monix.execution.internal.collection.ChunkedArrayStack import monix.execution.misc.Local -import monix.execution.{Callback, CancelableFuture, ExecutionModel, Scheduler} +import monix.execution.{ Callback, CancelableFuture, ExecutionModel, Scheduler } import scala.concurrent.Promise import scala.util.control.NonFatal -import monix.eval.internal.TracingPlatform.{enhancedExceptions, isStackTracing} -import monix.eval.tracing.{TaskEvent, TaskTrace} +import monix.eval.internal.TracingPlatform.{ enhancedExceptions, isStackTracing } +import monix.eval.tracing.{ TaskEvent, TaskTrace } import scala.reflect.NameTransformer @@ -49,7 +49,8 @@ private[eval] object TaskRunLoop { rcb: TaskRestartCallback, bFirst: Bind, bRest: CallStack, - frameIndex: FrameIndex): Unit = { + frameIndex: FrameIndex + ): Unit = { val cba = cb.asInstanceOf[Callback[Throwable, Any]] var current: Current = source @@ -213,7 +214,8 @@ private[eval] object TaskRunLoop { cb: Callback[Throwable, A], rcb: TaskRestartCallback, bindCurrent: Bind, - bindRest: CallStack): Unit = { + bindRest: CallStack + ): Unit = { val savedLocals = if (context.options.localContextPropagation) Local.getContext() @@ -258,7 +260,8 @@ private[eval] object TaskRunLoop { scheduler: Scheduler, opts: Task.Options, cb: Callback[Throwable, A], - isCancelable: Boolean = true): CancelToken[Task] = { + isCancelable: Boolean = true + ): CancelToken[Task] = { var current = source.asInstanceOf[Task[Any]] var bFirst: Bind = null @@ -363,7 +366,8 @@ private[eval] object TaskRunLoop { frameIndex, forceFork = false, isCancelable = isCancelable, - tracingCtx = tracingCtx) + tracingCtx = tracingCtx + ) } @@ -399,7 +403,8 @@ private[eval] object TaskRunLoop { frameIndex, forceFork = true, isCancelable = true, - tracingCtx = tracingCtx) + tracingCtx = tracingCtx + ) } } // $COVERAGE-OFF$ @@ -502,7 +507,16 @@ private[eval] object TaskRunLoop { case async => if (tracingCtx eq null) tracingCtx = new StackTracedContext - return goAsync4Step(async, scheduler, opts, bFirst, bRest, frameIndex, forceFork = false, tracingCtx = tracingCtx) + return goAsync4Step( + async, + scheduler, + opts, + bFirst, + bRest, + frameIndex, + forceFork = false, + tracingCtx = tracingCtx + ) } if (hasUnboxed) { @@ -526,7 +540,16 @@ private[eval] object TaskRunLoop { if (tracingCtx eq null) tracingCtx = new StackTracedContext // Force async boundary - return goAsync4Step(current, scheduler, opts, bFirst, bRest, frameIndex, forceFork = true, tracingCtx = tracingCtx) + return goAsync4Step( + current, + scheduler, + opts, + bFirst, + bRest, + frameIndex, + forceFork = true, + tracingCtx = tracingCtx + ) } } // $COVERAGE-OFF$ @@ -665,7 +688,16 @@ private[eval] object TaskRunLoop { } else { if (tracingCtx eq null) tracingCtx = new StackTracedContext // Force async boundary - return goAsync4Future(current, scheduler, opts, bFirst, bRest, frameIndex, forceFork = true, tracingCtx = tracingCtx) + return goAsync4Future( + current, + scheduler, + opts, + bFirst, + bRest, + frameIndex, + forceFork = true, + tracingCtx = tracingCtx + ) } } // $COVERAGE-OFF$ @@ -680,7 +712,8 @@ private[eval] object TaskRunLoop { rcb: TaskRestartCallback, bFirst: Bind, bRest: CallStack, - nextFrame: FrameIndex): Unit = { + nextFrame: FrameIndex + ): Unit = { if (isStackTracing) { val trace = task.trace @@ -716,7 +749,8 @@ private[eval] object TaskRunLoop { nextFrame: FrameIndex, isCancelable: Boolean, forceFork: Boolean, - tracingCtx: StackTracedContext): CancelToken[Task] = { + tracingCtx: StackTracedContext + ): CancelToken[Task] = { val context = Context( scheduler, @@ -747,7 +781,8 @@ private[eval] object TaskRunLoop { bRest: CallStack, nextFrame: FrameIndex, forceFork: Boolean, - tracingCtx: StackTracedContext): CancelableFuture[A] = { + tracingCtx: StackTracedContext + ): CancelableFuture[A] = { val p = Promise[A]() val cb = Callback.fromPromise(p).asInstanceOf[Callback[Throwable, Any]] @@ -775,7 +810,8 @@ private[eval] object TaskRunLoop { bRest: CallStack, nextFrame: FrameIndex, forceFork: Boolean, - tracingCtx: StackTracedContext): Either[Task[A], A] = { + tracingCtx: StackTracedContext + ): Either[Task[A], A] = { val ctx = Context(scheduler, opts, TaskConnection(), tracingCtx) val start: Start[Any] = @@ -791,7 +827,8 @@ private[eval] object TaskRunLoop { start.asInstanceOf[Start[A]], trampolineBefore = false, trampolineAfter = false - )) + ) + ) } private[internal] def findErrorHandler(bFirst: Bind, bRest: CallStack): StackFrame[Any, Task[Any]] = { @@ -864,10 +901,12 @@ private[eval] object TaskRunLoop { case (methodSite, callSite) => val op = NameTransformer.decode(methodSite.getMethodName) - new StackTraceElement(op + " @ " + callSite.getClassName, + new StackTraceElement( + op + " @ " + callSite.getClassName, callSite.getMethodName, callSite.getFileName, - callSite.getLineNumber) + callSite.getLineNumber + ) } .toArray ex.setStackTrace(prefix ++ suffix) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala index 3d684dd1f..2014a2b40 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala @@ -18,13 +18,13 @@ package monix.eval.internal import monix.eval.Task -import monix.eval.Task.{Async, Context, Error, Eval, FlatMap, Map, Now, Suspend, Trace} +import monix.eval.Task.{ Async, Context, Error, Eval, FlatMap, Map, Now, Suspend, Trace } import monix.eval.internal.TaskRunLoop._ import monix.eval.tracing.TaskEvent -import monix.eval.internal.TracingPlatform.{enhancedExceptions, isStackTracing} +import monix.eval.internal.TracingPlatform.{ enhancedExceptions, isStackTracing } import monix.execution.internal.collection.ChunkedArrayStack import monix.execution.misc.Local -import monix.execution.{Callback, CancelableFuture, Scheduler} +import monix.execution.{ Callback, CancelableFuture, Scheduler } import scala.concurrent.Promise import scala.util.control.NonFatal @@ -170,7 +170,18 @@ private[eval] object TaskRunToFutureWithLocal { } else { if (tracingCtx eq null) tracingCtx = new StackTracedContext // Force async boundary - return goAsync4Future(current, scheduler, opts, bFirst, bRest, frameIndex, forceFork = true, prev, isolated, tracingCtx = tracingCtx) + return goAsync4Future( + current, + scheduler, + opts, + bFirst, + bRest, + frameIndex, + forceFork = true, + prev, + isolated, + tracingCtx = tracingCtx + ) } } // $COVERAGE-OFF$ @@ -189,7 +200,8 @@ private[eval] object TaskRunToFutureWithLocal { forceFork: Boolean, previousCtx: Local.Context, isolatedCtx: Local.Context, - tracingCtx: StackTracedContext): CancelableFuture[A] = { + tracingCtx: StackTracedContext + ): CancelableFuture[A] = { Local.setContext(isolatedCtx) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala index 012bb4fd5..502dd3249 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala @@ -45,7 +45,8 @@ private[eval] object TaskSequence { /** Implementation for `Task.traverse`. */ def traverse[A, B, M[X] <: Iterable[X]](in: M[A], f: A => Task[B])( - implicit bf: BuildFrom[M[A], B, M[B]]): Task[M[B]] = { + implicit bf: BuildFrom[M[A], B, M[B]] + ): Task[M[B]] = { def loop(cursor: Iterator[A], acc: mutable.Builder[B, M[B]]): Task[M[B]] = { if (cursor.hasNext) { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala index 02cea9914..78c24e0c5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala @@ -19,9 +19,9 @@ package monix.eval.internal import java.util.concurrent.RejectedExecutionException import monix.eval.Task -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import monix.execution.schedulers.TracingScheduler -import monix.execution.{Callback, Scheduler} +import monix.execution.{ Callback, Scheduler } import scala.concurrent.ExecutionContext private[eval] object TaskShift { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala index d37c674da..ac5b552ba 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala @@ -19,7 +19,7 @@ package monix.eval.internal import java.util.concurrent.RejectedExecutionException -import monix.eval.Task.{Async, Context} +import monix.eval.Task.{ Async, Context } import monix.execution.Callback import monix.eval.Task diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala index 9115ffc07..d1697d6c3 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala @@ -18,8 +18,8 @@ package monix.eval package internal -import monix.eval.Task.{Async, Context} -import monix.execution.{Callback, CancelablePromise} +import monix.eval.Task.{ Async, Context } +import monix.execution.{ Callback, CancelablePromise } private[eval] object TaskStart { /** diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala index 884d8bc50..63e39db92 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala @@ -19,7 +19,7 @@ package monix.eval.internal import monix.eval.Task import monix.execution.rstreams.Subscription -import monix.execution.{Callback, Scheduler, UncaughtExceptionReporter} +import monix.execution.{ Callback, Scheduler, UncaughtExceptionReporter } import org.reactivestreams.Subscriber private[eval] object TaskToReactivePublisher { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala index 31e9c41a3..312f43e85 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala @@ -18,7 +18,7 @@ package monix.eval.internal import monix.eval.Task -import monix.eval.internal.TracingPlatform.{isCachedStackTracing, isFullStackTracing} +import monix.eval.internal.TracingPlatform.{ isCachedStackTracing, isFullStackTracing } import monix.execution.Callback /** @@ -33,7 +33,8 @@ private[eval] object TracedAsync { trampolineBefore: Boolean = false, trampolineAfter: Boolean = false, restoreLocals: Boolean = true, - traceKey: AnyRef): Task[A] = { + traceKey: AnyRef + ): Task[A] = { val trace = if (isCachedStackTracing) { TaskTracing.cached(traceKey.getClass) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala index 8eaed7044..994e90d79 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala @@ -20,7 +20,7 @@ package monix.eval.internal import cats.effect.CancelToken import monix.catnap.CancelableF import monix.eval.Task -import monix.execution.{Cancelable, Scheduler} +import monix.execution.{ Cancelable, Scheduler } import monix.execution.internal.Platform import scala.collection.mutable.ListBuffer @@ -39,7 +39,8 @@ private[eval] object UnsafeCancelUtils { * Internal API — very unsafe! */ private[internal] def cancelAllUnsafe( - cursor: Iterable[AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ]): CancelToken[Task] = { + cursor: Iterable[AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ] + ): CancelToken[Task] = { if (cursor.isEmpty) Task.unit @@ -54,7 +55,8 @@ private[eval] object UnsafeCancelUtils { * Internal API — very unsafe! */ private[internal] def unsafeCancel( - task: AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ): CancelToken[Task] = { + task: AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ + ): CancelToken[Task] = { task match { case ref: Task[Unit] @unchecked => @@ -92,7 +94,8 @@ private[eval] object UnsafeCancelUtils { * Internal API — very unsafe! */ private[internal] def triggerCancel(task: AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ )( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { task match { case ref: Task[Unit] @unchecked => diff --git a/monix-eval/shared/src/main/scala/monix/eval/package.scala b/monix-eval/shared/src/main/scala/monix/eval/package.scala index 387b089c1..304a00a75 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/package.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/package.scala @@ -22,7 +22,7 @@ import monix.catnap.CircuitBreaker import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding -import scala.concurrent.duration.{Duration, FiniteDuration} +import scala.concurrent.duration.{ Duration, FiniteDuration } package object eval { @@ -55,7 +55,8 @@ package object eval { onClosed: Task[Unit] = Task.unit, onHalfOpen: Task[Unit] = Task.unit, onOpen: Task[Unit] = Task.unit, - padding: PaddingStrategy = NoPadding): Task[CircuitBreaker[Task]] = { + padding: PaddingStrategy = NoPadding + ): Task[CircuitBreaker[Task]] = { // $COVERAGE-OFF$ CircuitBreaker[Task].of( diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala index e0bc560e8..e70d08016 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala @@ -27,4 +27,3 @@ object CoevalEvent { final case class StackTrace(stackTrace: List[StackTraceElement]) extends CoevalEvent } - diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala index ca0766e87..e42e6be58 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala @@ -122,7 +122,7 @@ private[eval] object CoevalTrace { private def demangleMethod(methodName: String): String = anonfunRegex.findFirstMatchIn(methodName) match { case Some(mat) => mat.group(1) - case None => methodName + case None => methodName } private[this] val anonfunRegex = "^\\$+anonfun\\$+(.+)\\$+\\d+$".r diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala index 68c17b7ca..b71f41a98 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala @@ -26,9 +26,11 @@ package monix.eval.tracing * * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ -final case class PrintingOptions private (showFullStackTraces: Boolean, - maxStackTraceLines: Int, - ignoreStackTraceLines: Int) { +final case class PrintingOptions private ( + showFullStackTraces: Boolean, + maxStackTraceLines: Int, + ignoreStackTraceLines: Int +) { def withShowFullStackTraces(showFullStackTraces: Boolean): PrintingOptions = copy(showFullStackTraces = showFullStackTraces) @@ -47,4 +49,4 @@ object PrintingOptions { ) def apply(): PrintingOptions = Default -} \ No newline at end of file +} diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala index 41f3238e4..890492369 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala @@ -122,7 +122,7 @@ private[eval] object TaskTrace { private def demangleMethod(methodName: String): String = anonfunRegex.findFirstMatchIn(methodName) match { case Some(mat) => mat.group(1) - case None => methodName + case None => methodName } private[this] val anonfunRegex = "^\\$+anonfun\\$+(.+)\\$+\\d+$".r diff --git a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala index 928cba222..a0ff4c83a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala @@ -19,14 +19,14 @@ package monix.eval import cats.Eq import cats.effect.laws.discipline.Parameters -import cats.effect.laws.discipline.arbitrary.{catsEffectLawsArbitraryForIO, catsEffectLawsCogenForIO} -import cats.effect.{Async, IO} +import cats.effect.laws.discipline.arbitrary.{ catsEffectLawsArbitraryForIO, catsEffectLawsCogenForIO } +import cats.effect.{ Async, IO } import monix.execution.atomic.Atomic import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import org.scalacheck.Arbitrary.{arbitrary => getArbitrary} -import org.scalacheck.{Arbitrary, Cogen, Gen} -import scala.util.{Either, Success, Try} +import org.scalacheck.Arbitrary.{ arbitrary => getArbitrary } +import org.scalacheck.{ Arbitrary, Cogen, Gen } +import scala.util.{ Either, Success, Try } /** * Base trait to inherit in all `monix-eval` tests that use ScalaCheck. @@ -47,7 +47,8 @@ trait ArbitraryInstances extends ArbitraryInstancesBase { implicit A: Eq[A], sc: TestScheduler, - opts: Task.Options = Task.defaultOptions): Eq[Task[A]] = { + opts: Task.Options = Task.defaultOptions + ): Eq[Task[A]] = { new Eq[Task[A]] { def eqv(lh: Task[A], rh: Task[A]): Boolean = @@ -59,7 +60,8 @@ trait ArbitraryInstances extends ArbitraryInstancesBase { implicit A: Eq[A], ec: TestScheduler, - opts: Task.Options = Task.defaultOptions): Eq[Task.Par[A]] = { + opts: Task.Options = Task.defaultOptions + ): Eq[Task.Par[A]] = { new Eq[Task.Par[A]] { import Task.Par.unwrap @@ -85,7 +87,8 @@ trait ArbitraryInstancesBase extends monix.execution.ArbitraryInstances { Coeval.evalOnce(a), Coeval.eval(a), Coeval.unit.map(_ => a), - Coeval.unit.flatMap(_ => Coeval.now(a))) + Coeval.unit.flatMap(_ => Coeval.now(a)) + ) } yield coeval } @@ -173,7 +176,8 @@ trait ArbitraryInstancesBase extends monix.execution.ArbitraryInstances { 1 -> getMapOne, 1 -> getMapTwo, 2 -> genFlatMap - )) + ) + ) } implicit def arbitraryTaskPar[A: Arbitrary: Cogen]: Arbitrary[Task.Par[A]] = diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala index 26e41ba69..73050841e 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala @@ -20,9 +20,9 @@ package monix.eval import cats.laws._ import cats.laws.discipline._ import cats.syntax.all._ -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalBracketSuite extends BaseTestSuite { test("equivalence with onErrorHandleWith") { _ => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala index 69e2782c0..fc13f03e9 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala @@ -21,7 +21,7 @@ import cats.Eval import cats.effect.IO import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalCatsConversions extends BaseTestSuite { test("Coeval.now(value).to[Eval]") { _ => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala index a8e4955b6..79d756a89 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala @@ -17,7 +17,7 @@ package monix.eval -import cats.effect.{Resource, SyncIO} +import cats.effect.{ Resource, SyncIO } import minitest.SimpleTestSuite object CoevalConversionsKSuite extends SimpleTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala index 6c0403114..36b6be333 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala @@ -19,7 +19,7 @@ package monix.eval import monix.execution.exceptions.DummyException import scala.concurrent.TimeoutException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalErrorSuite extends BaseTestSuite { test("Coeval.attempt should expose error") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala index acf4cbdac..27d706cb1 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalEvalAlwaysSuite extends BaseTestSuite { test("Coeval.eval should work synchronously") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala index 1af14bf45..36c83feab 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalEvalOnceSuite extends BaseTestSuite { test("Coeval.evalOnce should work synchronously") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala index ec1d3e769..19efff530 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Random, Success} +import scala.util.{ Random, Success } object CoevalFlatMapSuite extends BaseTestSuite { test("transformWith equivalence with flatMap") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala index 4d49d39d5..61d04e813 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala @@ -17,9 +17,9 @@ package monix.eval -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalGuaranteeSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala index 6caa60830..ab557dd9f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala @@ -22,7 +22,7 @@ import cats.effect.SyncIO import minitest.SimpleTestSuite import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object CoevalLikeConversionsSuite extends SimpleTestSuite { test("Coeval.from(Coeval)") { diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala index c1dd24db4..77a6b533f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { test("Coeval.eval.memoizeOnSuccess should work for first subscriber") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala index db75bc6b4..6746687ca 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalMiscSuite extends BaseTestSuite { test("Coeval.now.attempt should succeed") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala index 96aa2a782..e11c43b05 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CoevalNowSuite extends BaseTestSuite { test("Coeval.now should work") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala index ef9c677e9..ce91e531c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala @@ -18,7 +18,7 @@ package monix.eval import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object CoevalRunSuite extends BaseTestSuite { def testRun(build: (() => Int) => Coeval[Int]): Unit = { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala index c7ba712aa..bd8734593 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala @@ -17,7 +17,7 @@ package monix.eval -import cats.effect.{ExitCode, IO} +import cats.effect.{ ExitCode, IO } import minitest.SimpleTestSuite import monix.eval.Task.Options import monix.execution.Scheduler.Implicits.global diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala index a55559902..de2805b3c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala @@ -18,7 +18,7 @@ package monix.eval import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import scala.concurrent.duration._ object TaskAsyncSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala index 43afc87de..7ac909f1e 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala @@ -21,10 +21,10 @@ import cats.effect.concurrent.Deferred import cats.laws._ import cats.laws.discipline._ import cats.syntax.all._ -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskBracketSuite extends BaseTestSuite { test("equivalence with onErrorHandleWith") { implicit sc => @@ -241,10 +241,10 @@ object TaskBracketSuite extends BaseTestSuite { test("cancel should wait for already started finalizers on success") { implicit sc => val fa = for { - pa <- Deferred[Task, Unit] + pa <- Deferred[Task, Unit] fiber <- Task.unit.guarantee(pa.complete(()) >> Task.sleep(1.second)).start - _ <- pa.get - _ <- fiber.cancel + _ <- pa.get + _ <- fiber.cancel } yield () val f = fa.runToFuture @@ -260,10 +260,10 @@ object TaskBracketSuite extends BaseTestSuite { val dummy = new RuntimeException("dummy") val fa = for { - pa <- Deferred[Task, Unit] + pa <- Deferred[Task, Unit] fiber <- Task.unit.guarantee(pa.complete(()) >> Task.sleep(1.second) >> Task.raiseError(dummy)).start - _ <- pa.get - _ <- fiber.cancel + _ <- pa.get + _ <- fiber.cancel } yield () val f = fa.runToFuture @@ -280,9 +280,7 @@ object TaskBracketSuite extends BaseTestSuite { val fa = for { pa <- Deferred[Task, Unit] fibA <- Task.unit - .bracket( - _ => Task.unit.guarantee(pa.complete(()) >> Task.sleep(2.second)) - )(_ => Task.unit) + .bracket(_ => Task.unit.guarantee(pa.complete(()) >> Task.sleep(2.second)))(_ => Task.unit) .start _ <- pa.get _ <- fibA.cancel @@ -302,9 +300,7 @@ object TaskBracketSuite extends BaseTestSuite { val fa = for { pa <- Deferred[Task, Unit] fiber <- Task.unit - .bracket( - _ => (pa.complete(()) >> Task.never).guarantee(Task.sleep(2.second)) - )(_ => Task.unit) + .bracket(_ => (pa.complete(()) >> Task.never).guarantee(Task.sleep(2.second)))(_ => Task.unit) .start _ <- pa.get _ <- Task.race(fiber.cancel, fiber.cancel) @@ -367,8 +363,8 @@ object TaskBracketSuite extends BaseTestSuite { val fa = for { fiber <- Task.sleep(1.second).start - _ <- fiber.cancel - _ <- fiber.cancel + _ <- fiber.cancel + _ <- fiber.cancel } yield () val f = fa.runToFuture diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala index 0a97709b1..51c3d3245 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.Callback import monix.execution.exceptions.CallbackCalledMultipleTimesException import monix.execution.schedulers.TestScheduler -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskCallbackSafetySuite extends BaseTestSuite { test("Task.async's callback can be called multiple times") { implicit sc => @@ -39,14 +39,16 @@ object TaskCallbackSafetySuite extends BaseTestSuite { runTestCanCallMultipleTimes(r => Task.cancelable { cb => r(cb); Task.unit - }) + } + ) } test("Task.cancelable0's callback can be called multiple times") { implicit sc => runTestCanCallMultipleTimes(r => Task.cancelable0 { (_, cb) => r(cb); Task.unit - }) + } + ) } test("Task.async's register throwing is signaled as error") { implicit sc => @@ -69,14 +71,16 @@ object TaskCallbackSafetySuite extends BaseTestSuite { runTestRegisterCanThrow(r => Task.cancelable { cb => r(cb); Task.unit - }) + } + ) } test("Task.cancelable0's register throwing is signaled as error") { implicit sc => runTestRegisterCanThrow(r => Task.cancelable0 { (_, cb) => r(cb); Task.unit - }) + } + ) } test("Task.async's register throwing, after result, is reported") { implicit sc => @@ -99,18 +103,21 @@ object TaskCallbackSafetySuite extends BaseTestSuite { runTestRegisterThrowingCanBeReported(r => Task.cancelable { cb => r(cb); Task.unit - }) + } + ) } test("Task.cancelable0's register throwing, after result, is reported") { implicit sc => runTestRegisterThrowingCanBeReported(r => Task.cancelable0 { (_, cb) => r(cb); Task.unit - }) + } + ) } def runTestRegisterCanThrow(create: (Callback[Throwable, Int] => Unit) => Task[Int])( - implicit sc: TestScheduler): Unit = { + implicit sc: TestScheduler + ): Unit = { var effect = 0 val task = create { _ => @@ -129,7 +136,8 @@ object TaskCallbackSafetySuite extends BaseTestSuite { } def runTestRegisterThrowingCanBeReported(create: (Callback[Throwable, Int] => Unit) => Task[Int])( - implicit sc: TestScheduler): Unit = { + implicit sc: TestScheduler + ): Unit = { var effect = 0 val task = create { cb => @@ -149,7 +157,8 @@ object TaskCallbackSafetySuite extends BaseTestSuite { } def runTestCanCallMultipleTimes(create: (Callback[Throwable, Int] => Unit) => Task[Int])( - implicit sc: TestScheduler): Unit = { + implicit sc: TestScheduler + ): Unit = { def run(expected: Int)(trySignal: Callback[Throwable, Int] => Boolean) = { var effect = 0 @@ -177,15 +186,18 @@ object TaskCallbackSafetySuite extends BaseTestSuite { run(1)(cb => try { cb.onSuccess(1); true - } catch { case _: CallbackCalledMultipleTimesException => false }) + } catch { case _: CallbackCalledMultipleTimesException => false } + ) run(1)(cb => try { cb(Right(1)); true - } catch { case _: CallbackCalledMultipleTimesException => false }) + } catch { case _: CallbackCalledMultipleTimesException => false } + ) run(1)(cb => try { cb(Success(1)); true - } catch { case _: CallbackCalledMultipleTimesException => false }) + } catch { case _: CallbackCalledMultipleTimesException => false } + ) run(10)(_.tryOnError(WrappedEx(10))) run(10)(_.tryApply(Failure(WrappedEx(10)))) @@ -194,15 +206,18 @@ object TaskCallbackSafetySuite extends BaseTestSuite { run(10)(cb => try { cb.onError(WrappedEx(10)); true - } catch { case _: CallbackCalledMultipleTimesException => false }) + } catch { case _: CallbackCalledMultipleTimesException => false } + ) run(10)(cb => try { cb(Left(WrappedEx(10))); true - } catch { case _: CallbackCalledMultipleTimesException => false }) + } catch { case _: CallbackCalledMultipleTimesException => false } + ) run(10)(cb => try { cb(Failure(WrappedEx(10))); true - } catch { case _: CallbackCalledMultipleTimesException => false }) + } catch { case _: CallbackCalledMultipleTimesException => false } + ) } case class WrappedEx(nr: Int) extends RuntimeException diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala index 36dfa6d9c..5089c154c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala @@ -22,7 +22,7 @@ import monix.execution.Callback import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object TaskCancelableSuite extends BaseTestSuite { test("Task.cancelable0 should be stack safe on repeated, right-associated binds") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala index 5582f5098..7d93d06c9 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala @@ -25,7 +25,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskCancellationSuite extends BaseTestSuite { test("cancellation works for async actions") { implicit ec => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala index f4a5554d1..be8af914b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala @@ -19,12 +19,12 @@ package monix.eval import java.util.concurrent.TimeUnit -import cats.effect.{Clock, ContextShift, Timer} +import cats.effect.{ Clock, ContextShift, Timer } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskClockTimerAndContextShiftSuite extends BaseTestSuite { test("Task.clock is implicit") { _ => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala index 2a17ff069..fa1f24066 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.exceptions.DummyException import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskCoevalDoOnFinishSuite extends BaseTestSuite { test("Task.doOnFinish should work for successful values") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala index 766af03b9..32e949cdc 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.eval.internal.TaskConnection import monix.execution.Cancelable import monix.execution.cancelables.BooleanCancelable -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform object TaskConnectionSuite extends BaseTestSuite { @@ -29,7 +29,7 @@ object TaskConnectionSuite extends BaseTestSuite { val initial = Task { effect += 1 } val c = TaskConnection() - c push initial + c.push(initial) assert(!c.isCanceled, "!c.isCanceled") c.cancel.runAsyncAndForget @@ -47,7 +47,7 @@ object TaskConnectionSuite extends BaseTestSuite { c.cancel.runAsyncAndForget; s.tick() assert(c.isCanceled, "c.isCanceled") - c push initial + c.push(initial) s.tick() assertEquals(effect, 1) } @@ -62,7 +62,7 @@ object TaskConnectionSuite extends BaseTestSuite { c.cancel.runAsyncAndForget; s.tick() assert(c.isCanceled, "c.isCanceled") - c push initial + c.push(initial) s.tick() assertEquals(effect, 1) } @@ -74,7 +74,7 @@ object TaskConnectionSuite extends BaseTestSuite { c.cancel.runAsyncAndForget; s.tick() assert(c.isCanceled, "c.isCanceled") - c push initial + c.push(initial) s.tick() assert(initial.isCanceled, "initial.isCanceled") } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala index a4e5bd489..65518cf24 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala @@ -17,7 +17,7 @@ package monix.eval -import cats.effect.{ContextShift, IO} +import cats.effect.{ ContextShift, IO } import monix.catnap.SchedulerEffect import scala.util.Success diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala index ea57f335a..5321239d5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala @@ -21,15 +21,15 @@ import cats.effect._ import cats.laws._ import cats.laws.discipline._ import cats.syntax.all._ -import cats.{effect, Eval} +import cats.{ effect, Eval } import monix.catnap.SchedulerEffect import monix.execution.CancelablePromise import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import org.reactivestreams.{Publisher, Subscriber, Subscription} +import org.reactivestreams.{ Publisher, Subscriber, Subscription } import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskConversionsSuite extends BaseTestSuite { test("Task.from(task.to[IO]) == task") { implicit s => @@ -447,7 +447,8 @@ object TaskConversionsSuite extends BaseTestSuite { override def liftIO[A](ioa: IO[A]): CIO[A] = CIO(ioa) override def bracketCase[A, B](acquire: CIO[A])(use: A => CIO[B])( - release: (A, ExitCase[Throwable]) => CIO[Unit]): CIO[B] = + release: (A, ExitCase[Throwable]) => CIO[Unit] + ): CIO[B] = CIO(acquire.io.bracketCase(a => use(a).io)((a, e) => release(a, e).io)) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala index bc2a5188d..6f0f6fb25 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala @@ -21,7 +21,7 @@ import cats.effect.IO import monix.execution.Cancelable import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import scala.concurrent.duration._ object TaskCreateSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala index 32d9a0595..74cad0655 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.exceptions.DummyException import concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskDeferActionSuite extends BaseTestSuite { test("Task.deferAction works") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala index ff6607881..86da0cb68 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala @@ -21,7 +21,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskDelaySuite extends BaseTestSuite { test("Task#delayExecution should work") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala index a5e586de9..8fd944d5b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.exceptions.DummyException import concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskDoOnCancelSuite extends BaseTestSuite { test("doOnCancel should normally mirror the source") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala index 4529832b7..e25d824dc 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala @@ -17,7 +17,7 @@ package monix.eval -import cats.effect.{Effect, IO} +import cats.effect.{ Effect, IO } import monix.execution.schedulers.TracingScheduler import scala.concurrent.duration._ diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala index 32ce7acbe..bb7ecc9de 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala @@ -21,7 +21,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.TimeoutException import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskErrorSuite extends BaseTestSuite { test("Task.attempt should expose error") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala index bb77f6366..c38baacc9 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala @@ -22,7 +22,7 @@ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskEvalAlwaysSuite extends BaseTestSuite { test("Task.eval should work synchronously") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala index cdcabae5e..e38c9d278 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala @@ -20,7 +20,7 @@ package monix.eval import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskEvalAsyncSuite extends BaseTestSuite { test("Task.evalAsync should work, on different thread") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala index 5087413e2..ed798ba3f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala @@ -20,7 +20,7 @@ package monix.eval import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskEvalOnceSuite extends BaseTestSuite { test("Task.evalOnce should work synchronously") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala index db8bc668a..292edc01d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala @@ -18,7 +18,7 @@ package monix.eval import monix.execution.ExecutionModel -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, SynchronousExecution} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, SynchronousExecution } import scala.util.Success object TaskExecuteWithModelSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala index 111c79817..f35375781 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala @@ -20,10 +20,10 @@ package monix.eval import cats.laws._ import cats.laws.discipline._ import monix.execution.Callback -import monix.execution.atomic.{Atomic, AtomicInt} +import monix.execution.atomic.{ Atomic, AtomicInt } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import scala.util.{Failure, Random, Success, Try} +import scala.util.{ Failure, Random, Success, Try } object TaskFlatMapSuite extends BaseTestSuite { test("runAsync flatMap loop is not cancelable if autoCancelableRunLoops=false") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala index 6cb57c89d..72a87b8f4 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala @@ -17,11 +17,11 @@ package monix.eval -import monix.eval.Task.{Error, Now} +import monix.eval.Task.{ Error, Now } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskFromEitherSuite extends BaseTestSuite { test("Task.fromEither (`E <: Throwable` version) should returns a Now with a Right") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala index 6e226d9e6..a8d941180 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala @@ -17,12 +17,12 @@ package monix.eval -import monix.execution.{Cancelable, CancelableFuture} +import monix.execution.{ Cancelable, CancelableFuture } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskFromFutureSuite extends BaseTestSuite { test("Task.fromFuture should be faster for completed futures, success") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala index 181c52ba8..52fc29987 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala @@ -19,9 +19,9 @@ package monix.eval import cats.implicits._ import monix.execution.atomic.Atomic -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import scala.concurrent.duration._ object TaskGuaranteeSuite extends BaseTestSuite { @@ -117,7 +117,8 @@ object TaskGuaranteeSuite extends BaseTestSuite { Task.Async[Unit]((ctx, cb) => { println(ctx.connection) cb.onSuccess(()) - })) + }) + ) .flatMap(_ => Task.sleep(10.seconds)) val f = task.runToFuture diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala index b1b85d2d0..aa2481376 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala @@ -16,14 +16,14 @@ */ package monix.eval -import cats.effect.{ContextShift, IO} +import cats.effect.{ ContextShift, IO } import monix.catnap.SchedulerEffect import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskLiftSuite extends BaseTestSuite { - import TaskConversionsSuite.{CIO, CustomConcurrentEffect, CustomEffect} + import TaskConversionsSuite.{ CIO, CustomConcurrentEffect, CustomEffect } test("task.to[Task]") { _ => val task = Task(1) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala index 1d67dcc00..261443d59 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala @@ -18,16 +18,16 @@ package monix.eval import cats.Eval -import cats.effect.{ContextShift, IO, SyncIO} +import cats.effect.{ ContextShift, IO, SyncIO } import monix.catnap.SchedulerEffect import monix.execution.CancelablePromise import monix.execution.exceptions.DummyException import scala.concurrent.Promise -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object TaskLikeConversionsSuite extends BaseTestSuite { - import TaskConversionsSuite.{CIO, CustomConcurrentEffect, CustomEffect} + import TaskConversionsSuite.{ CIO, CustomConcurrentEffect, CustomEffect } test("Task.from(future)") { implicit s => val p = Promise[Int]() diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala index fc1eb56a7..760641719 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala @@ -21,11 +21,11 @@ import scala.concurrent.Future import scala.concurrent.duration._ import minitest.SimpleTestSuite -import monix.execution.{BufferCapacity, Scheduler} +import monix.execution.{ BufferCapacity, Scheduler } import monix.execution.exceptions.DummyException import monix.execution.misc.Local import cats.implicits._ -import monix.catnap.{ConcurrentChannel, ConsumerF} +import monix.catnap.{ ConcurrentChannel, ConsumerF } object TaskLocalSuite extends SimpleTestSuite { implicit val ec: Scheduler = monix.execution.Scheduler.Implicits.global @@ -306,7 +306,8 @@ object TaskLocalSuite extends SimpleTestSuite { ch <- ConcurrentChannel[Task].withConfig[Unit, Int]( ConsumerF.Config( capacity = BufferCapacity.Bounded(bufferSize).some - )) + ) + ) test = new Test(tl, ch) _ <- TaskLocal.isolate(test.produce) &> TaskLocal.isolate(test.consume) } yield () diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala index 4978e1978..53b174f5a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala @@ -20,7 +20,7 @@ package monix.eval import cats.laws._ import cats.laws.discipline._ import monix.execution.internal.Platform -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskMapBothSuite extends BaseTestSuite { test("if both tasks are synchronous, then mapBoth forks") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala index 4f1ade877..9c15ccb77 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala @@ -22,7 +22,7 @@ import monix.execution.atomic.AtomicInt import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import concurrent.duration._ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala index b09e544ab..580d15dcb 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala @@ -23,7 +23,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import concurrent.duration._ object TaskMemoizeSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala index a942468d2..fc67981e7 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala @@ -19,10 +19,10 @@ package monix.eval import monix.execution.Callback import monix.execution.exceptions.DummyException -import org.reactivestreams.{Subscriber, Subscription} +import org.reactivestreams.{ Subscriber, Subscription } import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskMiscSuite extends BaseTestSuite { test("Task.attempt should succeed") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala index 354b8078b..c2387c5fa 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala @@ -22,7 +22,7 @@ import cats.laws.discipline._ import monix.execution.Callback import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object TaskNowSuite extends BaseTestSuite { test("Task.now should work synchronously") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala index 952586886..0b0253c93 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala @@ -21,7 +21,7 @@ import monix.execution.Callback import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskOrCoevalTransformWithSuite extends BaseTestSuite { test("Task.materialize flatMap loop") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala index f764cb206..7e944af6a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala @@ -21,7 +21,7 @@ import monix.execution.Callback import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.exceptions.DummyException import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskOverloadsSuite extends BaseTestSuite { test("Now.runAsync(scheduler)") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala index aac31935c..2af8a8318 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala @@ -22,7 +22,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskParSequenceNSuite extends BaseTestSuite { @@ -121,7 +121,7 @@ object TaskParSequenceNSuite extends BaseTestSuite { test("Task.parSequenceN runAsync multiple times") { implicit s => var effect = 0 val task1 = Task.evalAsync { effect += 1; 3 }.memoize - val task2 = task1 map { x => + val task2 = task1.map { x => effect += 1; x + 1 } val task3 = Task.parSequenceN(2)(List(task2, task2, task2)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala index 1ac764028..d012aed2b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala @@ -20,14 +20,15 @@ package monix.eval import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskParSequenceSuite extends BaseTestSuite { test("Task.parSequence should execute in parallel for async tasks") { implicit s => val seq = Seq( Task.evalAsync(1).delayExecution(2.seconds), Task.evalAsync(2).delayExecution(1.second), - Task.evalAsync(3).delayExecution(3.seconds)) + Task.evalAsync(3).delayExecution(3.seconds) + ) val f = Task.parSequence(seq).runToFuture s.tick() @@ -59,7 +60,8 @@ object TaskParSequenceSuite extends BaseTestSuite { val seq = Seq( Task.evalAsync(1).delayExecution(2.seconds), Task.evalAsync(2).delayExecution(1.second), - Task.evalAsync(3).delayExecution(3.seconds)) + Task.evalAsync(3).delayExecution(3.seconds) + ) val f = Task.parSequence(seq).runToFuture s.tick() @@ -84,7 +86,7 @@ object TaskParSequenceSuite extends BaseTestSuite { test("Task.parSequence runAsync multiple times") { implicit s => var effect = 0 val task1 = Task.evalAsync { effect += 1; 3 }.memoize - val task2 = task1 map { x => + val task2 = task1.map { x => effect += 1; x + 1 } val task3 = Task.parSequence(List(task2, task2, task2)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala index a7d066c64..a9f00ca61 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala @@ -23,14 +23,15 @@ import monix.execution.internal.Platform import scala.collection.mutable.ListBuffer import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object TaskParSequenceUnorderedSuite extends BaseTestSuite { test("Task.parSequenceUnordered should execute in parallel") { implicit s => val seq = Seq( Task.evalAsync(1).delayExecution(2.seconds), Task.evalAsync(2).delayExecution(1.second), - Task.evalAsync(3).delayExecution(3.seconds)) + Task.evalAsync(3).delayExecution(3.seconds) + ) val f = Task.parSequenceUnordered(seq).runToFuture s.tick() @@ -62,7 +63,8 @@ object TaskParSequenceUnorderedSuite extends BaseTestSuite { val seq = Seq( Task.evalAsync(1).delayExecution(2.seconds), Task.evalAsync(2).delayExecution(1.second), - Task.evalAsync(3).delayExecution(3.seconds)) + Task.evalAsync(3).delayExecution(3.seconds) + ) val f = Task.parSequenceUnordered(seq).runToFuture s.tick() @@ -165,7 +167,7 @@ object TaskParSequenceUnorderedSuite extends BaseTestSuite { test("Task.parSequenceUnordered runAsync multiple times") { implicit s => var effect = 0 val task1 = Task.evalAsync { effect += 1; 3 }.memoize - val task2 = task1 map { x => + val task2 = task1.map { x => effect += 1; x + 1 } val task3 = Task.parSequenceUnordered(List(task2, task2, task2)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala index 609d6ff91..5fec87e84 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala @@ -22,7 +22,7 @@ import monix.execution.internal.Platform import concurrent.duration._ import scala.annotation.nowarn -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskParTraverseSuite extends BaseTestSuite { test("Task.parTraverse should execute in parallel for async tasks") { implicit s => @@ -93,7 +93,7 @@ object TaskParTraverseSuite extends BaseTestSuite { val task1 = Task.evalAsync { effect += 1; 3 }.memoize val task2 = Task.parTraverse(Seq(0, 0, 0)) { _ => - task1 map { x => + task1.map { x => effect += 1; x + 1 } } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala index ed2473213..3ecc021f1 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala @@ -23,7 +23,7 @@ import monix.execution.internal.Platform import scala.collection.mutable.ListBuffer import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object TaskParTraverseUnorderedSuite extends BaseTestSuite { test("Task.parTraverseUnordered should execute in parallel") { implicit s => @@ -99,11 +99,11 @@ object TaskParTraverseUnorderedSuite extends BaseTestSuite { test("Task.parTraverseUnordered should be stack safe on success") { implicit s => def fold[A](ta: Task[ListBuffer[A]], next: A): Task[ListBuffer[A]] = - ta flatMap { acc => + ta.flatMap { acc => Task.parTraverseUnordered(Seq(acc, next)) { v => Task.eval(v) } - } map { + }.map { case a :: b :: Nil => val (accR, valueR) = if (a.isInstanceOf[ListBuffer[_]]) (a, b) else (b, a) val acc = accR.asInstanceOf[ListBuffer[A]] @@ -167,7 +167,7 @@ object TaskParTraverseUnorderedSuite extends BaseTestSuite { effect += 1; 3 }.memoize - val task2 = task1 map { x => + val task2 = task1.map { x => effect += 1; x + 1 } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala index dcc5c69f0..4dc77135c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala @@ -19,7 +19,7 @@ package monix.eval import monix.execution.exceptions.DummyException import concurrent.duration._ -import scala.util.{Failure, Random, Success} +import scala.util.{ Failure, Random, Success } object TaskParZipSuite extends BaseTestSuite { test("Task.parZip2 should work if source finishes first") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala index ab56f6f0f..b5853cc15 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala @@ -20,9 +20,9 @@ package monix.eval import monix.execution.CancelableFuture import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import scala.concurrent.{Promise, TimeoutException} +import scala.concurrent.{ Promise, TimeoutException } import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import monix.execution.atomic.Atomic object TaskRaceSuite extends BaseTestSuite { @@ -40,7 +40,8 @@ object TaskRaceSuite extends BaseTestSuite { test("Task.raceMany should onError from other") { implicit s => val ex = DummyException("dummy") val task = Task.raceMany( - Seq(Task.evalAsync(1).delayExecution(10.seconds), Task.evalAsync(throw ex).delayExecution(1.second))) + Seq(Task.evalAsync(1).delayExecution(10.seconds), Task.evalAsync(throw ex).delayExecution(1.second)) + ) val f = task.runToFuture s.tick() @@ -64,7 +65,8 @@ object TaskRaceSuite extends BaseTestSuite { test("Task.raceMany should onError from the source") { implicit s => val ex = DummyException("dummy") val task = Task.raceMany( - Seq(Task.evalAsync(throw ex).delayExecution(1.seconds), Task.evalAsync(99).delayExecution(10.second))) + Seq(Task.evalAsync(throw ex).delayExecution(1.seconds), Task.evalAsync(99).delayExecution(10.second)) + ) val f = task.runToFuture s.tick() @@ -475,7 +477,8 @@ object TaskRaceSuite extends BaseTestSuite { Task.racePair(acc, t).map { case Left((a, _)) => a case Right((_, b)) => b - }) + } + ) sum.runToFuture s.tick() @@ -490,7 +493,8 @@ object TaskRaceSuite extends BaseTestSuite { Task.racePair(acc, t).map { case Left((a, _)) => a case Right((_, b)) => b - }) + } + ) sum.runToFuture s.tick() @@ -505,7 +509,8 @@ object TaskRaceSuite extends BaseTestSuite { Task.racePair(acc, t).flatMap { case Left((a, fb)) => fb.cancel.map(_ => a) case Right((fa, b)) => fa.cancel.map(_ => b) - }) + } + ) val f = Task .racePair(Task.fromFuture(p.future), all) @@ -631,7 +636,8 @@ object TaskRaceSuite extends BaseTestSuite { Task.race(acc, t).map { case Left(a) => a case Right(b) => b - }) + } + ) sum.runToFuture s.tick() @@ -646,7 +652,8 @@ object TaskRaceSuite extends BaseTestSuite { Task.race(acc, t).map { case Left(a) => a case Right(b) => b - }) + } + ) sum.runToFuture s.tick() @@ -661,7 +668,8 @@ object TaskRaceSuite extends BaseTestSuite { Task.race(acc, t).map { case Left(a) => a case Right(b) => b - }) + } + ) val f = Task.race(Task.fromFuture(p.future), all).map { case Left(a) => a; case Right(b) => b }.runToFuture diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala index a1dd44067..49077ebe8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala @@ -22,7 +22,7 @@ import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.exceptions.DummyException import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import scala.concurrent.duration._ object TaskRunAsyncSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala index 322f44885..6e92e7ed8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala @@ -20,14 +20,15 @@ package monix.eval import monix.execution.exceptions.DummyException import concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskSequenceSuite extends BaseTestSuite { test("Task.sequence should not execute in parallel") { implicit s => val seq = Seq( Task.evalAsync(1).delayExecution(2.seconds), Task.evalAsync(2).delayExecution(1.second), - Task.evalAsync(3).delayExecution(3.seconds)) + Task.evalAsync(3).delayExecution(3.seconds) + ) val f = Task.sequence(seq).runToFuture s.tick() @@ -63,7 +64,8 @@ object TaskSequenceSuite extends BaseTestSuite { val seq = Seq( Task.evalAsync(1).delayExecution(2.seconds), Task.evalAsync(2).delayExecution(1.second), - Task.evalAsync(3).delayExecution(3.seconds)) + Task.evalAsync(3).delayExecution(3.seconds) + ) val f = Task.sequence(seq).runToFuture s.tick() diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala index 07cfce745..c2d03797b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.exceptions.DummyException import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskTimedSuite extends BaseTestSuite { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala index d0618ae20..59cdc692c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala @@ -21,7 +21,7 @@ import monix.execution.exceptions.DummyException import scala.concurrent.Future import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskToFutureSuite extends BaseTestSuite { test("Task.fromFuture for already completed references") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala index c9f34f347..3265c77b3 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala @@ -20,7 +20,7 @@ package monix.eval import monix.execution.exceptions.DummyException import concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object TaskTraverseSuite extends BaseTestSuite { test("Task.traverse should not execute in parallel") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala index b29587a67..f1c27f6fb 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala @@ -19,7 +19,7 @@ package monix.eval import cats.effect.laws.discipline.SyncEffectTests import cats.kernel.laws.discipline.MonoidTests -import cats.laws.discipline.{CoflatMapTests, SemigroupKTests} +import cats.laws.discipline.{ CoflatMapTests, SemigroupKTests } object TypeClassLawsForCoevalSuite extends BaseLawsSuite { checkAll("SyncEffect[Coeval]", SyncEffectTests[Coeval].syncEffect[Int, Int, Int]) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala index 0b3e0dc03..ba22348a7 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala @@ -17,9 +17,9 @@ package monix.eval -import cats.effect.laws.discipline.{ConcurrentEffectTests, ConcurrentTests} +import cats.effect.laws.discipline.{ ConcurrentEffectTests, ConcurrentTests } import cats.kernel.laws.discipline.MonoidTests -import cats.laws.discipline.{CoflatMapTests, CommutativeApplicativeTests, ParallelTests, SemigroupKTests} +import cats.laws.discipline.{ CoflatMapTests, CommutativeApplicativeTests, ParallelTests, SemigroupKTests } object TypeClassLawsForTaskSuite extends BaseTypeClassLawsForTaskSuite()( diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala index 7c39c7d6f..c945c681e 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala @@ -18,9 +18,9 @@ package monix.eval import cats.Eq -import cats.effect.laws.discipline.{ConcurrentEffectTests, ConcurrentTests} +import cats.effect.laws.discipline.{ ConcurrentEffectTests, ConcurrentTests } import cats.kernel.laws.discipline.MonoidTests -import cats.laws.discipline.{CoflatMapTests, CommutativeApplicativeTests, ParallelTests} +import cats.laws.discipline.{ CoflatMapTests, CommutativeApplicativeTests, ParallelTests } import monix.eval.Task.Options import monix.execution.Callback import monix.execution.schedulers.TestScheduler @@ -51,7 +51,8 @@ class BaseTypeClassLawsForTaskWithCallbackSuite(implicit opts: Task.Options) ext implicit A: Eq[A], ec: TestScheduler, - opts: Options) = { + opts: Options + ) = { Eq.by { task => val p = Promise[A]() @@ -64,7 +65,8 @@ class BaseTypeClassLawsForTaskWithCallbackSuite(implicit opts: Task.Options) ext implicit A: Eq[A], ec: TestScheduler, - opts: Options): Eq[Task.Par[A]] = { + opts: Options + ): Eq[Task.Par[A]] = { import Task.Par.unwrap Eq.by { task => diff --git a/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala index 8b3820f6f..78fcfc7b0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala @@ -55,4 +55,4 @@ object StackTracedContextSuite extends BaseTestSuite { assertEquals(trace.omitted, 10) } -} \ No newline at end of file +} diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index efdbc90c3..f916921d2 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -125,7 +125,8 @@ object AtomicBuilder extends Implicits.Level2 { def buildInstance( initialValue: Double, strategy: PaddingStrategy, - allowPlatformIntrinsics: Boolean): AtomicDouble = + allowPlatformIntrinsics: Boolean + ): AtomicDouble = AtomicDouble(initialValue) def buildSafeInstance(initialValue: Double, strategy: PaddingStrategy): AtomicDouble = AtomicDouble(initialValue) diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index 45cd29da4..234b24863 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -144,7 +144,8 @@ object AtomicNumberAny { def create[A <: AnyRef: Numeric]( initialValue: A, padding: PaddingStrategy, - allowPlatformIntrinsics: Boolean): AtomicNumberAny[A] = + allowPlatformIntrinsics: Boolean + ): AtomicNumberAny[A] = new AtomicNumberAny[A](initialValue) /** $createDesc diff --git a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index c480e5377..da3773b0b 100644 --- a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -84,7 +84,7 @@ import monix.execution.internal.exceptions.matchError */ final class ChainedCancelable private (private var stateRef: AnyRef) extends AssignableCancelable { - import ChainedCancelable.{Canceled, WeakRef} + import ChainedCancelable.{ Canceled, WeakRef } private type CC = ChainedCancelable // States of `state`: @@ -105,7 +105,7 @@ final class ChainedCancelable private (private var stateRef: AnyRef) extends Ass case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } } @@ -186,7 +186,7 @@ final class ChainedCancelable private (private var stateRef: AnyRef) extends Ass case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } } } diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index 5e95a3b01..a72f88c4f 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -17,8 +17,8 @@ package monix.execution.internal.collection.queues -import monix.execution.{BufferCapacity, ChannelType} -import monix.execution.internal.collection.{JSArrayQueue, LowLevelConcurrentQueue} +import monix.execution.{ BufferCapacity, ChannelType } +import monix.execution.internal.collection.{ JSArrayQueue, LowLevelConcurrentQueue } private[internal] trait LowLevelConcurrentQueueBuilders { /** diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala index 32c4c8de7..4cba1bad7 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala @@ -20,8 +20,8 @@ package schedulers import java.util.concurrent.TimeUnit -import monix.execution.schedulers.JSTimer.{clearTimeout, setTimeout} -import monix.execution.{ExecutionModel => ExecModel} +import monix.execution.schedulers.JSTimer.{ clearTimeout, setTimeout } +import monix.execution.{ ExecutionModel => ExecModel } import scala.concurrent.ExecutionContext import monix.execution.internal.InterceptRunnable diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala index d244b5025..b552f274d 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala @@ -74,5 +74,6 @@ import scala.annotation.implicitNotFound @implicitNotFound( "Blocking operations aren't supported \n" + "on top of JavaScript, because it cannot block threads! \n" + - "Please use asynchronous API calls.") + "Please use asynchronous API calls." +) final class CanBlock private () diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala index 40df311f6..b2c380218 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala @@ -17,7 +17,7 @@ package monix.execution.schedulers -import monix.execution.{Scheduler, SchedulerCompanion, UncaughtExceptionReporter, ExecutionModel => ExecModel} +import monix.execution.{ ExecutionModel => ExecModel, Scheduler, SchedulerCompanion, UncaughtExceptionReporter } import scala.concurrent.ExecutionContext private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala index 65b15dcfb..8d89958d7 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala @@ -28,11 +28,13 @@ private[execution] class StandardContext(reporter: UncaughtExceptionReporter) ex override def execute(r: Runnable): Unit = { executeRef(() => - try { - r.run() - } catch { case e: Throwable => - reporter.reportFailure(e) - }) + try { + r.run() + } catch { + case e: Throwable => + reporter.reportFailure(e) + } + ) () } diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index 670b787a0..2053b32b0 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -19,7 +19,7 @@ package monix.execution.schedulers import monix.execution.internal.Trampoline -import scala.concurrent.{ExecutionContext, ExecutionContextExecutor} +import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor } /** A `scala.concurrentExecutionContext` implementation * that executes runnables immediately, on the current thread, diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index c34947934..45e39f1d2 100644 --- a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -169,7 +169,8 @@ object Atomic { * best reference possible, based on our `initialValue` */ def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R]): R = + implicit builder: AtomicBuilder[A, R] + ): R = macro Atomic.Macros.buildAnyWithPaddingMacro[A, R] /** Returns the builder that would be chosen to construct Atomic @@ -309,7 +310,8 @@ object Atomic { } def buildAnyMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag](initialValue: c.Expr[A])( - builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { + builder: c.Expr[AtomicBuilder[A, R]] + ): c.Expr[R] = { val expr = reify { builder.splice.buildInstance(initialValue.splice, NoPadding, allowPlatformIntrinsics = true) @@ -320,7 +322,8 @@ object Atomic { def buildAnyWithPaddingMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag]( initialValue: c.Expr[A], - padding: c.Expr[PaddingStrategy])(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { + padding: c.Expr[PaddingStrategy] + )(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { val expr = reify { builder.splice.buildInstance(initialValue.splice, padding.splice, allowPlatformIntrinsics = true) diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala index ed966dff2..191c18b4a 100644 --- a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala +++ b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala @@ -53,4 +53,4 @@ abstract class AtomicNumber[A] extends Atomic[A] { def getAndDecrement(v: Int = 1): A /** Subtracts from the atomic number and returns the value before the update. */ def getAndSubtract(v: A): A -} \ No newline at end of file +} diff --git a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala index cb52952f8..3d78d383a 100644 --- a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -179,7 +179,8 @@ object Atomic { * best reference possible, based on our `initialValue` */ inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R]): R = + implicit builder: AtomicBuilder[A, R] + ): R = builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) /** Returns the builder that would be chosen to construct Atomic diff --git a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala index 62d9d1ac9..815275e10 100644 --- a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala +++ b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala @@ -20,8 +20,8 @@ package monix.execution.internal import minitest.TestSuite import monix.execution.atomic.Atomic import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.schedulers.{AsyncScheduler, StandardContext} -import monix.execution.{ExecutionModel, Scheduler, TestUtils, UncaughtExceptionReporter} +import monix.execution.schedulers.{ AsyncScheduler, StandardContext } +import monix.execution.{ ExecutionModel, Scheduler, TestUtils, UncaughtExceptionReporter } import scala.concurrent.Promise import scala.concurrent.duration._ @@ -30,7 +30,7 @@ object AsyncSchedulerJSSuite extends TestSuite[Scheduler] with TestUtils { val lastReported = Atomic(null: Throwable) val reporter = new StandardContext(new UncaughtExceptionReporter { def reportFailure(ex: Throwable): Unit = - lastReported set ex + lastReported.set(ex) }) def setup(): Scheduler = { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala index 316a4c211..368212c34 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedObject, Factory} +import monix.execution.internal.atomic.{ BoxedObject, Factory } /** Atomic references wrapping `AnyRef` values. * @@ -86,7 +86,8 @@ object AtomicAny { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -111,5 +112,6 @@ object AtomicAny { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowPlatformIntrinsics - )) + ) + ) } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index a628b8d52..a73b4873e 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Boolean` values. * @@ -97,7 +97,9 @@ object AtomicBoolean { if (initialValue) 1 else 0, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics)) + allowPlatformIntrinsics + ) + ) } /** $createDesc @@ -122,6 +124,7 @@ object AtomicBoolean { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala index 736282763..91eced7e2 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Byte` values. * @@ -29,10 +29,10 @@ final class AtomicByte private (private[this] val ref: BoxedInt) extends AtomicN private[this] val mask = 255 - def get(): Byte = + def get(): Byte = (ref.volatileGet() & mask).asInstanceOf[Byte] - def set(update: Byte): Unit = + def set(update: Byte): Unit = ref.volatileSet(update.asInstanceOf[Int]) def lazySet(update: Byte): Unit = @@ -129,7 +129,8 @@ object AtomicByte { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) /** $createDesc * @@ -153,6 +154,7 @@ object AtomicByte { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala index 9d10ecadc..55b728e4c 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Char` values. * @@ -28,10 +28,10 @@ import monix.execution.internal.atomic.{BoxedInt, Factory} final class AtomicChar private (private[this] val ref: BoxedInt) extends AtomicNumber[Char] { private[this] val mask = 255 + 255 * 256 - def get(): Char = + def get(): Char = (ref.volatileGet() & mask).asInstanceOf[Char] - def set(update: Char): Unit = + def set(update: Char): Unit = ref.volatileSet(update.asInstanceOf[Int]) def lazySet(update: Char): Unit = @@ -128,7 +128,8 @@ object AtomicChar { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -153,6 +154,7 @@ object AtomicChar { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala index 8c1bc9df1..d85606cc1 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -19,8 +19,8 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding import scala.annotation.tailrec -import java.lang.Double.{doubleToLongBits, longBitsToDouble} -import monix.execution.internal.atomic.{BoxedLong, Factory} +import java.lang.Double.{ doubleToLongBits, longBitsToDouble } +import monix.execution.internal.atomic.{ BoxedLong, Factory } /** Atomic references wrapping `Double` values. * @@ -183,7 +183,8 @@ object AtomicDouble { boxStrategyToPaddingStrategy(padding), true, // allowIntrinsics allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -208,6 +209,7 @@ object AtomicDouble { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 83379e222..2c795e6c0 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -19,8 +19,8 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding import scala.annotation.tailrec -import java.lang.Float.{floatToIntBits, intBitsToFloat} -import monix.execution.internal.atomic.{BoxedInt, Factory} +import java.lang.Float.{ floatToIntBits, intBitsToFloat } +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Float` values. * @@ -183,7 +183,8 @@ object AtomicFloat { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -208,6 +209,7 @@ object AtomicFloat { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala index 1c648241f..b4497832e 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Int` values. * @@ -124,7 +124,8 @@ object AtomicInt { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -149,6 +150,7 @@ object AtomicInt { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala index e637dd6d9..d08243824 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedLong, Factory} +import monix.execution.internal.atomic.{ BoxedLong, Factory } /** Atomic references wrapping `Long` values. * @@ -70,16 +70,16 @@ final class AtomicLong private (private[this] val ref: BoxedLong) extends Atomic def subtractAndGet(v: Long): Long = addAndGet(-v) - def decrement(v: Int = 1): Unit = + def decrement(v: Int = 1): Unit = increment(-v) - def decrementAndGet(v: Int = 1): Long = + def decrementAndGet(v: Int = 1): Long = incrementAndGet(-v) - def getAndDecrement(v: Int = 1): Long = + def getAndDecrement(v: Int = 1): Long = getAndIncrement(-v) - override def toString: String = + override def toString: String = s"AtomicLong(${ref.volatileGet()})" } @@ -130,7 +130,8 @@ object AtomicLong { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -155,6 +156,7 @@ object AtomicLong { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowPlatformIntrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index d95c5df22..f0311002a 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedObject, Factory} +import monix.execution.internal.atomic.{ BoxedObject, Factory } import scala.annotation.tailrec /** Atomic references wrapping any values implementing @@ -180,14 +180,16 @@ object AtomicNumberAny { def create[A <: AnyRef: Numeric]( initialValue: A, padding: PaddingStrategy, - allowPlatformIntrinsics: Boolean): AtomicNumberAny[A] = { + allowPlatformIntrinsics: Boolean + ): AtomicNumberAny[A] = { new AtomicNumberAny[A]( Factory.newBoxedObject( initialValue, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -212,5 +214,6 @@ object AtomicNumberAny { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowPlatformIntrinsics - )) + ) + ) } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala index 86e0f46c5..2eab0d37b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Short` values. * @@ -28,10 +28,10 @@ import monix.execution.internal.atomic.{BoxedInt, Factory} final class AtomicShort private (private[this] val ref: BoxedInt) extends AtomicNumber[Short] { private[this] val mask = 255 + 255 * 256 - def get(): Short = + def get(): Short = (ref.volatileGet() & mask).asInstanceOf[Short] - def set(update: Short): Unit = + def set(update: Short): Unit = ref.volatileSet(update.asInstanceOf[Int]) def lazySet(update: Short): Unit = @@ -128,7 +128,8 @@ object AtomicShort { boxStrategyToPaddingStrategy(padding), true, // allowUnsafe allowPlatformIntrinsics - )) + ) + ) } /** $createDesc @@ -153,6 +154,7 @@ object AtomicShort { boxStrategyToPaddingStrategy(padding), false, // allowUnsafe false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index ecc8f8aae..9936cfd8b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -20,7 +20,7 @@ package monix.execution.cancelables import java.lang.ref.WeakReference import monix.execution.Cancelable import monix.execution.Cancelable.IsDummy -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import monix.execution.internal.exceptions.matchError /** Represents a [[monix.execution.Cancelable]] whose underlying @@ -113,7 +113,7 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } } @@ -210,7 +210,7 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala index 1ef39750e..b31b05762 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala @@ -18,10 +18,10 @@ package monix.execution package internal -import java.util.concurrent.{CancellationException, CompletableFuture, CompletionException} +import java.util.concurrent.{ CancellationException, CompletableFuture, CompletionException } import java.util.function.BiFunction import scala.concurrent.ExecutionContext -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[execution] abstract class CancelableFutureForPlatform { /** diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala index 73d09bf9d..c1714bbf8 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala @@ -20,8 +20,8 @@ package internal import java.util.concurrent.CompletableFuture import monix.execution.CancelableFuture -import scala.concurrent.{ExecutionContext, Future} -import scala.util.{Failure, Success} +import scala.concurrent.{ ExecutionContext, Future } +import scala.util.{ Failure, Success } private[execution] abstract class FutureUtilsForPlatform { self => /** diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala index a008f28cb..73d580d7b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala @@ -18,7 +18,7 @@ package monix.execution.internal import monix.execution.schedulers.CanBlock -import scala.concurrent.{Await, Awaitable} +import scala.concurrent.{ Await, Awaitable } import scala.concurrent.duration.Duration import scala.util.Try diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala index 587bfaae4..a97f781bb 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala @@ -19,7 +19,7 @@ package monix.execution.internal import java.util.concurrent.ScheduledExecutorService import monix.execution.schedulers.ShiftedRunnable -import monix.execution.{Cancelable, Scheduler} +import monix.execution.{ Cancelable, Scheduler } import scala.concurrent.duration.TimeUnit private[execution] object ScheduledExecutors { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala index 6a51f952e..2d843fb6a 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala @@ -18,7 +18,7 @@ package monix.execution.internal.collection.queues import monix.execution.ChannelType -import monix.execution.ChannelType.{SingleConsumer, SingleProducer} +import monix.execution.ChannelType.{ SingleConsumer, SingleProducer } import monix.execution.internal.atomic.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala index c0fd9a1ff..a112294b9 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala @@ -18,7 +18,7 @@ package monix.execution.internal.collection.queues import monix.execution.ChannelType -import monix.execution.ChannelType.{SingleConsumer, SingleProducer} +import monix.execution.ChannelType.{ SingleConsumer, SingleProducer } import monix.execution.internal.atomic.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index a3de27783..bc519d29b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -18,8 +18,8 @@ package monix.execution.internal.collection.queues import java.util.concurrent.ConcurrentLinkedQueue -import monix.execution.{BufferCapacity, ChannelType} -import monix.execution.ChannelType.{MPMC, MPSC, SPMC, SPSC} +import monix.execution.{ BufferCapacity, ChannelType } +import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } import monix.execution.internal.Platform import monix.execution.internal.atomic.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala index 58aa3e4e3..ff88044b1 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala @@ -19,14 +19,14 @@ package monix.execution.internal.forkJoin import java.lang.Thread.UncaughtExceptionHandler import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory -import java.util.concurrent.{ForkJoinPool, ForkJoinTask, ForkJoinWorkerThread} +import java.util.concurrent.{ ForkJoinPool, ForkJoinTask, ForkJoinWorkerThread } private[monix] final class AdaptedForkJoinPool( parallelism: Int, factory: ForkJoinWorkerThreadFactory, handler: UncaughtExceptionHandler, - asyncMode: Boolean) - extends ForkJoinPool(parallelism, factory, handler, asyncMode) { + asyncMode: Boolean +) extends ForkJoinPool(parallelism, factory, handler, asyncMode) { override def execute(runnable: Runnable): Unit = { val fjt: ForkJoinTask[_] = runnable match { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala index d6950b97b..77b4d1d64 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala @@ -17,22 +17,22 @@ package monix.execution.internal.forkJoin -import java.util.concurrent.ForkJoinPool.{ForkJoinWorkerThreadFactory, ManagedBlocker} -import java.util.concurrent.{ForkJoinPool, ForkJoinWorkerThread, ThreadFactory} +import java.util.concurrent.ForkJoinPool.{ ForkJoinWorkerThreadFactory, ManagedBlocker } +import java.util.concurrent.{ ForkJoinPool, ForkJoinWorkerThread, ThreadFactory } import monix.execution.atomic.AtomicInt import monix.execution.internal.forkJoin.DynamicWorkerThreadFactory.EmptyBlockContext import scala.annotation.tailrec -import scala.concurrent.{BlockContext, CanAwait} +import scala.concurrent.{ BlockContext, CanAwait } // Implement BlockContext on FJP threads private[monix] final class DynamicWorkerThreadFactory( prefix: String, maxThreads: Int, uncaught: Thread.UncaughtExceptionHandler, - daemonic: Boolean) - extends ThreadFactory with ForkJoinWorkerThreadFactory { + daemonic: Boolean +) extends ThreadFactory with ForkJoinWorkerThreadFactory { require(prefix ne null, "DefaultWorkerThreadFactory.prefix must be non null") require(maxThreads > 0, "DefaultWorkerThreadFactory.maxThreads must be greater than 0") diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala index 9a923872e..dca3386cb 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala @@ -18,7 +18,7 @@ package monix.execution.internal.forkJoin import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory -import java.util.concurrent.{ForkJoinPool, ForkJoinWorkerThread, ThreadFactory} +import java.util.concurrent.{ ForkJoinPool, ForkJoinWorkerThread, ThreadFactory } private[monix] final class StandardWorkerThreadFactory( prefix: String, diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala index 1872a293e..1fa80a438 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala @@ -17,12 +17,12 @@ package monix.execution.schedulers -import java.util.concurrent.{ScheduledExecutorService, TimeUnit} +import java.util.concurrent.{ ScheduledExecutorService, TimeUnit } -import monix.execution.{Cancelable, Features, Scheduler, UncaughtExceptionReporter, ExecutionModel => ExecModel} +import monix.execution.{ Cancelable, ExecutionModel => ExecModel, Features, Scheduler, UncaughtExceptionReporter } import scala.concurrent.ExecutionContext -import monix.execution.internal.{InterceptRunnable, ScheduledExecutors} +import monix.execution.internal.{ InterceptRunnable, ScheduledExecutors } /** An `AsyncScheduler` schedules tasks to happen in the future with the * given `ScheduledExecutorService` and the tasks themselves are executed on @@ -32,8 +32,8 @@ final class AsyncScheduler private ( scheduler: ScheduledExecutorService, ec: ExecutionContext, val executionModel: ExecModel, - r: UncaughtExceptionReporter) - extends ReferenceScheduler with BatchingScheduler { + r: UncaughtExceptionReporter +) extends ReferenceScheduler with BatchingScheduler { protected def executeAsync(runnable: Runnable): Unit = { if (((r: AnyRef) eq ec) || (r eq null)) ec.execute(runnable) @@ -69,6 +69,7 @@ object AsyncScheduler { schedulerService: ScheduledExecutorService, ec: ExecutionContext, executionModel: ExecModel, - reporter: UncaughtExceptionReporter = null): AsyncScheduler = + reporter: UncaughtExceptionReporter = null + ): AsyncScheduler = new AsyncScheduler(schedulerService, ec, executionModel, reporter) } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala index 7b9ecbfcd..fb7914d99 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala @@ -73,7 +73,8 @@ import scala.annotation.implicitNotFound */ @implicitNotFound( "For blocking operations on the JVM, there should be an implicit " + - "available by default, or import monix.execution.schedulers.CanBlock.permit.") + "available by default, or import monix.execution.schedulers.CanBlock.permit." +) final class CanBlock private () object CanBlock { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala index 76c118265..8c1593746 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala @@ -17,7 +17,7 @@ package monix.execution.schedulers -import java.util.concurrent.{ScheduledExecutorService, ScheduledThreadPoolExecutor} +import java.util.concurrent.{ ScheduledExecutorService, ScheduledThreadPoolExecutor } import monix.execution.UncaughtExceptionReporter @@ -28,7 +28,8 @@ private[schedulers] object Defaults { lazy val scheduledExecutor: ScheduledExecutorService = { val tp = new ScheduledThreadPoolExecutor( 1, - ThreadFactoryBuilder("monix-scheduler", UncaughtExceptionReporter.default, daemonic = true)) + ThreadFactoryBuilder("monix-scheduler", UncaughtExceptionReporter.default, daemonic = true) + ) tp.setRemoveOnCancelPolicy(true) tp } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala index 566c0d9f3..7c7232817 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala @@ -17,14 +17,18 @@ package monix.execution.schedulers -import java.util.concurrent.{ExecutorService, ScheduledExecutorService} -import monix.execution.internal.forkJoin.{AdaptedForkJoinPool, DynamicWorkerThreadFactory, StandardWorkerThreadFactory} -import monix.execution.internal.{InterceptRunnable, Platform, ScheduledExecutors} -import monix.execution.{Cancelable, UncaughtExceptionReporter} -import monix.execution.{Features, Scheduler} +import java.util.concurrent.{ ExecutorService, ScheduledExecutorService } +import monix.execution.internal.forkJoin.{ + AdaptedForkJoinPool, + DynamicWorkerThreadFactory, + StandardWorkerThreadFactory +} +import monix.execution.internal.{ InterceptRunnable, Platform, ScheduledExecutors } +import monix.execution.{ Cancelable, UncaughtExceptionReporter } +import monix.execution.{ Features, Scheduler } // Prevents conflict with the deprecated symbol -import monix.execution.{ExecutionModel => ExecModel} -import scala.concurrent.{ExecutionContext, Future, Promise, blocking} +import monix.execution.{ ExecutionModel => ExecModel } +import scala.concurrent.{ blocking, ExecutionContext, Future, Promise } import scala.concurrent.duration.TimeUnit import scala.util.control.NonFatal @@ -51,13 +55,16 @@ abstract class ExecutorScheduler(e: ExecutorService, r: UncaughtExceptionReporte override final def awaitTermination(timeout: Long, unit: TimeUnit, awaitOn: ExecutionContext): Future[Boolean] = { val p = Promise[Boolean]() - awaitOn.execute(() => try blocking { - p.success(e.awaitTermination(timeout, unit)) - () - } catch { - case ex if NonFatal(ex) => - p.failure(ex); () - }) + awaitOn.execute(() => + try blocking { + p.success(e.awaitTermination(timeout, unit)) + () + } + catch { + case ex if NonFatal(ex) => + p.failure(ex); () + } + ) p.future } @@ -92,7 +99,8 @@ object ExecutorScheduler { service: ExecutorService, reporter: UncaughtExceptionReporter, executionModel: ExecModel, - features: Features): ExecutorScheduler = { + features: Features + ): ExecutorScheduler = { // Implementations will inherit BatchingScheduler, so this is guaranteed val ft = features + Scheduler.BATCHING @@ -114,7 +122,8 @@ object ExecutorScheduler { def apply( service: ExecutorService, reporter: UncaughtExceptionReporter, - executionModel: ExecModel): ExecutorScheduler = { + executionModel: ExecModel + ): ExecutorScheduler = { // $COVERAGE-OFF$ apply(service, reporter, executionModel, Features.empty) // $COVERAGE-ON$ @@ -128,7 +137,8 @@ object ExecutorScheduler { parallelism: Int, daemonic: Boolean, reporter: UncaughtExceptionReporter, - executionModel: ExecModel): ExecutorScheduler = { + executionModel: ExecModel + ): ExecutorScheduler = { val handler = reporter.asJava val pool = new AdaptedForkJoinPool( @@ -150,7 +160,8 @@ object ExecutorScheduler { maxThreads: Int, daemonic: Boolean, reporter: UncaughtExceptionReporter, - executionModel: ExecModel): ExecutorScheduler = { + executionModel: ExecModel + ): ExecutorScheduler = { val exceptionHandler = reporter.asJava val pool = new AdaptedForkJoinPool( @@ -175,15 +186,16 @@ object ExecutorScheduler { executor: ExecutorService, r: UncaughtExceptionReporter, override val executionModel: ExecModel, - override val features: Features) - extends ExecutorScheduler(executor, r) { + override val features: Features + ) extends ExecutorScheduler(executor, r) { @deprecated("Provided for backwards compatibility", "3.0.0") def this( scheduler: ScheduledExecutorService, executor: ExecutorService, r: UncaughtExceptionReporter, - executionModel: ExecModel) = { + executionModel: ExecModel + ) = { // $COVERAGE-OFF$ this(scheduler, executor, r, executionModel, Features.empty) // $COVERAGE-ON$ @@ -204,8 +216,8 @@ object ExecutorScheduler { s: ScheduledExecutorService, r: UncaughtExceptionReporter, override val executionModel: ExecModel, - override val features: Features) - extends ExecutorScheduler(s, r) { + override val features: Features + ) extends ExecutorScheduler(s, r) { @deprecated("Provided for backwards compatibility", "3.0.0") def this(scheduler: ScheduledExecutorService, r: UncaughtExceptionReporter, executionModel: ExecModel) = { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala index 3cff896e5..f666e1bd2 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala @@ -19,9 +19,9 @@ package monix.execution.schedulers import java.util.concurrent._ -import monix.execution.{Features, Scheduler, SchedulerCompanion, UncaughtExceptionReporter} +import monix.execution.{ Features, Scheduler, SchedulerCompanion, UncaughtExceptionReporter } // Prevents conflict with the deprecated symbol -import monix.execution.{ExecutionModel => ExecModel} +import monix.execution.{ ExecutionModel => ExecModel } import scala.concurrent.ExecutionContext import scala.concurrent.duration._ @@ -77,7 +77,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { executor: ScheduledExecutorService, ec: ExecutionContext, reporter: UncaughtExceptionReporter, - executionModel: ExecModel): Scheduler = + executionModel: ExecModel + ): Scheduler = AsyncScheduler(executor, ec, executionModel, reporter) /** [[monix.execution.Scheduler Scheduler]] builder. @@ -124,7 +125,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { def apply( executor: ExecutorService, reporter: UncaughtExceptionReporter, - executionModel: ExecModel): SchedulerService = { + executionModel: ExecModel + ): SchedulerService = { ExecutorScheduler(executor, reporter, executionModel, Features.empty) } @@ -235,7 +237,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { name: String = "monix-computation", daemonic: Boolean = true, reporter: UncaughtExceptionReporter = UncaughtExceptionReporter.default, - executionModel: ExecModel = ExecModel.Default): SchedulerService = { + executionModel: ExecModel = ExecModel.Default + ): SchedulerService = { ExecutorScheduler.forkJoinStatic(name, parallelism, daemonic, reporter, executionModel) } @@ -263,7 +266,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { name: String = "monix-forkjoin", daemonic: Boolean = true, reporter: UncaughtExceptionReporter = UncaughtExceptionReporter.default, - executionModel: ExecModel = ExecModel.Default): SchedulerService = { + executionModel: ExecModel = ExecModel.Default + ): SchedulerService = { ExecutorScheduler.forkJoinDynamic(name, parallelism, maxThreads, daemonic, reporter, executionModel) } @@ -287,7 +291,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { name: String = "monix-io", daemonic: Boolean = true, reporter: UncaughtExceptionReporter = UncaughtExceptionReporter.default, - executionModel: ExecModel = ExecModel.Default): SchedulerService = { + executionModel: ExecModel = ExecModel.Default + ): SchedulerService = { val threadFactory = ThreadFactoryBuilder(name, reporter, daemonic) val executor = new ThreadPoolExecutor( @@ -296,7 +301,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { 60, TimeUnit.SECONDS, new SynchronousQueue[Runnable](false), - threadFactory) + threadFactory + ) ExecutorScheduler(executor, reporter, executionModel, Features.empty) } @@ -324,7 +330,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { keepAliveTime: FiniteDuration = 60.seconds, daemonic: Boolean = true, reporter: UncaughtExceptionReporter = UncaughtExceptionReporter.default, - executionModel: ExecModel = ExecModel.Default): SchedulerService = { + executionModel: ExecModel = ExecModel.Default + ): SchedulerService = { require(minThreads >= 0, "minThreads >= 0") require(maxThreads > 0, "maxThreads > 0") @@ -338,7 +345,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { keepAliveTime.toMillis, TimeUnit.MILLISECONDS, new SynchronousQueue[Runnable](false), - threadFactory) + threadFactory + ) ExecutorScheduler(executor, reporter, executionModel, Features.empty) } @@ -362,7 +370,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { name: String, daemonic: Boolean = true, reporter: UncaughtExceptionReporter = UncaughtExceptionReporter.default, - executionModel: ExecModel = ExecModel.Default): SchedulerService = { + executionModel: ExecModel = ExecModel.Default + ): SchedulerService = { val factory = ThreadFactoryBuilder(name, reporter, daemonic) val executor = new AdaptedThreadPoolExecutor(1, factory) { @@ -391,7 +400,8 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { poolSize: Int, daemonic: Boolean = true, reporter: UncaughtExceptionReporter = UncaughtExceptionReporter.default, - executionModel: ExecModel = ExecModel.Default): SchedulerService = { + executionModel: ExecModel = ExecModel.Default + ): SchedulerService = { val factory = ThreadFactoryBuilder(name, reporter, daemonic) val executor = new AdaptedThreadPoolExecutor(poolSize, factory) { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index 907d65879..a163ddb0a 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -20,7 +20,7 @@ package monix.execution.schedulers import monix.execution.internal.Trampoline import scala.util.control.NonFatal -import scala.concurrent.{BlockContext, ExecutionContext, ExecutionContextExecutor} +import scala.concurrent.{ BlockContext, ExecutionContext, ExecutionContextExecutor } /** A `scala.concurrentExecutionContext` implementation * that executes runnables immediately, on the current thread, diff --git a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index 62a3a07d7..b946c1c5d 100644 --- a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -138,7 +138,8 @@ object Atomic { * @param builder is the builder that helps us to build the * best reference possible, based on our `initialValue` */ - def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = macro Atomic.Macros.buildAnyMacro[A, R] + def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = + macro Atomic.Macros.buildAnyMacro[A, R] /** Constructs an `Atomic[A]` reference, applying the provided * [[PaddingStrategy]] in order to counter the "false sharing" @@ -165,7 +166,8 @@ object Atomic { * best reference possible, based on our `initialValue` */ def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R]): R = macro Atomic.Macros.buildAnyWithPaddingMacro[A, R] + implicit builder: AtomicBuilder[A, R] + ): R = macro Atomic.Macros.buildAnyWithPaddingMacro[A, R] /** Returns the builder that would be chosen to construct Atomic * references for the given `initialValue`. @@ -356,7 +358,8 @@ object Atomic { } def buildAnyMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag](initialValue: c.Expr[A])( - builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { + builder: c.Expr[AtomicBuilder[A, R]] + ): c.Expr[R] = { val expr = reify { builder.splice.buildInstance(initialValue.splice, NoPadding, allowPlatformIntrinsics = true) @@ -367,7 +370,8 @@ object Atomic { def buildAnyWithPaddingMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag]( initialValue: c.Expr[A], - padding: c.Expr[PaddingStrategy])(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { + padding: c.Expr[PaddingStrategy] + )(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { val expr = reify { builder.splice.buildInstance(initialValue.splice, padding.splice, allowPlatformIntrinsics = true) diff --git a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala index 203f78ca4..591d0d422 100644 --- a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -209,7 +209,8 @@ object Atomic { * best reference possible, based on our `initialValue` */ inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R]): R = + implicit builder: AtomicBuilder[A, R] + ): R = builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) /** Returns the builder that would be chosen to construct Atomic diff --git a/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala index e8e3dc71d..8d36deb77 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala @@ -18,7 +18,7 @@ package monix.execution import minitest.SimpleTestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.concurrent.Await import scala.concurrent.duration.Duration diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala index 0f74acd32..1997297d3 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala @@ -17,16 +17,16 @@ package monix.execution -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import minitest.TestSuite -import minitest.api.{AssertionException, MiniTestException} -import monix.execution.exceptions.{CallbackCalledMultipleTimesException, DummyException} +import minitest.api.{ AssertionException, MiniTestException } +import monix.execution.exceptions.{ CallbackCalledMultipleTimesException, DummyException } import monix.execution.schedulers.SchedulerService import scala.concurrent.Promise import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils { val WORKERS = 10 @@ -228,7 +228,8 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils def executeOnSuccessTest( wrap: Callback[Throwable, Int] => Callback[Throwable, Int], isForked: Boolean = false, - retries: Int = RETRIES)(implicit sc: Scheduler): Unit = { + retries: Int = RETRIES + )(implicit sc: Scheduler): Unit = { def run(trigger: Callback[Throwable, Int] => Any): Unit = { for (_ <- 0 until retries) { @@ -258,19 +259,23 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils run(cb => try cb.onSuccess(1) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb(Right(1)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb(Success(1)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) } def executeOnErrorTest( wrap: Callback[Throwable, String] => Callback[Throwable, String], isForked: Boolean = false, - retries: Int = RETRIES)(implicit sc: Scheduler): Unit = { + retries: Int = RETRIES + )(implicit sc: Scheduler): Unit = { def run(trigger: Callback[Throwable, String] => Any): Unit = { for (_ <- 0 until retries) { @@ -297,13 +302,16 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils run(cb => try cb.onError(DUMMY) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb.tryApply(Left(DUMMY)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) run(cb => try cb.tryApply(Failure(DUMMY)) - catch { case _: CallbackCalledMultipleTimesException => () }) + catch { case _: CallbackCalledMultipleTimesException => () } + ) } def runConcurrently(sc: Scheduler)(f: => Any): Unit = { diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala index 687f6b533..be5e43052 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala @@ -21,7 +21,7 @@ import minitest.SimpleTestSuite import monix.execution.Scheduler.Implicits.global import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, TimeoutException} +import scala.concurrent.{ Await, Future, TimeoutException } import scala.util.Success object CancelableFutureJVMSuite extends SimpleTestSuite { diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala index 3fdfbf6fa..fe2b22ff2 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala @@ -17,14 +17,14 @@ package monix.execution -import java.util.concurrent.{CompletableFuture, CompletionException} +import java.util.concurrent.{ CompletableFuture, CompletionException } import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } object CompletableFutureConversionsSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala index 49835893f..640ef5e04 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala @@ -55,10 +55,12 @@ object FutureUtilsJVMSuite extends TestSuite[TestScheduler] { .delayedResult(originalTimeout) { 15 } - .timeoutTo(timeout, { - sideEffect.incrementAndGet() - Future.failed(TestException()) - })(Scheduler.Implicits.global) + .timeoutTo( + timeout, { + sideEffect.incrementAndGet() + Future.failed(TestException()) + } + )(Scheduler.Implicits.global) _ <- FutureUtils.delayedResult(100.millis)(()) // wait for all concurrent processes } yield ()).map { _ => success.incrementAndGet() diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala index 0129a6822..b300bec63 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala @@ -19,7 +19,7 @@ package monix.execution.atomic import minitest.SimpleTestSuite import monix.execution.atomic.PaddingStrategy._ -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global @@ -30,7 +30,8 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( nan1: Option[A], maxValue: A, minValue: A, - allowPlatformIntrinsics: Boolean)(implicit ev: Numeric[A]) + allowPlatformIntrinsics: Boolean +)(implicit ev: Numeric[A]) extends SimpleTestSuite { def Atomic(initial: A): R = builder.buildInstance(initial, strategy, allowPlatformIntrinsics) @@ -39,10 +40,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent compareAndSet") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.increment() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.increment() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -51,10 +53,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent getAndSet") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.getAndSet(ev.fromInt(j + 1)) - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.getAndSet(ev.fromInt(j + 1)) + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -63,10 +66,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent increment") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.increment() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.increment() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -75,10 +79,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent incrementAndGet") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.incrementAndGet() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.incrementAndGet() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -87,10 +92,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent getAndIncrement") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.getAndIncrement() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.getAndIncrement() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -108,7 +114,8 @@ object ConcurrentAtomicNumberDoubleNoPaddingSuite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatNoPaddingSuite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -118,7 +125,8 @@ object ConcurrentAtomicNumberFloatNoPaddingSuite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongNoPaddingSuite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -128,7 +136,8 @@ object ConcurrentAtomicNumberLongNoPaddingSuite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntNoPaddingSuite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -138,7 +147,8 @@ object ConcurrentAtomicNumberIntNoPaddingSuite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortNoPaddingSuite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -148,7 +158,8 @@ object ConcurrentAtomicNumberShortNoPaddingSuite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteNoPaddingSuite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -158,7 +169,8 @@ object ConcurrentAtomicNumberByteNoPaddingSuite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharNoPaddingSuite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -168,7 +180,8 @@ object ConcurrentAtomicNumberCharNoPaddingSuite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyNoPaddingSuite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -178,7 +191,8 @@ object ConcurrentAtomicNumberNumberAnyNoPaddingSuite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) //--Left64 (Java 8) @@ -190,7 +204,8 @@ object ConcurrentAtomicNumberDoubleLeft64Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatLeft64Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -200,7 +215,8 @@ object ConcurrentAtomicNumberFloatLeft64Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongLeft64Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -210,7 +226,8 @@ object ConcurrentAtomicNumberLongLeft64Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntLeft64Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -220,7 +237,8 @@ object ConcurrentAtomicNumberIntLeft64Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortLeft64Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -230,7 +248,8 @@ object ConcurrentAtomicNumberShortLeft64Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteLeft64Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -240,7 +259,8 @@ object ConcurrentAtomicNumberByteLeft64Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharLeft64Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -250,7 +270,8 @@ object ConcurrentAtomicNumberCharLeft64Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyLeft64Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -260,7 +281,8 @@ object ConcurrentAtomicNumberNumberAnyLeft64Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) //-- Right64 (Java 8) @@ -272,7 +294,8 @@ object ConcurrentAtomicNumberDoubleRight64Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatRight64Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -282,7 +305,8 @@ object ConcurrentAtomicNumberFloatRight64Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongRight64Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -292,7 +316,8 @@ object ConcurrentAtomicNumberLongRight64Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntRight64Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -302,7 +327,8 @@ object ConcurrentAtomicNumberIntRight64Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortRight64Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -312,7 +338,8 @@ object ConcurrentAtomicNumberShortRight64Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteRight64Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -322,7 +349,8 @@ object ConcurrentAtomicNumberByteRight64Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharRight64Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -332,7 +360,8 @@ object ConcurrentAtomicNumberCharRight64Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyRight64Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -342,7 +371,8 @@ object ConcurrentAtomicNumberNumberAnyRight64Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) //-- LeftRight128 (Java 8) @@ -354,7 +384,8 @@ object ConcurrentAtomicNumberDoubleLeftRight128Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatLeftRight128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -364,7 +395,8 @@ object ConcurrentAtomicNumberFloatLeftRight128Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongLeftRight128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -374,7 +406,8 @@ object ConcurrentAtomicNumberLongLeftRight128Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntLeftRight128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -384,7 +417,8 @@ object ConcurrentAtomicNumberIntLeftRight128Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortLeftRight128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -394,7 +428,8 @@ object ConcurrentAtomicNumberShortLeftRight128Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteLeftRight128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -404,7 +439,8 @@ object ConcurrentAtomicNumberByteLeftRight128Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharLeftRight128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -414,7 +450,8 @@ object ConcurrentAtomicNumberCharLeftRight128Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyLeftRight128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -424,7 +461,8 @@ object ConcurrentAtomicNumberNumberAnyLeftRight128Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) //--Left128 (Java 8) @@ -436,7 +474,8 @@ object ConcurrentAtomicNumberDoubleLeft128Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatLeft128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -446,7 +485,8 @@ object ConcurrentAtomicNumberFloatLeft128Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongLeft128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -456,7 +496,8 @@ object ConcurrentAtomicNumberLongLeft128Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntLeft128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -466,7 +507,8 @@ object ConcurrentAtomicNumberIntLeft128Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortLeft128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -476,7 +518,8 @@ object ConcurrentAtomicNumberShortLeft128Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteLeft128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -486,7 +529,8 @@ object ConcurrentAtomicNumberByteLeft128Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharLeft128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -496,7 +540,8 @@ object ConcurrentAtomicNumberCharLeft128Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyLeft128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -506,7 +551,8 @@ object ConcurrentAtomicNumberNumberAnyLeft128Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) //-- Right128 (Java 8) @@ -518,7 +564,8 @@ object ConcurrentAtomicNumberDoubleRight128Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatRight128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -528,7 +575,8 @@ object ConcurrentAtomicNumberFloatRight128Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongRight128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -538,7 +586,8 @@ object ConcurrentAtomicNumberLongRight128Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntRight128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -548,7 +597,8 @@ object ConcurrentAtomicNumberIntRight128Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortRight128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -558,7 +608,8 @@ object ConcurrentAtomicNumberShortRight128Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteRight128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -568,7 +619,8 @@ object ConcurrentAtomicNumberByteRight128Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharRight128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -578,7 +630,8 @@ object ConcurrentAtomicNumberCharRight128Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyRight128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -588,7 +641,8 @@ object ConcurrentAtomicNumberNumberAnyRight128Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) //-- LeftRight256 (Java 8) @@ -600,7 +654,8 @@ object ConcurrentAtomicNumberDoubleLeftRight256Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberFloatLeftRight256Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -610,7 +665,8 @@ object ConcurrentAtomicNumberFloatLeftRight256Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberLongLeftRight256Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -620,7 +676,8 @@ object ConcurrentAtomicNumberLongLeftRight256Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberIntLeftRight256Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -630,7 +687,8 @@ object ConcurrentAtomicNumberIntLeftRight256Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberShortLeftRight256Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -640,7 +698,8 @@ object ConcurrentAtomicNumberShortLeftRight256Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberByteLeftRight256Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -650,7 +709,8 @@ object ConcurrentAtomicNumberByteLeftRight256Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberCharLeftRight256Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -660,7 +720,8 @@ object ConcurrentAtomicNumberCharLeftRight256Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicNumberNumberAnyLeftRight256Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -670,7 +731,8 @@ object ConcurrentAtomicNumberNumberAnyLeftRight256Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // ------------ Java 7 @@ -684,7 +746,8 @@ object ConcurrentAtomicNumberDoubleNoPaddingJava7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -694,7 +757,8 @@ object ConcurrentAtomicNumberFloatNoPaddingJava7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -704,7 +768,8 @@ object ConcurrentAtomicNumberLongNoPaddingJava7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -714,7 +779,8 @@ object ConcurrentAtomicNumberIntNoPaddingJava7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -724,7 +790,8 @@ object ConcurrentAtomicNumberShortNoPaddingJava7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -734,7 +801,8 @@ object ConcurrentAtomicNumberByteNoPaddingJava7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -744,7 +812,8 @@ object ConcurrentAtomicNumberCharNoPaddingJava7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -754,7 +823,8 @@ object ConcurrentAtomicNumberNumberAnyNoPaddingJava7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) //--Left64 (Java 7) @@ -766,7 +836,8 @@ object ConcurrentAtomicNumberDoubleLeft64Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -776,7 +847,8 @@ object ConcurrentAtomicNumberFloatLeft64Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -786,7 +858,8 @@ object ConcurrentAtomicNumberLongLeft64Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -796,7 +869,8 @@ object ConcurrentAtomicNumberIntLeft64Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -806,7 +880,8 @@ object ConcurrentAtomicNumberShortLeft64Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -816,7 +891,8 @@ object ConcurrentAtomicNumberByteLeft64Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -826,7 +902,8 @@ object ConcurrentAtomicNumberCharLeft64Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyLeft64Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -836,7 +913,8 @@ object ConcurrentAtomicNumberNumberAnyLeft64Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) //-- Right64 (Java 7) @@ -848,7 +926,8 @@ object ConcurrentAtomicNumberDoubleRight64Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatRight64Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -858,7 +937,8 @@ object ConcurrentAtomicNumberFloatRight64Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongRight64Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -868,7 +948,8 @@ object ConcurrentAtomicNumberLongRight64Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntRight64Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -878,7 +959,8 @@ object ConcurrentAtomicNumberIntRight64Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortRight64Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -888,7 +970,8 @@ object ConcurrentAtomicNumberShortRight64Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteRight64Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -898,7 +981,8 @@ object ConcurrentAtomicNumberByteRight64Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharRight64Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -908,7 +992,8 @@ object ConcurrentAtomicNumberCharRight64Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyRight64Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -918,7 +1003,8 @@ object ConcurrentAtomicNumberNumberAnyRight64Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) //-- LeftRight128 (Java 7) @@ -930,7 +1016,8 @@ object ConcurrentAtomicNumberDoubleLeftRight128Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -940,7 +1027,8 @@ object ConcurrentAtomicNumberFloatLeftRight128Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -950,7 +1038,8 @@ object ConcurrentAtomicNumberLongLeftRight128Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -960,7 +1049,8 @@ object ConcurrentAtomicNumberIntLeftRight128Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -970,7 +1060,8 @@ object ConcurrentAtomicNumberShortLeftRight128Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -980,7 +1071,8 @@ object ConcurrentAtomicNumberByteLeftRight128Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -990,7 +1082,8 @@ object ConcurrentAtomicNumberCharLeftRight128Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1000,7 +1093,8 @@ object ConcurrentAtomicNumberNumberAnyLeftRight128Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) //--Left128 (Java 7) @@ -1012,7 +1106,8 @@ object ConcurrentAtomicNumberDoubleLeft128Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -1022,7 +1117,8 @@ object ConcurrentAtomicNumberFloatLeft128Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -1032,7 +1128,8 @@ object ConcurrentAtomicNumberLongLeft128Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -1042,7 +1139,8 @@ object ConcurrentAtomicNumberIntLeft128Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -1052,7 +1150,8 @@ object ConcurrentAtomicNumberShortLeft128Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -1062,7 +1161,8 @@ object ConcurrentAtomicNumberByteLeft128Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -1072,7 +1172,8 @@ object ConcurrentAtomicNumberCharLeft128Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyLeft128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1082,7 +1183,8 @@ object ConcurrentAtomicNumberNumberAnyLeft128Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) //-- Right128 (Java 7) @@ -1094,7 +1196,8 @@ object ConcurrentAtomicNumberDoubleRight128Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatRight128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -1104,7 +1207,8 @@ object ConcurrentAtomicNumberFloatRight128Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongRight128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -1114,7 +1218,8 @@ object ConcurrentAtomicNumberLongRight128Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntRight128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -1124,7 +1229,8 @@ object ConcurrentAtomicNumberIntRight128Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortRight128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -1134,7 +1240,8 @@ object ConcurrentAtomicNumberShortRight128Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteRight128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -1144,7 +1251,8 @@ object ConcurrentAtomicNumberByteRight128Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharRight128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -1154,7 +1262,8 @@ object ConcurrentAtomicNumberCharRight128Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyRight128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1164,7 +1273,8 @@ object ConcurrentAtomicNumberNumberAnyRight128Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) //-- LeftRight256 (Java 7) @@ -1176,7 +1286,8 @@ object ConcurrentAtomicNumberDoubleLeftRight256Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberFloatLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -1186,7 +1297,8 @@ object ConcurrentAtomicNumberFloatLeftRight256Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberLongLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -1196,7 +1308,8 @@ object ConcurrentAtomicNumberLongLeftRight256Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberIntLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -1206,7 +1319,8 @@ object ConcurrentAtomicNumberIntLeftRight256Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberShortLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -1216,7 +1330,8 @@ object ConcurrentAtomicNumberShortLeftRight256Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberByteLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -1226,7 +1341,8 @@ object ConcurrentAtomicNumberByteLeftRight256Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberCharLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -1236,7 +1352,8 @@ object ConcurrentAtomicNumberCharLeftRight256Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicNumberNumberAnyLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1246,4 +1363,5 @@ object ConcurrentAtomicNumberNumberAnyLeftRight256Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala index 2df5b8ef7..2b4fdb782 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala @@ -21,15 +21,15 @@ import minitest.SimpleTestSuite import monix.execution.atomic.PaddingStrategy._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( builder: AtomicBuilder[A, R], strategy: PaddingStrategy, valueFromInt: Int => A, valueToInt: A => Int, - allowPlatformIntrinsics: Boolean) - extends SimpleTestSuite { + allowPlatformIntrinsics: Boolean +) extends SimpleTestSuite { def Atomic(initial: A): R = builder.buildInstance(initial, strategy, allowPlatformIntrinsics) def zero = valueFromInt(0) @@ -38,10 +38,11 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( test("should perform concurrent compareAndSet") { val r = Atomic(zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.transform(x => valueFromInt(valueToInt(x) + 1)) - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.transform(x => valueFromInt(valueToInt(x) + 1)) + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -50,10 +51,11 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( test("should perform concurrent getAndSet") { val r = Atomic(zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.getAndSet(valueFromInt(j)) - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.getAndSet(valueFromInt(j)) + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -67,13 +69,15 @@ abstract class ConcurrentAtomicBooleanSuite(strategy: PaddingStrategy, allowPlat strategy, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics) { + allowPlatformIntrinsics + ) { test("should flip to true when false") { val r = Atomic(false) - val futures = for (_ <- 0 until 5) yield Future { - r.flip(true) - } + val futures = + for (_ <- 0 until 5) yield Future { + r.flip(true) + } val result = Await.result(Future.sequence(futures), 30.seconds) assert(result.count(_ == true) == 1) assert(r.get()) @@ -81,9 +85,10 @@ abstract class ConcurrentAtomicBooleanSuite(strategy: PaddingStrategy, allowPlat test("should not flip to true when already true") { val r = Atomic(true) - val futures = for (_ <- 0 until 5) yield Future { - r.flip(true) - } + val futures = + for (_ <- 0 until 5) yield Future { + r.flip(true) + } val result = Await.result(Future.sequence(futures), 30.seconds) assert(result.forall(_ == false)) } @@ -97,7 +102,8 @@ object ConcurrentAtomicAnyNoPaddingSuite NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanNoPaddingSuite extends ConcurrentAtomicBooleanSuite(NoPadding) @@ -107,7 +113,8 @@ object ConcurrentAtomicNumberAnyNoPaddingSuite NoPadding, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatNoPaddingSuite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -115,7 +122,8 @@ object ConcurrentAtomicFloatNoPaddingSuite NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleNoPaddingSuite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -123,7 +131,8 @@ object ConcurrentAtomicDoubleNoPaddingSuite NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortNoPaddingSuite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -131,7 +140,8 @@ object ConcurrentAtomicShortNoPaddingSuite NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteNoPaddingSuite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -139,7 +149,8 @@ object ConcurrentAtomicByteNoPaddingSuite NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharNoPaddingSuite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -147,7 +158,8 @@ object ConcurrentAtomicCharNoPaddingSuite NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntNoPaddingSuite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -155,7 +167,8 @@ object ConcurrentAtomicIntNoPaddingSuite NoPadding, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongNoPaddingSuite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -163,7 +176,8 @@ object ConcurrentAtomicLongNoPaddingSuite NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -- Left64 (Java 8) @@ -173,7 +187,8 @@ object ConcurrentAtomicAnyLeft64Suite Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanLeft64Suite extends ConcurrentAtomicBooleanSuite(Left64) @@ -183,7 +198,8 @@ object ConcurrentAtomicNumberAnyLeft64Suite Left64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatLeft64Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -191,7 +207,8 @@ object ConcurrentAtomicFloatLeft64Suite Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleLeft64Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -199,7 +216,8 @@ object ConcurrentAtomicDoubleLeft64Suite Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortLeft64Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -207,7 +225,8 @@ object ConcurrentAtomicShortLeft64Suite Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteLeft64Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -215,7 +234,8 @@ object ConcurrentAtomicByteLeft64Suite Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharLeft64Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -223,7 +243,8 @@ object ConcurrentAtomicCharLeft64Suite Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntLeft64Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -231,7 +252,8 @@ object ConcurrentAtomicIntLeft64Suite Left64, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongLeft64Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -239,7 +261,8 @@ object ConcurrentAtomicLongLeft64Suite Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -- Right64 (Java 8) @@ -249,7 +272,8 @@ object ConcurrentAtomicAnyRight64Suite Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanRight64Suite extends ConcurrentAtomicBooleanSuite(Right64) @@ -259,7 +283,8 @@ object ConcurrentAtomicNumberAnyRight64Suite Right64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatRight64Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -267,7 +292,8 @@ object ConcurrentAtomicFloatRight64Suite Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleRight64Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -275,7 +301,8 @@ object ConcurrentAtomicDoubleRight64Suite Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortRight64Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -283,7 +310,8 @@ object ConcurrentAtomicShortRight64Suite Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteRight64Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -291,7 +319,8 @@ object ConcurrentAtomicByteRight64Suite Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharRight64Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -299,7 +328,8 @@ object ConcurrentAtomicCharRight64Suite Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntRight64Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -307,7 +337,8 @@ object ConcurrentAtomicIntRight64Suite Right64, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongRight64Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -315,7 +346,8 @@ object ConcurrentAtomicLongRight64Suite Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -- LeftRight128 (Java 8) @@ -325,7 +357,8 @@ object ConcurrentAtomicAnyLeftRight128Suite LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanLeftRight128Suite extends ConcurrentAtomicBooleanSuite(LeftRight128) @@ -335,7 +368,8 @@ object ConcurrentAtomicNumberAnyLeftRight128Suite LeftRight128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatLeftRight128Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -343,7 +377,8 @@ object ConcurrentAtomicFloatLeftRight128Suite LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleLeftRight128Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -351,7 +386,8 @@ object ConcurrentAtomicDoubleLeftRight128Suite LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortLeftRight128Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -359,7 +395,8 @@ object ConcurrentAtomicShortLeftRight128Suite LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteLeftRight128Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -367,7 +404,8 @@ object ConcurrentAtomicByteLeftRight128Suite LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharLeftRight128Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -375,7 +413,8 @@ object ConcurrentAtomicCharLeftRight128Suite LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntLeftRight128Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -383,7 +422,8 @@ object ConcurrentAtomicIntLeftRight128Suite LeftRight128, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongLeftRight128Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -391,7 +431,8 @@ object ConcurrentAtomicLongLeftRight128Suite LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -- Left128 (Java 8) @@ -401,7 +442,8 @@ object ConcurrentAtomicAnyLeft128Suite Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanLeft128Suite extends ConcurrentAtomicBooleanSuite(Left128) @@ -411,7 +453,8 @@ object ConcurrentAtomicNumberAnyLeft128Suite Left128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatLeft128Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -419,7 +462,8 @@ object ConcurrentAtomicFloatLeft128Suite Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleLeft128Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -427,7 +471,8 @@ object ConcurrentAtomicDoubleLeft128Suite Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortLeft128Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -435,7 +480,8 @@ object ConcurrentAtomicShortLeft128Suite Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteLeft128Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -443,7 +489,8 @@ object ConcurrentAtomicByteLeft128Suite Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharLeft128Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -451,7 +498,8 @@ object ConcurrentAtomicCharLeft128Suite Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntLeft128Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -459,7 +507,8 @@ object ConcurrentAtomicIntLeft128Suite Left128, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongLeft128Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -467,7 +516,8 @@ object ConcurrentAtomicLongLeft128Suite Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -- Right128 (Java 8) @@ -477,7 +527,8 @@ object ConcurrentAtomicAnyRight128Suite Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanRight128Suite extends ConcurrentAtomicBooleanSuite(Right128) @@ -487,7 +538,8 @@ object ConcurrentAtomicNumberAnyRight128Suite Right128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatRight128Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -495,7 +547,8 @@ object ConcurrentAtomicFloatRight128Suite Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleRight128Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -503,7 +556,8 @@ object ConcurrentAtomicDoubleRight128Suite Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortRight128Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -511,7 +565,8 @@ object ConcurrentAtomicShortRight128Suite Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteRight128Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -519,7 +574,8 @@ object ConcurrentAtomicByteRight128Suite Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharRight128Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -527,7 +583,8 @@ object ConcurrentAtomicCharRight128Suite Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntRight128Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -535,7 +592,8 @@ object ConcurrentAtomicIntRight128Suite Right128, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongRight128Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -543,7 +601,8 @@ object ConcurrentAtomicLongRight128Suite Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -- LeftRight256 (Java 8) @@ -553,7 +612,8 @@ object ConcurrentAtomicAnyLeftRight256Suite LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicBooleanLeftRight256Suite extends ConcurrentAtomicBooleanSuite(LeftRight256) @@ -563,7 +623,8 @@ object ConcurrentAtomicNumberAnyLeftRight256Suite LeftRight256, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicFloatLeftRight256Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -571,7 +632,8 @@ object ConcurrentAtomicFloatLeftRight256Suite LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicDoubleLeftRight256Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -579,7 +641,8 @@ object ConcurrentAtomicDoubleLeftRight256Suite LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicShortLeftRight256Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -587,7 +650,8 @@ object ConcurrentAtomicShortLeftRight256Suite LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicByteLeftRight256Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -595,7 +659,8 @@ object ConcurrentAtomicByteLeftRight256Suite LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicCharLeftRight256Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -603,7 +668,8 @@ object ConcurrentAtomicCharLeftRight256Suite LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicIntLeftRight256Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -611,7 +677,8 @@ object ConcurrentAtomicIntLeftRight256Suite LeftRight256, x => x, x => x, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) object ConcurrentAtomicLongLeftRight256Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -619,7 +686,8 @@ object ConcurrentAtomicLongLeftRight256Suite LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + allowPlatformIntrinsics = true + ) // -------------- Java 7 @@ -631,7 +699,8 @@ object ConcurrentAtomicAnyNoPaddingJava7Suite NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanNoPaddingJava7Suite extends ConcurrentAtomicBooleanSuite(NoPadding, allowPlatformIntrinsics = false) @@ -642,7 +711,8 @@ object ConcurrentAtomicNumberAnyNoPaddingJava7Suite NoPadding, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatNoPaddingJava7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -650,7 +720,8 @@ object ConcurrentAtomicFloatNoPaddingJava7Suite NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleNoPaddingJava7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -658,7 +729,8 @@ object ConcurrentAtomicDoubleNoPaddingJava7Suite NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortNoPaddingJava7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -666,7 +738,8 @@ object ConcurrentAtomicShortNoPaddingJava7Suite NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteNoPaddingJava7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -674,7 +747,8 @@ object ConcurrentAtomicByteNoPaddingJava7Suite NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharNoPaddingJava7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -682,7 +756,8 @@ object ConcurrentAtomicCharNoPaddingJava7Suite NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntNoPaddingJava7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -690,7 +765,8 @@ object ConcurrentAtomicIntNoPaddingJava7Suite NoPadding, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongNoPaddingJava7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -698,7 +774,8 @@ object ConcurrentAtomicLongNoPaddingJava7Suite NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) // -- Left64 (Java 7) @@ -708,7 +785,8 @@ object ConcurrentAtomicAnyLeft64Java7Suite Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanLeft64Java7Suite extends ConcurrentAtomicBooleanSuite(Left64, allowPlatformIntrinsics = false) @@ -719,7 +797,8 @@ object ConcurrentAtomicNumberAnyLeft64Java7Suite Left64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatLeft64Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -727,7 +806,8 @@ object ConcurrentAtomicFloatLeft64Java7Suite Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleLeft64Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -735,7 +815,8 @@ object ConcurrentAtomicDoubleLeft64Java7Suite Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortLeft64Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -743,7 +824,8 @@ object ConcurrentAtomicShortLeft64Java7Suite Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteLeft64Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -751,7 +833,8 @@ object ConcurrentAtomicByteLeft64Java7Suite Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharLeft64Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -759,7 +842,8 @@ object ConcurrentAtomicCharLeft64Java7Suite Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntLeft64Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -767,7 +851,8 @@ object ConcurrentAtomicIntLeft64Java7Suite Left64, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongLeft64Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -775,7 +860,8 @@ object ConcurrentAtomicLongLeft64Java7Suite Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) // -- Right64 (Java 7) @@ -785,7 +871,8 @@ object ConcurrentAtomicAnyRight64Java7Suite Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanRight64Java7Suite extends ConcurrentAtomicBooleanSuite(Right64, allowPlatformIntrinsics = false) @@ -796,7 +883,8 @@ object ConcurrentAtomicNumberAnyRight64Java7Suite Right64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatRight64Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -804,7 +892,8 @@ object ConcurrentAtomicFloatRight64Java7Suite Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleRight64Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -812,7 +901,8 @@ object ConcurrentAtomicDoubleRight64Java7Suite Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortRight64Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -820,7 +910,8 @@ object ConcurrentAtomicShortRight64Java7Suite Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteRight64Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -828,7 +919,8 @@ object ConcurrentAtomicByteRight64Java7Suite Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharRight64Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -836,7 +928,8 @@ object ConcurrentAtomicCharRight64Java7Suite Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntRight64Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -844,7 +937,8 @@ object ConcurrentAtomicIntRight64Java7Suite Right64, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongRight64Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -852,7 +946,8 @@ object ConcurrentAtomicLongRight64Java7Suite Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) // -- LeftRight128 (Java 7) @@ -862,7 +957,8 @@ object ConcurrentAtomicAnyLeftRight128Java7Suite LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanLeftRight128Java7Suite extends ConcurrentAtomicBooleanSuite(LeftRight128, allowPlatformIntrinsics = false) @@ -873,7 +969,8 @@ object ConcurrentAtomicNumberAnyLeftRight128Java7Suite LeftRight128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatLeftRight128Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -881,7 +978,8 @@ object ConcurrentAtomicFloatLeftRight128Java7Suite LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleLeftRight128Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -889,7 +987,8 @@ object ConcurrentAtomicDoubleLeftRight128Java7Suite LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortLeftRight128Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -897,7 +996,8 @@ object ConcurrentAtomicShortLeftRight128Java7Suite LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteLeftRight128Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -905,7 +1005,8 @@ object ConcurrentAtomicByteLeftRight128Java7Suite LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharLeftRight128Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -913,7 +1014,8 @@ object ConcurrentAtomicCharLeftRight128Java7Suite LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntLeftRight128Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -921,7 +1023,8 @@ object ConcurrentAtomicIntLeftRight128Java7Suite LeftRight128, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongLeftRight128Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -929,7 +1032,8 @@ object ConcurrentAtomicLongLeftRight128Java7Suite LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) // -- Left128 (Java 7) @@ -939,7 +1043,8 @@ object ConcurrentAtomicAnyLeft128Java7Suite Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanLeft128Java7Suite extends ConcurrentAtomicBooleanSuite(Left128, allowPlatformIntrinsics = false) @@ -950,7 +1055,8 @@ object ConcurrentAtomicNumberAnyLeft128Java7Suite Left128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatLeft128Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -958,7 +1064,8 @@ object ConcurrentAtomicFloatLeft128Java7Suite Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleLeft128Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -966,7 +1073,8 @@ object ConcurrentAtomicDoubleLeft128Java7Suite Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortLeft128Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -974,7 +1082,8 @@ object ConcurrentAtomicShortLeft128Java7Suite Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteLeft128Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -982,7 +1091,8 @@ object ConcurrentAtomicByteLeft128Java7Suite Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharLeft128Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -990,7 +1100,8 @@ object ConcurrentAtomicCharLeft128Java7Suite Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntLeft128Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -998,7 +1109,8 @@ object ConcurrentAtomicIntLeft128Java7Suite Left128, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongLeft128Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -1006,7 +1118,8 @@ object ConcurrentAtomicLongLeft128Java7Suite Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) // -- Right128 (Java 7) @@ -1016,7 +1129,8 @@ object ConcurrentAtomicAnyRight128Java7Suite Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanRight128Java7Suite extends ConcurrentAtomicBooleanSuite(Right128, allowPlatformIntrinsics = false) @@ -1027,7 +1141,8 @@ object ConcurrentAtomicNumberAnyRight128Java7Suite Right128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatRight128Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -1035,7 +1150,8 @@ object ConcurrentAtomicFloatRight128Java7Suite Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleRight128Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -1043,7 +1159,8 @@ object ConcurrentAtomicDoubleRight128Java7Suite Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortRight128Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -1051,7 +1168,8 @@ object ConcurrentAtomicShortRight128Java7Suite Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteRight128Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -1059,7 +1177,8 @@ object ConcurrentAtomicByteRight128Java7Suite Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharRight128Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -1067,7 +1186,8 @@ object ConcurrentAtomicCharRight128Java7Suite Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntRight128Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -1075,7 +1195,8 @@ object ConcurrentAtomicIntRight128Java7Suite Right128, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongRight128Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -1083,7 +1204,8 @@ object ConcurrentAtomicLongRight128Java7Suite Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) // -- LeftRight256 (Java 7) @@ -1093,7 +1215,8 @@ object ConcurrentAtomicAnyLeftRight256Java7Suite LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicBooleanLeftRight256Java7Suite extends ConcurrentAtomicBooleanSuite(LeftRight256, allowPlatformIntrinsics = false) @@ -1104,7 +1227,8 @@ object ConcurrentAtomicNumberAnyLeftRight256Java7Suite LeftRight256, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicFloatLeftRight256Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -1112,7 +1236,8 @@ object ConcurrentAtomicFloatLeftRight256Java7Suite LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicDoubleLeftRight256Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -1120,7 +1245,8 @@ object ConcurrentAtomicDoubleLeftRight256Java7Suite LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicShortLeftRight256Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -1128,7 +1254,8 @@ object ConcurrentAtomicShortLeftRight256Java7Suite LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicByteLeftRight256Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -1136,7 +1263,8 @@ object ConcurrentAtomicByteLeftRight256Java7Suite LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicCharLeftRight256Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -1144,7 +1272,8 @@ object ConcurrentAtomicCharLeftRight256Java7Suite LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicIntLeftRight256Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -1152,7 +1281,8 @@ object ConcurrentAtomicIntLeftRight256Java7Suite LeftRight256, x => x, x => x, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) object ConcurrentAtomicLongLeftRight256Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -1160,4 +1290,5 @@ object ConcurrentAtomicLongLeftRight256Java7Suite LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + allowPlatformIntrinsics = false + ) diff --git a/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala index eb1267a72..8e250fbcd 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala @@ -18,7 +18,7 @@ package monix.execution.misc import minitest.SimpleTestSuite -import monix.execution.{Cancelable, CancelableFuture, Scheduler} +import monix.execution.{ Cancelable, CancelableFuture, Scheduler } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TracingScheduler import scala.concurrent.Future @@ -50,9 +50,12 @@ object LocalJVMSuite extends SimpleTestSuite { val f = for { _ <- CancelableFuture(Future { local := 50 }, Cancelable()) _ <- Local.isolate { - CancelableFuture(Future { - local := 100 - }, Cancelable()) + CancelableFuture( + Future { + local := 100 + }, + Cancelable() + ) } v <- CancelableFuture(Future { local() }, Cancelable()) } yield v @@ -85,9 +88,12 @@ object LocalJVMSuite extends SimpleTestSuite { val f = for { _ <- Future { local := 50 } - _ <- Local.bindCurrentIf(true)(CancelableFuture(Future { - local := 100 - }, Cancelable.empty)) + _ <- Local.bindCurrentIf(true)(CancelableFuture( + Future { + local := 100 + }, + Cancelable.empty + )) v <- Future { local() } } yield v diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala index 1a5a890e5..30cc539ba 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala @@ -17,14 +17,14 @@ package monix.execution.schedulers -import java.util.concurrent.{CountDownLatch, TimeUnit, TimeoutException} +import java.util.concurrent.{ CountDownLatch, TimeUnit, TimeoutException } import minitest.SimpleTestSuite import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.{Cancelable, Scheduler} -import monix.execution.{ExecutionModel => ExecModel} +import monix.execution.{ Cancelable, Scheduler } +import monix.execution.{ ExecutionModel => ExecModel } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } object AsyncSchedulerJVMSuite extends SimpleTestSuite { val s: Scheduler = monix.execution.Scheduler.global @@ -78,7 +78,8 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { } else if (value < 4) { value += 1 } - }) + } + ) assert(Await.result(p.future, 5.second) == 4) } @@ -101,7 +102,8 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { } else if (value < 4) { value += 1 } - }) + } + ) assert(Await.result(p.future, 5.second) == 4) } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala index e4147f13a..feadb0a6c 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala @@ -17,16 +17,16 @@ package monix.execution.schedulers -import java.util.concurrent.{CountDownLatch, TimeUnit, TimeoutException} +import java.util.concurrent.{ CountDownLatch, TimeUnit, TimeoutException } import minitest.TestSuite -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, Default => DefaultExecutionModel} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, Default => DefaultExecutionModel } import monix.execution.cancelables.SingleAssignCancelable import monix.execution.exceptions.DummyException -import monix.execution.{Cancelable, Scheduler, UncaughtExceptionReporter} +import monix.execution.{ Cancelable, Scheduler, UncaughtExceptionReporter } import scala.concurrent.duration._ -import scala.concurrent.{blocking, Await, Promise} +import scala.concurrent.{ blocking, Await, Promise } abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self => var lastReportedFailure = null: Throwable @@ -101,7 +101,8 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self } else if (value < 4) { value += 1 } - }) + } + ) assert(Await.result(p.future, 5.second) == 4) } @@ -124,7 +125,8 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self } else if (value < 4) { value += 1 } - }) + } + ) assert(Await.result(p.future, 5.second) == 4) } @@ -184,7 +186,8 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self scheduler.scheduleOnce( 1, TimeUnit.MILLISECONDS, - () => throw ex) + () => throw ex + ) assert(latch.await(15, TimeUnit.MINUTES), "lastReportedFailureLatch.await") self.synchronized(assertEquals(lastReportedFailure, ex)) diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala index e586a0484..518a5dcfd 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala @@ -17,7 +17,7 @@ package monix.execution.schedulers -import monix.execution.{Scheduler, UncaughtExceptionReporter} +import monix.execution.{ Scheduler, UncaughtExceptionReporter } import java.util.concurrent.Executors import monix.execution.exceptions.DummyException diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala index 04ef6dc81..9cb81540e 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala @@ -21,7 +21,7 @@ package schedulers import java.util.concurrent.ScheduledThreadPoolExecutor import minitest.SimpleTestSuite import scala.concurrent.duration._ -import scala.concurrent.{Await, ExecutionContext, Future, Promise} +import scala.concurrent.{ Await, ExecutionContext, Future, Promise } object ScheduleOnceJVMSuite extends SimpleTestSuite { test("Scheduler.global") { @@ -89,10 +89,14 @@ object ScheduleOnceJVMSuite extends SimpleTestSuite { def runTest(sc: Scheduler, threadPrefix: Option[String] = None): Unit = { def runAndGetThread(sc: Scheduler, delayMs: Int): Future[String] = { val p = Promise[String]() - sc.scheduleOnce(delayMs.toLong, MILLISECONDS, () => { - p.success(Thread.currentThread().getName) - () - }) + sc.scheduleOnce( + delayMs.toLong, + MILLISECONDS, + () => { + p.success(Thread.currentThread().getName) + () + } + ) p.future } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala index c8e549f41..8a701fb09 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala @@ -23,10 +23,10 @@ import minitest.TestSuite import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.atomic.Atomic import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.{Features, UncaughtExceptionReporter, ExecutionModel => ExecModel} +import monix.execution.{ ExecutionModel => ExecModel, Features, UncaughtExceptionReporter } import scala.concurrent.duration._ -import scala.concurrent.{Await, Promise} +import scala.concurrent.{ Await, Promise } object ScheduledExecutorToSchedulerSuite extends TestSuite[ExecutorScheduler] { val lastError = Atomic(null: Throwable) @@ -39,7 +39,8 @@ object ScheduledExecutorToSchedulerSuite extends TestSuite[ExecutorScheduler] { "ExecutorSchedulerSuite", reporter, daemonic = true - )) + ) + ) ExecutorScheduler(executor, reporter, ExecModel.Default, Features.empty) } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala index 2d1a7c0ae..98f67b7e2 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala @@ -17,9 +17,9 @@ package monix.execution.schedulers -import java.util.concurrent.{CountDownLatch, Executors, TimeUnit} +import java.util.concurrent.{ CountDownLatch, Executors, TimeUnit } import minitest.SimpleTestSuite -import monix.execution.{Scheduler, UncaughtExceptionReporter} +import monix.execution.{ Scheduler, UncaughtExceptionReporter } object TestSchedulerCompanionSuite extends SimpleTestSuite { test("scheduler builder, apply, test 1") { diff --git a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala index ebc1e46f9..31f3be8f4 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala @@ -20,8 +20,8 @@ package monix.execution import scala.util.control.NonFatal import monix.execution.schedulers.TrampolineExecutionContext.immediate import scala.concurrent.duration.Duration -import scala.concurrent.{CanAwait, ExecutionContext, Future, Promise} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ CanAwait, ExecutionContext, Future, Promise } +import scala.util.{ Failure, Success, Try } /** Represents an acknowledgement of processing that a consumer * sends back upstream. Useful to implement back-pressure. @@ -35,7 +35,9 @@ sealed abstract class Ack extends Future[Ack] with Serializable { onComplete(r => p.complete( try f(r) - catch { case t if NonFatal(t) => Failure(t) })) + catch { case t if NonFatal(t) => Failure(t) } + ) + ) p.future } @@ -45,7 +47,9 @@ sealed abstract class Ack extends Future[Ack] with Serializable { onComplete(r => p.completeWith( try f(r) - catch { case t if NonFatal(t) => Future.failed(t) })) + catch { case t if NonFatal(t) => Future.failed(t) } + ) + ) p.future } @@ -145,10 +149,11 @@ object Ack { else if (source ne Continue) source.onComplete { ack => try ack match { - case Success(Stop) => cb(None) - case Failure(e) => cb(Some(e)) - case _ => () - } catch { + case Success(Stop) => cb(None) + case Failure(e) => cb(Some(e)) + case _ => () + } + catch { case e if NonFatal(e) => r.reportFailure(e) } }(immediate) diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala index 845b2a47a..3cbc92b19 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala @@ -18,7 +18,7 @@ package monix.execution import monix.execution.ChannelType.MPMC -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.atomic.AtomicAny import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.cancelables.MultiAssignCancelable @@ -112,7 +112,8 @@ import scala.concurrent.duration._ final class AsyncQueue[A] private[monix] ( capacity: BufferCapacity, channelType: ChannelType, - retryDelay: FiniteDuration = 10.millis)(implicit scheduler: Scheduler) { + retryDelay: FiniteDuration = 10.millis +)(implicit scheduler: Scheduler) { /** Try pushing a value to the queue. * @@ -240,7 +241,8 @@ final class AsyncQueue[A] private[monix] ( _ => buffer.length >= minLength, _ => toSeq(buffer), promise, - conn) + conn + ) CancelableFuture(promise.future, conn) } @@ -362,7 +364,8 @@ final class AsyncQueue[A] private[monix] ( filter: T => Boolean, map: T => U, cb: Promise[U], - token: MultiAssignCancelable): Unit = { + token: MultiAssignCancelable + ): Unit = { // Registering intention to sleep via promise state.get() match { @@ -384,7 +387,8 @@ final class AsyncQueue[A] private[monix] ( filter: T => Boolean, map: T => U, cb: Promise[U], - token: MultiAssignCancelable)(p: CancelablePromise[Unit]): Unit = { + token: MultiAssignCancelable + )(p: CancelablePromise[Unit]): Unit = { // Async boundary, for fairness reasons; also creates a full // memory barrier between the promise registration and what follows @@ -410,7 +414,8 @@ final class AsyncQueue[A] private[monix] ( filter: T => Boolean, map: T => U, cb: Promise[U], - token: MultiAssignCancelable): Unit = { + token: MultiAssignCancelable + ): Unit = { // Trying to read val value = f() @@ -479,7 +484,8 @@ object AsyncQueue { @UnsafeProtocol @UnsafeBecauseImpure def withConfig[A](capacity: BufferCapacity, channelType: ChannelType)(implicit - scheduler: Scheduler): AsyncQueue[A] = { + scheduler: Scheduler + ): AsyncQueue[A] = { new AsyncQueue[A](capacity, channelType) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala index 62224477e..eeb75ce25 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala @@ -17,14 +17,14 @@ package monix.execution -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericSemaphore.Listener import monix.execution.internal.GenericSemaphore import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.concurrent.{ExecutionContext, Future, Promise} +import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.util.control.NonFatal /** The `AsyncSemaphore` is an asynchronous semaphore implementation that diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala index 23fb369a8..be9e16a3e 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala @@ -17,7 +17,7 @@ package monix.execution -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericVar diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index dbdf43ad9..436cf3f45 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -17,11 +17,11 @@ package monix.execution -import monix.execution.exceptions.{CallbackCalledMultipleTimesException, UncaughtErrorException} -import monix.execution.schedulers.{TrampolineExecutionContext, TrampolinedRunnable} -import scala.concurrent.{ExecutionContext, Promise} +import monix.execution.exceptions.{ CallbackCalledMultipleTimesException, UncaughtErrorException } +import monix.execution.schedulers.{ TrampolineExecutionContext, TrampolinedRunnable } +import scala.concurrent.{ ExecutionContext, Promise } import scala.util.control.NonFatal -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } /** Represents a callback that should be called asynchronously * with the result of a computation. diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala index 7492744df..0a6aca8cb 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala @@ -18,15 +18,15 @@ package monix.execution import monix.execution.Cancelable.IsDummy -import monix.execution.CancelableFuture.{Async, Never, Pure} -import monix.execution.cancelables.{ChainedCancelable, SingleAssignCancelable} +import monix.execution.CancelableFuture.{ Async, Never, Pure } +import monix.execution.cancelables.{ ChainedCancelable, SingleAssignCancelable } import monix.execution.misc.Local import monix.execution.schedulers.TrampolinedRunnable import monix.execution.schedulers.TrampolineExecutionContext.immediate import scala.concurrent._ import scala.concurrent.duration.Duration import scala.reflect.ClassTag -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal /** Represents an asynchronous computation that can be canceled @@ -53,7 +53,8 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s } override final def transform[S](s: (A) => S, f: (Throwable) => Throwable)(implicit - executor: ExecutionContext): CancelableFuture[S] = + executor: ExecutionContext + ): CancelableFuture[S] = transform { case Success(a) => Success(s(a)) case Failure(e) => Failure(f(e)) @@ -84,7 +85,8 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s } override final def recover[U >: A](pf: PartialFunction[Throwable, U])(implicit - executor: ExecutionContext): CancelableFuture[U] = + executor: ExecutionContext + ): CancelableFuture[U] = transform { case ref @ Success(_) => ref case Failure(e) => @@ -93,7 +95,8 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s } override final def recoverWith[U >: A](pf: PartialFunction[Throwable, Future[U]])(implicit - executor: ExecutionContext): CancelableFuture[U] = + executor: ExecutionContext + ): CancelableFuture[U] = transformWith { case Success(_) => this case Failure(e) => @@ -126,7 +129,8 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s } override final def andThen[U](pf: PartialFunction[Try[A], U])(implicit - executor: ExecutionContext): CancelableFuture[A] = + executor: ExecutionContext + ): CancelableFuture[A] = transformWith { r => if (pf.isDefinedAt(r)) pf(r) this @@ -154,37 +158,40 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s // FutureUtils will use a polyfill for Scala 2.11 and will // use the real `transformWith` on Scala 2.12 - val f2 = FutureUtils.transformWith(underlying, { (result: Try[A]) => - if (isolatedCtx ne null) Local.setContext(isolatedCtx) - val nextRef: Future[S] = - try f(result) - catch { case e if NonFatal(e) => Future.failed(e) } - - // Checking to see if we are dealing with a "flatMap" - // future, in which case we need to chain the cancelable - // reference in order to not create a memory leak - nextRef match { - case ref: CancelableFuture[_] if ref ne Never => - val cf = ref.asInstanceOf[CancelableFuture[S]] - // If the resulting Future is completed, there's no reason - // to chain cancelable tokens - if (!cf.isCompleted) - cf.cancelable match { - case cRef2: ChainedCancelable => - // Chaining ensures we don't leak - cRef2.forwardTo(cRef) - case cRef2 => - if (!cRef2.isInstanceOf[IsDummy]) cRef := cRef2 - } - - // Returning underlying b/c otherwise we leak memory in - // infinite loops - cf.underlying - - case _ => - nextRef + val f2 = FutureUtils.transformWith( + underlying, + { (result: Try[A]) => + if (isolatedCtx ne null) Local.setContext(isolatedCtx) + val nextRef: Future[S] = + try f(result) + catch { case e if NonFatal(e) => Future.failed(e) } + + // Checking to see if we are dealing with a "flatMap" + // future, in which case we need to chain the cancelable + // reference in order to not create a memory leak + nextRef match { + case ref: CancelableFuture[_] if ref ne Never => + val cf = ref.asInstanceOf[CancelableFuture[S]] + // If the resulting Future is completed, there's no reason + // to chain cancelable tokens + if (!cf.isCompleted) + cf.cancelable match { + case cRef2: ChainedCancelable => + // Chaining ensures we don't leak + cRef2.forwardTo(cRef) + case cRef2 => + if (!cRef2.isInstanceOf[IsDummy]) cRef := cRef2 + } + + // Returning underlying b/c otherwise we leak memory in + // infinite loops + cf.underlying + + case _ => + nextRef + } } - }) + ) CancelableFuture.applyWithLocal(f2, cRef, isolatedCtx) } } @@ -304,7 +311,11 @@ object CancelableFuture extends internal.CancelableFutureForPlatform { private[monix] def successfulWithLocal[A](value: A, isolatedCtx: Local.Context): CancelableFuture[A] = new Pure[A](Success(value), isolatedCtx) - private[monix] def applyWithLocal[A](underlying: Future[A], cancelable: Cancelable, isolatedCtx: Local.Context): CancelableFuture[A] = + private[monix] def applyWithLocal[A]( + underlying: Future[A], + cancelable: Cancelable, + isolatedCtx: Local.Context + ): CancelableFuture[A] = new Async[A](underlying, cancelable, isolatedCtx) /** A [[CancelableFuture]] instance that will never complete. */ @@ -332,12 +343,14 @@ object CancelableFuture extends internal.CancelableFutureForPlatform { override def transform[S](f: (Try[Nothing]) => Try[S])(implicit executor: ExecutionContext): CancelableFuture[S] = this override def transformWith[S](f: (Try[Nothing]) => Future[S])(implicit - executor: ExecutionContext): CancelableFuture[S] = + executor: ExecutionContext + ): CancelableFuture[S] = this } /** An internal [[CancelableFuture]] implementation. */ - private[execution] final class Pure[+A](immediate: Try[A], override val isolatedCtx: Local.Context = null) extends CancelableFuture[A] { + private[execution] final class Pure[+A](immediate: Try[A], override val isolatedCtx: Local.Context = null) + extends CancelableFuture[A] { def ready(atMost: Duration)(implicit permit: CanAwait): this.type = this def result(atMost: Duration)(implicit permit: CanAwait): A = immediate.get @@ -355,8 +368,11 @@ object CancelableFuture extends internal.CancelableFutureForPlatform { } /** An actual [[CancelableFuture]] implementation; internal. */ - private[execution] final case class Async[+A](underlying: Future[A], cancelable: Cancelable, override val isolatedCtx: Local.Context = null) - extends CancelableFuture[A] { + private[execution] final case class Async[+A]( + underlying: Future[A], + cancelable: Cancelable, + override val isolatedCtx: Local.Context = null + ) extends CancelableFuture[A] { override def onComplete[U](f: (Try[A]) => U)(implicit executor: ExecutionContext): Unit = { underlying.onComplete(f)(executor) diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala index fc00e7895..41928f397 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala @@ -20,13 +20,13 @@ package monix.execution import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.Platform import monix.execution.internal.exceptions.matchError -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import scala.annotation.tailrec import scala.collection.immutable.LongMap import scala.collection.mutable.ListBuffer import scala.concurrent.Promise -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } import scala.util.control.NonFatal /** @@ -212,7 +212,7 @@ object CancelablePromise { case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } @tailrec @@ -262,7 +262,7 @@ object CancelablePromise { case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } @tailrec def unsafeSubscribe(cb: AnyRef): Cancelable = @@ -279,7 +279,7 @@ object CancelablePromise { case other => // $COVERAGE-OFF$ matchError(other) - // $COVERAGE-ON$ + // $COVERAGE-ON$ } private final class IdCancelable(id: Long) extends Cancelable { diff --git a/monix-execution/shared/src/main/scala/monix/execution/Features.scala b/monix-execution/shared/src/main/scala/monix/execution/Features.scala index fadca66cb..a4821509c 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Features.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Features.scala @@ -17,7 +17,7 @@ package monix.execution -import monix.execution.Features.{Flag, Flags} +import monix.execution.Features.{ Flag, Flags } /** `Features` describes a set of features described via * bitwise operators applied to ints, but made type safe. diff --git a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala index 78b08838d..05f77bdc1 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala @@ -20,8 +20,8 @@ package monix.execution import java.util.concurrent.TimeoutException import monix.execution.schedulers.TrampolineExecutionContext.immediate import scala.concurrent.duration._ -import scala.concurrent.{ExecutionContext, Future, Promise} -import scala.util.{Success, Try} +import scala.concurrent.{ ExecutionContext, Future, Promise } +import scala.util.{ Success, Try } /** Utilities for Scala's standard `concurrent.Future`. */ object FutureUtils extends internal.FutureUtilsForPlatform { @@ -38,10 +38,13 @@ object FutureUtils extends internal.FutureUtilsForPlatform { def timeout[A](source: Future[A], atMost: FiniteDuration)(implicit s: Scheduler): Future[A] = { val err = new TimeoutException val promise = Promise[A]() - val task = s.scheduleOnce(atMost.length, atMost.unit, + val task = s.scheduleOnce( + atMost.length, + atMost.unit, () => { promise.tryFailure(err); () - }) + } + ) source.onComplete { r => // canceling task to prevent waisted CPU resources and memory leaks @@ -66,13 +69,17 @@ object FutureUtils extends internal.FutureUtilsForPlatform { * source or with the fallback in case the timeout is reached */ def timeoutTo[A](source: Future[A], atMost: FiniteDuration, fallback: => Future[A])( - implicit s: Scheduler): Future[A] = { + implicit s: Scheduler + ): Future[A] = { val promise = Promise[Option[Try[A]]]() - val task = s.scheduleOnce(atMost.length, atMost.unit, + val task = s.scheduleOnce( + atMost.length, + atMost.unit, () => { promise.trySuccess(None); () - }) + } + ) source.onComplete { r => // canceling task to prevent waisted CPU resources and memory leaks @@ -157,4 +164,4 @@ object FutureUtils extends internal.FutureUtilsForPlatform { FutureUtils.delayedResult(delay)(result) } } -} \ No newline at end of file +} diff --git a/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala index d28d06bae..8b468fee0 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala @@ -24,14 +24,15 @@ import monix.execution.schedulers.SchedulerCompanionImpl import scala.annotation.implicitNotFound import scala.concurrent.ExecutionContext -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS, TimeUnit} +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS, TimeUnit } /** A Scheduler is an `scala.concurrent.ExecutionContext` that additionally can * schedule the execution of units of work to run with a delay or periodically. */ @implicitNotFound( "Cannot find an implicit Scheduler, either " + - "import monix.execution.Scheduler.Implicits.global or use a custom one") + "import monix.execution.Scheduler.Implicits.global or use a custom one" +) trait Scheduler extends ExecutionContext with UncaughtExceptionReporter with Executor { /** Schedules the given `command` for execution at some time in the future. * diff --git a/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala b/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala index 280dee78e..8582dc35a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala @@ -32,7 +32,8 @@ import scala.concurrent.ExecutionContext @implicitNotFound( "No ExceptionReporter was found in context for " + "reporting uncaught errors, either build one yourself or use " + - "an implicit Scheduler (schedulers are ExceptionReporters)") + "an implicit Scheduler (schedulers are ExceptionReporters)" +) trait UncaughtExceptionReporter extends Serializable { def reportFailure(ex: Throwable): Unit } diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala index 8b02cc1ca..983cb7bc0 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala @@ -18,7 +18,7 @@ package monix.execution.cancelables import monix.execution.Cancelable -import monix.execution.Cancelable.{Empty, IsDummy} +import monix.execution.Cancelable.{ Empty, IsDummy } /** Represents a class of cancelables that can hold * an internal reference to another cancelable (and thus diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala index 38ab614c3..9f47623a3 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala @@ -18,7 +18,7 @@ package monix.execution.cancelables import monix.execution.Cancelable -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import scala.annotation.tailrec /** Represents a composite of multiple cancelables. In case it is canceled, all @@ -74,7 +74,7 @@ import scala.annotation.tailrec final class CompositeCancelable private (stateRef: AtomicAny[CompositeCancelable.State]) extends BooleanCancelable { self => - import CompositeCancelable.{Active, Cancelled} + import CompositeCancelable.{ Active, Cancelled } override def isCanceled: Boolean = stateRef.get() eq Cancelled diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala index e4b7efbbd..7c5697081 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala @@ -19,7 +19,7 @@ package monix.execution.cancelables import monix.execution.Cancelable import monix.execution.Cancelable.IsDummy -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import scala.annotation.tailrec diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala index 4ec911eb2..6ad81da15 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala @@ -18,7 +18,7 @@ package monix.execution.cancelables import monix.execution.Cancelable -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import scala.annotation.tailrec /** Represents a [[monix.execution.Cancelable Cancelable]] whose @@ -64,7 +64,7 @@ import scala.annotation.tailrec */ final class OrderedCancelable private (initial: Cancelable) extends AssignableCancelable.Multi { - import OrderedCancelable.{Active, Cancelled, State} + import OrderedCancelable.{ Active, Cancelled, State } private[this] val state = { val ref = if (initial != null) initial else Cancelable.empty diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala index fbcfb365b..0c0b031a4 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala @@ -18,7 +18,7 @@ package monix.execution.cancelables import monix.execution.Cancelable -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import scala.annotation.tailrec /** Represents a [[monix.execution.Cancelable]] whose underlying cancelable diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala index aa9411b5b..45677eb52 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala @@ -110,7 +110,8 @@ final class SingleAssignCancelable private (extra: Cancelable) extends Assignabl private def raiseError(): Nothing = { throw new IllegalStateException( "Cannot assign to SingleAssignmentCancelable, " + - "as it was already assigned once") + "as it was already assigned once" + ) } private[this] val state = AtomicAny(Empty: State) diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala index 273518854..184c6eb6a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala @@ -18,7 +18,7 @@ package monix.execution.cancelables import monix.execution.Cancelable -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import scala.annotation.tailrec /** Represents a composite of cancelables that are stacked, diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala index 5025e39ef..10fb1d3e8 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala @@ -18,7 +18,7 @@ package monix.execution.exceptions import scala.runtime.AbstractFunction1 -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } /** Generic exception thrown on API contract violations. */ class APIContractViolationException(val message: String, cause: Throwable) diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala index d14172d5c..b01470705 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala @@ -19,7 +19,7 @@ package monix.execution.internal import monix.execution.UncaughtExceptionReporter -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } /** Internal API — some utilities for working with cats-effect * callbacks. diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala index c2e0828b6..08dab8627 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala @@ -17,7 +17,7 @@ package monix.execution.internal -import scala.util.{Success, Try} +import scala.util.{ Success, Try } /** * Reusable references used in Monix's implementation. diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala index 7714891e9..47e9cf914 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala @@ -230,7 +230,8 @@ private[monix] object GenericSemaphore { private final case class State( available: Long, awaitPermits: Queue[(Long, Listener[Unit])], - awaitReleases: List[(Long, Listener[Unit])]) { + awaitReleases: List[(Long, Listener[Unit])] + ) { def count: Long = { if (available > 0) available diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala index 9dc869a35..7bd3126c2 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala @@ -17,7 +17,7 @@ package monix.execution.internal -import monix.execution.atomic.{AtomicAny, PaddingStrategy} +import monix.execution.atomic.{ AtomicAny, PaddingStrategy } import monix.execution.internal.collection.LinkedMap import scala.annotation.tailrec @@ -276,8 +276,8 @@ private[monix] object GenericVar { */ private final case class WaitForPut[A]( reads: LinkedMap[Id, Either[Nothing, A] => Unit], - takes: LinkedMap[Id, Either[Nothing, A] => Unit]) - extends State[A] + takes: LinkedMap[Id, Either[Nothing, A] => Unit] + ) extends State[A] /** `AsyncVar` state signaling it has one or more values enqueued, * to be signaled on the next `take`. diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala index 0e2ace1df..ead027dc2 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala @@ -20,7 +20,7 @@ package monix.execution.internal import monix.execution.internal.collection.ChunkedArrayQueue import scala.util.control.NonFatal import scala.annotation.tailrec -import scala.concurrent.{BlockContext, CanAwait, ExecutionContext} +import scala.concurrent.{ BlockContext, CanAwait, ExecutionContext } private[execution] class Trampoline { private def makeQueue(): ChunkedArrayQueue[Runnable] = ChunkedArrayQueue[Runnable](chunkSize = 16) diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala index bfa463e96..05b95d637 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala @@ -23,8 +23,8 @@ private[monix] final class ChunkedArrayQueue[A] private ( initialTailIndex: Int, initialHeadArray: Array[AnyRef], initialHeadIndex: Int, - chunkSize: Int) - extends Serializable { self => + chunkSize: Int +) extends Serializable { self => assert(chunkSize > 1, "chunkSize > 1") diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala index 47f940197..3d28f4f6b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala @@ -27,7 +27,8 @@ import scala.collection.immutable.LongMap private[monix] class LinkedMap[K, +V]( val entries: Map[K, (V, Long)], private[this] val insertionOrder: LongMap[K], - private[this] val nextId: Long) { + private[this] val nextId: Long +) { /** Returns `true` if this map is empty, or `false` otherwise. */ def isEmpty: Boolean = @@ -47,7 +48,8 @@ private[monix] class LinkedMap[K, +V]( .get(k) .map { case (_, id) => insertionOrder - id } .getOrElse(insertionOrder), - nextId) + nextId + ) /** The keys in this map, in the order they were added. */ def keys: Iterable[K] = insertionOrder.values diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala index a2515bd82..81ecfce87 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala @@ -21,7 +21,7 @@ private[monix] object exceptions { /** * To use in `case _ =>` branches that are absurd, but needed * due to the compiler complaining. - */ + */ def matchError[A](received: A): Nothing = throw new scala.MatchError(received) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala index 15d8885bb..a886eae87 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala @@ -17,7 +17,7 @@ package monix.execution.internal -import scala.math.{ceil, round} +import scala.math.{ ceil, round } private[monix] object math { /** Natural log of 2 */ diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala index b10c73721..c1e7e5a98 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala @@ -18,7 +18,7 @@ package monix.execution.misc import implicitbox.Not -import monix.execution.{CancelableFuture, FutureUtils} +import monix.execution.{ CancelableFuture, FutureUtils } import monix.execution.schedulers.TrampolineExecutionContext import scala.annotation.implicitNotFound @@ -142,10 +142,13 @@ private[misc] abstract class CanIsolateInstancesLevel0 { try { FutureUtils - .transform[Any, Any](f, result => { - Local.setContext(prev) - result - })(TrampolineExecutionContext.immediate) + .transform[Any, Any]( + f, + result => { + Local.setContext(prev) + result + } + )(TrampolineExecutionContext.immediate) } finally { Local.setContext(prev) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala index 3fecad07f..e9fa2eafe 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala @@ -19,11 +19,11 @@ package monix.execution.schedulers import monix.execution.cancelables.OrderedCancelable import monix.execution.schedulers.ReferenceScheduler.WrappedScheduler -import monix.execution.{Cancelable, Features, Scheduler, UncaughtExceptionReporter} -import scala.concurrent.duration.{MILLISECONDS, NANOSECONDS, TimeUnit} +import monix.execution.{ Cancelable, Features, Scheduler, UncaughtExceptionReporter } +import scala.concurrent.duration.{ MILLISECONDS, NANOSECONDS, TimeUnit } import monix.execution.internal.InterceptRunnable // Prevents conflict with the deprecated symbol -import monix.execution.{ExecutionModel => ExecModel} +import monix.execution.{ ExecutionModel => ExecModel } /** Helper for building a [[Scheduler]]. * @@ -49,7 +49,8 @@ trait ReferenceScheduler extends Scheduler { () => { r.run() loop(delay, delay) - }) + } + ) () } } diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala index 831c63693..0a58d6fa1 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala @@ -17,11 +17,11 @@ package monix.execution.schedulers -import monix.execution.{Scheduler, UncaughtExceptionReporter, ExecutionModel => ExecModel} +import monix.execution.{ ExecutionModel => ExecModel, Scheduler, UncaughtExceptionReporter } import monix.execution.internal.Platform import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.concurrent.{ExecutionContext, Future} -import scala.concurrent.duration.{FiniteDuration, TimeUnit} +import scala.concurrent.{ ExecutionContext, Future } +import scala.concurrent.duration.{ FiniteDuration, TimeUnit } /** A [[monix.execution.Scheduler Scheduler]] type that provides * methods for managing termination. diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala index 60a8cec5a..922dc3ed6 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala @@ -25,7 +25,7 @@ import monix.execution.schedulers.TestScheduler._ import scala.annotation.tailrec import scala.collection.immutable.SortedSet -import scala.concurrent.duration.{Duration, FiniteDuration, TimeUnit} +import scala.concurrent.duration.{ Duration, FiniteDuration, TimeUnit } import scala.util.Random /** [[Scheduler]] and a provider of `cats.effect.Timer` instances, @@ -127,8 +127,8 @@ import scala.util.Random */ final class TestScheduler private ( private[this] val stateRef: AtomicAny[State], - override val executionModel: ExecutionModel) - extends ReferenceScheduler with BatchingScheduler { + override val executionModel: ExecutionModel +) extends ReferenceScheduler with BatchingScheduler { /** * Returns the internal state of the `TestScheduler`, useful for testing @@ -338,7 +338,8 @@ object TestScheduler { clock = Duration.Zero, tasks = SortedSet.empty[Task], lastReportedError = null - )) + ) + ) new TestScheduler(state, executionModel) } @@ -387,7 +388,8 @@ object TestScheduler { state: State, delay: FiniteDuration, r: Runnable, - cancelTask: Task => Unit): (Cancelable, State) = { + cancelTask: Task => Unit + ): (Cancelable, State) = { // $COVERAGE-OFF$ require(delay >= Duration.Zero, "The given delay must be positive") // $COVERAGE-ON$ @@ -409,6 +411,7 @@ object TestScheduler { state.copy( lastID = newID, tasks = state.tasks + task - )) + ) + ) } } diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala index c95e6e76e..cf817d59b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala @@ -18,7 +18,7 @@ package monix.execution.schedulers import scala.concurrent.duration.TimeUnit -import monix.execution.{Cancelable, Features, Scheduler, UncaughtExceptionReporter, ExecutionModel => ExecModel} +import monix.execution.{ Cancelable, ExecutionModel => ExecModel, Features, Scheduler, UncaughtExceptionReporter } import scala.concurrent.ExecutionContext /** The `TracingScheduler` is a [[monix.execution.Scheduler Scheduler]] diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala index f2e292bf4..b505423d1 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala @@ -17,9 +17,9 @@ package monix.execution.schedulers -import monix.execution.{ExecutionModel, UncaughtExceptionReporter} +import monix.execution.{ ExecutionModel, UncaughtExceptionReporter } import scala.concurrent.duration.TimeUnit -import scala.concurrent.{ExecutionContext, Future} +import scala.concurrent.{ ExecutionContext, Future } /** The `TracingScheduler` is a [[monix.execution.Scheduler Scheduler]] * implementation that wraps another diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala index f25673999..7c365c1ec 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala @@ -18,9 +18,9 @@ package monix.execution.schedulers import java.util.concurrent.TimeUnit -import monix.execution.{Cancelable, Features, Scheduler, UncaughtExceptionReporter} +import monix.execution.{ Cancelable, Features, Scheduler, UncaughtExceptionReporter } // Prevents conflict with the deprecated symbol -import monix.execution.{ExecutionModel => ExecModel} +import monix.execution.{ ExecutionModel => ExecModel } /** A [[monix.execution.Scheduler Scheduler]] implementation * that executes runnables immediately, on the current thread, diff --git a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala index 5dee491ae..b966d90b7 100644 --- a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala @@ -17,7 +17,7 @@ package monix.execution -import scala.collection.{BuildFrom => ScalaBuildFrom} +import scala.collection.{ BuildFrom => ScalaBuildFrom } import scala.collection.mutable object compat { diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala index c246fd6d1..d081f1832 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala @@ -47,7 +47,7 @@ trait InlineMacros { case i @ Ident(_) if i.name == symbol => value case tt: TypeTree if tt.original != null => - //super.transform(TypeTree().setOriginal(transform(tt.original))) + // super.transform(TypeTree().setOriginal(transform(tt.original))) super.transform(c.universe.internal.setOriginal(TypeTree(), transform(tt.original))) case _ => super.transform(tree) @@ -60,13 +60,15 @@ trait InlineMacros { override def transform(tree: Tree): Tree = tree match { case Apply(Select(Function(params, body), ApplyName), args) => - params.zip(args).foldLeft(body) { case (b, (param, arg)) => - inlineSymbol(param.name, b, arg) + params.zip(args).foldLeft(body) { + case (b, (param, arg)) => + inlineSymbol(param.name, b, arg) } case Apply(Function(params, body), args) => - params.zip(args).foldLeft(body) { case (b, (param, arg)) => - inlineSymbol(param.name, b, arg) + params.zip(args).foldLeft(body) { + case (b, (param, arg)) => + inlineSymbol(param.name, b, arg) } case _ => @@ -93,11 +95,13 @@ trait InlineMacros { tree match { case UnApply( Apply(Select(qualifier, nme.unapply | nme.unapplySeq), List(Ident(nme.SELECTOR_DUMMY))), - args) => + args + ) => Apply(transform(qualifier), transformTrees(args)) case UnApply( Apply(TypeApply(Select(qualifier, nme.unapply | nme.unapplySeq), _), List(Ident(nme.SELECTOR_DUMMY))), - args) => + args + ) => Apply(transform(qualifier), transformTrees(args)) case t => t } diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala index b5a866307..b9f0fff14 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala @@ -257,7 +257,6 @@ object Local extends LocalCompanionDeprecated { ) extends Context } - /** A `Local` is a [[ThreadLocal]] whose scope is flexible. The state * of all Locals may be saved or restored onto the current thread by * the user. This is useful for threading Locals through execution @@ -332,4 +331,4 @@ final class Local[A](default: () => A) extends LocalDeprecated[A] { */ def clear(): Unit = Local.clearKey(key) -} \ No newline at end of file +} diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala index 71134cbb7..237f44fc7 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala @@ -17,7 +17,7 @@ package monix.execution.misc.test -import monix.execution.misc.{HygieneUtilMacros, InlineMacros} +import monix.execution.misc.{ HygieneUtilMacros, InlineMacros } import scala.reflect.macros.whitebox /** Represents a boxed value, to be used in the testing diff --git a/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala index 31a494ddf..315643034 100644 --- a/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala @@ -17,7 +17,7 @@ package monix.execution -import scala.collection.{BuildFrom => ScalaBuildFrom} +import scala.collection.{ BuildFrom => ScalaBuildFrom } import scala.collection.mutable object compat { @@ -42,30 +42,30 @@ object compat { opaque type Flag = Long extension (x: Flag) { - def & (y: Flag): Flag = x & y + def &(y: Flag): Flag = x & y } opaque type Flags = Long extension (x: Flags) { @targetName("and") - def & (y: Flags): Flags = x & y + def &(y: Flags): Flags = x & y @targetName("and2") - def & (y: Flag): Flags = x & y + def &(y: Flag): Flags = x & y @targetName("or") - def | (y: Flags): Flags = x | y + def |(y: Flags): Flags = x | y @targetName("or2") - def | (y: Flag): Flags = x | y + def |(y: Flag): Flags = x | y def unary_~ : Flags = ~x } extension (x: Long) { @targetName("or3") - def | (y: Flag): Long = x | y + def |(y: Flag): Long = x | y } } } diff --git a/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala index 0d786269f..58df9e7c3 100644 --- a/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala @@ -132,8 +132,10 @@ object Local extends LocalCompanionDeprecated { /** If `b` evaluates to `true`, execute a block of code using a current * state of `Local.Context` and restore the current state when complete. */ - private[monix] inline def bindCurrentIf[R](b: Boolean)(inline f: => R)(implicit cb: CanBindLocals[R] = CanBindLocals.synchronous[R]): R = - if (!b) f else Local.isolate(f) + private[monix] inline def bindCurrentIf[R](b: Boolean)(inline f: => R)(implicit + cb: CanBindLocals[R] = CanBindLocals.synchronous[R] + ): R = + if (!b) f else Local.isolate(f) /** Represents the current state of all [[Local locals]] for a given * execution context. @@ -232,7 +234,6 @@ object Local extends LocalCompanionDeprecated { ) extends Context } - /** A `Local` is a [[ThreadLocal]] whose scope is flexible. The state * of all Locals may be saved or restored onto the current thread by * the user. This is useful for threading Locals through execution @@ -307,4 +308,4 @@ final class Local[A](default: () => A) extends LocalDeprecated[A] { */ def clear(): Unit = Local.clearKey(key) -} \ No newline at end of file +} diff --git a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala index a3af5d289..92711c440 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala @@ -18,13 +18,13 @@ package monix.execution import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler import monix.execution.internal.Platform -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success, Try } object AckSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala index b89aef39c..3ee9d0836 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala @@ -19,8 +19,8 @@ package monix.execution import java.util.concurrent.atomic.AtomicLong import minitest.TestSuite -import monix.execution.BufferCapacity.{Bounded, Unbounded} -import monix.execution.ChannelType.{MPMC, MPSC, SPMC, SPSC} +import monix.execution.BufferCapacity.{ Bounded, Unbounded } +import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import scala.collection.immutable.Queue @@ -120,7 +120,8 @@ abstract class BaseAsyncQueueSuite[S <: Scheduler] extends TestSuite[S] { if (n > 0) queue.poll().flatMap { a => consumer(n - 1, acc.enqueue(a)) - } else + } + else Future.successful(acc.foldLeft(0L)(_ + _)) val p = producer(count) diff --git a/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala index 9da2e8ada..95e056aa4 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala @@ -20,8 +20,8 @@ package monix.execution import minitest.TestSuite import monix.execution.schedulers.TestScheduler import monix.execution.internal.Platform -import scala.concurrent.{ExecutionContext, Future, Promise} -import scala.util.{Random, Success} +import scala.concurrent.{ ExecutionContext, Future, Promise } +import scala.util.{ Random, Success } object AsyncSemaphoreSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -218,7 +218,7 @@ object AsyncSemaphoreSuite extends TestSuite[TestScheduler] { assertEquals(r, count) assertEquals(semaphore.available(), available) } - } + } } def repeatTest(n: Int)(f: () => Future[Unit])(implicit ec: ExecutionContext): Future[Unit] = diff --git a/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala index a83207a5c..cd7466248 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala @@ -27,12 +27,12 @@ import monix.execution.exceptions.DummyException import org.scalacheck.Test.Parameters import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import org.scalacheck.{Arbitrary, Cogen, Gen, Prop} +import org.scalacheck.{ Arbitrary, Cogen, Gen, Prop } import org.typelevel.discipline.Laws import scala.concurrent.duration._ -import scala.concurrent.{ExecutionException, Future} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ ExecutionException, Future } +import scala.util.{ Failure, Success, Try } import scala.language.implicitConversions diff --git a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala index 40ef2ba53..2393892ca 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala @@ -18,11 +18,11 @@ package monix.execution import minitest.TestSuite -import monix.execution.exceptions.{CallbackCalledMultipleTimesException, DummyException} +import monix.execution.exceptions.{ CallbackCalledMultipleTimesException, DummyException } import monix.execution.schedulers.TestScheduler import scala.concurrent.Promise -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object CallbackSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -72,7 +72,8 @@ object CallbackSuite extends TestSuite[TestScheduler] { }, { e => result = Some(Failure(e)) - }) + } + ) val stringCallback = callback.contramap[String](_.toInt) val dummy = DummyException("dummy") diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala index 7914b5264..a6f07d96d 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala @@ -18,13 +18,13 @@ package monix.execution import minitest.TestSuite -import monix.execution.cancelables.{BooleanCancelable, ChainedCancelable} +import monix.execution.cancelables.{ BooleanCancelable, ChainedCancelable } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success, Try } object CancelableFutureSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -531,7 +531,8 @@ object CancelableFutureSuite extends TestSuite[TestScheduler] { CancelableFuture.never[Unit], Cancelable { () => c.cancel() - }) + } + ) } assert(first.isCompleted, "!first.isCompleted") diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala index 0190a8622..00957597c 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala @@ -21,7 +21,7 @@ import minitest.SimpleTestSuite import monix.execution.exceptions.DummyException import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CancelablePromiseSuite extends SimpleTestSuite { test("completes in success") { diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala index 7a390a0a2..1d91505a1 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala @@ -18,7 +18,7 @@ package monix.execution import minitest.SimpleTestSuite -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.schedulers.TestScheduler import monix.execution.internal.Platform import scala.concurrent.Promise diff --git a/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala index b019c8d6a..1ef7b7368 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala @@ -20,7 +20,7 @@ package monix.execution import cats.implicits._ import minitest.SimpleTestSuite import minitest.laws.Checkers -import monix.execution.Features.{Flag, Flags} +import monix.execution.Features.{ Flag, Flags } import org.scalacheck.Arbitrary object FeaturesSuite extends SimpleTestSuite with Checkers { @@ -31,7 +31,7 @@ object FeaturesSuite extends SimpleTestSuite with Checkers { test("Features.intersect") { check2 { (f1: Features, f2: Features) => - val r = f1 intersect f2 + val r = f1.intersect(f2) allFlags.forall { flag => (f1.contains(flag) && f2.contains(flag)) === r.contains(flag) } @@ -40,7 +40,7 @@ object FeaturesSuite extends SimpleTestSuite with Checkers { test("Features.union") { check2 { (f1: Features, f2: Features) => - val r = f1 union f2 + val r = f1.union(f2) allFlags.forall { flag => (f1.contains(flag) || f2.contains(flag)) === r.contains(flag) } @@ -49,7 +49,7 @@ object FeaturesSuite extends SimpleTestSuite with Checkers { test("Features.diff") { check2 { (f1: Features, f2: Features) => - val r = f1 diff f2 + val r = f1.diff(f2) allFlags.forall { flag => if (f2.contains(flag)) !r.contains(flag) diff --git a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala index 053402201..a84331c20 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala @@ -22,8 +22,8 @@ import monix.execution.FutureUtils.extensions._ import monix.execution.schedulers.TestScheduler import scala.concurrent.duration._ -import scala.concurrent.{Future, TimeoutException} -import scala.util.{Failure, Success, Try} +import scala.concurrent.{ Future, TimeoutException } +import scala.util.{ Failure, Success, Try } object FutureUtilsSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -82,10 +82,12 @@ object FutureUtilsSuite extends TestSuite[TestScheduler] { val expected = 15 val f = Future .delayedResult(50.millis)(expected) - .timeoutTo(100.millis, { - called = true - Future.failed(new RuntimeException) - }) + .timeoutTo( + 100.millis, { + called = true + Future.failed(new RuntimeException) + } + ) s.tick(1.second) assertEquals(f.value, Some(Success(expected))) diff --git a/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala b/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala index eeadf768f..5e3949b22 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala @@ -18,7 +18,7 @@ package monix.execution import monix.execution.internal.Platform -import java.io.{ByteArrayOutputStream, PrintStream} +import java.io.{ ByteArrayOutputStream, PrintStream } import scala.util.control.NonFatal /** diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala index 0b64b22f8..0343449f1 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala @@ -28,7 +28,8 @@ abstract class AtomicNumberSuite[A, R <: AtomicNumber[A]]( minValue: A, hasOverflow: Boolean = true, allowPlatformIntrinsics: Boolean, - allowUnsafe: Boolean)(implicit ev: Numeric[A]) + allowUnsafe: Boolean +)(implicit ev: Numeric[A]) extends SimpleTestSuite { def Atomic(initial: A): R = { @@ -348,7 +349,8 @@ abstract class AtomicDoubleSuite(strategy: PaddingStrategy, allowPlatformIntrins Double.MinValue, hasOverflow = false, allowPlatformIntrinsics, - allowUnsafe) { + allowUnsafe + ) { test("should store MinPositiveValue, NaN, NegativeInfinity, PositiveInfinity") { assert(Atomic(Double.MinPositiveValue).get() == Double.MinPositiveValue) @@ -367,7 +369,8 @@ abstract class AtomicFloatSuite(strategy: PaddingStrategy, allowPlatformIntrinsi Float.MinValue, hasOverflow = false, allowPlatformIntrinsics, - allowUnsafe) { + allowUnsafe + ) { test("should store MinPositiveValue, NaN, NegativeInfinity, PositiveInfinity") { assert(Atomic(Float.MinPositiveValue).get() == Float.MinPositiveValue) @@ -391,7 +394,8 @@ object AtomicLongNoPaddingSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntNoPaddingSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -401,7 +405,8 @@ object AtomicIntNoPaddingSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortNoPaddingSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -411,7 +416,8 @@ object AtomicShortNoPaddingSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteNoPaddingSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -421,7 +427,8 @@ object AtomicByteNoPaddingSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharNoPaddingSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -431,7 +438,8 @@ object AtomicCharNoPaddingSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyNoPaddingSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -441,7 +449,8 @@ object AtomicNumberAnyNoPaddingSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 8) @@ -456,7 +465,8 @@ object AtomicLongLeft64Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft64Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -466,7 +476,8 @@ object AtomicIntLeft64Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft64Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -476,7 +487,8 @@ object AtomicShortLeft64Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft64Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -486,7 +498,8 @@ object AtomicByteLeft64Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft64Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -496,7 +509,8 @@ object AtomicCharLeft64Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft64Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -506,7 +520,8 @@ object AtomicNumberAnyLeft64Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 8) @@ -521,7 +536,8 @@ object AtomicLongRight64Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight64Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -531,7 +547,8 @@ object AtomicIntRight64Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight64Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -541,7 +558,8 @@ object AtomicShortRight64Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight64Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -551,7 +569,8 @@ object AtomicByteRight64Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight64Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -561,7 +580,8 @@ object AtomicCharRight64Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight64Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -571,7 +591,8 @@ object AtomicNumberAnyRight64Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 8) @@ -588,7 +609,8 @@ object AtomicLongLeftRight128Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight128Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -598,7 +620,8 @@ object AtomicIntLeftRight128Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight128Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -608,7 +631,8 @@ object AtomicShortLeftRight128Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight128Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -618,7 +642,8 @@ object AtomicByteLeftRight128Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight128Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -628,7 +653,8 @@ object AtomicCharLeftRight128Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight128Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -638,7 +664,8 @@ object AtomicNumberAnyLeftRight128Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 8) @@ -653,7 +680,8 @@ object AtomicLongLeft128Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft128Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -663,7 +691,8 @@ object AtomicIntLeft128Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft128Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -673,7 +702,8 @@ object AtomicShortLeft128Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft128Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -683,7 +713,8 @@ object AtomicByteLeft128Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft128Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -693,7 +724,8 @@ object AtomicCharLeft128Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft128Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -703,7 +735,8 @@ object AtomicNumberAnyLeft128Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 8) @@ -718,7 +751,8 @@ object AtomicLongRight128Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight128Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -728,7 +762,8 @@ object AtomicIntRight128Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight128Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -738,7 +773,8 @@ object AtomicShortRight128Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight128Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -748,7 +784,8 @@ object AtomicByteRight128Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight128Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -758,7 +795,8 @@ object AtomicCharRight128Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight128Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -768,7 +806,8 @@ object AtomicNumberAnyRight128Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 8) @@ -785,7 +824,8 @@ object AtomicLongLeftRight256Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight256Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -795,7 +835,8 @@ object AtomicIntLeftRight256Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight256Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -805,7 +846,8 @@ object AtomicShortLeftRight256Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight256Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -815,7 +857,8 @@ object AtomicByteLeftRight256Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight256Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -825,7 +868,8 @@ object AtomicCharLeftRight256Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight256Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -835,7 +879,8 @@ object AtomicNumberAnyLeftRight256Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // ------------------ Java 7 @@ -854,7 +899,8 @@ object AtomicLongNoPaddingJava7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntNoPaddingJava7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -864,7 +910,8 @@ object AtomicIntNoPaddingJava7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortNoPaddingJava7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -874,7 +921,8 @@ object AtomicShortNoPaddingJava7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteNoPaddingJava7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -884,7 +932,8 @@ object AtomicByteNoPaddingJava7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharNoPaddingJava7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -894,7 +943,8 @@ object AtomicCharNoPaddingJava7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyNoPaddingJava7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -904,7 +954,8 @@ object AtomicNumberAnyNoPaddingJava7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 7) @@ -920,7 +971,8 @@ object AtomicLongLeft64Java7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft64Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -930,7 +982,8 @@ object AtomicIntLeft64Java7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft64Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -940,7 +993,8 @@ object AtomicShortLeft64Java7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft64Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -950,7 +1004,8 @@ object AtomicByteLeft64Java7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft64Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -960,7 +1015,8 @@ object AtomicCharLeft64Java7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft64Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -970,7 +1026,8 @@ object AtomicNumberAnyLeft64Java7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 7) @@ -987,7 +1044,8 @@ object AtomicLongRight64Java7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight64Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -997,7 +1055,8 @@ object AtomicIntRight64Java7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight64Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1007,7 +1066,8 @@ object AtomicShortRight64Java7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight64Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1017,7 +1077,8 @@ object AtomicByteRight64Java7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight64Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1027,7 +1088,8 @@ object AtomicCharRight64Java7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight64Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1037,7 +1099,8 @@ object AtomicNumberAnyRight64Java7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 7) @@ -1054,7 +1117,8 @@ object AtomicLongLeftRight128Java7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight128Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1064,7 +1128,8 @@ object AtomicIntLeftRight128Java7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight128Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1074,7 +1139,8 @@ object AtomicShortLeftRight128Java7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight128Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1084,7 +1150,8 @@ object AtomicByteLeftRight128Java7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight128Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1094,7 +1161,8 @@ object AtomicCharLeftRight128Java7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight128Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1104,7 +1172,8 @@ object AtomicNumberAnyLeftRight128Java7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 7) @@ -1121,7 +1190,8 @@ object AtomicLongLeft128Java7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft128Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1131,7 +1201,8 @@ object AtomicIntLeft128Java7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft128Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1141,7 +1212,8 @@ object AtomicShortLeft128Java7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft128Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1151,7 +1223,8 @@ object AtomicByteLeft128Java7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft128Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1161,7 +1234,8 @@ object AtomicCharLeft128Java7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft128Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1171,7 +1245,8 @@ object AtomicNumberAnyLeft128Java7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 7) @@ -1188,7 +1263,8 @@ object AtomicLongRight128Java7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight128Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1198,7 +1274,8 @@ object AtomicIntRight128Java7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight128Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1208,7 +1285,8 @@ object AtomicShortRight128Java7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight128Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1218,7 +1296,8 @@ object AtomicByteRight128Java7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight128Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1228,7 +1307,8 @@ object AtomicCharRight128Java7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight128Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1238,7 +1318,8 @@ object AtomicNumberAnyRight128Java7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 7) @@ -1255,7 +1336,8 @@ object AtomicLongLeftRight256Java7Suite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight256Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1265,7 +1347,8 @@ object AtomicIntLeftRight256Java7Suite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight256Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1275,7 +1358,8 @@ object AtomicShortLeftRight256Java7Suite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight256Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1285,7 +1369,8 @@ object AtomicByteLeftRight256Java7Suite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight256Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1295,7 +1380,8 @@ object AtomicCharLeftRight256Java7Suite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight256Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1305,7 +1391,8 @@ object AtomicNumberAnyLeftRight256Java7Suite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // ------------------ Java X @@ -1324,7 +1411,8 @@ object AtomicLongNoPaddingJavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntNoPaddingJavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1334,7 +1422,8 @@ object AtomicIntNoPaddingJavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortNoPaddingJavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1344,7 +1433,8 @@ object AtomicShortNoPaddingJavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteNoPaddingJavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1354,7 +1444,8 @@ object AtomicByteNoPaddingJavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharNoPaddingJavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1364,7 +1455,8 @@ object AtomicCharNoPaddingJavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyNoPaddingJavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1374,7 +1466,8 @@ object AtomicNumberAnyNoPaddingJavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left64 (Java X) @@ -1391,7 +1484,8 @@ object AtomicLongLeft64JavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeft64JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1401,7 +1495,8 @@ object AtomicIntLeft64JavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeft64JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1411,7 +1506,8 @@ object AtomicShortLeft64JavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeft64JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1421,7 +1517,8 @@ object AtomicByteLeft64JavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeft64JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1431,7 +1528,8 @@ object AtomicCharLeft64JavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeft64JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1441,7 +1539,8 @@ object AtomicNumberAnyLeft64JavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right64 (Java X) @@ -1458,7 +1557,8 @@ object AtomicLongRight64JavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntRight64JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1468,7 +1568,8 @@ object AtomicIntRight64JavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortRight64JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1478,7 +1579,8 @@ object AtomicShortRight64JavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteRight64JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1488,7 +1590,8 @@ object AtomicByteRight64JavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharRight64JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1498,7 +1601,8 @@ object AtomicCharRight64JavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyRight64JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1508,7 +1612,8 @@ object AtomicNumberAnyRight64JavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight128 (Java X) @@ -1525,7 +1630,8 @@ object AtomicLongLeftRight128JavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeftRight128JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1535,7 +1641,8 @@ object AtomicIntLeftRight128JavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeftRight128JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1545,7 +1652,8 @@ object AtomicShortLeftRight128JavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeftRight128JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1555,7 +1663,8 @@ object AtomicByteLeftRight128JavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeftRight128JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1565,7 +1674,8 @@ object AtomicCharLeftRight128JavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeftRight128JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1575,7 +1685,8 @@ object AtomicNumberAnyLeftRight128JavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left128 (Java X) @@ -1592,7 +1703,8 @@ object AtomicLongLeft128JavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeft128JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1602,7 +1714,8 @@ object AtomicIntLeft128JavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeft128JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1612,7 +1725,8 @@ object AtomicShortLeft128JavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeft128JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1622,7 +1736,8 @@ object AtomicByteLeft128JavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeft128JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1632,7 +1747,8 @@ object AtomicCharLeft128JavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeft128JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1642,7 +1758,8 @@ object AtomicNumberAnyLeft128JavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right128 (Java X) @@ -1659,7 +1776,8 @@ object AtomicLongRight128JavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntRight128JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1669,7 +1787,8 @@ object AtomicIntRight128JavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortRight128JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1679,7 +1798,8 @@ object AtomicShortRight128JavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteRight128JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1689,7 +1809,8 @@ object AtomicByteRight128JavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharRight128JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1699,7 +1820,8 @@ object AtomicCharRight128JavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyRight128JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1709,7 +1831,8 @@ object AtomicNumberAnyRight128JavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight256 (Java X) @@ -1726,7 +1849,8 @@ object AtomicLongLeftRight256JavaXSuite Long.MaxValue, Long.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeftRight256JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1736,7 +1860,8 @@ object AtomicIntLeftRight256JavaXSuite Int.MaxValue, Int.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeftRight256JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1746,7 +1871,8 @@ object AtomicShortLeftRight256JavaXSuite Short.MaxValue, Short.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeftRight256JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1756,7 +1882,8 @@ object AtomicByteLeftRight256JavaXSuite Byte.MaxValue, Byte.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeftRight256JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1766,7 +1893,8 @@ object AtomicCharLeftRight256JavaXSuite Char.MaxValue, Char.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeftRight256JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1776,4 +1904,5 @@ object AtomicNumberAnyLeftRight256JavaXSuite BoxedLong.MaxValue, BoxedLong.MinValue, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala index 2c23d76b1..93f86b3b9 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala @@ -28,8 +28,8 @@ abstract class GenericAtomicSuite[A, R <: Atomic[A]]( valueFromInt: Int => A, valueToInt: A => Int, allowPlatformIntrinsics: Boolean, - allowUnsafe: Boolean) - extends SimpleTestSuite { + allowUnsafe: Boolean +) extends SimpleTestSuite { def Atomic(initial: A): R = { if (allowUnsafe) @@ -292,7 +292,8 @@ object GenericAtomicAnyNoPadding x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanNoPadding extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -301,7 +302,8 @@ object GenericAtomicBooleanNoPadding x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyNoPadding extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -310,7 +312,8 @@ object GenericAtomicNumberAnyNoPadding x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatNoPadding extends GenericAtomicSuite[Float, AtomicFloat]( @@ -319,7 +322,8 @@ object GenericAtomicFloatNoPadding x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleNoPadding extends GenericAtomicSuite[Double, AtomicDouble]( @@ -328,7 +332,8 @@ object GenericAtomicDoubleNoPadding x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortNoPadding extends GenericAtomicSuite[Short, AtomicShort]( @@ -337,7 +342,8 @@ object GenericAtomicShortNoPadding x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteNoPadding extends GenericAtomicSuite[Byte, AtomicByte]( @@ -346,7 +352,8 @@ object GenericAtomicByteNoPadding x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharNoPadding extends GenericAtomicSuite[Char, AtomicChar]( @@ -355,7 +362,8 @@ object GenericAtomicCharNoPadding x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntNoPadding extends GenericAtomicSuite[Int, AtomicInt]( @@ -364,7 +372,8 @@ object GenericAtomicIntNoPadding x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongNoPadding extends GenericAtomicSuite[Long, AtomicLong]( @@ -373,7 +382,8 @@ object GenericAtomicLongNoPadding x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 8) @@ -384,7 +394,8 @@ object GenericAtomicAnyLeft64 x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft64 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -393,7 +404,8 @@ object GenericAtomicBooleanLeft64 x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft64 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -402,7 +414,8 @@ object GenericAtomicNumberAnyLeft64 x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft64 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -411,7 +424,8 @@ object GenericAtomicFloatLeft64 x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft64 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -420,7 +434,8 @@ object GenericAtomicDoubleLeft64 x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft64 extends GenericAtomicSuite[Short, AtomicShort]( @@ -429,7 +444,8 @@ object GenericAtomicShortLeft64 x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft64 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -438,7 +454,8 @@ object GenericAtomicByteLeft64 x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft64 extends GenericAtomicSuite[Char, AtomicChar]( @@ -447,7 +464,8 @@ object GenericAtomicCharLeft64 x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft64 extends GenericAtomicSuite[Int, AtomicInt]( @@ -456,7 +474,8 @@ object GenericAtomicIntLeft64 x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft64 extends GenericAtomicSuite[Long, AtomicLong]( @@ -465,7 +484,8 @@ object GenericAtomicLongLeft64 x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 8) @@ -476,7 +496,8 @@ object GenericAtomicAnyRight64 x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight64 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -485,7 +506,8 @@ object GenericAtomicBooleanRight64 x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight64 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -494,7 +516,8 @@ object GenericAtomicNumberAnyRight64 x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight64 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -503,7 +526,8 @@ object GenericAtomicFloatRight64 x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight64 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -512,7 +536,8 @@ object GenericAtomicDoubleRight64 x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight64 extends GenericAtomicSuite[Short, AtomicShort]( @@ -521,7 +546,8 @@ object GenericAtomicShortRight64 x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight64 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -530,7 +556,8 @@ object GenericAtomicByteRight64 x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight64 extends GenericAtomicSuite[Char, AtomicChar]( @@ -539,7 +566,8 @@ object GenericAtomicCharRight64 x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight64 extends GenericAtomicSuite[Int, AtomicInt]( @@ -548,7 +576,8 @@ object GenericAtomicIntRight64 x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight64 extends GenericAtomicSuite[Long, AtomicLong]( @@ -557,7 +586,8 @@ object GenericAtomicLongRight64 x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 8) @@ -568,7 +598,8 @@ object GenericAtomicAnyLeftRight128 x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight128 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -577,7 +608,8 @@ object GenericAtomicBooleanLeftRight128 x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight128 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -586,7 +618,8 @@ object GenericAtomicNumberAnyLeftRight128 x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight128 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -595,7 +628,8 @@ object GenericAtomicFloatLeftRight128 x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight128 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -604,7 +638,8 @@ object GenericAtomicDoubleLeftRight128 x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight128 extends GenericAtomicSuite[Short, AtomicShort]( @@ -613,7 +648,8 @@ object GenericAtomicShortLeftRight128 x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight128 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -622,7 +658,8 @@ object GenericAtomicByteLeftRight128 x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight128 extends GenericAtomicSuite[Char, AtomicChar]( @@ -631,7 +668,8 @@ object GenericAtomicCharLeftRight128 x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight128 extends GenericAtomicSuite[Int, AtomicInt]( @@ -640,7 +678,8 @@ object GenericAtomicIntLeftRight128 x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight128 extends GenericAtomicSuite[Long, AtomicLong]( @@ -649,7 +688,8 @@ object GenericAtomicLongLeftRight128 x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 8) @@ -660,7 +700,8 @@ object GenericAtomicAnyLeft128 x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft128 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -669,7 +710,8 @@ object GenericAtomicBooleanLeft128 x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft128 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -678,7 +720,8 @@ object GenericAtomicNumberAnyLeft128 x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft128 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -687,7 +730,8 @@ object GenericAtomicFloatLeft128 x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft128 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -696,7 +740,8 @@ object GenericAtomicDoubleLeft128 x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft128 extends GenericAtomicSuite[Short, AtomicShort]( @@ -705,7 +750,8 @@ object GenericAtomicShortLeft128 x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft128 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -714,7 +760,8 @@ object GenericAtomicByteLeft128 x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft128 extends GenericAtomicSuite[Char, AtomicChar]( @@ -723,7 +770,8 @@ object GenericAtomicCharLeft128 x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft128 extends GenericAtomicSuite[Int, AtomicInt]( @@ -732,7 +780,8 @@ object GenericAtomicIntLeft128 x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft128 extends GenericAtomicSuite[Long, AtomicLong]( @@ -741,7 +790,8 @@ object GenericAtomicLongLeft128 x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 8) @@ -752,7 +802,8 @@ object GenericAtomicAnyRight128 x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight128 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -761,7 +812,8 @@ object GenericAtomicBooleanRight128 x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight128 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -770,7 +822,8 @@ object GenericAtomicNumberAnyRight128 x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight128 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -779,7 +832,8 @@ object GenericAtomicFloatRight128 x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight128 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -788,7 +842,8 @@ object GenericAtomicDoubleRight128 x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight128 extends GenericAtomicSuite[Short, AtomicShort]( @@ -797,7 +852,8 @@ object GenericAtomicShortRight128 x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight128 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -806,7 +862,8 @@ object GenericAtomicByteRight128 x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight128 extends GenericAtomicSuite[Char, AtomicChar]( @@ -815,7 +872,8 @@ object GenericAtomicCharRight128 x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight128 extends GenericAtomicSuite[Int, AtomicInt]( @@ -824,7 +882,8 @@ object GenericAtomicIntRight128 x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight128 extends GenericAtomicSuite[Long, AtomicLong]( @@ -833,7 +892,8 @@ object GenericAtomicLongRight128 x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 8) @@ -844,7 +904,8 @@ object GenericAtomicAnyLeftRight256 x => x.toString, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight256 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -853,7 +914,8 @@ object GenericAtomicBooleanLeftRight256 x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight256 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -862,7 +924,8 @@ object GenericAtomicNumberAnyLeftRight256 x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight256 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -871,7 +934,8 @@ object GenericAtomicFloatLeftRight256 x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight256 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -880,7 +944,8 @@ object GenericAtomicDoubleLeftRight256 x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight256 extends GenericAtomicSuite[Short, AtomicShort]( @@ -889,7 +954,8 @@ object GenericAtomicShortLeftRight256 x => x.toShort, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight256 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -898,7 +964,8 @@ object GenericAtomicByteLeftRight256 x => x.toByte, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight256 extends GenericAtomicSuite[Char, AtomicChar]( @@ -907,7 +974,8 @@ object GenericAtomicCharLeftRight256 x => x.toChar, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight256 extends GenericAtomicSuite[Int, AtomicInt]( @@ -916,7 +984,8 @@ object GenericAtomicIntLeftRight256 x => x, x => x, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight256 extends GenericAtomicSuite[Long, AtomicLong]( @@ -925,7 +994,8 @@ object GenericAtomicLongLeftRight256 x => x.toLong, x => x.toInt, allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // ----------------- Java 7 @@ -938,7 +1008,8 @@ object GenericAtomicAnyNoPaddingJava7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanNoPaddingJava7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -947,7 +1018,8 @@ object GenericAtomicBooleanNoPaddingJava7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyNoPaddingJava7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -956,7 +1028,8 @@ object GenericAtomicNumberAnyNoPaddingJava7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatNoPaddingJava7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -965,7 +1038,8 @@ object GenericAtomicFloatNoPaddingJava7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleNoPaddingJava7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -974,7 +1048,8 @@ object GenericAtomicDoubleNoPaddingJava7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortNoPaddingJava7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -983,7 +1058,8 @@ object GenericAtomicShortNoPaddingJava7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteNoPaddingJava7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -992,7 +1068,8 @@ object GenericAtomicByteNoPaddingJava7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharNoPaddingJava7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1001,7 +1078,8 @@ object GenericAtomicCharNoPaddingJava7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntNoPaddingJava7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1010,7 +1088,8 @@ object GenericAtomicIntNoPaddingJava7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongNoPaddingJava7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1019,7 +1098,8 @@ object GenericAtomicLongNoPaddingJava7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 7) @@ -1030,7 +1110,8 @@ object GenericAtomicAnyLeft64Java7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft64Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1039,7 +1120,8 @@ object GenericAtomicBooleanLeft64Java7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft64Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1048,7 +1130,8 @@ object GenericAtomicNumberAnyLeft64Java7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft64Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1057,7 +1140,8 @@ object GenericAtomicFloatLeft64Java7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft64Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1066,7 +1150,8 @@ object GenericAtomicDoubleLeft64Java7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft64Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1075,7 +1160,8 @@ object GenericAtomicShortLeft64Java7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft64Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1084,7 +1170,8 @@ object GenericAtomicByteLeft64Java7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft64Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1093,7 +1180,8 @@ object GenericAtomicCharLeft64Java7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft64Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1102,7 +1190,8 @@ object GenericAtomicIntLeft64Java7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft64Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1111,7 +1200,8 @@ object GenericAtomicLongLeft64Java7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 7) @@ -1122,7 +1212,8 @@ object GenericAtomicAnyRight64Java7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight64Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1131,7 +1222,8 @@ object GenericAtomicBooleanRight64Java7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight64Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1140,7 +1232,8 @@ object GenericAtomicNumberAnyRight64Java7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight64Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1149,7 +1242,8 @@ object GenericAtomicFloatRight64Java7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight64Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1158,7 +1252,8 @@ object GenericAtomicDoubleRight64Java7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight64Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1167,7 +1262,8 @@ object GenericAtomicShortRight64Java7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight64Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1176,7 +1272,8 @@ object GenericAtomicByteRight64Java7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight64Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1185,7 +1282,8 @@ object GenericAtomicCharRight64Java7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight64Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1194,7 +1292,8 @@ object GenericAtomicIntRight64Java7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight64Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1203,7 +1302,8 @@ object GenericAtomicLongRight64Java7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 7) @@ -1214,7 +1314,8 @@ object GenericAtomicAnyLeftRight128Java7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight128Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1223,7 +1324,8 @@ object GenericAtomicBooleanLeftRight128Java7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight128Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1232,7 +1334,8 @@ object GenericAtomicNumberAnyLeftRight128Java7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight128Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1241,7 +1344,8 @@ object GenericAtomicFloatLeftRight128Java7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight128Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1250,7 +1354,8 @@ object GenericAtomicDoubleLeftRight128Java7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight128Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1259,7 +1364,8 @@ object GenericAtomicShortLeftRight128Java7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight128Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1268,7 +1374,8 @@ object GenericAtomicByteLeftRight128Java7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight128Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1277,7 +1384,8 @@ object GenericAtomicCharLeftRight128Java7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight128Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1286,7 +1394,8 @@ object GenericAtomicIntLeftRight128Java7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight128Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1295,7 +1404,8 @@ object GenericAtomicLongLeftRight128Java7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 7) @@ -1306,7 +1416,8 @@ object GenericAtomicAnyLeft128Java7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft128Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1315,7 +1426,8 @@ object GenericAtomicBooleanLeft128Java7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft128Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1324,7 +1436,8 @@ object GenericAtomicNumberAnyLeft128Java7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft128Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1333,7 +1446,8 @@ object GenericAtomicFloatLeft128Java7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft128Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1342,7 +1456,8 @@ object GenericAtomicDoubleLeft128Java7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft128Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1351,7 +1466,8 @@ object GenericAtomicShortLeft128Java7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft128Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1360,7 +1476,8 @@ object GenericAtomicByteLeft128Java7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft128Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1369,7 +1486,8 @@ object GenericAtomicCharLeft128Java7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft128Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1378,7 +1496,8 @@ object GenericAtomicIntLeft128Java7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft128Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1387,7 +1506,8 @@ object GenericAtomicLongLeft128Java7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 7) @@ -1398,7 +1518,8 @@ object GenericAtomicAnyRight128Java7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight128Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1407,7 +1528,8 @@ object GenericAtomicBooleanRight128Java7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight128Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1416,7 +1538,8 @@ object GenericAtomicNumberAnyRight128Java7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight128Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1425,7 +1548,8 @@ object GenericAtomicFloatRight128Java7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight128Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1434,7 +1558,8 @@ object GenericAtomicDoubleRight128Java7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight128Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1443,7 +1568,8 @@ object GenericAtomicShortRight128Java7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight128Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1452,7 +1578,8 @@ object GenericAtomicByteRight128Java7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight128Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1461,7 +1588,8 @@ object GenericAtomicCharRight128Java7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight128Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1470,7 +1598,8 @@ object GenericAtomicIntRight128Java7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight128Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1479,7 +1608,8 @@ object GenericAtomicLongRight128Java7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 7) @@ -1490,7 +1620,8 @@ object GenericAtomicAnyLeftRight256Java7Suite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight256Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1499,7 +1630,8 @@ object GenericAtomicBooleanLeftRight256Java7Suite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight256Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1508,7 +1640,8 @@ object GenericAtomicNumberAnyLeftRight256Java7Suite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight256Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1517,7 +1650,8 @@ object GenericAtomicFloatLeftRight256Java7Suite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight256Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1526,7 +1660,8 @@ object GenericAtomicDoubleLeftRight256Java7Suite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight256Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1535,7 +1670,8 @@ object GenericAtomicShortLeftRight256Java7Suite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight256Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1544,7 +1680,8 @@ object GenericAtomicByteLeftRight256Java7Suite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight256Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1553,7 +1690,8 @@ object GenericAtomicCharLeftRight256Java7Suite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight256Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1562,7 +1700,8 @@ object GenericAtomicIntLeftRight256Java7Suite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight256Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1571,7 +1710,8 @@ object GenericAtomicLongLeftRight256Java7Suite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // ----------------- Java X @@ -1584,7 +1724,8 @@ object GenericAtomicAnyNoPaddingJavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanNoPaddingJavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1593,7 +1734,8 @@ object GenericAtomicBooleanNoPaddingJavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyNoPaddingJavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1602,7 +1744,8 @@ object GenericAtomicNumberAnyNoPaddingJavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatNoPaddingJavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1611,7 +1754,8 @@ object GenericAtomicFloatNoPaddingJavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleNoPaddingJavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1620,7 +1764,8 @@ object GenericAtomicDoubleNoPaddingJavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortNoPaddingJavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1629,7 +1774,8 @@ object GenericAtomicShortNoPaddingJavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteNoPaddingJavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1638,7 +1784,8 @@ object GenericAtomicByteNoPaddingJavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharNoPaddingJavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1647,7 +1794,8 @@ object GenericAtomicCharNoPaddingJavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntNoPaddingJavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1656,7 +1804,8 @@ object GenericAtomicIntNoPaddingJavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongNoPaddingJavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1665,7 +1814,8 @@ object GenericAtomicLongNoPaddingJavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left64 (Java X) @@ -1676,7 +1826,8 @@ object GenericAtomicAnyLeft64JavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeft64JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1685,7 +1836,8 @@ object GenericAtomicBooleanLeft64JavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeft64JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1694,7 +1846,8 @@ object GenericAtomicNumberAnyLeft64JavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeft64JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1703,7 +1856,8 @@ object GenericAtomicFloatLeft64JavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeft64JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1712,7 +1866,8 @@ object GenericAtomicDoubleLeft64JavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeft64JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1721,7 +1876,8 @@ object GenericAtomicShortLeft64JavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeft64JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1730,7 +1886,8 @@ object GenericAtomicByteLeft64JavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeft64JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1739,7 +1896,8 @@ object GenericAtomicCharLeft64JavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeft64JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1748,7 +1906,8 @@ object GenericAtomicIntLeft64JavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeft64JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1757,7 +1916,8 @@ object GenericAtomicLongLeft64JavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right64 (Java X) @@ -1768,7 +1928,8 @@ object GenericAtomicAnyRight64JavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanRight64JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1777,7 +1938,8 @@ object GenericAtomicBooleanRight64JavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyRight64JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1786,7 +1948,8 @@ object GenericAtomicNumberAnyRight64JavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatRight64JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1795,7 +1958,8 @@ object GenericAtomicFloatRight64JavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleRight64JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1804,7 +1968,8 @@ object GenericAtomicDoubleRight64JavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortRight64JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1813,7 +1978,8 @@ object GenericAtomicShortRight64JavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteRight64JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1822,7 +1988,8 @@ object GenericAtomicByteRight64JavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharRight64JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1831,7 +1998,8 @@ object GenericAtomicCharRight64JavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntRight64JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1840,7 +2008,8 @@ object GenericAtomicIntRight64JavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongRight64JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1849,7 +2018,8 @@ object GenericAtomicLongRight64JavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight128 (Java X) @@ -1860,7 +2030,8 @@ object GenericAtomicAnyLeftRight128JavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeftRight128JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1869,7 +2040,8 @@ object GenericAtomicBooleanLeftRight128JavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeftRight128JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1878,7 +2050,8 @@ object GenericAtomicNumberAnyLeftRight128JavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeftRight128JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1887,7 +2060,8 @@ object GenericAtomicFloatLeftRight128JavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeftRight128JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1896,7 +2070,8 @@ object GenericAtomicDoubleLeftRight128JavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeftRight128JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1905,7 +2080,8 @@ object GenericAtomicShortLeftRight128JavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeftRight128JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1914,7 +2090,8 @@ object GenericAtomicByteLeftRight128JavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeftRight128JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1923,7 +2100,8 @@ object GenericAtomicCharLeftRight128JavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeftRight128JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1932,7 +2110,8 @@ object GenericAtomicIntLeftRight128JavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeftRight128JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1941,7 +2120,8 @@ object GenericAtomicLongLeftRight128JavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left128 (Java X) @@ -1952,7 +2132,8 @@ object GenericAtomicAnyLeft128JavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeft128JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1961,7 +2142,8 @@ object GenericAtomicBooleanLeft128JavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeft128JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1970,7 +2152,8 @@ object GenericAtomicNumberAnyLeft128JavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeft128JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1979,7 +2162,8 @@ object GenericAtomicFloatLeft128JavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeft128JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1988,7 +2172,8 @@ object GenericAtomicDoubleLeft128JavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeft128JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1997,7 +2182,8 @@ object GenericAtomicShortLeft128JavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeft128JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -2006,7 +2192,8 @@ object GenericAtomicByteLeft128JavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeft128JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -2015,7 +2202,8 @@ object GenericAtomicCharLeft128JavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeft128JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -2024,7 +2212,8 @@ object GenericAtomicIntLeft128JavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeft128JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -2033,7 +2222,8 @@ object GenericAtomicLongLeft128JavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right128 (Java X) @@ -2044,7 +2234,8 @@ object GenericAtomicAnyRight128JavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanRight128JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -2053,7 +2244,8 @@ object GenericAtomicBooleanRight128JavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyRight128JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -2062,7 +2254,8 @@ object GenericAtomicNumberAnyRight128JavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatRight128JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -2071,7 +2264,8 @@ object GenericAtomicFloatRight128JavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleRight128JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -2080,7 +2274,8 @@ object GenericAtomicDoubleRight128JavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortRight128JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -2089,7 +2284,8 @@ object GenericAtomicShortRight128JavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteRight128JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -2098,7 +2294,8 @@ object GenericAtomicByteRight128JavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharRight128JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -2107,7 +2304,8 @@ object GenericAtomicCharRight128JavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntRight128JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -2116,7 +2314,8 @@ object GenericAtomicIntRight128JavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongRight128JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -2125,7 +2324,8 @@ object GenericAtomicLongRight128JavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight256 (Java X) @@ -2136,7 +2336,8 @@ object GenericAtomicAnyLeftRight256JavaXSuite x => x.toString, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeftRight256JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -2145,7 +2346,8 @@ object GenericAtomicBooleanLeftRight256JavaXSuite x => if (x == 1) true else false, x => if (x) 1 else 0, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeftRight256JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -2154,7 +2356,8 @@ object GenericAtomicNumberAnyLeftRight256JavaXSuite x => BoxedLong(x.toLong), x => x.value.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeftRight256JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -2163,7 +2366,8 @@ object GenericAtomicFloatLeftRight256JavaXSuite x => x.toFloat, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeftRight256JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -2172,7 +2376,8 @@ object GenericAtomicDoubleLeftRight256JavaXSuite x => x.toDouble, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeftRight256JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -2181,7 +2386,8 @@ object GenericAtomicShortLeftRight256JavaXSuite x => x.toShort, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeftRight256JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -2190,7 +2396,8 @@ object GenericAtomicByteLeftRight256JavaXSuite x => x.toByte, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeftRight256JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -2199,7 +2406,8 @@ object GenericAtomicCharLeftRight256JavaXSuite x => x.toChar, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeftRight256JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -2208,7 +2416,8 @@ object GenericAtomicIntLeftRight256JavaXSuite x => x, x => x, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeftRight256JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -2217,4 +2426,5 @@ object GenericAtomicLongLeftRight256JavaXSuite x => x.toLong, x => x.toInt, allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala index 6f25ac363..b98e344dd 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala @@ -33,7 +33,7 @@ object StackedCancelableSuite extends SimpleTestSuite { var effect = 0 val initial = Cancelable(() => effect += 1) val c = StackedCancelable() - c push initial + c.push(initial) c.cancel() assertEquals(effect, 1) } @@ -43,7 +43,7 @@ object StackedCancelableSuite extends SimpleTestSuite { val initial = Cancelable(() => effect += 1) val c = StackedCancelable() c.cancel() - c push initial + c.push(initial) assertEquals(effect, 1) } @@ -145,7 +145,7 @@ object StackedCancelableSuite extends SimpleTestSuite { val d4 = Cancelable(() => effect += 20) val c2 = StackedCancelable(d3) - c2 push d4 + c2.push(d4) assertEquals(c2.popAndPushList(List(d1, d2)), d4) c2.cancel() diff --git a/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala index 4c64f4557..6f011496c 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala @@ -19,7 +19,7 @@ package monix.execution.misc import cats.Eval import minitest.SimpleTestSuite -import monix.execution.schedulers.{TestScheduler, TracingScheduler} +import monix.execution.schedulers.{ TestScheduler, TracingScheduler } import monix.execution.misc.CanBindLocals.Implicits.synchronousAsDefault import scala.concurrent.Future import scala.util.Success diff --git a/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala index 151ba5ba0..b9f19553d 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala @@ -18,7 +18,7 @@ package monix.execution.rstreams import minitest.SimpleTestSuite -import org.reactivestreams.{Subscription => RSubscription} +import org.reactivestreams.{ Subscription => RSubscription } object SubscriptionSuite extends SimpleTestSuite { test("wraps any subscription reference") { diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala index 786069d17..aa0776392 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala @@ -18,7 +18,7 @@ package monix.execution.schedulers import minitest.SimpleTestSuite -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, BatchedExecution, SynchronousExecution} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } object ExecutionModelSuite extends SimpleTestSuite { test("SynchronousExecution") { diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala index 2eee90bd2..c0d56d610 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala @@ -19,8 +19,8 @@ package monix.execution.schedulers import java.util.concurrent.TimeUnit import minitest.SimpleTestSuite -import monix.execution.{Cancelable, Features} -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, SynchronousExecution} +import monix.execution.{ Cancelable, Features } +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, SynchronousExecution } import scala.concurrent.duration._ object ReferenceSchedulerSuite extends SimpleTestSuite { diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala index 7378cdafc..d81724bcc 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala @@ -17,7 +17,7 @@ package monix.execution.schedulers -import java.util.concurrent.{TimeUnit, TimeoutException} +import java.util.concurrent.{ TimeUnit, TimeoutException } import minitest.TestSuite import monix.execution.Scheduler @@ -25,8 +25,8 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} -import scala.util.{Success, Try} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Success, Try } object TestSchedulerSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -87,9 +87,11 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { TimeUnit.SECONDS, action { firstBatch += 1 - }) + } + ) () - }) + } + ) s.scheduleOnce( 20, @@ -102,9 +104,11 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { TimeUnit.SECONDS, action { secondBatch += 1 - }) + } + ) () - }) + } + ) s.tick() assert(firstBatch == 0 && secondBatch == 0) diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala index bba53fc0a..a7500f8d6 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala @@ -23,11 +23,11 @@ import minitest.SimpleTestSuite import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.misc.Local import monix.execution.FutureUtils.extensions._ -import monix.execution.{Cancelable, Scheduler} +import monix.execution.{ Cancelable, Scheduler } import monix.execution.cancelables.SingleAssignCancelable import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ import scala.util.Success @@ -128,14 +128,20 @@ object TracingSchedulerSuite extends SimpleTestSuite { val p = Promise[Int]() val sub = SingleAssignCancelable() - sub := schedule(traced, 1, 1, TimeUnit.SECONDS, () => { - sum += local1.get + local2.get - count += 1 - if (count >= 3) { - p.success(sum) - sub.cancel() + sub := schedule( + traced, + 1, + 1, + TimeUnit.SECONDS, + () => { + sum += local1.get + local2.get + count += 1 + if (count >= 3) { + p.success(sum) + sub.cancel() + } } - }) + ) p.future } diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala index b2c4b801a..b8e19574a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala @@ -19,7 +19,7 @@ package monix.execution.schedulers import minitest.TestSuite import monix.execution.ExecutionModel.AlwaysAsyncExecution -import monix.execution.ExecutionModel.{Default => DefaultExecModel} +import monix.execution.ExecutionModel.{ Default => DefaultExecModel } import monix.execution.Scheduler import monix.execution.internal.Platform import scala.concurrent.Promise diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala index ba5a121db..c63dcf04a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala @@ -17,10 +17,10 @@ package monix.execution.schedulers -import scala.concurrent.{ExecutionContext, Promise} +import scala.concurrent.{ ExecutionContext, Promise } import scala.concurrent.duration._ import minitest.TestSuite -import monix.execution.{ExecutionModel, FutureUtils, Scheduler, UncaughtExceptionReporter} +import monix.execution.{ ExecutionModel, FutureUtils, Scheduler, UncaughtExceptionReporter } class UncaughtExceptionReporterBaseSuite extends TestSuite[Promise[Throwable]] { protected val immediateEC = TrampolineExecutionContext.immediate diff --git a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala b/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala index 8a492bec7..6b6f3a476 100644 --- a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala +++ b/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala @@ -19,7 +19,7 @@ package monix.execution.misc import minitest.SimpleTestSuite import monix.execution.exceptions.DummyException -import monix.execution.misc.test.{TestBox, TestInlineMacros} +import monix.execution.misc.test.{ TestBox, TestInlineMacros } import scala.util.control.NonFatal object InlineMacrosTest extends SimpleTestSuite { diff --git a/monix-java/src/main/scala/monix/java8/eval/package.scala b/monix-java/src/main/scala/monix/java8/eval/package.scala index bd89c7dfa..c34e66807 100644 --- a/monix-java/src/main/scala/monix/java8/eval/package.scala +++ b/monix-java/src/main/scala/monix/java8/eval/package.scala @@ -17,11 +17,11 @@ package monix.java8 -import java.util.concurrent.{CancellationException, CompletableFuture, CompletionException} +import java.util.concurrent.{ CancellationException, CompletableFuture, CompletionException } import java.util.function.BiFunction import monix.eval.Task -import monix.execution.{Cancelable, Scheduler} -import scala.util.{Failure, Success} +import monix.execution.{ Cancelable, Scheduler } +import scala.util.{ Failure, Success } /** * DEPRECATED — switch to Scala 2.12+ and [[monix.eval.Task.from Task.from]]. diff --git a/monix-java/src/main/scala/monix/java8/execution/package.scala b/monix-java/src/main/scala/monix/java8/execution/package.scala index a8fd2da0b..3f8cf03ad 100644 --- a/monix-java/src/main/scala/monix/java8/execution/package.scala +++ b/monix-java/src/main/scala/monix/java8/execution/package.scala @@ -17,11 +17,11 @@ package monix.java8 -import java.util.concurrent.{CancellationException, CompletableFuture, CompletionException} +import java.util.concurrent.{ CancellationException, CompletableFuture, CompletionException } import java.util.function.BiFunction -import monix.execution.{Cancelable, CancelableFuture} -import scala.concurrent.{ExecutionContext, Future} -import scala.util.{Failure, Success} +import monix.execution.{ Cancelable, CancelableFuture } +import scala.concurrent.{ ExecutionContext, Future } +import scala.util.{ Failure, Success } /** * DEPRECATED — switch to Scala 2.12+ and [[monix.execution.FutureUtils]]. diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index 4326e531d..453e1cc80 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -18,14 +18,14 @@ package monix.reactive.observers.buffers import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.internal.collection.JSArrayQueue import monix.execution.internal.math.nextPowerOf2 import scala.util.control.NonFatal -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } /** Shared internals between [[BackPressuredBufferedSubscriber]] and * [[BatchedBufferedSubscriber]]. @@ -168,51 +168,52 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( var streamErrors = true try while (isLoopActive && !downstreamIsComplete) { - val next = fetchNext() - - if (next != null) { - if (nextIndex > 0 || isFirstIteration) { - isFirstIteration = false - - ack match { - case Continue => - ack = signalNext(next) - if (ack == Stop) { + val next = fetchNext() + + if (next != null) { + if (nextIndex > 0 || isFirstIteration) { + isFirstIteration = false + + ack match { + case Continue => + ack = signalNext(next) + if (ack == Stop) { + stopStreaming() + return + } else { + val isSync = ack == Continue + nextIndex = if (isSync) em.nextFrameIndex(nextIndex) else 0 + } + + case Stop => stopStreaming() return - } else { - val isSync = ack == Continue - nextIndex = if (isSync) em.nextFrameIndex(nextIndex) else 0 - } - - case Stop => - stopStreaming() - return - - case _ => - goAsync(next, ack) - return + + case _ => + goAsync(next, ack) + return + } + } else { + goAsync(next, ack) + return } } else { - goAsync(next, ack) - return - } - } else { - // Ending loop - if (backPressured != null) { - backPressured.success(if (upstreamIsComplete) Stop else Continue) - backPressured = null - } + // Ending loop + if (backPressured != null) { + backPressured.success(if (upstreamIsComplete) Stop else Continue) + backPressured = null + } - streamErrors = false - if (upstreamIsComplete) - downstreamSignalComplete(errorThrown) + streamErrors = false + if (upstreamIsComplete) + downstreamSignalComplete(errorThrown) - lastIterationAck = ack - isLoopActive = false - return + lastIterationAck = ack + isLoopActive = false + return + } } - } catch { + catch { case ex if NonFatal(ex) => if (streamErrors) downstreamSignalComplete(ex) else scheduler.reportFailure(ex) diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala index 6597572b1..f6210e73b 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala @@ -21,13 +21,14 @@ import monix.execution.ChannelType import monix.execution.ChannelType.MultiProducer import monix.reactive.OverflowStrategy import monix.reactive.OverflowStrategy._ -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def apply[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy[A], - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber[A] = { + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber[A] = { bufferPolicy match { case Unbounded => SyncBufferedSubscriber.unbounded(subscriber) @@ -56,7 +57,8 @@ private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def synchronous[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy.Synchronous[A], - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber.Sync[A] = { + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber.Sync[A] = { bufferPolicy match { case Unbounded => SyncBufferedSubscriber.unbounded(subscriber) @@ -83,6 +85,7 @@ private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def batched[A]( underlying: Subscriber[List[A]], bufferSize: Int, - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber[A] = + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber[A] = BatchedBufferedSubscriber(underlying, bufferSize) } diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala index f49cb9077..c53fe1450 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala @@ -19,15 +19,15 @@ package monix.reactive.observers.buffers import monix.eval.Coeval import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.internal.collection.{JSArrayQueue, _} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.internal.collection.{ JSArrayQueue, _ } import scala.util.control.NonFatal import monix.execution.exceptions.BufferOverflowException -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** A [[BufferedSubscriber]] implementation for the * [[monix.reactive.OverflowStrategy.DropNew DropNew]] overflow strategy. @@ -35,8 +35,8 @@ import scala.util.{Failure, Success} private[observers] final class SyncBufferedSubscriber[-A] private ( out: Subscriber[A], queue: EvictingQueue[A], - onOverflow: Long => Coeval[Option[A]] = null) - extends BufferedSubscriber[A] with Subscriber.Sync[A] { + onOverflow: Long => Coeval[Option[A]] = null +) extends BufferedSubscriber[A] with Subscriber.Sync[A] { implicit val scheduler = out.scheduler // to be modified only in onError, before upstreamIsComplete @@ -257,11 +257,15 @@ private[monix] object SyncBufferedSubscriber { */ def bounded[A](underlying: Subscriber[A], bufferSize: Int): Subscriber.Sync[A] = { require(bufferSize > 1, "bufferSize must be strictly higher than 1") - val buffer = JSArrayQueue.bounded[A](bufferSize, _ => { - BufferOverflowException( - s"Downstream observer is too slow, buffer over capacity with a " + - s"specified buffer size of $bufferSize") - }) + val buffer = JSArrayQueue.bounded[A]( + bufferSize, + _ => { + BufferOverflowException( + s"Downstream observer is too slow, buffer over capacity with a " + + s"specified buffer size of $bufferSize" + ) + } + ) new SyncBufferedSubscriber[A](underlying, buffer, null) } @@ -285,7 +289,8 @@ private[monix] object SyncBufferedSubscriber { def dropNewAndSignal[A]( underlying: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]]): Subscriber.Sync[A] = { + onOverflow: Long => Coeval[Option[A]] + ): Subscriber.Sync[A] = { require(bufferSize > 1, "bufferSize must be strictly higher than 1") val buffer = JSArrayQueue.bounded[A](bufferSize) new SyncBufferedSubscriber[A](underlying, buffer, onOverflow) @@ -311,7 +316,8 @@ private[monix] object SyncBufferedSubscriber { def dropOldAndSignal[A]( underlying: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]]): Subscriber.Sync[A] = { + onOverflow: Long => Coeval[Option[A]] + ): Subscriber.Sync[A] = { require(bufferSize > 1, "bufferSize must be strictly higher than 1") val buffer = DropHeadOnOverflowQueue[AnyRef](bufferSize).asInstanceOf[EvictingQueue[A]] new SyncBufferedSubscriber[A](underlying, buffer, onOverflow) @@ -337,7 +343,8 @@ private[monix] object SyncBufferedSubscriber { def clearBufferAndSignal[A]( underlying: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]]): Subscriber.Sync[A] = { + onOverflow: Long => Coeval[Option[A]] + ): Subscriber.Sync[A] = { require(bufferSize > 1, "bufferSize must be strictly higher than 1") val buffer = DropAllOnOverflowQueue[AnyRef](bufferSize).asInstanceOf[EvictingQueue[A]] new SyncBufferedSubscriber[A](underlying, buffer, onOverflow) diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala index ec03961ef..8ae9c3fe4 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala @@ -18,7 +18,7 @@ package monix.reactive.compression.internal.operators import java.util.zip.Deflater -import java.{util => ju} +import java.{ util => ju } import monix.reactive.compression.FlushMode diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala index 58149ca48..140473062 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala @@ -22,7 +22,7 @@ import java.util.zip.Deflater import monix.execution.Ack import monix.execution.Ack.Continue import monix.reactive.Observable.Operator -import monix.reactive.compression.{CompressionLevel, CompressionParameters, CompressionStrategy, FlushMode} +import monix.reactive.compression.{ CompressionLevel, CompressionParameters, CompressionStrategy, FlushMode } import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala index 81f20d652..ceedf9d74 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala @@ -17,11 +17,11 @@ package monix.reactive.compression.internal.operators -import java.util.zip.{CRC32, DataFormatException, Inflater} -import java.{util => ju} +import java.util.zip.{ CRC32, DataFormatException, Inflater } +import java.{ util => ju } import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.compression.internal.operators.Gunzipper._ import monix.reactive.compression.{ @@ -236,7 +236,7 @@ private final class Gunzipper(bufferSize: Int) { private class CheckCrc16Step(pastCrc16Bytes: Array[Byte], crcValue: Long) extends State { override def feed(chunkBytes: Array[Byte]): (State, Array[Byte]) = { val (crc16Bytes, leftover) = (pastCrc16Bytes ++ chunkBytes).splitAt(2) - //Unlikely but possible that chunk was 1 byte only, leftover is empty. + // Unlikely but possible that chunk was 1 byte only, leftover is empty. if (crc16Bytes.length < 2) { (new CheckCrc16Step(crc16Bytes, crcValue), Array.emptyByteArray) } else { diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala index 900c788fa..546f2f563 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala @@ -19,7 +19,7 @@ package monix.reactive.compression.internal.operators import java.nio.charset.StandardCharsets import java.time.Instant -import java.util.zip.{CRC32, Deflater} +import java.util.zip.{ CRC32, Deflater } import monix.execution.Ack import monix.execution.Ack.Continue diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala index 340366afe..ae226feca 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala @@ -17,11 +17,11 @@ package monix.reactive.compression.internal.operators -import java.util.zip.{DataFormatException, Inflater} -import java.{util => ju} +import java.util.zip.{ DataFormatException, Inflater } +import java.{ util => ju } import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.compression.CompressionException import monix.reactive.observers.Subscriber diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala index 925a660c0..66437fcda 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala @@ -20,7 +20,7 @@ package monix.reactive import java.time.Instant import java.util.zip.Deflater -import monix.reactive.compression.internal.operators.{DeflateOperator, GunzipOperator, GzipOperator, InflateOperator} +import monix.reactive.compression.internal.operators.{ DeflateOperator, GunzipOperator, GzipOperator, InflateOperator } // From https://github.com/typelevel/fs2/blob/main/core/jvm/src/main/scala/fs2/compression.scala package object compression { diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index f748f67a2..aa6463e4e 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -17,21 +17,21 @@ package monix.reactive.observers.buffers -import monix.execution.{Ack, ChannelType} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, ChannelType } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.BufferCapacity.Unbounded import monix.execution.ChannelType._ import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight256 import monix.execution.internal.collection.LowLevelConcurrentQueue -import monix.execution.internal.{math, Platform} +import monix.execution.internal.{ math, Platform } import scala.util.control.NonFatal -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.annotation.tailrec -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } /** Shared internals between [[BackPressuredBufferedSubscriber]] and * [[BatchedBufferedSubscriber]]. @@ -39,8 +39,8 @@ import scala.util.{Failure, Success} private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( out: Subscriber[R], _bufferSize: Int, - pt: ChannelType.ProducerSide) - extends CommonBufferMembers with BufferedSubscriber[A] { + pt: ChannelType.ProducerSide +) extends CommonBufferMembers with BufferedSubscriber[A] { require(_bufferSize > 0, "bufferSize must be a strictly positive number") diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala index 3da6eb5d2..8100383f2 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala @@ -27,8 +27,8 @@ import monix.reactive.observers.Subscriber private[observers] final class BackPressuredBufferedSubscriber[A] private ( out: Subscriber[A], _bufferSize: Int, - pt: ChannelType.ProducerSide) - extends AbstractBackPressuredBufferedSubscriber[A, A](out, _bufferSize, pt) { + pt: ChannelType.ProducerSide +) extends AbstractBackPressuredBufferedSubscriber[A, A](out, _bufferSize, pt) { @volatile protected var p50, p51, p52, p53, p54, p55, p56, p57 = 5 @volatile protected var q50, q51, q52, q53, q54, q55, q56, q57 = 5 @@ -44,7 +44,8 @@ private[observers] object BackPressuredBufferedSubscriber { def apply[A]( underlying: Subscriber[A], bufferSize: Int, - producerType: ChannelType.ProducerSide): BackPressuredBufferedSubscriber[A] = { + producerType: ChannelType.ProducerSide + ): BackPressuredBufferedSubscriber[A] = { new BackPressuredBufferedSubscriber[A](underlying, bufferSize, producerType) } diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala index 4b15a9620..37dbac1e1 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala @@ -30,8 +30,8 @@ import scala.collection.mutable.ListBuffer private[monix] final class BatchedBufferedSubscriber[A] private ( out: Subscriber[List[A]], _bufferSize: Int, - pt: ChannelType.ProducerSide) - extends AbstractBackPressuredBufferedSubscriber[A, ListBuffer[A]]( + pt: ChannelType.ProducerSide +) extends AbstractBackPressuredBufferedSubscriber[A, ListBuffer[A]]( subscriberBufferToList(out), _bufferSize, pt @@ -56,6 +56,7 @@ private[monix] object BatchedBufferedSubscriber { def apply[A]( underlying: Subscriber[List[A]], bufferSize: Int, - producerType: ChannelType.ProducerSide): BatchedBufferedSubscriber[A] = + producerType: ChannelType.ProducerSide + ): BatchedBufferedSubscriber[A] = new BatchedBufferedSubscriber[A](underlying, bufferSize, producerType) } diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala index 4a9be3a89..cb3e768c5 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala @@ -22,13 +22,14 @@ import monix.execution.ChannelType.MultiProducer import monix.execution.internal.Platform import monix.reactive.OverflowStrategy import monix.reactive.OverflowStrategy._ -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def apply[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy[A], - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber[A] = { + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber[A] = { bufferPolicy match { case Unbounded => SimpleBufferedSubscriber.unbounded(subscriber, Some(Platform.recommendedBufferChunkSize), producerType) @@ -57,7 +58,8 @@ private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def synchronous[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy.Synchronous[A], - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber.Sync[A] = { + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber.Sync[A] = { bufferPolicy match { case Unbounded => SimpleBufferedSubscriber.unbounded(subscriber, Some(Platform.recommendedBufferChunkSize), producerType) @@ -84,6 +86,7 @@ private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def batched[A]( underlying: Subscriber[List[A]], bufferSize: Int, - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber[A] = + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber[A] = BatchedBufferedSubscriber(underlying, bufferSize, producerType) } diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala index f47431443..7708492a0 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala @@ -23,7 +23,7 @@ import monix.execution.internal.atomic.UnsafeAccess import monix.execution.internal.math.nextPowerOf2 import monix.execution.internal.jctools.queues._ import monix.execution.internal.jctools.queues.MessagePassingQueue.Consumer -import monix.execution.internal.jctools.queues.atomic.{MpscAtomicArrayQueue, MpscLinkedAtomicQueue} +import monix.execution.internal.jctools.queues.atomic.{ MpscAtomicArrayQueue, MpscLinkedAtomicQueue } import scala.collection.mutable /** A simple internal interface providing the needed commonality between diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala index 0c5c58fe6..e74be7e78 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala @@ -19,15 +19,15 @@ package monix.reactive.observers.buffers import monix.eval.Coeval import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.atomic.PaddingStrategy.{LeftRight128, LeftRight256} -import monix.execution.atomic.{Atomic, AtomicInt} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.atomic.PaddingStrategy.{ LeftRight128, LeftRight256 } +import monix.execution.atomic.{ Atomic, AtomicInt } import scala.util.control.NonFatal -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** A high-performance and non-blocking [[BufferedSubscriber]] * implementation for the [[monix.reactive.OverflowStrategy.DropNew DropNew]] @@ -37,8 +37,8 @@ import scala.util.{Failure, Success} private[observers] final class DropNewBufferedSubscriber[A] private ( out: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]] = null) - extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { + onOverflow: Long => Coeval[Option[A]] = null +) extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { require(bufferSize > 0, "bufferSize must be a strictly positive number") @@ -279,6 +279,7 @@ private[observers] object DropNewBufferedSubscriber { def withSignal[A]( underlying: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]]): DropNewBufferedSubscriber[A] = + onOverflow: Long => Coeval[Option[A]] + ): DropNewBufferedSubscriber[A] = new DropNewBufferedSubscriber[A](underlying, bufferSize, onOverflow) } diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala index dd39a7216..5e28c8419 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala @@ -19,20 +19,20 @@ package monix.reactive.observers.buffers import monix.eval.Coeval import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.atomic.PaddingStrategy.{LeftRight128, LeftRight256} -import monix.execution.atomic.{Atomic, AtomicAny, AtomicInt} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.atomic.PaddingStrategy.{ LeftRight128, LeftRight256 } +import monix.execution.atomic.{ Atomic, AtomicAny, AtomicInt } import monix.execution.internal.math import scala.util.control.NonFatal import monix.reactive.OverflowStrategy._ import monix.reactive.observers.buffers.AbstractEvictingBufferedSubscriber._ -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.annotation.tailrec import scala.collection.immutable.Queue import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** A [[BufferedSubscriber]] implementation for the * [[monix.reactive.OverflowStrategy.DropOld DropOld]] @@ -43,8 +43,8 @@ import scala.util.{Failure, Success} private[observers] final class EvictingBufferedSubscriber[-A] private ( out: Subscriber[A], strategy: Evicted[Nothing], - onOverflow: Long => Coeval[Option[A]]) - extends AbstractEvictingBufferedSubscriber(out, strategy, onOverflow) { + onOverflow: Long => Coeval[Option[A]] +) extends AbstractEvictingBufferedSubscriber(out, strategy, onOverflow) { @volatile protected var p50, p51, p52, p53, p54, p55, p56, p57 = 5 @volatile protected var q50, q51, q52, q53, q54, q55, q56, q57 = 5 @@ -69,7 +69,8 @@ private[observers] object EvictingBufferedSubscriber { def dropOldAndSignal[A]( underlying: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]]): EvictingBufferedSubscriber[A] = { + onOverflow: Long => Coeval[Option[A]] + ): EvictingBufferedSubscriber[A] = { require(bufferSize > 1, "bufferSize must be a strictly positive number, bigger than 1") val maxCapacity = math.nextPowerOf2(bufferSize) @@ -96,7 +97,8 @@ private[observers] object EvictingBufferedSubscriber { def clearBufferAndSignal[A]( underlying: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]]): EvictingBufferedSubscriber[A] = { + onOverflow: Long => Coeval[Option[A]] + ): EvictingBufferedSubscriber[A] = { require(bufferSize > 1, "bufferSize must be a strictly positive number, bigger than 1") val maxCapacity = math.nextPowerOf2(bufferSize) @@ -107,8 +109,8 @@ private[observers] object EvictingBufferedSubscriber { private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( out: Subscriber[A], strategy: Evicted[Nothing], - onOverflow: Long => Coeval[Option[A]]) - extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { + onOverflow: Long => Coeval[Option[A]] +) extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { require(strategy.bufferSize > 0, "bufferSize must be a strictly positive number") diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala index dbe6a245a..1626b2e57 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala @@ -17,9 +17,9 @@ package monix.reactive.observers.buffers -import monix.execution.{Ack, ChannelType} -import monix.execution.Ack.{Continue, Stop} -import monix.execution.BufferCapacity.{Bounded, Unbounded} +import monix.execution.{ Ack, ChannelType } +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.BufferCapacity.{ Bounded, Unbounded } import monix.execution.ChannelType.SingleConsumer import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight256 @@ -28,10 +28,10 @@ import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.math.nextPowerOf2 import scala.util.control.NonFatal -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** A highly optimized [[BufferedSubscriber]] implementation. It supports 2 * [[monix.reactive.OverflowStrategy overflow strategies]]: @@ -47,8 +47,8 @@ import scala.util.{Failure, Success} private[observers] final class SimpleBufferedSubscriber[A] protected ( out: Subscriber[A], _qRef: LowLevelConcurrentQueue[A], - capacity: Int) - extends AbstractSimpleBufferedSubscriber[A](out, _qRef, capacity) { + capacity: Int +) extends AbstractSimpleBufferedSubscriber[A](out, _qRef, capacity) { @volatile protected var p50, p51, p52, p53, p54, p55, p56, p57 = 5 @volatile protected var q50, q51, q52, q53, q54, q55, q56, q57 = 5 @@ -57,8 +57,8 @@ private[observers] final class SimpleBufferedSubscriber[A] protected ( private[observers] abstract class AbstractSimpleBufferedSubscriber[A] protected ( out: Subscriber[A], _qRef: LowLevelConcurrentQueue[A], - capacity: Int) - extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { + capacity: Int +) extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { private[this] val queue = _qRef private[this] val em = out.scheduler.executionModel @@ -81,7 +81,8 @@ private[observers] abstract class AbstractSimpleBufferedSubscriber[A] protected BufferOverflowException( s"Downstream observer is too slow, buffer overflowed with a " + s"specified maximum capacity of $capacity" - )) + ) + ) Stop } @@ -258,7 +259,8 @@ private[observers] object SimpleBufferedSubscriber { def unbounded[A]( underlying: Subscriber[A], chunkSizeHint: Option[Int], - pt: ChannelType.ProducerSide): SimpleBufferedSubscriber[A] = { + pt: ChannelType.ProducerSide + ): SimpleBufferedSubscriber[A] = { val ct = ChannelType.assemble(pt, SingleConsumer) val queue = LowLevelConcurrentQueue[A](Unbounded(chunkSizeHint), ct, fenced = false) new SimpleBufferedSubscriber[A](underlying, queue, Int.MaxValue) @@ -267,7 +269,8 @@ private[observers] object SimpleBufferedSubscriber { def overflowTriggering[A]( underlying: Subscriber[A], bufferSize: Int, - pt: ChannelType.ProducerSide): SimpleBufferedSubscriber[A] = { + pt: ChannelType.ProducerSide + ): SimpleBufferedSubscriber[A] = { val maxCapacity = math.max(4, nextPowerOf2(bufferSize)) val ct = ChannelType.assemble(pt, SingleConsumer) val queue = LowLevelConcurrentQueue[A](Bounded(bufferSize), ct, fenced = false) diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala index 5f3d74fb2..46f2643ef 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala @@ -25,8 +25,8 @@ import monix.execution.Scheduler import monix.execution.schedulers.SchedulerService import scala.concurrent.duration._ -import scala.concurrent.{Await, Future} -import scala.util.{Failure, Success} +import scala.concurrent.{ Await, Future } +import scala.util.{ Failure, Success } trait BaseConcurrencySuite extends TestSuite[SchedulerService] with Checkers with ArbitraryInstancesBase { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala index 5783ee5f1..b46622fb4 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala @@ -17,12 +17,12 @@ package monix.reactive -import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} +import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream } import cats.laws._ import cats.laws.discipline._ import monix.execution.Ack import monix.execution.Ack.Continue -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object SerializableSuite extends BaseTestSuite { def serialize(obj: Serializable) = { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala index 4aee98d29..767a6cf18 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala @@ -39,7 +39,8 @@ object DeflateOperatorSuite extends BaseOperatorSuite with DeflateTestUtils { assertEquals( list.flatten, jdkDeflate(Array.empty, new Deflater(-1, false)).toList - )) + ) + ) .runToFuture } testAsync("deflates same as JDK") { _ => @@ -95,7 +96,8 @@ object DeflateOperatorSuite extends BaseOperatorSuite with DeflateTestUtils { .take(sourceCount.toLong - 1) .transform(deflate()) .map(_ => 1L), - ex) + ex + ) Sample(o, sourceCount, sourceCount, Zero, Zero) } diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala index 20c1da3f6..91ef1b297 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala @@ -19,7 +19,7 @@ package monix.reactive.compression import java.io.ByteArrayInputStream import java.util.Arrays -import java.util.zip.{Deflater, DeflaterInputStream, Inflater, InflaterInputStream} +import java.util.zip.{ Deflater, DeflaterInputStream, Inflater, InflaterInputStream } import monix.reactive.Observable diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala index 5f9ce4ace..eaf9c9080 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala @@ -98,7 +98,7 @@ object GunzipOperatorSuite extends BaseDecompressionSuite with GzipTestsUtils { .repeatEval(jdkGzip(longText, syncFlush = false)) .take(sourceCount.toLong) .transform(gunzip()) ++ Observable - .repeatEval(longText) //corrupted payload + .repeatEval(longText) // corrupted payload .transform(gunzip())) .map(_ => 1L) .onErrorFallbackTo(Observable.raiseError(ex)) @@ -113,7 +113,8 @@ object GunzipOperatorSuite extends BaseDecompressionSuite with GzipTestsUtils { .take(sourceCount.toLong - 1) .transform(gunzip(64)) .map(_ => 1L), - ex) + ex + ) Sample(o, sourceCount, sourceCount, Zero, Zero) } diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala index 220ce6b1e..f820a4ddd 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala @@ -17,8 +17,8 @@ package monix.reactive.compression -import java.io.{ByteArrayInputStream, ByteArrayOutputStream, InputStream} -import java.util.zip.{GZIPInputStream, GZIPOutputStream} +import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, InputStream } +import java.util.zip.{ GZIPInputStream, GZIPOutputStream } import monix.eval.Task import monix.reactive.Observable diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala index 98b457932..c619cbf69 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala @@ -99,7 +99,8 @@ object GzipOperatorSuite extends BaseOperatorSuite with GzipTestsUtils { .take(sourceCount.toLong - 1) .transform(gzip()) .map(_ => 1L), - ex) + ex + ) Sample(o, sourceCount, sourceCount, Zero, Zero) } diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala index e8d1f95f1..bd18e6d75 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala @@ -17,9 +17,9 @@ package monix.reactive.compression -import java.io.{ByteArrayInputStream, ByteArrayOutputStream} +import java.io.{ ByteArrayInputStream, ByteArrayOutputStream } import java.nio.charset.StandardCharsets -import java.util.zip.{CRC32, GZIPInputStream, GZIPOutputStream} +import java.util.zip.{ CRC32, GZIPInputStream, GZIPOutputStream } import monix.reactive.Observable diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala index 92849dd7c..2edf6f369 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala @@ -68,7 +68,7 @@ object InflateOperatorSuite extends BaseDecompressionSuite with DeflateTestUtils .repeatEval(jdkDeflate(longText, new Deflater(-1, true))) .take(sourceCount.toLong) .transform(inflate(noWrap = true)) ++ Observable - .repeatEval(longText) //corrupted payload + .repeatEval(longText) // corrupted payload .transform(inflate(noWrap = true))) .map(_ => 1L) .onErrorFallbackTo(Observable.raiseError(ex)) diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala index b63d76283..769b0befd 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala @@ -20,7 +20,7 @@ package monix.reactive.consumers import cats.laws._ import cats.laws.discipline._ -import monix.reactive.{BaseConcurrencySuite, Consumer, Observable} +import monix.reactive.{ BaseConcurrencySuite, Consumer, Observable } object LoadBalanceConsumerConcurrencySuite extends BaseConcurrencySuite { test("aggregate all events") { implicit s => diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala index 645365c81..a6711ae92 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala @@ -20,9 +20,9 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Cancelable import monix.execution.cancelables.BooleanCancelable -import monix.reactive.{BaseConcurrencySuite, Observable} +import monix.reactive.{ BaseConcurrencySuite, Observable } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } object ConcatMapConcurrencySuite extends BaseConcurrencySuite { val cancelTimeout = 3.minutes diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala index f92f55d55..f64aa9091 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala @@ -20,10 +20,10 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Cancelable import monix.execution.cancelables.BooleanCancelable -import monix.reactive.{BaseConcurrencySuite, Observable} +import monix.reactive.{ BaseConcurrencySuite, Observable } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } object FlatScanConcurrencySuite extends BaseConcurrencySuite { val cancelTimeout = 3.minutes diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala index ac3b81925..7a9ea13af 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import cats.laws._ import cats.laws.discipline._ import monix.eval.Task -import monix.reactive.{BaseConcurrencySuite, Observable} +import monix.reactive.{ BaseConcurrencySuite, Observable } object MapParallelOrderedConcurrencySuite extends BaseConcurrencySuite { test("mapParallelOrdered works concurrently") { implicit s => diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala index 4aa3a1c63..99aac2497 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.eval.Task -import monix.reactive.{BaseConcurrencySuite, Observable} +import monix.reactive.{ BaseConcurrencySuite, Observable } object MapParallelUnorderedConcurrencySuite extends BaseConcurrencySuite { test("mapParallelUnordered works concurrently") { implicit s => diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala index bccea4b36..4e58cde44 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala @@ -19,9 +19,9 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Cancelable -import monix.reactive.{BaseConcurrencySuite, Observable} +import monix.reactive.{ BaseConcurrencySuite, Observable } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } object MapTaskConcurrencySuite extends BaseConcurrencySuite { val cancelTimeout = 30.seconds diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala index ed1afe4ea..216dca23c 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala @@ -19,10 +19,10 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Cancelable -import monix.reactive.{BaseConcurrencySuite, Observable} +import monix.reactive.{ BaseConcurrencySuite, Observable } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } object ScanTaskConcurrencySuite extends BaseConcurrencySuite { val cancelTimeout = 30.seconds diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala index e0163b92a..6435f1b50 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala @@ -20,7 +20,7 @@ package monix.reactive.issues import monix.eval.Task import monix.execution.Scheduler import scala.concurrent.duration._ -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } object Issue1167Suite extends BaseTestSuite { @@ -33,7 +33,6 @@ object Issue1167Suite extends BaseTestSuite { assertEquals(received, Right(())) } - test("zip2 of different sizes should terminate [issue #1167]") { _ => val obs1 = Observable(1, 2, 3) val obs2 = Observable(1, 2, 3, 4) @@ -76,7 +75,6 @@ object Issue1167Suite extends BaseTestSuite { val obs5 = Observable(1, 2, 3, 4) val obs6 = Observable(1, 2, 3, 4) - testIssue1167(Observable.zip6(obs1, obs2, obs3, obs4, obs5, obs6)) } @@ -170,6 +168,9 @@ object Issue1167Suite extends BaseTestSuite { val received: List[Seq[Int]] = Observable.zipList(obs1, obs2, obs3, obs4, obs5, obs6).toListL.runSyncUnsafe() - assertEquals(received, List(List(0, 0, 0, 0, 0, 0), List(1, 1, 1, 1, 1, 1), List(2, 2, 2, 2, 2, 2), List(3, 3, 3, 3, 3, 3))) + assertEquals( + received, + List(List(0, 0, 0, 0, 0, 0), List(1, 1, 1, 1, 1, 1), List(2, 2, 2, 2, 2, 2), List(3, 3, 3, 3, 3, 3)) + ) } } diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala index 0fc7fb29b..545dd9310 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala @@ -20,13 +20,13 @@ package issues import minitest.TestSuite import monix.eval.Task -import monix.execution.{Scheduler, UncaughtExceptionReporter} +import monix.execution.{ Scheduler, UncaughtExceptionReporter } import monix.execution.schedulers.SchedulerService -import monix.reactive.subjects.{AsyncSubject, Subject} +import monix.reactive.subjects.{ AsyncSubject, Subject } -import scala.concurrent.{Await, TimeoutException} +import scala.concurrent.{ Await, TimeoutException } import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object Issue908Suite extends TestSuite[SchedulerService] { val CONCURRENT_TASKS = 1000 @@ -37,7 +37,8 @@ object Issue908Suite extends TestSuite[SchedulerService] { parallelism = math.max(Runtime.getRuntime.availableProcessors(), 2), name = "issue908-suite", daemonic = true, - reporter = UncaughtExceptionReporter(_ => ())) + reporter = UncaughtExceptionReporter(_ => ()) + ) } def tearDown(env: SchedulerService): Unit = { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala index b7323a6b2..7cc5bb4f2 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala @@ -17,17 +17,17 @@ package monix.reactive.observers -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ExecutionModel.BatchedExecution import monix.execution.exceptions.DummyException import monix.reactive.OverflowStrategy.BackPressure -import monix.reactive.{BaseConcurrencySuite, Observable, Observer} +import monix.reactive.{ BaseConcurrencySuite, Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } import scala.util.Random object OverflowStrategyBackPressuredConcurrencySuite extends BaseConcurrencySuite { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala index a9b5ee125..0b398fe72 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala @@ -17,17 +17,17 @@ package monix.reactive.observers -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import monix.eval.Coeval -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.OverflowStrategy.DropNewAndSignal -import monix.reactive.{BaseConcurrencySuite, Observable, Observer} +import monix.reactive.{ BaseConcurrencySuite, Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } import scala.util.Random object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencySuite { @@ -189,7 +189,8 @@ object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencyS val buffer = BufferedSubscriber[Either[Int, Int]]( Subscriber(underlying, s), - DropNewAndSignal(8, nr => Coeval.pure(Some(Left(nr.toInt))))) + DropNewAndSignal(8, nr => Coeval.pure(Some(Left(nr.toInt)))) + ) for (i <- 1 to 100) buffer.onNext(Right(i)) @@ -289,11 +290,14 @@ object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencyS test("should send onComplete when in flight") { implicit s => val latch = new CountDownLatch(1) val promise = Promise[Ack]() - val buffer = buildNewForInt(5, new Observer[Int] { - def onError(ex: Throwable) = throw new IllegalStateException() - def onNext(elem: Int) = promise.future - def onComplete() = latch.countDown() - }) + val buffer = buildNewForInt( + 5, + new Observer[Int] { + def onError(ex: Throwable) = throw new IllegalStateException() + def onNext(elem: Int) = promise.future + def onComplete() = latch.countDown() + } + ) buffer.onNext(1) buffer.onComplete() @@ -303,11 +307,14 @@ object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencyS test("should send onComplete when at capacity") { implicit s => val latch = new CountDownLatch(1) val promise = Promise[Ack]() - val buffer = buildNewForInt(5, new Observer[Int] { - def onError(ex: Throwable) = throw new IllegalStateException() - def onNext(elem: Int) = promise.future - def onComplete() = latch.countDown() - }) + val buffer = buildNewForInt( + 5, + new Observer[Int] { + def onError(ex: Throwable) = throw new IllegalStateException() + def onNext(elem: Int) = promise.future + def onComplete() = latch.countDown() + } + ) buffer.onNext(1) buffer.onNext(2) @@ -326,14 +333,17 @@ object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencyS val complete = new CountDownLatch(1) val startConsuming = Promise[Continue.type]() - val buffer = buildNewForLong(10000, new Observer[Long] { - def onNext(elem: Long) = { - sum += elem - startConsuming.future + val buffer = buildNewForLong( + 10000, + new Observer[Long] { + def onNext(elem: Long) = { + sum += elem + startConsuming.future + } + def onError(ex: Throwable) = throw ex + def onComplete() = complete.countDown() } - def onError(ex: Throwable) = throw ex - def onComplete() = complete.countDown() - }) + ) (0 until 9999).foreach { x => buffer.onNext(x.toLong); () } buffer.onComplete() @@ -347,14 +357,17 @@ object OverflowStrategyDropNewAndSignalConcurrencySuite extends BaseConcurrencyS var sum = 0L val complete = new CountDownLatch(1) - val buffer = buildNewForLong(10000, new Observer[Long] { - def onNext(elem: Long) = { - sum += elem - Continue + val buffer = buildNewForLong( + 10000, + new Observer[Long] { + def onNext(elem: Long) = { + sum += elem + Continue + } + def onError(ex: Throwable) = throw ex + def onComplete() = complete.countDown() } - def onError(ex: Throwable) = throw ex - def onComplete() = complete.countDown() - }) + ) (0 until 9999).foreach { x => buffer.onNext(x.toLong); () } buffer.onComplete() diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala index f6fae30d2..f65fb2540 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala @@ -17,15 +17,15 @@ package monix.reactive.observers -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException import monix.reactive.OverflowStrategy.DropNew import monix.reactive.observers.buffers.DropNewBufferedSubscriber -import monix.reactive.{BaseConcurrencySuite, Observable, Observer} +import monix.reactive.{ BaseConcurrencySuite, Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Await, Future, Promise} +import scala.concurrent.{ Await, Future, Promise } import scala.util.Random object OverflowStrategyDropNewConcurrencySuite extends BaseConcurrencySuite { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala index f68c1290d..343769a6f 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala @@ -17,13 +17,13 @@ package monix.reactive.observers -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.exceptions.{BufferOverflowException, DummyException} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.exceptions.{ BufferOverflowException, DummyException } import monix.reactive.OverflowStrategy.Fail -import monix.reactive.{BaseConcurrencySuite, Observer} -import scala.concurrent.{Future, Promise} +import monix.reactive.{ BaseConcurrencySuite, Observer } +import scala.concurrent.{ Future, Promise } import scala.util.Random object OverflowStrategyFailConcurrencySuite extends BaseConcurrencySuite { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala index 53b1341d9..b4b86e0a8 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala @@ -17,17 +17,17 @@ package monix.reactive.observers -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.schedulers.SchedulerService -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.OverflowStrategy.Unbounded -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{blocking, Await, Future, Promise} +import scala.concurrent.{ blocking, Await, Future, Promise } import scala.util.Random object OverflowStrategyUnboundedConcurrencySuite extends TestSuite[SchedulerService] { diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala index a439cab4e..e75641a3d 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala @@ -17,12 +17,12 @@ package monix.reactive.subjects -import java.util.concurrent.{CountDownLatch, TimeUnit} +import java.util.concurrent.{ CountDownLatch, TimeUnit } import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.Scheduler import monix.execution.internal.RunnableAction -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } object ReplaySubjectConcurrencySuite extends TestSuite[Scheduler] { def tearDown(env: Scheduler) = () diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala index 6c3e3a820..2fe20fc7d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala @@ -19,9 +19,9 @@ package monix.reactive import cats.Contravariant import cats.arrow.Profunctor -import monix.eval.{Task, TaskLike} +import monix.eval.{ Task, TaskLike } import monix.execution.cancelables.AssignableCancelable -import monix.execution.{Callback, Cancelable, Scheduler} +import monix.execution.{ Callback, Cancelable, Scheduler } import monix.reactive.internal.consumers._ import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index afdfdae6d..dfcefd90f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -17,35 +17,48 @@ package monix.reactive -import java.io.{BufferedReader, InputStream, PrintStream, Reader} - -import cats.{Alternative, Applicative, Apply, CoflatMap, Eq, FlatMap, Functor, FunctorFilter, Monoid, NonEmptyParallel, Order, ~>} -import cats.effect.{Bracket, Effect, ExitCase, Resource} -import monix.eval.{Coeval, Task, TaskLift, TaskLike} +import java.io.{ BufferedReader, InputStream, PrintStream, Reader } + +import cats.{ + ~>, + Alternative, + Applicative, + Apply, + CoflatMap, + Eq, + FlatMap, + Functor, + FunctorFilter, + Monoid, + NonEmptyParallel, + Order +} +import cats.effect.{ Bracket, Effect, ExitCase, Resource } +import monix.eval.{ Coeval, Task, TaskLift, TaskLike } import monix.eval.Task.defaultOptions -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer import monix.execution._ -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} -import monix.execution.cancelables.{BooleanCancelable, SingleAssignCancelable} -import monix.execution.exceptions.{DownstreamTimeoutException, UpstreamTimeoutException} -import monix.reactive.Observable.{Operator, Transformer} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } +import monix.execution.cancelables.{ BooleanCancelable, SingleAssignCancelable } +import monix.execution.exceptions.{ DownstreamTimeoutException, UpstreamTimeoutException } +import monix.reactive.Observable.{ Operator, Transformer } import monix.reactive.OverflowStrategy.Synchronous import monix.reactive.internal.builders import monix.reactive.internal.builders._ -import monix.reactive.internal.deprecated.{ObservableDeprecatedBuilders, ObservableDeprecatedMethods} +import monix.reactive.internal.deprecated.{ ObservableDeprecatedBuilders, ObservableDeprecatedMethods } import monix.reactive.internal.operators._ import monix.reactive.internal.subscribers.ForeachSubscriber import monix.reactive.observables._ import monix.reactive.observers._ import monix.reactive.subjects._ -import org.reactivestreams.{Publisher => RPublisher, Subscriber => RSubscriber} +import org.reactivestreams.{ Publisher => RPublisher, Subscriber => RSubscriber } import scala.collection.mutable import scala.collection.immutable -import scala.concurrent.duration.{Duration, FiniteDuration} -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success, Try} +import scala.concurrent.duration.{ Duration, FiniteDuration } +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success, Try } /** The `Observable` type that implements the Reactive Pattern. * @@ -362,7 +375,8 @@ abstract class Observable[+A] extends Serializable { self => */ @UnsafeBecauseImpure final def subscribe(nextFn: A => Future[Ack], errorFn: Throwable => Unit, completedFn: () => Unit)(implicit - s: Scheduler): Cancelable = { + s: Scheduler + ): Cancelable = { subscribe(new Subscriber[A] { implicit val scheduler = s @@ -762,7 +776,8 @@ abstract class Observable[+A] extends Serializable { self => final def bufferTimedWithPressure[AA >: A]( period: FiniteDuration, maxSize: Int, - sizeOf: AA => Int = (_: AA) => 1): Observable[Seq[AA]] = { + sizeOf: AA => Int = (_: AA) => 1 + ): Observable[Seq[AA]] = { val sampler = Observable.intervalAtFixedRate(period, period) new BufferWithSelectorObservable(self, sampler, maxSize, sizeOf) } @@ -913,7 +928,8 @@ abstract class Observable[+A] extends Serializable { self => * - ... */ final def bracketCaseF[F[_], B](use: A => Observable[B])(release: (A, ExitCase[Throwable]) => F[Unit])(implicit - F: TaskLike[F]): Observable[B] = + F: TaskLike[F] + ): Observable[B] = bracketCase(use)((a, e) => F(release(a, e))) /** Applies the given partial function to the source @@ -2062,7 +2078,8 @@ abstract class Observable[+A] extends Serializable { self => * @param keySelector a function that extracts the key for each item */ final def groupBy[K](keySelector: A => K)(implicit - os: Synchronous[Nothing] = OverflowStrategy.Unbounded): Observable[GroupedObservable[K, A]] = + os: Synchronous[Nothing] = OverflowStrategy.Unbounded + ): Observable[GroupedObservable[K, A]] = self.liftByOperator(new GroupByOperator[A, K](os, keySelector)) /** Given a routine make sure to execute it whenever the current @@ -2280,7 +2297,8 @@ abstract class Observable[+A] extends Serializable { self => * @see [[mapEval]] for serial execution */ final def mapParallelOrdered[B](parallelism: Int)(f: A => Task[B])(implicit - os: OverflowStrategy[B] = OverflowStrategy.Default): Observable[B] = + os: OverflowStrategy[B] = OverflowStrategy.Default + ): Observable[B] = new MapParallelOrderedObservable[A, B](self, parallelism, f, os) /** Version of [[mapParallelOrderedF]] that can work with generic @@ -2307,7 +2325,8 @@ abstract class Observable[+A] extends Serializable { self => * @see [[mapEvalF]] for serial execution */ final def mapParallelOrderedF[F[_], B](parallelism: Int)( - f: A => F[B])(implicit os: OverflowStrategy[B] = OverflowStrategy.Default, F: TaskLike[F]): Observable[B] = + f: A => F[B] + )(implicit os: OverflowStrategy[B] = OverflowStrategy.Default, F: TaskLike[F]): Observable[B] = new MapParallelOrderedObservable[A, B](self, parallelism, f.andThen(F.apply), os) /** Given a mapping function that maps events to [[monix.eval.Task tasks]], @@ -2335,7 +2354,8 @@ abstract class Observable[+A] extends Serializable { self => * @see [[mapEval]] for serial execution */ final def mapParallelUnordered[B](parallelism: Int)(f: A => Task[B])(implicit - os: OverflowStrategy[B] = OverflowStrategy.Default): Observable[B] = + os: OverflowStrategy[B] = OverflowStrategy.Default + ): Observable[B] = new MapParallelUnorderedObservable[A, B](self, parallelism, f, os) /** Version of [[mapParallelUnordered]] that can work with generic @@ -2363,7 +2383,8 @@ abstract class Observable[+A] extends Serializable { self => * @see [[mapEval]] for serial execution */ final def mapParallelUnorderedF[F[_], B](parallelism: Int)( - f: A => F[B])(implicit os: OverflowStrategy[B] = OverflowStrategy.Default, F: TaskLike[F]): Observable[B] = + f: A => F[B] + )(implicit os: OverflowStrategy[B] = OverflowStrategy.Default, F: TaskLike[F]): Observable[B] = new MapParallelUnorderedObservable[A, B](self, parallelism, f.andThen(F.apply), os) /** Converts the source Observable that emits `A` into an Observable @@ -2398,7 +2419,8 @@ abstract class Observable[+A] extends Serializable { self => */ final def merge[B](implicit ev: A <:< Observable[B], - os: OverflowStrategy[B] = OverflowStrategy.Default[B]): Observable[B] = + os: OverflowStrategy[B] = OverflowStrategy.Default[B] + ): Observable[B] = self.mergeMap(x => x)(os) /** Concurrently merges the observables emitted by the source with @@ -2432,7 +2454,8 @@ abstract class Observable[+A] extends Serializable { self => * @return $mergeMapReturn */ final def mergeMap[B](f: A => Observable[B])(implicit - os: OverflowStrategy[B] = OverflowStrategy.Default): Observable[B] = + os: OverflowStrategy[B] = OverflowStrategy.Default + ): Observable[B] = new MergeMapObservable[A, B](self, f, os, delayErrors = false) /** $mergeDescription @@ -2444,7 +2467,8 @@ abstract class Observable[+A] extends Serializable { self => */ final def mergeDelayErrors[B](implicit ev: A <:< Observable[B], - os: OverflowStrategy[B] = OverflowStrategy.Default): Observable[B] = + os: OverflowStrategy[B] = OverflowStrategy.Default + ): Observable[B] = self.mergeMap(x => x)(os) /** $mergeMapDescription @@ -2455,7 +2479,8 @@ abstract class Observable[+A] extends Serializable { self => * @return $mergeMapReturn */ final def mergeMapDelayErrors[B](f: A => Observable[B])(implicit - os: OverflowStrategy[B] = OverflowStrategy.Default): Observable[B] = + os: OverflowStrategy[B] = OverflowStrategy.Default + ): Observable[B] = new MergeMapObservable[A, B](self, f, os, delayErrors = true) /** Overrides the default [[monix.execution.Scheduler Scheduler]], @@ -3050,7 +3075,8 @@ abstract class Observable[+A] extends Serializable { self => * similar to `scanLeft` on Scala collections */ final def scanEval0F[F[_], S](seed: F[S])( - op: (S, A) => F[S])(implicit F: TaskLike[F], A: Applicative[F]): Observable[S] = + op: (S, A) => F[S] + )(implicit F: TaskLike[F], A: Applicative[F]): Observable[S] = Observable.fromTaskLike(seed).flatMap(s => s +: scanEvalF(A.pure(s))(op)) /** Applies a binary operator to a start value and all elements of @@ -3716,7 +3742,8 @@ abstract class Observable[+A] extends Serializable { self => * @param f is a mapping function over the generated pairs */ final def withLatestFrom3[B1, B2, B3, R](o1: Observable[B1], o2: Observable[B2], o3: Observable[B3])( - f: (A, B1, B2, B3) => R): Observable[R] = { + f: (A, B1, B2, B3) => R + ): Observable[R] = { self.withLatestFrom(Observable.combineLatest3(o1, o2, o3)) { (a, o) => f(a, o._1, o._2, o._3) @@ -3740,7 +3767,8 @@ abstract class Observable[+A] extends Serializable { self => o1: Observable[B1], o2: Observable[B2], o3: Observable[B3], - o4: Observable[B4])(f: (A, B1, B2, B3, B4) => R): Observable[R] = { + o4: Observable[B4] + )(f: (A, B1, B2, B3, B4) => R): Observable[R] = { self.withLatestFrom(Observable.combineLatest4(o1, o2, o3, o4)) { (a, o) => f(a, o._1, o._2, o._3, o._4) @@ -3766,7 +3794,8 @@ abstract class Observable[+A] extends Serializable { self => o2: Observable[B2], o3: Observable[B3], o4: Observable[B4], - o5: Observable[B5])(f: (A, B1, B2, B3, B4, B5) => R): Observable[R] = { + o5: Observable[B5] + )(f: (A, B1, B2, B3, B4, B5) => R): Observable[R] = { self.withLatestFrom(Observable.combineLatest5(o1, o2, o3, o4, o5)) { (a, o) => f(a, o._1, o._2, o._3, o._4, o._5) @@ -3794,7 +3823,8 @@ abstract class Observable[+A] extends Serializable { self => o3: Observable[B3], o4: Observable[B4], o5: Observable[B5], - o6: Observable[B6])(f: (A, B1, B2, B3, B4, B5, B6) => R): Observable[R] = { + o6: Observable[B6] + )(f: (A, B1, B2, B3, B4, B5, B6) => R): Observable[R] = { self.withLatestFrom(Observable.combineLatest6(o1, o2, o3, o4, o5, o6)) { (a, o) => f(a, o._1, o._2, o._3, o._4, o._5, o._6) @@ -3958,7 +3988,8 @@ abstract class Observable[+A] extends Serializable { self => subscription := unsafeSubscribeFn( SafeSubscriber( Subscriber.fromReactiveSubscriber(subscriber, subscription) - )) + ) + ) () } } @@ -4935,7 +4966,8 @@ object Observable extends ObservableDeprecatedBuilders { */ def create[A]( overflowStrategy: OverflowStrategy.Synchronous[A], - producerType: ChannelType.ProducerSide = MultiProducer)(f: Subscriber.Sync[A] => Cancelable): Observable[A] = + producerType: ChannelType.ProducerSide = MultiProducer + )(f: Subscriber.Sync[A] => Cancelable): Observable[A] = new builders.CreateObservable(overflowStrategy, producerType, f) /** $multicastDesc @@ -4958,7 +4990,8 @@ object Observable extends ObservableDeprecatedBuilders { * back-pressured) */ def multicast[A](multicast: MulticastStrategy[A], overflow: OverflowStrategy.Synchronous[A])(implicit - s: Scheduler): (Observer.Sync[A], Observable[A]) = { + s: Scheduler + ): (Observer.Sync[A], Observable[A]) = { val ref = ConcurrentSubject(multicast, overflow) (ref, ref) @@ -5205,7 +5238,8 @@ object Observable extends ObservableDeprecatedBuilders { * - ... */ def fromInputStreamF[F[_]](in: F[InputStream], chunkSize: Int = 4096)(implicit - F: TaskLike[F]): Observable[Array[Byte]] = + F: TaskLike[F] + ): Observable[Array[Byte]] = fromInputStream(F(in), chunkSize) /** Converts a `java.io.InputStream` into an observable that will @@ -5816,7 +5850,8 @@ object Observable extends ObservableDeprecatedBuilders { * @param f is the mapping function applied over the generated pairs */ def zipMap3[A1, A2, A3, R](oa1: Observable[A1], oa2: Observable[A2], oa3: Observable[A3])( - f: (A1, A2, A3) => R): Observable[R] = + f: (A1, A2, A3) => R + ): Observable[R] = new builders.Zip3Observable(oa1, oa2, oa3)(f) /** Creates a new observable from four observable sequences @@ -5835,7 +5870,8 @@ object Observable extends ObservableDeprecatedBuilders { oa1: Observable[A1], oa2: Observable[A2], oa3: Observable[A3], - oa4: Observable[A4]): Observable[(A1, A2, A3, A4)] = + oa4: Observable[A4] + ): Observable[(A1, A2, A3, A4)] = new builders.Zip4Observable(oa1, oa2, oa3, oa4)((a1, a2, a3, a4) => (a1, a2, a3, a4)) /** Creates a new observable from four observable sequences @@ -5853,7 +5889,8 @@ object Observable extends ObservableDeprecatedBuilders { * @param f is the mapping function applied over the generated pairs */ def zipMap4[A1, A2, A3, A4, R](oa1: Observable[A1], oa2: Observable[A2], oa3: Observable[A3], oa4: Observable[A4])( - f: (A1, A2, A3, A4) => R): Observable[R] = + f: (A1, A2, A3, A4) => R + ): Observable[R] = new builders.Zip4Observable(oa1, oa2, oa3, oa4)(f) /** Creates a new observable from five observable sequences @@ -5873,7 +5910,8 @@ object Observable extends ObservableDeprecatedBuilders { oa2: Observable[A2], oa3: Observable[A3], oa4: Observable[A4], - oa5: Observable[A5]): Observable[(A1, A2, A3, A4, A5)] = + oa5: Observable[A5] + ): Observable[(A1, A2, A3, A4, A5)] = new builders.Zip5Observable(oa1, oa2, oa3, oa4, oa5)((a1, a2, a3, a4, a5) => (a1, a2, a3, a4, a5)) /** Creates a new observable from five observable sequences @@ -5895,7 +5933,8 @@ object Observable extends ObservableDeprecatedBuilders { oa2: Observable[A2], oa3: Observable[A3], oa4: Observable[A4], - oa5: Observable[A5])(f: (A1, A2, A3, A4, A5) => R): Observable[R] = + oa5: Observable[A5] + )(f: (A1, A2, A3, A4, A5) => R): Observable[R] = new builders.Zip5Observable(oa1, oa2, oa3, oa4, oa5)(f) /** Creates a new observable from five observable sequences @@ -5916,7 +5955,8 @@ object Observable extends ObservableDeprecatedBuilders { oa3: Observable[A3], oa4: Observable[A4], oa5: Observable[A5], - oa6: Observable[A6]): Observable[(A1, A2, A3, A4, A5, A6)] = + oa6: Observable[A6] + ): Observable[(A1, A2, A3, A4, A5, A6)] = new builders.Zip6Observable(oa1, oa2, oa3, oa4, oa5, oa6)((a1, a2, a3, a4, a5, a6) => (a1, a2, a3, a4, a5, a6)) /** Creates a new observable from five observable sequences @@ -5939,7 +5979,8 @@ object Observable extends ObservableDeprecatedBuilders { oa3: Observable[A3], oa4: Observable[A4], oa5: Observable[A5], - oa6: Observable[A6])(f: (A1, A2, A3, A4, A5, A6) => R): Observable[R] = + oa6: Observable[A6] + )(f: (A1, A2, A3, A4, A5, A6) => R): Observable[R] = new builders.Zip6Observable(oa1, oa2, oa3, oa4, oa5, oa6)(f) /** Given an observable sequence, it [[Observable!.zip zips]] them @@ -6063,7 +6104,8 @@ object Observable extends ObservableDeprecatedBuilders { * - ... */ def resourceCaseF[F[_], A](acquire: F[A])(release: (A, ExitCase[Throwable]) => F[Unit])(implicit - F: TaskLike[F]): Observable[A] = + F: TaskLike[F] + ): Observable[A] = resourceCase(F(acquire))((a, e) => F(release(a, e))) /** Creates a combined observable from 2 source observables. @@ -6120,7 +6162,8 @@ object Observable extends ObservableDeprecatedBuilders { def combineLatest3[A1, A2, A3]( oa1: Observable[A1], oa2: Observable[A2], - oa3: Observable[A3]): Observable[(A1, A2, A3)] = + oa3: Observable[A3] + ): Observable[(A1, A2, A3)] = new builders.CombineLatest3Observable(oa1, oa2, oa3)((a1, a2, a3) => (a1, a2, a3)) /** Creates a combined observable from 3 source observables. @@ -6133,7 +6176,8 @@ object Observable extends ObservableDeprecatedBuilders { * least one item). */ def combineLatestMap3[A1, A2, A3, R](a1: Observable[A1], a2: Observable[A2], a3: Observable[A3])( - f: (A1, A2, A3) => R): Observable[R] = + f: (A1, A2, A3) => R + ): Observable[R] = new builders.CombineLatest3Observable[A1, A2, A3, R](a1, a2, a3)(f) /** Creates a combined observable from 4 source observables. @@ -6149,7 +6193,8 @@ object Observable extends ObservableDeprecatedBuilders { oa1: Observable[A1], oa2: Observable[A2], oa3: Observable[A3], - oa4: Observable[A4]): Observable[(A1, A2, A3, A4)] = + oa4: Observable[A4] + ): Observable[(A1, A2, A3, A4)] = new builders.CombineLatest4Observable(oa1, oa2, oa3, oa4)((a1, a2, a3, a4) => (a1, a2, a3, a4)) /** Creates a combined observable from 4 source observables. @@ -6165,7 +6210,8 @@ object Observable extends ObservableDeprecatedBuilders { a1: Observable[A1], a2: Observable[A2], a3: Observable[A3], - a4: Observable[A4])(f: (A1, A2, A3, A4) => R): Observable[R] = + a4: Observable[A4] + )(f: (A1, A2, A3, A4) => R): Observable[R] = new builders.CombineLatest4Observable[A1, A2, A3, A4, R](a1, a2, a3, a4)(f) /** Creates a combined observable from 5 source observables. @@ -6182,7 +6228,8 @@ object Observable extends ObservableDeprecatedBuilders { oa2: Observable[A2], oa3: Observable[A3], oa4: Observable[A4], - oa5: Observable[A5]): Observable[(A1, A2, A3, A4, A5)] = + oa5: Observable[A5] + ): Observable[(A1, A2, A3, A4, A5)] = new builders.CombineLatest5Observable(oa1, oa2, oa3, oa4, oa5)((a1, a2, a3, a4, a5) => (a1, a2, a3, a4, a5)) /** Creates a combined observable from 5 source observables. @@ -6199,7 +6246,8 @@ object Observable extends ObservableDeprecatedBuilders { a2: Observable[A2], a3: Observable[A3], a4: Observable[A4], - a5: Observable[A5])(f: (A1, A2, A3, A4, A5) => R): Observable[R] = + a5: Observable[A5] + )(f: (A1, A2, A3, A4, A5) => R): Observable[R] = new builders.CombineLatest5Observable[A1, A2, A3, A4, A5, R](a1, a2, a3, a4, a5)(f) /** Creates a combined observable from 6 source observables. @@ -6217,9 +6265,11 @@ object Observable extends ObservableDeprecatedBuilders { oa3: Observable[A3], oa4: Observable[A4], oa5: Observable[A5], - oa6: Observable[A6]): Observable[(A1, A2, A3, A4, A5, A6)] = + oa6: Observable[A6] + ): Observable[(A1, A2, A3, A4, A5, A6)] = new builders.CombineLatest6Observable(oa1, oa2, oa3, oa4, oa5, oa6)((a1, a2, a3, a4, a5, a6) => - (a1, a2, a3, a4, a5, a6)) + (a1, a2, a3, a4, a5, a6) + ) /** Creates a combined observable from 6 source observables. * @@ -6236,7 +6286,8 @@ object Observable extends ObservableDeprecatedBuilders { a3: Observable[A3], a4: Observable[A4], a5: Observable[A5], - a6: Observable[A6])(f: (A1, A2, A3, A4, A5, A6) => R): Observable[R] = + a6: Observable[A6] + )(f: (A1, A2, A3, A4, A5, A6) => R): Observable[R] = new builders.CombineLatest6Observable[A1, A2, A3, A4, A5, A6, R](a1, a2, a3, a4, a5, a6)(f) /** Given an observable sequence, it combines them together @@ -6334,15 +6385,18 @@ object Observable extends ObservableDeprecatedBuilders { override def apply[A](task: Task[A]): Observable[A] = Observable.fromTask(task) override def bracketCase[A, B](acquire: Observable[A])(use: A => Observable[B])( - release: (A, ExitCase[Throwable]) => Observable[Unit]): Observable[B] = + release: (A, ExitCase[Throwable]) => Observable[Unit] + ): Observable[B] = acquire.bracketCase(use)((a, e) => release(a, e).completedL) override def bracket[A, B](acquire: Observable[A])(use: A => Observable[B])( - release: A => Observable[Unit]): Observable[B] = + release: A => Observable[Unit] + ): Observable[B] = acquire.bracket(use)(release.andThen(_.completedL)) override def guarantee[A](fa: Observable[A])(finalizer: Observable[Unit]): Observable[A] = fa.guarantee(finalizer.completedL) override def guaranteeCase[A](fa: Observable[A])( - finalizer: ExitCase[Throwable] => Observable[Unit]): Observable[A] = + finalizer: ExitCase[Throwable] => Observable[Unit] + ): Observable[A] = fa.guaranteeCase(e => finalizer(e).completedL) override def uncancelable[A](fa: Observable[A]): Observable[A] = fa.uncancelable @@ -6359,7 +6413,7 @@ object Observable extends ObservableDeprecatedBuilders { implicit val observableNonEmptyParallel: NonEmptyParallel.Aux[Observable, CombineObservable.Type] = new NonEmptyParallel[Observable] { import CombineObservable.unwrap - import CombineObservable.{apply => wrap} + import CombineObservable.{ apply => wrap } override type F[A] = CombineObservable.Type[A] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala b/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala index 65d84bb0a..63ba1b642 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala @@ -17,11 +17,11 @@ package monix.reactive -import cats.{~>, Eval} -import cats.effect.{IO, SyncIO} -import monix.eval.{Coeval, Task, TaskLike} +import cats.{ ~>, Eval } +import cats.effect.{ IO, SyncIO } +import monix.eval.{ Coeval, Task, TaskLike } import monix.reactive.internal.builders.EvalAlwaysObservable -import org.reactivestreams.{Publisher => RPublisher} +import org.reactivestreams.{ Publisher => RPublisher } import scala.annotation.implicitNotFound import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala index b364bf39b..2f77c5486 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala @@ -19,15 +19,15 @@ package monix.reactive import java.io.PrintStream -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution._ import monix.execution.cancelables.BooleanCancelable import monix.reactive.internal.rstreams._ import monix.reactive.observers.Subscriber -import org.reactivestreams.{Subscriber => RSubscriber} +import org.reactivestreams.{ Subscriber => RSubscriber } import scala.annotation.tailrec -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success import scala.util.control.NonFatal @@ -123,7 +123,8 @@ object Observer { * Monix Rx implementation. */ def fromReactiveSubscriber[A](subscriber: RSubscriber[A], subscription: Cancelable)( - implicit s: Scheduler): Observer[A] = + implicit s: Scheduler + ): Observer[A] = ReactiveSubscriberAsMonixSubscriber(subscriber, subscription) /** Transforms the source [[Observer]] into a `org.reactivestreams.Subscriber` @@ -164,7 +165,8 @@ object Observer { * @param iterable is the collection of items to push downstream */ def feed[A](target: Observer[A], subscription: BooleanCancelable, iterable: Iterable[A])( - implicit s: Scheduler): Future[Ack] = { + implicit s: Scheduler + ): Future[Ack] = { try feed(target, subscription, iterable.iterator) catch { @@ -189,7 +191,8 @@ object Observer { * @param iterator is the collection of items to push downstream */ def feed[A](target: Observer[A], subscription: BooleanCancelable, iterator: Iterator[A])( - implicit s: Scheduler): Future[Ack] = { + implicit s: Scheduler + ): Future[Ack] = { def scheduleFeedLoop(promise: Promise[Ack], iterator: Iterator[A]): Future[Ack] = { s.execute(new Runnable { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala index dc125181a..38970d402 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala @@ -18,13 +18,13 @@ package monix.reactive import monix.execution.ChannelType.MultiProducer -import monix.execution.{ChannelType, Scheduler} +import monix.execution.{ ChannelType, Scheduler } import scala.util.control.NonFatal import monix.reactive.Observable.Operator -import monix.reactive.OverflowStrategy.{Synchronous, Unbounded} -import monix.reactive.Pipe.{LiftedPipe, TransformedPipe} -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.OverflowStrategy.{ Synchronous, Unbounded } +import monix.reactive.Pipe.{ LiftedPipe, TransformedPipe } +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import monix.reactive.subjects._ /** Represents a factory for an input/output channel for @@ -82,7 +82,8 @@ abstract class Pipe[I, +O] extends Serializable { * can be multi producer (the default) or single producer */ def concurrent(strategy: Synchronous[I], producerType: ChannelType.ProducerSide)( - implicit s: Scheduler): (Observer.Sync[I], Observable[O]) = { + implicit s: Scheduler + ): (Observer.Sync[I], Observable[O]) = { val (in, out) = multicast(s) val buffer = BufferedSubscriber.synchronous[I](Subscriber(in, s), strategy, producerType) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala index c37e8fa90..6cceb627b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala @@ -19,7 +19,7 @@ package monix.reactive.instances import cats.arrow.Profunctor import monix.execution.Ack.Stop -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.observers.Subscriber import monix.reactive.subjects.Subject diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala index 5a954339c..5a5a0a1f7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.builders import monix.execution.Callback import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.Cancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -47,17 +47,18 @@ private[reactive] final class AsyncStateActionObservable[S, A](seed: => S, f: S def loop(subscriber: Subscriber[A], state: S): Task[Unit] = try f(state).redeemWith( - { ex => - subscriber.onError(ex) - Task.unit - }, { - case (a, newState) => - Task.fromFuture(subscriber.onNext(a)).flatMap { - case Continue => loop(subscriber, newState) - case Stop => Task.unit - } - } - ) + { ex => + subscriber.onError(ex) + Task.unit + }, + { + case (a, newState) => + Task.fromFuture(subscriber.onNext(a)).flatMap { + case Continue => loop(subscriber, newState) + case Stop => Task.unit + } + } + ) catch { case ex if NonFatal(ex) => Task.raiseError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala index 637f1f4f8..56377d3bb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala @@ -17,19 +17,19 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.cancelables.BooleanCancelable import monix.execution.compat.internal.toSeq import monix.execution.exceptions.APIContractViolationException -import monix.execution.{Ack, Cancelable, ExecutionModel, Scheduler} +import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec import scala.concurrent.Future import scala.util.control.NonFatal -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class BufferedIteratorAsObservable[A](iterator: Iterator[A], bufferSize: Int) extends Observable[Seq[A]] { @@ -47,7 +47,7 @@ private[reactive] final class BufferedIteratorAsObservable[A](iterator: Iterator } private def startLoop(subscriber: Subscriber[Seq[A]]): Cancelable = { - import subscriber.{scheduler => s} + import subscriber.{ scheduler => s } // Protect against contract violations - we are only allowed to // call onError if no other terminal event has been called. var streamErrors = true @@ -92,7 +92,8 @@ private[reactive] final class BufferedIteratorAsObservable[A](iterator: Iterator iter: Iterator[A], out: Subscriber[Seq[A]], c: BooleanCancelable, - em: ExecutionModel)(implicit s: Scheduler): Unit = { + em: ExecutionModel + )(implicit s: Scheduler): Unit = { ack.onComplete { case Success(next) => @@ -127,7 +128,8 @@ private[reactive] final class BufferedIteratorAsObservable[A](iterator: Iterator out: Subscriber[Seq[A]], c: BooleanCancelable, em: ExecutionModel, - syncIndex: Int)(implicit s: Scheduler): Unit = { + syncIndex: Int + )(implicit s: Scheduler): Unit = { // The result of onNext calls, on which we must do back-pressure var ack: Future[Ack] = Continue // We do not want to catch errors from our interaction with our diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala index 73362b941..65d6f0841 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.builders import java.io.Reader import java.util -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.cancelables.BooleanCancelable import monix.execution._ @@ -32,8 +32,8 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec -import scala.concurrent.{blocking, Future} -import scala.util.{Failure, Success} +import scala.concurrent.{ blocking, Future } +import scala.util.{ Failure, Success } private[reactive] final class CharsReaderObservable(in: Reader, chunkSize: Int) extends Observable[Array[Char]] { @@ -61,7 +61,8 @@ private[reactive] final class CharsReaderObservable(in: Reader, chunkSize: Int) b: Array[Char], out: Subscriber[Array[Char]], c: BooleanCancelable, - em: ExecutionModel)(implicit s: Scheduler): Unit = { + em: ExecutionModel + )(implicit s: Scheduler): Unit = { ack.onComplete { case Success(next) => @@ -82,7 +83,8 @@ private[reactive] final class CharsReaderObservable(in: Reader, chunkSize: Int) out: Subscriber[Array[Char]], c: BooleanCancelable, em: ExecutionModel, - syncIndex: Int)(implicit s: Scheduler): Unit = { + syncIndex: Int + )(implicit s: Scheduler): Unit = { // Dealing with mutable status in order to keep the // loop tail-recursive :-( diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala index 140b0a02b..3d2e174e1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala @@ -17,8 +17,8 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -28,8 +28,8 @@ import scala.concurrent.Future import scala.util.Success private[reactive] final class CombineLatest2Observable[A1, A2, +R](obsA1: Observable[A1], obsA2: Observable[A2])( - f: (A1, A2) => R) - extends Observable[R] { + f: (A1, A2) => R +) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { import out.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala index 3c5245241..4dfb949e1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala @@ -17,8 +17,8 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -30,7 +30,8 @@ import scala.util.Success private[reactive] final class CombineLatest3Observable[A1, A2, A3, +R]( obsA1: Observable[A1], obsA2: Observable[A2], - obsA3: Observable[A3])(f: (A1, A2, A3) => R) + obsA3: Observable[A3] +)(f: (A1, A2, A3) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala index 3e2977a6b..d4351d4e3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -31,7 +31,8 @@ private[reactive] final class CombineLatest4Observable[A1, A2, A3, A4, +R]( obsA1: Observable[A1], obsA2: Observable[A2], obsA3: Observable[A3], - obsA4: Observable[A4])(f: (A1, A2, A3, A4) => R) + obsA4: Observable[A4] +)(f: (A1, A2, A3, A4) => R) extends Observable[R] { lock => def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala index 3990b6153..68e180232 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala @@ -17,8 +17,8 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -32,7 +32,8 @@ private[reactive] final class CombineLatest5Observable[A1, A2, A3, A4, A5, +R]( obsA2: Observable[A2], obsA3: Observable[A3], obsA4: Observable[A4], - obsA5: Observable[A5])(f: (A1, A2, A3, A4, A5) => R) + obsA5: Observable[A5] +)(f: (A1, A2, A3, A4, A5) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala index 376a9e69e..be19373be 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala @@ -17,8 +17,8 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -33,7 +33,8 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + obsA3: Observable[A3], obsA4: Observable[A4], obsA5: Observable[A5], - obsA6: Observable[A6])(f: (A1, A2, A3, A4, A5, A6) => R) + obsA6: Observable[A6] +)(f: (A1, A2, A3, A4, A5, A6) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala index 3f3a8f2ed..6ab4df109 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala index 933ae458e..1f637ddf7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala @@ -18,16 +18,16 @@ package monix.reactive.internal.builders import monix.execution.Cancelable -import monix.execution.cancelables.{AssignableCancelable, MultiAssignCancelable, SingleAssignCancelable} +import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable, SingleAssignCancelable } import monix.reactive.Observable import monix.reactive.observables.ChainedObservable -import monix.reactive.observables.ChainedObservable.{subscribe => chain} +import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber private[reactive] final class ConsObservable[+A](head: A, tail: Observable[A]) extends ChainedObservable[A] { def unsafeSubscribeFn(conn: AssignableCancelable.Multi, out: Subscriber[A]): Unit = { - import out.{scheduler => s} + import out.{ scheduler => s } out.onNext(head).syncOnContinue(chain(tail, conn, out))(s) () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala index 7d0a9529c..17b4c35f9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala @@ -17,17 +17,17 @@ package monix.reactive.internal.builders -import monix.execution.{Cancelable, ChannelType} +import monix.execution.{ Cancelable, ChannelType } import scala.util.control.NonFatal -import monix.reactive.observers.{BufferedSubscriber, Subscriber} -import monix.reactive.{Observable, OverflowStrategy} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import monix.reactive.{ Observable, OverflowStrategy } /** Implementation for [[monix.reactive.Observable.create]]. */ private[reactive] final class CreateObservable[+A]( overflowStrategy: OverflowStrategy.Synchronous[A], producerType: ChannelType.ProducerSide, - f: Subscriber.Sync[A] => Cancelable) - extends Observable[A] { + f: Subscriber.Sync[A] => Cancelable +) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { val out = BufferedSubscriber.synchronous(subscriber, overflowStrategy, producerType) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala index ed3155529..140cb32fe 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala @@ -18,11 +18,11 @@ package monix.reactive.internal.builders import monix.execution.Cancelable -import monix.execution.cancelables.{AssignableCancelable, MultiAssignCancelable} +import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable } import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observables.ChainedObservable -import monix.reactive.observables.ChainedObservable.{subscribe => chain} +import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber private[reactive] final class DeferObservable[+A](factory: () => Observable[A]) extends ChainedObservable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala index 7f1c79f8e..be8233eca 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.builders import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable, ExecutionModel} +import monix.execution.{ Ack, Cancelable, ExecutionModel } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala index 8c9c8a863..c15d038e6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala @@ -19,12 +19,12 @@ package monix.reactive.internal.builders import monix.execution.Ack.Stop import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.atomic.{Atomic, AtomicInt} +import monix.execution.atomic.{ Atomic, AtomicInt } import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Observer} -import scala.concurrent.{Future, Promise} +import monix.reactive.{ Observable, Observer } +import scala.concurrent.{ Future, Promise } private[reactive] final class FirstStartedObservable[A](source: Observable[A]*) extends Observable[A] { @@ -68,7 +68,8 @@ private[reactive] final class FirstStartedObservable[A](source: Observable[A]*) observer: Observer[A], finishLine: AtomicInt, idx: Int, - p: Promise[Int])(implicit s: Scheduler): Cancelable = { + p: Promise[Int] + )(implicit s: Scheduler): Cancelable = { observable.unsafeSubscribeFn(new Observer[A] { // for fast path diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala index db3750dfd..4afe84073 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala @@ -18,18 +18,18 @@ package monix.reactive.internal.builders import scala.util.control.NonFatal -import monix.execution.{Cancelable, CancelableFuture} +import monix.execution.{ Cancelable, CancelableFuture } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** Converts any `Future` into an observable */ private[reactive] final class FutureAsObservable[A](factory: => Future[A]) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { - import subscriber.{scheduler => s} + import subscriber.{ scheduler => s } // Protects calls to user code var streamErrors = true try { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala index 49b5da4b4..30cc40e54 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.builders import java.io.InputStream import java.util -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ import monix.reactive.Observable @@ -30,9 +30,9 @@ import monix.execution.exceptions.APIContractViolationException import monix.execution.internal.Platform import scala.annotation.tailrec -import scala.concurrent.{blocking, Future} +import scala.concurrent.{ blocking, Future } import scala.util.control.NonFatal -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class InputStreamObservable(in: InputStream, chunkSize: Int) extends Observable[Array[Byte]] { @@ -61,7 +61,8 @@ private[reactive] final class InputStreamObservable(in: InputStream, chunkSize: b: Array[Byte], out: Subscriber[Array[Byte]], c: BooleanCancelable, - em: ExecutionModel)(implicit s: Scheduler): Unit = { + em: ExecutionModel + )(implicit s: Scheduler): Unit = { ack.onComplete { case Success(next) => @@ -82,7 +83,8 @@ private[reactive] final class InputStreamObservable(in: InputStream, chunkSize: out: Subscriber[Array[Byte]], c: BooleanCancelable, em: ExecutionModel, - syncIndex: Int)(implicit s: Scheduler): Unit = { + syncIndex: Int + )(implicit s: Scheduler): Unit = { // Dealing with mutable status in order to keep the // loop tail-recursive :-( diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala index 8ddd6469f..456d803a8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala @@ -17,12 +17,12 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } private[reactive] final class Interleave2Observable[+A](obsA1: Observable[A], obsA2: Observable[A]) extends Observable[A] { @@ -82,7 +82,8 @@ private[reactive] final class Interleave2Observable[+A](obsA1: Observable[A], ob def onNext(elem: A): Future[Ack] = lock.synchronized { def sendSignal(elem: A): Future[Ack] = lock.synchronized { - if (isDone) Stop else { + if (isDone) Stop + else { downstreamAck = out.onNext(elem) pauseA1 = Promise[Ack]() pauseA2.completeWith(downstreamAck) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala index 767bdee76..b92d8c73d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala @@ -18,19 +18,19 @@ package monix.reactive.internal.builders import monix.execution.cancelables.MultiAssignCancelable -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class IntervalFixedDelayObservable(initialDelay: FiniteDuration, delay: FiniteDuration) extends Observable[Long] { def unsafeSubscribeFn(subscriber: Subscriber[Long]): Cancelable = { - import subscriber.{scheduler => s} + import subscriber.{ scheduler => s } val o = subscriber val task = MultiAssignCancelable() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala index b577ff61a..0ce74c9d3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala @@ -19,21 +19,21 @@ package monix.reactive.internal.builders import java.util.concurrent.TimeUnit -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.MultiAssignCancelable import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class IntervalFixedRateObservable(initialDelay: FiniteDuration, period: FiniteDuration) extends Observable[Long] { override def unsafeSubscribeFn(subscriber: Subscriber[Long]): Cancelable = { - import subscriber.{scheduler => s} + import subscriber.{ scheduler => s } val o = subscriber val task = MultiAssignCancelable() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala index edd4471a2..5efdb35af 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ import monix.reactive.Observable @@ -27,7 +27,7 @@ import monix.execution.exceptions.APIContractViolationException import scala.util.control.NonFatal import scala.annotation.tailrec import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** Converts any `Iterator` into an observable */ private[reactive] final class IteratorAsObservable[A](iterator: Iterator[A]) extends Observable[A] { @@ -43,7 +43,7 @@ private[reactive] final class IteratorAsObservable[A](iterator: Iterator[A]) ext } private def startLoop(subscriber: Subscriber[A]): Cancelable = { - import subscriber.{scheduler => s} + import subscriber.{ scheduler => s } // Protect against contract violations - we are only allowed to // call onError if no other terminal event has been called. var streamErrors = true @@ -88,7 +88,8 @@ private[reactive] final class IteratorAsObservable[A](iterator: Iterator[A]) ext iter: Iterator[A], out: Subscriber[A], c: BooleanCancelable, - em: ExecutionModel)(implicit s: Scheduler): Unit = { + em: ExecutionModel + )(implicit s: Scheduler): Unit = { ack.onComplete { case Success(next) => @@ -123,7 +124,8 @@ private[reactive] final class IteratorAsObservable[A](iterator: Iterator[A]) ext out: Subscriber[A], c: BooleanCancelable, em: ExecutionModel, - syncIndex: Int)(implicit s: Scheduler): Unit = { + syncIndex: Int + )(implicit s: Scheduler): Unit = { // The result of onNext calls, on which we must do back-pressure var ack: Future[Ack] = Continue // We do not want to catch errors from our interaction with our diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala index 4cc392c97..9b92f29f6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.builders -import java.io.{BufferedReader, Reader} +import java.io.{ BufferedReader, Reader } -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ import monix.reactive.Observable @@ -30,8 +30,8 @@ import monix.execution.internal.Platform import scala.util.control.NonFatal import scala.annotation.tailrec -import scala.concurrent.{blocking, Future} -import scala.util.{Failure, Success} +import scala.concurrent.{ blocking, Future } +import scala.util.{ Failure, Success } private[reactive] final class LinesReaderObservable(reader: Reader) extends Observable[String] { self => @@ -59,7 +59,8 @@ private[reactive] final class LinesReaderObservable(reader: Reader) extends Obse } private def reschedule(ack: Future[Ack], out: Subscriber[String], c: BooleanCancelable, em: ExecutionModel)( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { ack.onComplete { case Success(next) => @@ -76,7 +77,8 @@ private[reactive] final class LinesReaderObservable(reader: Reader) extends Obse @tailrec private def fastLoop(out: Subscriber[String], c: BooleanCancelable, em: ExecutionModel, syncIndex: Int)( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { // Dealing with mutable status in order to keep the // loop tail-recursive :-( diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala index c0b5093b2..6f47d8700 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala @@ -17,14 +17,14 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.collection.mutable -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success /** Given a sequence of priority/observable pairs, combines them into a new @@ -44,8 +44,8 @@ import scala.util.Success * given source will be in flight at a time. */ private[reactive] final class MergePrioritizedListObservable[A]( - sources: Seq[(Int, Observable[A])]) - extends Observable[A] { + sources: Seq[(Int, Observable[A])] +) extends Observable[A] { override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { import out.scheduler @@ -88,12 +88,12 @@ private[reactive] final class MergePrioritizedListObservable[A]( def signalOnNext(): Future[Ack] = { lastAck = lastAck match { case Continue => processNext() - case Stop => Stop + case Stop => Stop case async => async.flatMap { // async execution, we have to re-sync case Continue => lock.synchronized(processNext()) - case Stop => Stop + case Stop => Stop } } lastAck diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala index 2ab6559fd..bd52d7d3a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala @@ -18,14 +18,15 @@ package monix.reactive.internal.builders import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Callback, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Callback, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.util.control.NonFatal -private[reactive] final class PaginateEvalObservable[S, A](seed: S, f: S => Task[(A, Option[S])]) extends Observable[A] { +private[reactive] final class PaginateEvalObservable[S, A](seed: S, f: S => Task[(A, Option[S])]) + extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { import subscriber.scheduler @@ -48,23 +49,24 @@ private[reactive] final class PaginateEvalObservable[S, A](seed: S, f: S => Task def loop(subscriber: Subscriber[A], state: S): Task[Unit] = try f(state).redeemWith( - { ex => - subscriber.onError(ex) - Task.unit - }, { - case (a, Some(newState)) => - Task.fromFuture(subscriber.onNext(a)).flatMap { - case Continue => - loop(subscriber, newState) - case Stop => - Task.unit - } - case (a, None) => - subscriber.onNext(a) - subscriber.onComplete() + { ex => + subscriber.onError(ex) Task.unit - } - ) + }, + { + case (a, Some(newState)) => + Task.fromFuture(subscriber.onNext(a)).flatMap { + case Continue => + loop(subscriber, newState) + case Stop => + Task.unit + } + case (a, None) => + subscriber.onNext(a) + subscriber.onComplete() + Task.unit + } + ) catch { case ex if NonFatal(ex) => Task.raiseError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala index ddc4f4aba..19df42b9e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala @@ -17,15 +17,15 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec import scala.util.control.NonFatal -import scala.util.{Failure, Try} +import scala.util.{ Failure, Try } private[reactive] final class PaginateObservable[S, A](seed: => S, f: S => (A, Option[S])) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { @@ -48,7 +48,7 @@ private[reactive] final class PaginateObservable[S, A](seed: => S, f: S => (A, O extends Runnable { self => - import o.{scheduler => s} + import o.{ scheduler => s } private[this] var seed = initialSeed private[this] val em = s.executionModel diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala index ee8283cd6..adfd719cf 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala @@ -17,19 +17,19 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.execution.cancelables.SingleAssignCancelable import scala.util.control.NonFatal import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Pipe} +import monix.reactive.{ Observable, Pipe } import scala.concurrent.Future private[reactive] final class PipeThroughSelectorObservable[A, B, C]( source: Observable[A], pipe: Pipe[A, B], - f: Observable[B] => Observable[C]) - extends Observable[C] { + f: Observable[B] => Observable[C] +) extends Observable[C] { def unsafeSubscribeFn(out: Subscriber[C]): Cancelable = { import out.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala index 10244d272..cfb22a089 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala @@ -17,15 +17,15 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable -import monix.execution.{Ack, Cancelable, ExecutionModel, Scheduler} +import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** Generates ranges */ private[reactive] final class RangeObservable(from: Long, until: Long, step: Long = 1) extends Observable[Long] { @@ -46,7 +46,8 @@ private[reactive] final class RangeObservable(from: Long, until: Long, step: Lon @tailrec private def loop(c: BooleanCancelable, downstream: Subscriber[Long], em: ExecutionModel, from: Long, syncIndex: Int)( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { val ack = downstream.onNext(from) val nextFrom = from + step @@ -71,7 +72,8 @@ private[reactive] final class RangeObservable(from: Long, until: Long, step: Lon ack: Future[Ack], downstream: Subscriber[Long], em: ExecutionModel, - from: Long)(implicit s: Scheduler): Unit = { + from: Long + )(implicit s: Scheduler): Unit = { ack.onComplete { case Success(success) => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala index 7bc6fe4a8..3c685f67e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala @@ -22,7 +22,7 @@ import monix.execution.rstreams.SingleAssignSubscription import monix.reactive.Observable import monix.reactive.observers.Subscriber import org.reactivestreams -import org.reactivestreams.{Subscription, Publisher => RPublisher} +import org.reactivestreams.{ Publisher => RPublisher, Subscription } /** Implementation for `Observable.fromReactivePublisher` */ private[reactive] final class ReactiveObservable[A](publisher: RPublisher[A], requestCount: Int) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala index 041dc6b19..e93d29bed 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ import scala.util.control.NonFatal @@ -26,7 +26,7 @@ import monix.reactive.observers.Subscriber import scala.annotation.tailrec import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class RepeatEvalObservable[+A](eval: => A) extends Observable[A] { @@ -38,7 +38,8 @@ private[reactive] final class RepeatEvalObservable[+A](eval: => A) extends Obser } def reschedule(ack: Future[Ack], o: Subscriber[A], c: BooleanCancelable, em: ExecutionModel)( - implicit s: Scheduler): Unit = + implicit s: Scheduler + ): Unit = ack.onComplete { case Success(Continue) => fastLoop(o, c, em, 0) @@ -50,7 +51,8 @@ private[reactive] final class RepeatEvalObservable[+A](eval: => A) extends Obser @tailrec def fastLoop(o: Subscriber[A], c: BooleanCancelable, em: ExecutionModel, syncIndex: Int)( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { val ack = try o.onNext(eval) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala index 6ba0904b7..5f33395a3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala @@ -17,15 +17,15 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable -import monix.execution.{Ack, Cancelable, ExecutionModel, Scheduler} +import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class RepeatOneObservable[A](elem: A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { @@ -36,7 +36,8 @@ private[reactive] final class RepeatOneObservable[A](elem: A) extends Observable } def reschedule(ack: Future[Ack], o: Subscriber[A], c: BooleanCancelable, em: ExecutionModel)( - implicit s: Scheduler): Unit = + implicit s: Scheduler + ): Unit = ack.onComplete { case Success(Continue) => fastLoop(o, c, em, 0) @@ -48,7 +49,8 @@ private[reactive] final class RepeatOneObservable[A](elem: A) extends Observable @tailrec def fastLoop(o: Subscriber[A], c: BooleanCancelable, em: ExecutionModel, syncIndex: Int)( - implicit s: Scheduler): Unit = { + implicit s: Scheduler + ): Unit = { val ack = o.onNext(elem) val nextIndex = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala index 7c77525c9..c448aa3bd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala @@ -19,12 +19,12 @@ package monix.reactive.internal.builders import java.util.concurrent.TimeUnit import monix.execution.cancelables.MultiAssignCancelable -import monix.execution.{Ack, Cancelable, Scheduler} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable, Scheduler } +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.duration._ -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } private[reactive] final class RepeatedValueObservable[A](initialDelay: FiniteDuration, period: FiniteDuration, unit: A) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala index e40432386..af6150952 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala @@ -22,7 +22,7 @@ package builders import cats.effect.ExitCase import monix.execution.Callback import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.Cancelable import monix.execution.cancelables.AssignableCancelable import monix.reactive.observables.ChainedObservable @@ -31,8 +31,8 @@ import scala.util.Success private[reactive] final class ResourceCaseObservable[A]( acquire: Task[A], - release: (A, ExitCase[Throwable]) => Task[Unit]) - extends ChainedObservable[A] { + release: (A, ExitCase[Throwable]) => Task[Unit] +) extends ChainedObservable[A] { def unsafeSubscribeFn(conn: AssignableCancelable.Multi, subscriber: Subscriber[A]): Unit = { implicit val s = subscriber.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala index 9613b1c41..d1a7796d8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala @@ -18,14 +18,14 @@ package monix.reactive.internal.builders import monix.execution.cancelables.BooleanCancelable -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec -import scala.util.{Failure, Try} +import scala.util.{ Failure, Try } private[reactive] final class StateActionObservable[S, A](seed: => S, f: S => (A, S)) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { @@ -47,7 +47,7 @@ private[reactive] final class StateActionObservable[S, A](seed: => S, f: S => (A private[this] final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => (A, S)) extends Runnable { self => - import o.{scheduler => s} + import o.{ scheduler => s } private[this] var seed = initialSeed private[this] val em = s.executionModel diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala index 30eeaa7f7..0343a8f9d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala @@ -18,16 +18,16 @@ package monix.reactive.internal.builders import monix.execution.Scheduler -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.AtomicBoolean -import monix.execution.cancelables.{SingleAssignCancelable, StackedCancelable} +import monix.execution.cancelables.{ SingleAssignCancelable, StackedCancelable } import scala.util.control.NonFatal import monix.execution.schedulers.TrampolineExecutionContext.immediate -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } /** Implementation for `Observable.tailRecM`. */ private[monix] final class TailRecMObservable[A, B](seed: A, f: A => Observable[Either[A, B]]) extends Observable[B] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala index c46d74760..88d4cc545 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.builders import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Callback, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Callback, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -48,22 +48,23 @@ private[reactive] final class UnfoldEvalObservable[S, A](seed: S, f: S => Task[O def loop(subscriber: Subscriber[A], state: S): Task[Unit] = try f(state).redeemWith( - { ex => - subscriber.onError(ex) - Task.unit - }, { - case Some((a, newState)) => - Task.fromFuture(subscriber.onNext(a)).flatMap { - case Continue => - loop(subscriber, newState) - case Stop => - Task.unit - } - case None => - subscriber.onComplete() + { ex => + subscriber.onError(ex) Task.unit - } - ) + }, + { + case Some((a, newState)) => + Task.fromFuture(subscriber.onNext(a)).flatMap { + case Continue => + loop(subscriber, newState) + case Stop => + Task.unit + } + case None => + subscriber.onComplete() + Task.unit + } + ) catch { case ex if NonFatal(ex) => Task.raiseError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala index 34c39956e..3bb6e5560 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala @@ -17,15 +17,15 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec import scala.util.control.NonFatal -import scala.util.{Failure, Try} +import scala.util.{ Failure, Try } private[reactive] final class UnfoldObservable[S, A](seed: => S, f: S => Option[(A, S)]) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { @@ -48,7 +48,7 @@ private[reactive] final class UnfoldObservable[S, A](seed: => S, f: S => Option[ extends Runnable { self => - import o.{scheduler => s} + import o.{ scheduler => s } private[this] var seed = initialSeed private[this] val em = s.executionModel diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala index 6ff1e2b08..50fc652b3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.builders -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.internal.builders.UnsafeCreateObservable.SafeSubscriber import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala index 65535de55..7d5d5346d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala @@ -18,13 +18,13 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success private[reactive] final class Zip2Observable[A1, A2, +R](obsA1: Observable[A1], obsA2: Observable[A2])(f: (A1, A2) => R) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala index 0efac6886..f0f1d7e9f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala @@ -17,20 +17,21 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success private[reactive] final class Zip3Observable[A1, A2, A3, +R]( obsA1: Observable[A1], obsA2: Observable[A2], - obsA3: Observable[A3])(f: (A1, A2, A3) => R) + obsA3: Observable[A3] +)(f: (A1, A2, A3) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala index 379729377..8975cc282 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala @@ -17,21 +17,22 @@ package monix.reactive.internal.builders -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success private[reactive] final class Zip4Observable[A1, A2, A3, A4, +R]( obsA1: Observable[A1], obsA2: Observable[A2], obsA3: Observable[A3], - obsA4: Observable[A4])(f: (A1, A2, A3, A4) => R) + obsA4: Observable[A4] +)(f: (A1, A2, A3, A4) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala index 49856a371..16dd8b763 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala @@ -18,13 +18,13 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( @@ -32,7 +32,8 @@ private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( obsA2: Observable[A2], obsA3: Observable[A3], obsA4: Observable[A4], - obsA5: Observable[A5])(f: (A1, A2, A3, A4, A5) => R) + obsA5: Observable[A5] +)(f: (A1, A2, A3, A4, A5) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala index 7285bcbb8..7ddc0292f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala @@ -18,13 +18,13 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable } +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( @@ -33,7 +33,8 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( obsA3: Observable[A3], obsA4: Observable[A4], obsA5: Observable[A5], - obsA6: Observable[A6])(f: (A1, A2, A3, A4, A5, A6) => R) + obsA6: Observable[A6] +)(f: (A1, A2, A3, A4, A5, A6) => R) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala index b84bf6987..ad2d1ecc1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import monix.reactive.Consumer import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala index 8450c1344..f40a43ee5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Continue -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import monix.reactive.Consumer import monix.reactive.observers.Subscriber @@ -28,7 +28,8 @@ import monix.reactive.observers.Subscriber private[reactive] object CompleteConsumer extends Consumer.Sync[Any, Unit] { override def createSubscriber( cb: Callback[Throwable, Unit], - s: Scheduler): (Subscriber.Sync[Any], AssignableCancelable) = { + s: Scheduler + ): (Subscriber.Sync[Any], AssignableCancelable) = { val out = new Subscriber.Sync[Any] { implicit val scheduler = s def onNext(elem: Any): Ack = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala index 8466b636d..baa4b4d15 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import scala.util.control.NonFatal import monix.reactive.Consumer diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala index 47f840d80..8cf1bbc83 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala @@ -18,16 +18,16 @@ package monix.reactive.internal.consumers import monix.execution.Callback -import monix.execution.{Cancelable, Scheduler} -import monix.execution.cancelables.{AssignableCancelable, SingleAssignCancelable} -import monix.reactive.{Consumer, Observer} +import monix.execution.{ Cancelable, Scheduler } +import monix.execution.cancelables.{ AssignableCancelable, SingleAssignCancelable } +import monix.reactive.{ Consumer, Observer } import monix.reactive.observers.Subscriber -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } /** Implementation for [[monix.reactive.Consumer.create]]. */ private[reactive] final class CreateConsumer[-In, +Out]( - f: (Scheduler, Cancelable, Callback[Throwable, Out]) => Observer[In]) - extends Consumer[In, Out] { + f: (Scheduler, Cancelable, Callback[Throwable, Out]) => Observer[In] +) extends Consumer[In, Out] { def createSubscriber(cb: Callback[Throwable, Out], s: Scheduler): (Subscriber[In], AssignableCancelable) = { val conn = SingleAssignCancelable() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala index ebfda4e79..b6b599673 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala @@ -20,15 +20,16 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop import monix.execution.cancelables.AssignableCancelable -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.observers.Subscriber -import monix.reactive.{Consumer, Notification} +import monix.reactive.{ Consumer, Notification } /** Implementation for [[monix.reactive.Consumer.firstNotification]]. */ private[reactive] final class FirstNotificationConsumer[A] extends Consumer.Sync[A, Notification[A]] { override def createSubscriber( cb: Callback[Throwable, Notification[A]], - s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { + s: Scheduler + ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler = s private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala index 9ee45755c..e9aba94d3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.consumers import monix.execution.Callback -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Scheduler} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import scala.util.control.NonFatal import monix.reactive.Consumer diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala index 10406dda5..ef4c157fe 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala @@ -17,10 +17,10 @@ package monix.reactive.internal.consumers -import monix.execution.{Ack, Callback, Cancelable, Scheduler} +import monix.execution.{ Ack, Callback, Cancelable, Scheduler } import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{AssignableCancelable, SingleAssignCancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ AssignableCancelable, SingleAssignCancelable } import scala.util.control.NonFatal import monix.reactive.Consumer @@ -45,13 +45,16 @@ private[reactive] final class FoldLeftTaskConsumer[A, R](initial: () => R, f: (R // as a matter of contract. try { def task = - f(state, elem).redeem(error => { - onError(error) - Stop - }, update => { - state = update - Continue - }) + f(state, elem).redeem( + error => { + onError(error) + Stop + }, + update => { + state = update + Continue + } + ) synchronized { if (!isDone) { @@ -80,12 +83,15 @@ private[reactive] final class FoldLeftTaskConsumer[A, R](initial: () => R, f: (R } } - (out, SingleAssignCancelable.plusOne(Cancelable { () => - synchronized { - isDone = true - lastCancelable.cancel() - lastCancelable = Cancelable.empty - } - })) + ( + out, + SingleAssignCancelable.plusOne(Cancelable { () => + synchronized { + isDone = true + lastCancelable.cancel() + lastCancelable = Cancelable.empty + } + }) + ) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala index 1acc33643..8134c7d97 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala @@ -17,10 +17,10 @@ package monix.reactive.internal.consumers -import monix.execution.{Ack, Callback, Cancelable, Scheduler} +import monix.execution.{ Ack, Callback, Cancelable, Scheduler } import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{AssignableCancelable, SingleAssignCancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ AssignableCancelable, SingleAssignCancelable } import scala.util.control.NonFatal import monix.reactive.Consumer @@ -41,7 +41,7 @@ private[reactive] final class ForeachAsyncConsumer[A](f: A => Task[Unit]) extend try { this.synchronized { if (!isDone) { - val future = f(elem).redeem({e => onError(e); Stop}, _ => Continue).runToFuture + val future = f(elem).redeem({ e => onError(e); Stop }, _ => Continue).runToFuture lastCancelable = future future.syncTryFlatten } else Stop @@ -66,12 +66,15 @@ private[reactive] final class ForeachAsyncConsumer[A](f: A => Task[Unit]) extend } } - (out, SingleAssignCancelable.plusOne(Cancelable { () => - out.synchronized { - isDone = true - lastCancelable.cancel() - lastCancelable = Cancelable.empty - } - })) + ( + out, + SingleAssignCancelable.plusOne(Cancelable { () => + out.synchronized { + isDone = true + lastCancelable.cancel() + lastCancelable = Cancelable.empty + } + }) + ) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala index ccb05ef49..09196433d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.consumers import monix.execution.Callback -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Scheduler} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import scala.util.control.NonFatal import monix.reactive.Consumer diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala index ffea42a40..e04c00c06 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala @@ -19,15 +19,15 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.atomic.Atomic import monix.execution.cancelables.AssignableCancelable import scala.util.control.NonFatal -import monix.reactive.{Consumer, Observer} +import monix.reactive.{ Consumer, Observer } import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } /** Implementation for [[monix.reactive.Consumer.fromObserver]]. */ private[reactive] final class FromObserverConsumer[In](f: Scheduler => Observer[In]) extends Consumer[In, Unit] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala index a008c3e1e..2ee5b7f88 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import monix.reactive.Consumer import monix.reactive.observers.Subscriber @@ -28,7 +28,8 @@ import monix.reactive.observers.Subscriber private[reactive] final class HeadConsumer[A] extends Consumer.Sync[A, A] { override def createSubscriber( cb: Callback[Throwable, A], - s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { + s: Scheduler + ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler = s private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala index b649b9063..8a718997b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import monix.reactive.Consumer import monix.reactive.observers.Subscriber @@ -28,7 +28,8 @@ import monix.reactive.observers.Subscriber private[reactive] final class HeadOptionConsumer[A] extends Consumer.Sync[A, Option[A]] { override def createSubscriber( cb: Callback[Throwable, Option[A]], - s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { + s: Scheduler + ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler = s private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala index 78c87af4c..600aa60ed 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala @@ -18,20 +18,20 @@ package monix.reactive.internal.consumers import monix.execution.Callback -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Cancelable, Scheduler} -import monix.execution.atomic.{Atomic, PaddingStrategy} -import monix.execution.cancelables.{AssignableCancelable, SingleAssignCancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Cancelable, Scheduler } +import monix.execution.atomic.{ Atomic, PaddingStrategy } +import monix.execution.cancelables.{ AssignableCancelable, SingleAssignCancelable } import scala.util.control.NonFatal import monix.reactive.Consumer import monix.reactive.internal.consumers.LoadBalanceConsumer.IndexedSubscriber import monix.reactive.observers.Subscriber import scala.annotation.tailrec -import scala.collection.immutable.{BitSet, Queue} +import scala.collection.immutable.{ BitSet, Queue } import scala.collection.mutable.ListBuffer -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } /** Implementation for [[monix.reactive.Consumer.loadBalance]]. */ private[reactive] final class LoadBalanceConsumer[-In, R](parallelism: Int, consumers: Array[Consumer[In, R]]) @@ -216,18 +216,19 @@ private[reactive] final class LoadBalanceConsumer[-In, R](parallelism: Int, cons // don't want to block the main thread! scheduler.execute { () => try out.out.onNext(elem).syncOnComplete { - case Success(ack) => - ack match { - case Continue => - // We have permission to continue from this subscriber - // so returning it to the queue, to be reused - subscribersQueue.offer(out) - case Stop => - interruptOne(out, null) - } - case Failure(ex) => - interruptAll(ex) - } catch { + case Success(ack) => + ack match { + case Continue => + // We have permission to continue from this subscriber + // so returning it to the queue, to be reused + subscribersQueue.offer(out) + case Stop => + interruptOne(out, null) + } + case Failure(ex) => + interruptAll(ex) + } + catch { case ex if NonFatal(ex) => interruptAll(ex) } @@ -414,12 +415,12 @@ private[reactive] object LoadBalanceConsumer { private[reactive] final case class Available[In]( available: Queue[IndexedSubscriber[In]], canceledIDs: BitSet, - activeCount: Int) - extends State[In] + activeCount: Int + ) extends State[In] private[reactive] final case class Waiting[In]( promise: Promise[IndexedSubscriber[In]], canceledIDs: BitSet, - activeCount: Int) - extends State[In] + activeCount: Int + ) extends State[In] } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala index 834dda0bf..593fff1f8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.consumers -import monix.execution.{Callback, Cancelable, Scheduler} +import monix.execution.{ Callback, Cancelable, Scheduler } import monix.eval.Task import monix.execution.cancelables.AssignableCancelable import scala.util.control.NonFatal @@ -61,19 +61,22 @@ private[reactive] final class MapTaskConsumer[In, R, R2](source: Consumer[In, R] } val (sub, ac) = source.createSubscriber(asyncCallback, s) - (sub, new AssignableCancelable { - override def `:=`(value: Cancelable): this.type = { - ac := value - this - } + ( + sub, + new AssignableCancelable { + override def `:=`(value: Cancelable): this.type = { + ac := value + this + } - override def cancel(): Unit = { - ac.cancel() - asyncCallback.synchronized { - isCancelled = true - lastCancelable.cancel() + override def cancel(): Unit = { + ac.cancel() + asyncCallback.synchronized { + isCancelled = true + lastCancelable.cancel() + } } } - }) + ) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala index 1fdb38038..e010daa4c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.consumers import monix.execution.Callback import monix.execution.Ack.Stop -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.cancelables.AssignableCancelable import monix.reactive.Consumer import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala index 5f22a5308..ad14744dd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala @@ -21,13 +21,13 @@ import monix.execution.Callback import monix.execution.Scheduler import monix.execution.cancelables.AssignableCancelable import monix.reactive.observers.Subscriber -import monix.reactive.{Consumer, Observable, Pipe} +import monix.reactive.{ Consumer, Observable, Pipe } /** Implementation for [[monix.reactive.Consumer.transformInput]]. */ private[reactive] final class TransformInputConsumer[In2, -In, +R]( source: Consumer[In, R], - f: Observable[In2] => Observable[In]) - extends Consumer[In2, R] { + f: Observable[In2] => Observable[In] +) extends Consumer[In2, R] { def createSubscriber(cb: Callback[Throwable, R], s: Scheduler): (Subscriber[In2], AssignableCancelable) = { val (input1, conn) = source.createSubscriber(cb, s) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala index 0c8f95dfb..33f308898 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.deprecated import cats.Eval import cats.effect.IO import monix.execution.Scheduler -import monix.reactive.{Observable, OverflowStrategy} +import monix.reactive.{ Observable, OverflowStrategy } private[reactive] trait ObservableDeprecatedBuilders extends Any { /** DEPRECATED — please use [[Observable!.executeAsync .executeAsync]]. @@ -104,7 +104,8 @@ private[reactive] trait ObservableDeprecatedBuilders extends Any { */ @deprecated("Switch to Observable(list).merge", "3.0.0") def mergeDelayError[A](sources: Observable[A]*)( - implicit os: OverflowStrategy[A] = OverflowStrategy.Default): Observable[A] = { + implicit os: OverflowStrategy[A] = OverflowStrategy.Default + ): Observable[A] = { // $COVERAGE-OFF$ Observable.fromIterable(sources).mergeMapDelayErrors(identity)(os) // $COVERAGE-ON$ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala index ab71ecead..f15046eee 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.deprecated -import cats.effect.{Effect, ExitCase} -import cats.{Monoid, Order} -import monix.eval.{Task, TaskLike} +import cats.effect.{ Effect, ExitCase } +import cats.{ Monoid, Order } +import monix.eval.{ Task, TaskLike } import monix.execution.Ack import monix.reactive.Observable import monix.reactive.internal.operators.DoOnTerminateOperator diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala index 1bbe5fb38..9e5162925 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.ChannelType.SingleProducer import monix.reactive.Observable.Operator import monix.reactive.OverflowStrategy -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } private[reactive] final class AsyncBoundaryOperator[A](overflowStrategy: OverflowStrategy[A]) extends Operator[A, A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala index 996ffca98..8f5f12566 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Cancelable import monix.execution.ChannelType.SingleProducer import monix.reactive.Observable -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } private[reactive] final class BufferIntrospectiveObservable[+A](source: Observable[A], maxSize: Int) extends Observable[List[A]] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala index dd8ce185e..0e9a07cfa 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala index 16b6e7861..e5d36a546 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala @@ -19,15 +19,15 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.collection.mutable.ListBuffer import scala.concurrent.Future -import scala.concurrent.duration.{Duration, FiniteDuration, MILLISECONDS} +import scala.concurrent.duration.{ Duration, FiniteDuration, MILLISECONDS } private[reactive] final class BufferTimedObservable[+A](source: Observable[A], timespan: FiniteDuration, maxCount: Int) extends Observable[Seq[A]] { @@ -70,7 +70,8 @@ private[reactive] final class BufferTimedObservable[+A](source: Observable[A], t sendNextAndReset(now).syncOnContinue( // Schedule the next tick, but only after we are done // sending the bundle - run()) + run() + ) } () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala index 14c08f10f..629dcc2d6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala index 2261a09db..3c0594671 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala @@ -17,20 +17,20 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.collection.mutable.ListBuffer -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } private[reactive] final class BufferWithSelectorObservable[+A, S]( source: Observable[A], sampler: Observable[S], maxSize: Int, - sizeOf: A => Int) - extends Observable[Seq[A]] { + sizeOf: A => Int +) extends Observable[Seq[A]] { def unsafeSubscribeFn(downstream: Subscriber[Seq[A]]): Cancelable = { val upstreamSubscription = SingleAssignCancelable() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala index 7d9be1573..24a3a1f46 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -26,7 +26,7 @@ import scala.concurrent.Future private[reactive] final class CollectOperator[-A, +B](pf: PartialFunction[A, B]) extends Operator[A, B] { - import CollectOperator.{checkFallback, isDefined} + import CollectOperator.{ checkFallback, isDefined } def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala index 59490d6e4..611407d1a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala @@ -22,7 +22,7 @@ import monix.execution.Ack.Stop import scala.util.control.NonFatal import monix.reactive.Observable.Operator -import monix.reactive.internal.operators.CollectOperator.{checkFallback, isDefined} +import monix.reactive.internal.operators.CollectOperator.{ checkFallback, isDefined } import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala index cfb36df26..4645ad01e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala index f269b358d..13b3e096d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala @@ -19,18 +19,18 @@ package monix.reactive.internal.operators import cats.effect.ExitCase import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.execution.exceptions.CompositeException import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Failure /** Implementation for `Observable.concatMap`. @@ -68,8 +68,8 @@ private[reactive] final class ConcatMapObservable[A, B]( source: Observable[A], f: A => Observable[B], release: (A, ExitCase[Throwable]) => Task[Unit], - delayErrors: Boolean) - extends Observable[B] { + delayErrors: Boolean +) extends Observable[B] { def unsafeSubscribeFn(out: Subscriber[B]): Cancelable = { val subscriber = new ConcatMapSubscriber(out) @@ -333,7 +333,8 @@ private[reactive] final class ConcatMapObservable[A, B]( s"State $state in the Monix ConcatMap.$method implementation is invalid, " + "due to either a broken Subscriber implementation, or a bug, " + "please open an issue, see: https://monix.io" - )) + ) + ) // $COVERAGE-ON$ } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala index e80687390..07ed5adee 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala @@ -22,7 +22,7 @@ import monix.execution.Ack.Continue import monix.execution.cancelables.AssignableCancelable import monix.reactive.Observable import monix.reactive.observables.ChainedObservable -import monix.reactive.observables.ChainedObservable.{subscribe => chain} +import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala index ebdfe5142..780aca411 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala @@ -19,13 +19,13 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS} +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } private[reactive] final class DebounceObservable[A](source: Observable[A], timeout: FiniteDuration, repeat: Boolean) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala index 842236e84..11207d3db 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala @@ -17,14 +17,14 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } private[reactive] final class DelayBySelectorObservable[A, S](source: Observable[A], selector: A => Observable[S]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala index f1d2393a5..181f2d3c3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala @@ -19,14 +19,14 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import monix.execution.atomic.Atomic import scala.concurrent.duration.FiniteDuration -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } private[reactive] final class DelayByTimespanObservable[A](source: Observable[A], delay: FiniteDuration) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala index 67b54a273..f4371500a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala @@ -28,10 +28,14 @@ private[reactive] final class DelayExecutionByTimespanObservable[A](source: Obse def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val conn = OrderedCancelable() - val main = out.scheduler.scheduleOnce(timespan.length, timespan.unit, () => { - conn.orderedUpdate(source.unsafeSubscribeFn(out), order = 2) - () - }) + val main = out.scheduler.scheduleOnce( + timespan.length, + timespan.unit, + () => { + conn.orderedUpdate(source.unsafeSubscribeFn(out), order = 2) + () + } + ) conn.orderedUpdate(main, order = 1) } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala index 97f13b3d1..ac7af78b9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop import monix.execution.cancelables.OrderedCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala index dbeac1a08..85d1ab650 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.cancelables.OrderedCancelable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala index 60223805b..57fd1ca38 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop import monix.reactive.Notification -import monix.reactive.Notification.{OnComplete, OnError, OnNext} +import monix.reactive.Notification.{ OnComplete, OnError, OnNext } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala index d6475112a..ed5916f87 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import cats.Eq import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import scala.util.control.NonFatal diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala index ad22f7f45..ff641fc9b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import cats.Eq -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala index 7f83ee0af..dab6e0a83 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import scala.util.control.NonFatal import monix.reactive.Observable.Operator diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala index baac2494b..d279fcef3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala @@ -21,14 +21,14 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop import monix.execution.atomic.Atomic -import monix.execution.cancelables.{OrderedCancelable, SingleAssignCancelable, StackedCancelable} +import monix.execution.cancelables.{ OrderedCancelable, SingleAssignCancelable, StackedCancelable } import monix.execution.schedulers.TrampolineExecutionContext.immediate -import monix.execution.{Ack, Cancelable, FutureUtils} +import monix.execution.{ Ack, Cancelable, FutureUtils } import monix.reactive.Observable import monix.reactive.observers.Subscriber -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } private[reactive] object DoOnSubscribeObservable { // Implementation for doBeforeSubscribe @@ -80,12 +80,15 @@ private[reactive] object DoOnSubscribeObservable { out.onNext(elem) } } else { - FutureUtils.transformWith[Unit, Ack](p.future, { - case Success(_) => out.onNext(elem) - case Failure(e) => - finalSignal(e) - Stop - })(immediate) + FutureUtils.transformWith[Unit, Ack]( + p.future, + { + case Success(_) => out.onNext(elem) + case Failure(e) => + finalSignal(e) + Stop + } + )(immediate) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala index 314a62833..104f34117 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Callback import monix.eval.Task import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import scala.util.control.NonFatal import monix.reactive.internal.util.Instances._ @@ -31,8 +31,8 @@ import scala.util.Success private[reactive] final class DoOnTerminateOperator[A]( onTerminate: Option[Throwable] => Task[Unit], - happensBefore: Boolean) - extends Operator[A, A] { + happensBefore: Boolean +) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { @@ -81,18 +81,19 @@ private[reactive] final class DoOnTerminateOperator[A]( if (active.getAndSet(false)) { var streamErrors = true try if (happensBefore) { - val task = onTerminate(ex).onErrorHandle { ex => - scheduler.reportFailure(ex) - } - streamErrors = false - task.map { _ => + val task = onTerminate(ex).onErrorHandle { ex => + scheduler.reportFailure(ex) + } + streamErrors = false + task.map { _ => + triggerSignal() + } + } else { + streamErrors = false triggerSignal() + onTerminate(ex) } - } else { - streamErrors = false - triggerSignal() - onTerminate(ex) - } catch { + catch { case err if NonFatal(err) => if (streamErrors) { out.onError(err) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala index 38126511e..c8e5d286f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala @@ -19,15 +19,15 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.exceptions.DownstreamTimeoutException import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS} +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } private[reactive] final class DownstreamTimeoutObservable[+A](source: Observable[A], timeout: FiniteDuration) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala index 954f3b244..61da594e9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala index 250b5754e..b558d33e6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala index 60fc1adbc..62c735098 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.execution.cancelables.{CompositeCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala index fa4f8a9e2..b17b8ad75 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala index e338bc138..945032005 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import java.io.PrintStream import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala index 566b049c1..779257186 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala @@ -19,14 +19,14 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS} +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } import scala.util.Success private[reactive] final class EchoObservable[+A](source: Observable[A], timeout: FiniteDuration, onlyOnce: Boolean) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala index b2069421c..8be501c3b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.operators -import monix.execution.cancelables.{AssignableCancelable, SingleAssignCancelable} +import monix.execution.cancelables.{ AssignableCancelable, SingleAssignCancelable } import monix.execution.schedulers.TrampolinedRunnable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala index 2bdbd8c47..cb58b0bd5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala index e7c247361..a77813ee3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala @@ -17,17 +17,17 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.execution.exceptions.CompositeException import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Failure /** Implementation for `Observable.scanTask`. @@ -40,8 +40,8 @@ private[reactive] final class FlatScanObservable[A, R]( source: Observable[A], initial: () => R, op: (R, A) => Observable[R], - delayErrors: Boolean) - extends Observable[R] { + delayErrors: Boolean +) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { var streamErrors = true @@ -307,7 +307,8 @@ private[reactive] final class FlatScanObservable[A, R]( s"State $state in the Monix ConcatMap.$method implementation is invalid, " + "due to either a broken Subscriber implementation, or a bug, " + "please open an issue, see: https://monix.io" - )) + ) + ) // $COVERAGE-ON$ } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala index 271158303..27e597bc8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala index 7eddd29ee..f9a408226 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -28,8 +28,8 @@ import scala.concurrent.Future private[reactive] final class FoldWhileLeftObservable[A, S]( source: Observable[A], seed: () => S, - op: (S, A) => Either[S, S]) - extends Observable[S] { + op: (S, A) => Either[S, S] +) extends Observable[S] { def unsafeSubscribeFn(out: Subscriber[S]): Cancelable = { var streamErrors = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala index 6f0b10829..879b512ee 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala @@ -17,22 +17,22 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.SingleProducer import monix.execution.atomic.Atomic import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.observables.GroupedObservable import monix.reactive.Observable.Operator -import monix.reactive.observers.{BufferedSubscriber, Subscriber} -import monix.reactive.{Observer, OverflowStrategy} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import monix.reactive.{ Observer, OverflowStrategy } import scala.annotation.tailrec import scala.concurrent.Future private[reactive] final class GroupByOperator[A, K]( os: OverflowStrategy.Synchronous[GroupedObservable[K, A]], - keyFn: A => K) - extends Operator[A, GroupedObservable[K, A]] { + keyFn: A => K +) extends Operator[A, GroupedObservable[K, A]] { def apply(subscriber: Subscriber[GroupedObservable[K, A]]): Subscriber[A] = new Subscriber[A] { self => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala index 03ae53bbb..a4435d63c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala @@ -20,17 +20,17 @@ package monix.reactive.internal.operators import cats.effect.ExitCase import monix.execution.Callback import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} -import monix.execution.atomic.{Atomic, AtomicBoolean} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.atomic.{ Atomic, AtomicBoolean } import monix.execution.internal.Platform import monix.execution.schedulers.TrampolineExecutionContext.immediate import monix.execution.schedulers.TrampolinedRunnable -import monix.execution.{Ack, Cancelable, FutureUtils, Scheduler} +import monix.execution.{ Ack, Cancelable, FutureUtils, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.util.control.NonFatal -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } private[reactive] class GuaranteeCaseObservable[A](source: Observable[A], f: ExitCase[Throwable] => Task[Unit]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala index 63eb1ea1b..a2026bcf0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -28,8 +28,8 @@ private[reactive] final class IntersperseObservable[+A]( source: Observable[A], start: Option[A], separator: A, - end: Option[A]) - extends Observable[A] { self => + end: Option[A] +) extends Observable[A] { self => override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val upstream = source.unsafeSubscribeFn(new Subscriber[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala index 4d9009702..345cf7fe9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -28,8 +28,8 @@ import scala.concurrent.Future private[reactive] final class MapAccumulateObservable[A, S, R]( source: Observable[A], initial: () => S, - f: (S, A) => (S, R)) - extends Observable[R] { + f: (S, A) => (S, R) +) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { var streamErrors = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala index 3ff83d09d..beb94b4eb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala @@ -20,24 +20,24 @@ package monix.reactive.internal.operators import java.util.concurrent.ConcurrentLinkedQueue import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import monix.execution.AsyncSemaphore import monix.execution.ChannelType.MultiProducer -import monix.execution.{Ack, Cancelable, CancelableFuture} -import monix.reactive.observers.{BufferedSubscriber, Subscriber} -import monix.reactive.{Observable, OverflowStrategy} +import monix.execution.{ Ack, Cancelable, CancelableFuture } +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import monix.reactive.{ Observable, OverflowStrategy } import scala.concurrent.Future import scala.util.control.NonFatal -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } private[reactive] final class MapParallelOrderedObservable[A, B]( source: Observable[A], parallelism: Int, f: A => Task[B], - overflowStrategy: OverflowStrategy[B]) - extends Observable[B] { + overflowStrategy: OverflowStrategy[B] +) extends Observable[B] { override def unsafeSubscribeFn(out: Subscriber[B]): Cancelable = { if (parallelism <= 0) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala index 86d90ce68..f0aa4ec31 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala @@ -17,17 +17,17 @@ package monix.reactive.internal.operators -import monix.execution.{Ack, AsyncSemaphore, Callback, Cancelable} +import monix.execution.{ Ack, AsyncSemaphore, Callback, Cancelable } import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer -import monix.execution.cancelables.{CompositeCancelable, SingleAssignCancelable} -import monix.reactive.{Observable, OverflowStrategy} -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } +import monix.reactive.{ Observable, OverflowStrategy } +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future import scala.util.control.NonFatal -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } /** Implementation for a `mapTask`-like operator that can execute * multiple tasks in parallel. Similar with @@ -45,8 +45,8 @@ private[reactive] final class MapParallelUnorderedObservable[A, B]( source: Observable[A], parallelism: Int, f: A => Task[B], - overflowStrategy: OverflowStrategy[B]) - extends Observable[B] { + overflowStrategy: OverflowStrategy[B] +) extends Observable[B] { def unsafeSubscribeFn(out: Subscriber[B]): Cancelable = { if (parallelism <= 0) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala index 0cc5fbae9..c04a298dc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala @@ -22,7 +22,7 @@ import monix.execution.Ack.Stop import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -351,7 +351,8 @@ private[reactive] final class MapTaskObservable[A, B](source: Observable[A], f: s"State $state in the Monix MapTask.$method implementation is invalid, " + "due to either a broken Subscriber implementation, or a bug, " + "please open an issue, see: https://monix.io" - )) + ) + ) // $COVERAGE-ON$ } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala index 9130897d6..6b511c3c7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.reactive.Notification -import monix.reactive.Notification.{OnComplete, OnError, OnNext} +import monix.reactive.Notification.{ OnComplete, OnError, OnNext } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala index 6bbda7d08..971856c72 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala @@ -17,13 +17,13 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.execution.cancelables._ import monix.execution.exceptions.CompositeException -import monix.reactive.observers.{BufferedSubscriber, Subscriber} -import monix.reactive.{Observable, OverflowStrategy} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import monix.reactive.{ Observable, OverflowStrategy } import monix.execution.atomic.Atomic import scala.util.control.NonFatal import scala.collection.mutable @@ -32,8 +32,8 @@ private[reactive] final class MergeMapObservable[A, B]( source: Observable[A], f: A => Observable[B], overflowStrategy: OverflowStrategy[B], - delayErrors: Boolean) - extends Observable[B] { + delayErrors: Boolean +) extends Observable[B] { def unsafeSubscribeFn(downstream: Subscriber[B]): Cancelable = { val composite = CompositeCancelable() @@ -57,7 +57,8 @@ private[reactive] final class MergeMapObservable[A, B]( subscriberB.onError(CompositeException(errors.toSeq)) else subscriberB.onComplete() - } else { + } + else { subscriberB.onComplete() } } @@ -93,7 +94,8 @@ private[reactive] final class MergeMapObservable[A, B]( if (delayErrors) errors.synchronized { errors += ex refID.cancel() - } else if (!upstreamIsDone.getAndSet(true)) { + } + else if (!upstreamIsDone.getAndSet(true)) { try subscriberB.onError(ex) finally composite.cancel() } @@ -121,7 +123,8 @@ private[reactive] final class MergeMapObservable[A, B]( if (delayErrors) errors.synchronized { errors += ex onComplete() - } else if (!upstreamIsDone.getAndSet(true)) { + } + else if (!upstreamIsDone.getAndSet(true)) { // oops, error happened on main thread, // piping that along should cancel everything composite.cancel() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala index e7b927cdc..6bc7f129b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala @@ -18,9 +18,9 @@ package monix.reactive.internal.operators import monix.execution.ChannelType.SingleProducer -import monix.execution.{Ack, Cancelable, Scheduler} -import monix.reactive.{Observable, OverflowStrategy} -import monix.reactive.observers.{BufferedSubscriber, Subscriber} +import monix.execution.{ Ack, Cancelable, Scheduler } +import monix.reactive.{ Observable, OverflowStrategy } +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala index 1893b7f7a..a2143868b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala @@ -17,8 +17,8 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala index bd92f96be..c9f685821 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.cancelables.OrderedCancelable import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala index 7f63e86db..b9775482c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.cancelables.OrderedCancelable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala index 1cfd848fd..ec6bd28ef 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.cancelables.OrderedCancelable import scala.util.control.NonFatal import monix.reactive.Observable diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala index b2b30e4ad..ec93da264 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala @@ -18,9 +18,9 @@ package monix.reactive.internal.operators import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Pipe} +import monix.reactive.{ Observable, Pipe } import scala.concurrent.Future private[reactive] final class PipeThroughObservable[A, B](source: Observable[A], pipe: Pipe[A, B]) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala index 71683ee8b..0e006e544 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala index 34b8d94ac..0ba337ff9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala @@ -18,11 +18,11 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.execution.cancelables.{CompositeCancelable, OrderedCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.cancelables.{ CompositeCancelable, OrderedCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber -import monix.reactive.subjects.{ReplaySubject, Subject} +import monix.reactive.subjects.{ ReplaySubject, Subject } import scala.concurrent.Future import scala.util.Success diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala index 8ec5628cf..fa8f30921 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop import monix.execution.cancelables.SerialCancelable import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala index 0741d6291..99055284a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala index 7631327ae..99530c4da 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala @@ -24,7 +24,7 @@ import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.cancelables.OrderedCancelable import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.annotation.tailrec @@ -343,7 +343,8 @@ private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], se s"State $state in the Monix MapTask.$method implementation is invalid, " + "due to either a broken Subscriber implementation, or a bug, " + "please open an issue, see: https://monix.io" - )) + ) + ) // $COVERAGE-ON$ } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala index 27ba85904..fef1a5f46 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import cats.Order import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala index e8ff12163..ba1df0c7f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.{Cancelable, Scheduler} +import monix.execution.{ Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala index ff60e866f..1ca31b22c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.cancelables.OrderedCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala index e9b531033..a1ea2f7e5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala @@ -17,12 +17,12 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, SerialCancelable, SingleAssignCancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, SerialCancelable, SingleAssignCancelable } import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala index a0f37c025..8b9020ace 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala @@ -29,28 +29,32 @@ private[reactive] final class TakeLastObservable[A](source: Observable[A], n: In extends ChainedObservable[A] { override def unsafeSubscribeFn(conn: AssignableCancelable.Multi, out: Subscriber[A]): Unit = { - ChainedObservable.subscribe(source, conn, new Subscriber[A] { - implicit val scheduler = out.scheduler - private[this] val queue = mutable.Queue.empty[A] - private[this] var queued = 0 + ChainedObservable.subscribe( + source, + conn, + new Subscriber[A] { + implicit val scheduler = out.scheduler + private[this] val queue = mutable.Queue.empty[A] + private[this] var queued = 0 - def onNext(elem: A): Ack = { - queue.enqueue(elem) - if (queued < n) - queued += 1 - else - queue.dequeue() - Continue - } + def onNext(elem: A): Ack = { + queue.enqueue(elem) + if (queued < n) + queued += 1 + else + queue.dequeue() + Continue + } - def onComplete(): Unit = { - val other = Observable.fromIteratorUnsafe(queue.iterator) - ChainedObservable.subscribe(other, conn, out) - } + def onComplete(): Unit = { + val other = Observable.fromIteratorUnsafe(queue.iterator) + ChainedObservable.subscribe(other, conn, out) + } - def onError(ex: Throwable): Unit = { - out.onError(ex) + def onError(ex: Throwable): Unit = { + out.onError(ex) + } } - }) + ) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala index e7407baf0..b78de0491 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop import monix.execution.cancelables.CompositeCancelable -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala index fd53a429d..aa53ea109 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop -import monix.execution.cancelables.{CompositeCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala index 89801da81..aaa1eff96 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala @@ -23,7 +23,7 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS} +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } private[reactive] final class ThrottleFirstOperator[A](interval: FiniteDuration) extends Operator[A, A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala index 33e0ce302..0f81cffb3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -27,8 +27,8 @@ import scala.concurrent.Future private[reactive] final class ThrottleLastObservable[+A, S]( source: Observable[A], sampler: Observable[S], - shouldRepeatOnSilence: Boolean) - extends Observable[A] { + shouldRepeatOnSilence: Boolean +) extends Observable[A] { def unsafeSubscribeFn(downstream: Subscriber[A]): Cancelable = { val upstreamSubscription = SingleAssignCancelable() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala index 569888fa7..633711883 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala @@ -17,21 +17,21 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import java.util.concurrent.TimeUnit -import scala.concurrent.{Future, Promise} -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS} +import scala.concurrent.{ Future, Promise } +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } private[reactive] final class ThrottleLatestObservable[A]( source: Observable[A], duration: FiniteDuration, - emitLast: Boolean) - extends Observable[A] { + emitLast: Boolean +) extends Observable[A] { def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val task = MultiAssignCancelable() @@ -113,8 +113,8 @@ private[reactive] final class ThrottleLatestObservable[A]( override def onComplete(): Unit = self.synchronized { if (!isDone) { - val lastAck = if(ack == null) Continue else ack - lastAck.syncTryFlatten.syncOnContinue{signalOnComplete()} + val lastAck = if (ack == null) Continue else ack + lastAck.syncTryFlatten.syncOnContinue { signalOnComplete() } } () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala index f49f5003a..4ed26797c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala @@ -19,15 +19,15 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit -import monix.execution.Ack.{Continue, Stop} -import monix.execution.cancelables.{CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } import monix.execution.exceptions.UpstreamTimeoutException -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.concurrent.duration.{FiniteDuration, MILLISECONDS} +import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } private[reactive] final class UpstreamTimeoutObservable[+A](source: Observable[A], timeout: FiniteDuration) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala index 0956d4196..7b6c6a1e1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala @@ -18,15 +18,16 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import scala.util.control.NonFatal -private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => S, aggregate: (S, A) => S) extends Operator[A, S] { +private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => S, aggregate: (S, A) => S) + extends Operator[A, S] { def apply(downstream: Subscriber[S]): Subscriber.Sync[A] = { new Subscriber.Sync[A] { @@ -43,21 +44,21 @@ private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => if (downstreamIsDone) Stop else { if (!pendingAck) { - val downstreamAck = try { - downstream.onNext(seed(elem)) - } catch { - case ex if NonFatal(ex) => - downstream.onError(ex) - Stop - } + val downstreamAck = + try { + downstream.onNext(seed(elem)) + } catch { + case ex if NonFatal(ex) => + downstream.onError(ex) + Stop + } lastAck = downstreamAck if (downstreamAck == Continue) Continue else if (downstreamAck == Stop) { downstreamIsDone = true Stop - } - else { + } else { pendingAck = true emitAggregatedOnAckContinue(downstreamAck) Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala index 40e750b7d..f89ee0735 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala index de711d524..1c6b5a464 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala index 5ec17a864..3a0c3dac8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala @@ -17,10 +17,10 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -29,8 +29,8 @@ import scala.concurrent.Future private[reactive] final class WithLatestFromObservable[A, B, +R]( source: Observable[A], other: Observable[B], - f: (A, B) => R) - extends Observable[R] { + f: (A, B) => R +) extends Observable[R] { def unsafeSubscribeFn(out: Subscriber[R]): Cancelable = { val connection = CompositeCancelable() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala index 700f2bce9..cc737f377 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala @@ -17,15 +17,15 @@ package monix.reactive.internal.rstreams -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.observers.Subscriber import monix.execution.atomic.Atomic -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.internal.rstreams.ReactiveSubscriberAsMonixSubscriber.RequestsQueue -import org.reactivestreams.{Subscriber => RSubscriber, Subscription} +import org.reactivestreams.{ Subscriber => RSubscriber, Subscription } import scala.annotation.tailrec import scala.collection.immutable.Queue -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } /** Wraps a `org.reactivestreams.Subscriber` instance that respects the * [[http://www.reactive-streams.org/ Reactive Streams]] contract @@ -34,7 +34,8 @@ import scala.concurrent.{Future, Promise} */ private[reactive] final class ReactiveSubscriberAsMonixSubscriber[A] private ( subscriber: RSubscriber[A], - subscription: Cancelable)(implicit val scheduler: Scheduler) + subscription: Cancelable +)(implicit val scheduler: Scheduler) extends Subscriber[A] with Cancelable { self => if (subscriber == null) throw null @@ -113,7 +114,8 @@ private[reactive] object ReactiveSubscriberAsMonixSubscriber { * instance compliant with the Monix Rx implementation. */ def apply[A](subscriber: RSubscriber[A], subscription: Cancelable)( - implicit s: Scheduler): ReactiveSubscriberAsMonixSubscriber[A] = + implicit s: Scheduler + ): ReactiveSubscriberAsMonixSubscriber[A] = new ReactiveSubscriberAsMonixSubscriber[A](subscriber, subscription) /** An asynchronous queue implementation for dealing with @@ -154,7 +156,8 @@ private[reactive] object ReactiveSubscriberAsMonixSubscriber { require( n > 0, "n must be strictly positive, according to " + - "the Reactive Streams contract, rule 3.9") + "the Reactive Streams contract, rule 3.9" + ) state.get() match { case CancelledState => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala index 3f75376e6..746025a9f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala @@ -17,14 +17,14 @@ package monix.reactive.internal.rstreams -import monix.execution.{Ack, Scheduler} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Scheduler } +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.SingleProducer import monix.execution.rstreams.SingleAssignSubscription import monix.execution.schedulers.TrampolineExecutionContext.immediate import monix.reactive.OverflowStrategy.Unbounded -import monix.reactive.observers.{BufferedSubscriber, Subscriber} -import org.reactivestreams.{Subscriber => RSubscriber, Subscription => RSubscription} +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import org.reactivestreams.{ Subscriber => RSubscriber, Subscription => RSubscription } import scala.concurrent.Future @@ -134,7 +134,8 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub err => { stop() err - })(immediate) + } + )(immediate) } def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala index cca8c2b58..e2248c305 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala @@ -18,9 +18,9 @@ package monix.reactive.internal.subscribers import monix.execution.Callback -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.observers.Subscriber /** Subscriber implementation for `Observable.foreach` */ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala index 6d28e1683..5f6067767 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.util import monix.execution.atomic.Atomic -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } /** * Represents a Promise that completes with `value` after diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala index ec6793bd6..949568cf5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.observables import monix.execution.Cancelable -import monix.execution.cancelables.{AssignableCancelable, MultiAssignCancelable} +import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala index 69ba3066f..289b65bcb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala @@ -28,7 +28,7 @@ import monix.reactive.Observable object CombineObservable extends Newtype1[Observable] { implicit val combineObservableApplicative: Apply[CombineObservable.Type] = new Apply[CombineObservable.Type] { - import CombineObservable.{apply => wrap} + import CombineObservable.{ apply => wrap } override def ap[A, B](ff: CombineObservable.Type[(A) => B])(fa: CombineObservable.Type[A]) = wrap(unwrap(ff).combineLatestMap(unwrap(fa))((f, a) => f(a))) @@ -37,12 +37,14 @@ object CombineObservable extends Newtype1[Observable] { wrap(unwrap(fa).map(f)) override def map2[A, B, C](fa: CombineObservable.Type[A], fb: CombineObservable.Type[B])( - f: (A, B) => C): CombineObservable.Type[C] = + f: (A, B) => C + ): CombineObservable.Type[C] = wrap(unwrap(fa).combineLatestMap(unwrap(fb))(f)) override def product[A, B]( fa: CombineObservable.Type[A], - fb: CombineObservable.Type[B]): CombineObservable.Type[(A, B)] = + fb: CombineObservable.Type[B] + ): CombineObservable.Type[(A, B)] = wrap(unwrap(fa).combineLatest(unwrap(fb))) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala index 35d026f3c..19b835f84 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala @@ -17,11 +17,11 @@ package monix.reactive.observables -import monix.execution.annotations.{UnsafeBecauseImpure, UnsafeProtocol} -import monix.execution.{Cancelable, Scheduler} -import monix.reactive.observers.{CacheUntilConnectSubscriber, Subscriber} +import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } +import monix.execution.{ Cancelable, Scheduler } +import monix.reactive.observers.{ CacheUntilConnectSubscriber, Subscriber } import monix.reactive.subjects.Subject -import monix.reactive.{Observable, Pipe} +import monix.reactive.{ Observable, Pipe } /** Represents an [[monix.reactive.Observable Observable]] that waits for * the call to `connect()` before @@ -51,7 +51,8 @@ object ConnectableObservable { @UnsafeProtocol @UnsafeBecauseImpure def unsafeMulticast[A, B](source: Observable[A], subject: Subject[A, B])( - implicit s: Scheduler): ConnectableObservable[B] = { + implicit s: Scheduler + ): ConnectableObservable[B] = { new ConnectableObservable[B] { private[this] lazy val connection: Cancelable = @@ -92,7 +93,8 @@ object ConnectableObservable { */ @UnsafeBecauseImpure def cacheUntilConnect[A, B](source: Observable[A], subject: Subject[A, B])( - implicit s: Scheduler): ConnectableObservable[B] = { + implicit s: Scheduler + ): ConnectableObservable[B] = { new ConnectableObservable[B] { private[this] val (connectable, cancelRef) = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala index 792932873..55d59d423 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala @@ -18,9 +18,9 @@ package monix.reactive.observables import monix.execution.exceptions.APIContractViolationException -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable -import monix.reactive.observers.{CacheUntilConnectSubscriber, Subscriber} +import monix.reactive.observers.{ CacheUntilConnectSubscriber, Subscriber } import scala.concurrent.Future @@ -41,7 +41,8 @@ abstract class GroupedObservable[K, +V] extends Observable[V] { self => object GroupedObservable { /** Builder returning an input+output pair */ private[monix] def broadcast[K, V](key: K, onCancel: Cancelable)( - implicit s: Scheduler): (Subscriber[V], GroupedObservable[K, V]) = { + implicit s: Scheduler + ): (Subscriber[V], GroupedObservable[K, V]) = { val ref = new Implementation[K, V](key, onCancel) (ref, ref) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala index bb966cd98..e0c3f1e47 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala @@ -17,7 +17,7 @@ package monix.reactive.observables -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.observers.Subscriber import monix.execution.atomic.Atomic diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala index 4b80a43f5..b847416dc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala @@ -72,7 +72,8 @@ private[reactive] trait Builders { def apply[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy[A], - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber[A] + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber[A] /** Given an synchronous [[OverflowStrategy overflow strategy]] wraps * a [[Subscriber]] into a buffered subscriber. @@ -80,7 +81,8 @@ private[reactive] trait Builders { def synchronous[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy.Synchronous[A], - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber.Sync[A] + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber.Sync[A] /** Builds a batched buffered subscriber. * @@ -97,7 +99,8 @@ private[reactive] trait Builders { def batched[A]( underlying: Subscriber[List[A]], bufferSize: Int, - producerType: ChannelType.ProducerSide = MultiProducer): Subscriber[A] + producerType: ChannelType.ProducerSide = MultiProducer + ): Subscriber[A] } object BufferedSubscriber extends Builders with BuildersImpl diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala index e03d2076d..73d4389ed 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala @@ -17,12 +17,12 @@ package monix.reactive.observers -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, CancelableFuture} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, CancelableFuture } import monix.reactive.Observable import scala.collection.mutable -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } /** Wraps an `underlying` [[Subscriber]] into an implementation that caches * all events until the call to `connect()` happens. After being connected, @@ -163,7 +163,8 @@ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) connectedFuture } - } else if (!wasCanceled) { + } + else if (!wasCanceled) { // taking fast path :-) downstream.onNext(elem) } else { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala index c0208483a..826ef3374 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala @@ -17,13 +17,13 @@ package monix.reactive.observers -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, CancelableFuture, Scheduler} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, CancelableFuture, Scheduler } import monix.reactive.Observable import scala.collection.mutable -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } /** Wraps a [[Subscriber]] into an implementation that abstains from emitting items until the call * to `connect()` happens. Prior to `connect()` you can enqueue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala index 81a08b0f1..c59129be4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala @@ -18,10 +18,10 @@ package monix.reactive.observers import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Try /** A safe subscriber safe guards subscriber implementations, such that: diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala index ee709f536..ebc21521b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala @@ -18,12 +18,12 @@ package monix.reactive.observers import java.io.PrintStream -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observer import monix.reactive.internal.rstreams._ -import org.reactivestreams.{Subscriber => RSubscriber} +import org.reactivestreams.{ Subscriber => RSubscriber } import scala.concurrent.Future import scala.util.control.NonFatal @@ -108,7 +108,8 @@ object Subscriber { * Monix Rx implementation. */ def fromReactiveSubscriber[A](subscriber: RSubscriber[A], subscription: Cancelable)( - implicit s: Scheduler): Subscriber[A] = + implicit s: Scheduler + ): Subscriber[A] = ReactiveSubscriberAsMonixSubscriber(subscriber, subscription) /** Transforms the source [[Subscriber]] into a `org.reactivestreams.Subscriber` diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala index 7557af02f..c564f4278 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala @@ -17,8 +17,8 @@ package monix.reactive.subjects -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Cancelable } import monix.reactive.observers.Subscriber import monix.reactive.subjects.PublishSubject.State import monix.execution.atomic.Atomic diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala index e1278c528..bed5d200c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala @@ -17,11 +17,11 @@ package monix.reactive.subjects -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.internal.util.PromiseCounter -import monix.reactive.observers.{ConnectableSubscriber, Subscriber} +import monix.reactive.observers.{ ConnectableSubscriber, Subscriber } import monix.execution.atomic.Atomic import scala.util.control.NonFatal @@ -186,7 +186,8 @@ object BehaviorSubject { cached: A, subscribers: Set[ConnectableSubscriber[A]] = Set.empty[ConnectableSubscriber[A]], isDone: Boolean = false, - errorThrown: Throwable = null) { + errorThrown: Throwable = null + ) { def cacheElem(elem: A): State[A] = { copy(cached = elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala index 3525872bf..0534fa6f3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala @@ -19,11 +19,11 @@ package monix.reactive.subjects import monix.execution.ChannelType.MultiProducer import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.{Ack, Cancelable, ChannelType, Scheduler} -import monix.reactive.OverflowStrategy.{Synchronous, Unbounded} -import monix.reactive.observers.{BufferedSubscriber, Subscriber} -import monix.reactive.{MulticastStrategy, Observer, OverflowStrategy} -import org.reactivestreams.{Subscription, Processor => RProcessor, Subscriber => RSubscriber} +import monix.execution.{ Ack, Cancelable, ChannelType, Scheduler } +import monix.reactive.OverflowStrategy.{ Synchronous, Unbounded } +import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import monix.reactive.{ MulticastStrategy, Observer, OverflowStrategy } +import org.reactivestreams.{ Processor => RProcessor, Subscriber => RSubscriber, Subscription } /** A concurrent subject is meant for imperative style feeding of events. * @@ -39,7 +39,8 @@ object ConcurrentSubject { apply(multicast, Unbounded)(s) def apply[A](multicast: MulticastStrategy[A], overflow: OverflowStrategy.Synchronous[A])( - implicit s: Scheduler): ConcurrentSubject[A, A] = { + implicit s: Scheduler + ): ConcurrentSubject[A, A] = { multicast match { case MulticastStrategy.Publish => @@ -69,7 +70,8 @@ object ConcurrentSubject { def from[I, O]( p: Subject[I, O], overflowStrategy: Synchronous[I], - producerType: ChannelType.ProducerSide = MultiProducer)(implicit s: Scheduler): ConcurrentSubject[I, O] = + producerType: ChannelType.ProducerSide = MultiProducer + )(implicit s: Scheduler): ConcurrentSubject[I, O] = new SubjectAsConcurrent(p, overflowStrategy, producerType, s) /** Subject recipe for building [[PublishSubject publish]] subjects. */ @@ -219,7 +221,8 @@ object ConcurrentSubject { * we're dealing with slow consumers. */ def replayLimited[A](capacity: Int, initial: Seq[A], strategy: Synchronous[A])( - implicit s: Scheduler): ConcurrentSubject[A, A] = + implicit s: Scheduler + ): ConcurrentSubject[A, A] = from(ReplaySubject.createLimited[A](capacity, initial), strategy) /** Transforms the source [[ConcurrentSubject]] into a `org.reactivestreams.Processor` @@ -232,7 +235,8 @@ object ConcurrentSubject { * the reactive streams specification */ def toReactiveProcessor[I, O](source: ConcurrentSubject[I, O], bufferSize: Int)( - implicit s: Scheduler): RProcessor[I, O] = { + implicit s: Scheduler + ): RProcessor[I, O] = { new RProcessor[I, O] { private[this] val subscriber: RSubscriber[I] = @@ -260,8 +264,8 @@ object ConcurrentSubject { subject: Subject[I, O], overflowStrategy: OverflowStrategy.Synchronous[I], producerType: ChannelType.ProducerSide, - scheduler: Scheduler) - extends ConcurrentSubject[I, O] { + scheduler: Scheduler + ) extends ConcurrentSubject[I, O] { private[this] val in: Subscriber.Sync[I] = BufferedSubscriber.synchronous(Subscriber(subject, scheduler), overflowStrategy, producerType) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala index ed372134f..3fb0eb589 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala @@ -17,11 +17,11 @@ package monix.reactive.subjects -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import scala.util.control.NonFatal -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.reactive.internal.util.PromiseCounter import monix.reactive.observers.Subscriber import monix.reactive.subjects.PublishSubject.State @@ -209,7 +209,8 @@ object PublishSubject { private[subjects] final case class State[A]( subscribers: Set[Subscriber[A]] = Set.empty[Subscriber[A]], cache: Array[Subscriber[A]] = null, - errorThrown: Throwable = null) { + errorThrown: Throwable = null + ) { def refresh: State[A] = copy(cache = subscribers.toArray) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala index dae388c19..69063c6e5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala @@ -17,15 +17,15 @@ package monix.reactive.subjects -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.APIContractViolationException -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.observers.Subscriber import scala.annotation.tailrec -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } /** `PublishToOneSubject` is a [[monix.reactive.subjects.PublishSubject]] * that can be subscribed at most once. @@ -39,7 +39,7 @@ import scala.concurrent.{Future, Promise} * one can also be notified when the subscription finally happens. */ final class PublishToOneSubject[A] private () extends Subject[A, A] with BooleanCancelable { - import PublishToOneSubject.{canceledState, pendingCompleteState} + import PublishToOneSubject.{ canceledState, pendingCompleteState } private[this] val subscriptionP = Promise[Ack]() private[this] var errorThrown: Throwable = _ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala index 49b14ebb0..d3fbfdc3b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala @@ -17,11 +17,11 @@ package monix.reactive.subjects -import monix.execution.Ack.{Continue, Stop} -import monix.execution.{Ack, Cancelable} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable import monix.reactive.internal.util.PromiseCounter -import monix.reactive.observers.{ConnectableSubscriber, Subscriber} +import monix.reactive.observers.{ ConnectableSubscriber, Subscriber } import monix.execution.atomic.Atomic import scala.util.control.NonFatal @@ -225,7 +225,8 @@ object ReplaySubject { subscribers: Set[ConnectableSubscriber[A]] = Set.empty[ConnectableSubscriber[A]], length: Int = 0, isDone: Boolean = false, - errorThrown: Throwable = null) { + errorThrown: Throwable = null + ) { def appendElem(elem: A): State[A] = { if (capacity == 0) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala index 3a404c8d9..e4cedccba 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala @@ -22,8 +22,8 @@ import monix.execution.Scheduler import monix.execution.cancelables.SingleAssignCancelable import monix.reactive.instances.CatsProfunctorForSubject import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Observer} -import org.reactivestreams.{Subscription, Processor => RProcessor, Subscriber => RSubscriber} +import monix.reactive.{ Observable, Observer } +import org.reactivestreams.{ Processor => RProcessor, Subscriber => RSubscriber, Subscription } /** A `Subject` is a sort of bridge or proxy that acts both as an * [[Observer]] and as an [[Observable]] and that must respect diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala index e44177496..89c9a9b45 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala @@ -17,8 +17,8 @@ package monix.reactive.subjects -import monix.execution.{Ack, Cancelable, Scheduler} -import monix.reactive.{Observable, OverflowStrategy} +import monix.execution.{ Ack, Cancelable, Scheduler } +import monix.reactive.{ Observable, OverflowStrategy } import monix.reactive.observers.Subscriber /** `Var` when subscribed, will emit the most recently emitted item by the source, diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala index cc9e0aec3..26442d4cc 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala @@ -19,16 +19,16 @@ package monix.reactive import cats.Eq import cats.Monoid -import minitest.{SimpleTestSuite, TestSuite} +import minitest.{ SimpleTestSuite, TestSuite } import minitest.laws.Checkers import monix.eval.Task import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import monix.reactive.Notification.{OnComplete, OnError, OnNext} +import monix.reactive.Notification.{ OnComplete, OnError, OnNext } import monix.reactive.observables.CombineObservable import monix.reactive.subjects._ import org.scalacheck.Test.Parameters -import org.scalacheck.{Arbitrary, Cogen, Gen, Prop} +import org.scalacheck.{ Arbitrary, Cogen, Gen, Prop } import org.typelevel.discipline.Laws import scala.concurrent.duration._ @@ -141,7 +141,7 @@ trait ArbitraryInstancesBase extends monix.eval.ArbitraryInstancesBase { } implicit def arbitraryCombineObservable[A: Arbitrary]: Arbitrary[CombineObservable.Type[A]] = { - import CombineObservable.{apply => wrap} + import CombineObservable.{ apply => wrap } Arbitrary { implicitly[Arbitrary[List[A]]].arbitrary .map(list => wrap(Observable.fromIterable(list))) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala index 7b667a9d4..2b2c87183 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala @@ -18,15 +18,15 @@ package monix.reactive import cats.Eval -import cats.effect.{ContextShift, IO, SyncIO} +import cats.effect.{ ContextShift, IO, SyncIO } import monix.catnap.SchedulerEffect -import monix.eval.TaskConversionsSuite.{CIO, CustomConcurrentEffect, CustomEffect} -import monix.eval.{Coeval, Task} +import monix.eval.TaskConversionsSuite.{ CIO, CustomConcurrentEffect, CustomEffect } +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException -import org.reactivestreams.{Publisher, Subscriber, Subscription} +import org.reactivestreams.{ Publisher, Subscriber, Subscription } import scala.concurrent.Promise -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object ObservableLikeConversionsSuite extends BaseTestSuite { test("Observable.from(future)") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala index 411a51e4e..2bf09b073 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala @@ -17,7 +17,7 @@ package monix.reactive -import cats.laws.discipline.{ContravariantTests, ProfunctorTests} +import cats.laws.discipline.{ ContravariantTests, ProfunctorTests } object TypeClassLawsForConsumerSuite extends BaseLawsTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala index 6cc63df22..f786386a4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala @@ -19,7 +19,14 @@ package monix.reactive import cats.effect.laws.discipline.BracketTests import cats.laws.discipline.arbitrary.catsLawsArbitraryForPartialFunction -import cats.laws.discipline.{AlternativeTests, ApplyTests, CoflatMapTests, FunctorFilterTests, MonoidKTests, NonEmptyParallelTests} +import cats.laws.discipline.{ + AlternativeTests, + ApplyTests, + CoflatMapTests, + FunctorFilterTests, + MonoidKTests, + NonEmptyParallelTests +} import monix.reactive.observables.CombineObservable object TypeClassLawsForObservableSuite extends BaseLawsTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala index 7ddcd8faa..1fb1219a7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala @@ -23,7 +23,7 @@ import monix.execution.Ack.Stop import monix.execution.Cancelable import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } import scala.concurrent.Promise import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala index 249a1fd7f..b9bd13d89 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala @@ -20,10 +20,10 @@ package monix.reactive.consumers import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object CompleteConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala index 5944adfcd..3b8b7e090 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.consumers import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable} +import monix.reactive.{ BaseTestSuite, Consumer, Observable } import scala.util.Failure object ContramapConsumerSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala index 9077a7336..55e1b8b8c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala @@ -21,8 +21,8 @@ import cats.effect.IO import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.Notification.{OnComplete, OnError, OnNext} -import monix.reactive.{Consumer, Observable} +import monix.reactive.Notification.{ OnComplete, OnError, OnNext } +import monix.reactive.{ Consumer, Observable } import scala.util.Success object FirstNotificationConsumerSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala index 16f63906c..98174de1b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala @@ -20,8 +20,8 @@ package monix.reactive.consumers import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} -import scala.util.{Failure, Success} +import monix.reactive.{ Consumer, Observable } +import scala.util.{ Failure, Success } object FoldLeftConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala index 1b6239338..6da5b3ad8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala @@ -22,8 +22,8 @@ import cats.laws.discipline._ import cats.effect.IO import monix.eval.Task import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable} -import scala.util.{Failure, Success} +import monix.reactive.{ BaseTestSuite, Consumer, Observable } +import scala.util.{ Failure, Success } object FoldLeftTaskConsumerSuite extends BaseTestSuite { test("should sum a long stream") { implicit s => @@ -32,7 +32,8 @@ object FoldLeftTaskConsumerSuite extends BaseTestSuite { val f = obs .consumeWith( Consumer - .foldLeftTask(0L)((s, a) => Task.evalAsync(s + a))) + .foldLeftTask(0L)((s, a) => Task.evalAsync(s + a)) + ) .runToFuture s.tick() @@ -45,7 +46,8 @@ object FoldLeftTaskConsumerSuite extends BaseTestSuite { val f = obs .consumeWith( Consumer - .foldLeftTask(0L)((s, a) => Task.evalAsync(s + a))) + .foldLeftTask(0L)((s, a) => Task.evalAsync(s + a)) + ) .runToFuture s.tick() @@ -89,7 +91,8 @@ object FoldLeftTaskConsumerSuite extends BaseTestSuite { .consumeWith(Consumer.foldLeftTask(0L)((_, _) => Task.never.doOnCancel(Task { cancelled = true - }))) + }) + )) .runToFuture s.tick() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala index 4ce4f098a..6ba594e95 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala @@ -22,10 +22,10 @@ import minitest.TestSuite import monix.eval.Task import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } import scala.concurrent.Future -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object ForeachAsyncConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() @@ -40,7 +40,8 @@ object ForeachAsyncConsumerSuite extends TestSuite[TestScheduler] { val f = obs .consumeWith( Consumer - .foreachEval(x => IO(sum += x))) + .foreachEval(x => IO(sum += x)) + ) .runToFuture s.tick() @@ -55,7 +56,8 @@ object ForeachAsyncConsumerSuite extends TestSuite[TestScheduler] { val f = obs .consumeWith( Consumer - .foreachTask(x => Task.evalAsync(sum += x))) + .foreachTask(x => Task.evalAsync(sum += x)) + ) .runToFuture s.tick() @@ -70,7 +72,8 @@ object ForeachAsyncConsumerSuite extends TestSuite[TestScheduler] { val f = obs .consumeWith( Consumer - .foreachTask(x => Task.evalAsync(sum += x))) + .foreachTask(x => Task.evalAsync(sum += x)) + ) .runToFuture s.tick() @@ -94,7 +97,8 @@ object ForeachAsyncConsumerSuite extends TestSuite[TestScheduler] { .consumeWith(Consumer.foreachTask(_ => Task.never.doOnCancel(Task { cancelled = true - }))) + }) + )) .runToFuture s.tick() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala index d58ea687f..6f0809fd2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala @@ -20,8 +20,8 @@ package monix.reactive.consumers import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} -import scala.util.{Failure, Success} +import monix.reactive.{ Consumer, Observable } +import scala.util.{ Failure, Success } object ForeachConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala index 8a0a331a7..b57dbd098 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala @@ -25,9 +25,9 @@ import monix.execution.Cancelable import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object ForeachParallelAsyncConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() @@ -42,7 +42,8 @@ object ForeachParallelAsyncConsumerSuite extends TestSuite[TestScheduler] { val f = obs .consumeWith( Consumer - .foreachParallelTask(10)(x => Task.evalAsync(sum.add(x)))) + .foreachParallelTask(10)(x => Task.evalAsync(sum.add(x))) + ) .runToFuture s.tick() @@ -57,7 +58,8 @@ object ForeachParallelAsyncConsumerSuite extends TestSuite[TestScheduler] { val f = obs .consumeWith( Consumer - .foreachParallelTask(10)(x => Task.evalAsync(sum.add(x)))) + .foreachParallelTask(10)(x => Task.evalAsync(sum.add(x))) + ) .runToFuture s.tick() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala index 029a135f0..2a9347ee4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala @@ -24,10 +24,10 @@ import monix.execution.Cancelable import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object ForeachParallelConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala index 2a5511198..01faceb4e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala @@ -24,10 +24,10 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable, Observer} +import monix.reactive.{ BaseTestSuite, Consumer, Observable, Observer } import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object FromObserverConsumerSuite extends BaseTestSuite { test("convert an observer into a consumer") { implicit s => @@ -44,7 +44,8 @@ object FromObserverConsumerSuite extends BaseTestSuite { def onNext(elem: Int) = { sum += elem; Continue } - }) + } + ) val onFinish = Promise[Unit]() val (out, _) = consumer.createSubscriber(Callback.fromPromise(onFinish), s) @@ -70,7 +71,8 @@ object FromObserverConsumerSuite extends BaseTestSuite { def onError(ex: Throwable): Unit = throw ex def onComplete(): Unit = () def onNext(elem: Int) = Continue - }) + } + ) val (out, _) = consumer.createSubscriber(cb, s) source.endWithError(ex).unsafeSubscribeFn(out) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala index fdca6262e..c696246b0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala @@ -21,9 +21,9 @@ import minitest.TestSuite import monix.eval.Task import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object HeadConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() @@ -62,7 +62,8 @@ object HeadConsumerSuite extends TestSuite[TestScheduler] { assert(wasCompleted, "wasCompleted") assert( f.value.isDefined && f.value.get.isFailure && - f.value.get.failed.get.isInstanceOf[NoSuchElementException]) + f.value.get.failed.get.isInstanceOf[NoSuchElementException] + ) } test("on error") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala index 304dc6a58..07b0c0f5e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala @@ -21,9 +21,9 @@ import cats.effect.IO import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object HeadOptionConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala index 723ccf1b5..83b5db645 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala @@ -21,9 +21,9 @@ import minitest.TestSuite import monix.execution.CancelableFuture import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object ListConsumerSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala index 9dda01526..c8e55e5f5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala @@ -21,17 +21,17 @@ import cats.laws._ import cats.laws.discipline._ import monix.execution.Callback -import monix.execution.Ack.{Continue, Stop} -import monix.execution.atomic.{Atomic, AtomicInt, AtomicLong} -import monix.execution.cancelables.{AssignableCancelable, BooleanCancelable, CompositeCancelable} -import monix.execution.{Ack, Cancelable, Scheduler} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.atomic.{ Atomic, AtomicInt, AtomicLong } +import monix.execution.cancelables.{ AssignableCancelable, BooleanCancelable, CompositeCancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.exceptions.DummyException import monix.reactive.internal.consumers.LoadBalanceConsumer import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Consumer, Observable, Observer} +import monix.reactive.{ BaseTestSuite, Consumer, Observable, Observer } -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Success} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Success } object LoadBalanceConsumerSuite extends BaseTestSuite { test("trigger error when parallelism < 1") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala index ad3c23a97..a04c6555d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.consumers import cats.laws._ import cats.laws.discipline._ import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable} +import monix.reactive.{ BaseTestSuite, Consumer, Observable } import scala.util.Failure object MapConsumerSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala index a5a1cfa80..a4cd953ec 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import cats.effect.IO import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable} +import monix.reactive.{ BaseTestSuite, Consumer, Observable } import scala.util.Failure object MapEvalConsumerSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala index a67a77147..b6a30dbf7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.eval.Task import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable} +import monix.reactive.{ BaseTestSuite, Consumer, Observable } import scala.util.Failure object MapTaskConsumerSuite extends BaseTestSuite { @@ -106,7 +106,9 @@ object MapTaskConsumerSuite extends BaseTestSuite { .never[Int] .doOnCancel(Task { taskCancelled = true - }))) + }) + ) + ) .runToFuture s.tick() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala index d03d5cdfd..36fb3b127 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala @@ -21,7 +21,7 @@ import monix.execution.Callback import monix.execution.Ack.Stop import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer} +import monix.reactive.{ BaseTestSuite, Consumer } import scala.concurrent.Promise import scala.util.Failure diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala index 7e76b2647..c38e80bd8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala @@ -24,7 +24,7 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Consumer, Observable, Observer} +import monix.reactive.{ BaseTestSuite, Consumer, Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala index 3a225f625..66e1bec21 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala @@ -149,7 +149,7 @@ object AsyncStateActionObservableSuite extends TestSuite[TestScheduler] { def int(seed: Long): (Int, Long) = { // `&` is bitwise AND. We use the current seed to generate a new seed. - val newSeed = (seed * 0X5DEECE66DL + 0XBL) & 0XFFFFFFFFFFFFL + val newSeed = (seed * 0x5deece66dL + 0xbL) & 0xffffffffffffL // The next state, which is an `RNG` instance created from the new seed. val nextRNG = newSeed // `>>>` is right binary shift with zero fill. The value `n` is our new pseudo-random integer. diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala index 4ec001512..5572415c7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala @@ -23,7 +23,7 @@ import cats.effect.concurrent.Deferred import monix.eval.Task import monix.execution.Ack.Continue import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration._ import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala index a2467d24e..a7bc7afe0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala @@ -21,9 +21,9 @@ import cats.effect.Resource import minitest.TestSuite import monix.eval.Task import monix.execution.Ack.Continue -import monix.execution.exceptions.{APIContractViolationException, DummyException} +import monix.execution.exceptions.{ APIContractViolationException, DummyException } import monix.execution.schedulers.TestScheduler -import monix.execution.{Ack, ExecutionModel, Scheduler} +import monix.execution.{ Ack, ExecutionModel, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -362,7 +362,7 @@ object BufferedIteratorAsObservableSuite extends TestSuite[TestScheduler] { val seq = 0 until n * 4 val obs = Observable .fromIteratorBufferedUnsafe(seq.iterator, n) - .delayOnNext(1.millis) + .delayOnNext(1.millis) obs.executeAsync.unsafeSubscribeFn(new Subscriber[Seq[Int]] { implicit val scheduler: Scheduler = sc @@ -394,10 +394,12 @@ object BufferedIteratorAsObservableSuite extends TestSuite[TestScheduler] { val seq = 0 to 10 val f = Observable .fromIteratorBufferedUnsafe(seq.iterator, 4) - .toListL - .runToFuture + .toListL + .runToFuture - val expected = List(Seq(0, 1, 2, 3), Seq(4, 5, 6, 7), Seq(8, 9, 10)).map(seq => toSeq(seq.map(_.asInstanceOf[AnyRef]).toArray[AnyRef])) + val expected = List(Seq(0, 1, 2, 3), Seq(4, 5, 6, 7), Seq(8, 9, 10)).map(seq => + toSeq(seq.map(_.asInstanceOf[AnyRef]).toArray[AnyRef]) + ) s.tick() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala index 6fe957a46..f93c30ae1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.builders import cats.Eval import cats.effect.IO -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.util.Success object CatsConversionsSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala index 6a8b352c7..1bfc717b8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.builders -import java.io.{Reader, StringReader} +import java.io.{ Reader, StringReader } import cats.effect.ExitCase import minitest.SimpleTestSuite @@ -25,16 +25,16 @@ import minitest.laws.Checkers import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, BatchedExecution, SynchronousExecution} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } import monix.execution.exceptions.APIContractViolationException import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber -import org.scalacheck.{Gen, Prop} +import org.scalacheck.{ Gen, Prop } import scala.collection.mutable.ArrayBuffer -import scala.util.{Failure, Random, Success} +import scala.util.{ Failure, Random, Success } object CharsReaderObservableSuite extends SimpleTestSuite with Checkers { test("fromCharsReaderUnsafe yields a single subscriber observable") { @@ -361,7 +361,8 @@ object CharsReaderObservableSuite extends SimpleTestSuite with Checkers { nLines: Int = 100, nMinLines: Int = 0, nCharsPerLine: Int = 100, - nMinCharsPerLine: Int = 0): String = { + nMinCharsPerLine: Int = 0 + ): String = { val chars = (('a' to 'z') ++ ('A' to 'Z') ++ ('0' to '9')).toVector val builder = new StringBuilder diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala index 04a8734ea..e3df740b6 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } object EmptyObservableSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala index a36cda4ec..fe4750fa3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.execution.exceptions.DummyException object ErrorObservableSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala index 3311693be..06e4c11be 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala @@ -21,7 +21,7 @@ import minitest.TestSuite import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future object EvalAlwaysObservableSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala index b924a6794..e1d5a5cb8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.eval.Coeval import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.util.Success object EvalObservableSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala index 7bbcb1bbc..1a367eb8e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala @@ -22,7 +22,7 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala index 74a1124e9..96bb99b92 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala @@ -23,8 +23,8 @@ import monix.execution.Ack.Stop import monix.execution.internal.Platform import monix.execution.ExecutionModel.SynchronousExecution import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} -import scala.concurrent.{Future, Promise} +import monix.reactive.{ Observable, Observer } +import scala.concurrent.{ Future, Promise } import scala.util.Success object ExecuteAsyncObservableSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala index a199f73dc..140e5dcf4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.builders import cats.effect.IO import cats.laws._ import cats.laws.discipline._ -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration._ object FirstStartedObservableSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala index 15e4a1abd..f2e5191f8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.builders import cats.effect.Resource import monix.eval.Task -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration._ import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala index 7f2f2cc65..6dfdf1b5f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala @@ -23,7 +23,7 @@ import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala index a2485fe23..19a725a94 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala @@ -17,22 +17,22 @@ package monix.reactive.internal.builders -import java.io.{ByteArrayInputStream, InputStream} +import java.io.{ ByteArrayInputStream, InputStream } import minitest.SimpleTestSuite import minitest.laws.Checkers import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, BatchedExecution, SynchronousExecution} -import monix.execution.exceptions.{APIContractViolationException, DummyException} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } +import monix.execution.exceptions.{ APIContractViolationException, DummyException } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber -import org.scalacheck.{Gen, Prop} +import org.scalacheck.{ Gen, Prop } import scala.collection.mutable.ListBuffer -import scala.util.{Failure, Random, Success} +import scala.util.{ Failure, Random, Success } object InputStreamObservableSuite extends SimpleTestSuite with Checkers { test("fromInputStreamUnsafe yields a single subscriber observable") { @@ -248,7 +248,7 @@ object InputStreamObservableSuite extends SimpleTestSuite with Checkers { implicit val s = TestScheduler() val gen = for { - byteSize <- Gen.choose(1, 4096) + byteSize <- Gen.choose(1, 4096) chunkSize <- Gen.choose(Math.floorDiv(byteSize, 2).max(1), byteSize * 2) } yield { (byteSize, chunkSize) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala index 861858acc..e05050cfa 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala @@ -22,7 +22,7 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala index 44c37baaf..0be907b23 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala @@ -18,12 +18,12 @@ package monix.reactive.internal.builders import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.FutureUtils.extensions._ import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala index 96953e2c0..07f59fb6b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala @@ -22,7 +22,7 @@ import minitest.TestSuite import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.exceptions.APIContractViolationException -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.execution.exceptions.DummyException diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala index 3d9f20f3b..2e1071964 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala @@ -17,20 +17,20 @@ package monix.reactive.internal.builders -import java.io.{BufferedReader, Reader, StringReader} +import java.io.{ BufferedReader, Reader, StringReader } import minitest.SimpleTestSuite import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue -import monix.execution.ExecutionModel.{AlwaysAsyncExecution, BatchedExecution, SynchronousExecution} +import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } import monix.execution.exceptions.APIContractViolationException import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber -import scala.util.{Failure, Random, Success} +import scala.util.{ Failure, Random, Success } object LinesReaderObservableSuite extends SimpleTestSuite { test("fromLinesReaderUnsafe yields a single subscriber observable") { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala index 1fb16176a..d7e7f4466 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import concurrent.duration._ object NeverObservableSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala index 8f2ddc31a..3df38b002 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala @@ -19,10 +19,10 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} -import scala.concurrent.{Future, Promise} +import monix.reactive.{ Observable, Observer } +import scala.concurrent.{ Future, Promise } object NowObservableSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala index 51cf7aa22..5e3955b4a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala @@ -25,7 +25,7 @@ import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration.MILLISECONDS @@ -47,9 +47,10 @@ object PaginateEvalObservableSuite extends BaseTestSuite { test("paginateEval should execute 11 times and then return None") { implicit s => var received = 0 - Observable.paginateEval(0)(i => if (i < 10) Task.now((i, Some(i + 1))) else Task.now((i, None))).subscribe { (_: Int) => - received += 1 - Continue + Observable.paginateEval(0)(i => if (i < 10) Task.now((i, Some(i + 1))) else Task.now((i, None))).subscribe { + (_: Int) => + received += 1 + Continue } assertEquals((0 until received).toList, (0 to 10).toList) @@ -86,7 +87,7 @@ object PaginateEvalObservableSuite extends BaseTestSuite { def int(seed: Long): (Int, Option[Long]) = { // `&` is bitwise AND. We use the current seed to generate a new seed. - val newSeed = (seed * 0X5DEECE66DL + 0XBL) & 0XFFFFFFFFFFFFL + val newSeed = (seed * 0x5deece66dL + 0xbL) & 0xffffffffffffL // The next state, which is an `RNG` instance created from the new seed. val nextRNG = newSeed // `>>>` is right binary shift with zero fill. The value `n` is our new pseudo-random integer. diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala index ae7214423..7b9e13927 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala @@ -22,7 +22,7 @@ import cats.laws.discipline._ import monix.execution.Ack.Continue import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration.MILLISECONDS @@ -81,7 +81,7 @@ object PaginateObservableSuite extends BaseTestSuite { def intOption(seed: Long): (Int, Option[Long]) = { // `&` is bitwise AND. We use the current seed to generate a new seed. - val newSeed = (seed * 0X5DEECE66DL + 0XBL) & 0XFFFFFFFFFFFFL + val newSeed = (seed * 0x5deece66dL + 0xbL) & 0xffffffffffffL // The next state, which is an `RNG` instance created from the new seed. val nextRNG = newSeed // `>>>` is right binary shift with zero fill. The value `n` is our new pseudo-random integer. diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala index 63a384f0d..4b3d46f34 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala @@ -18,12 +18,12 @@ package monix.reactive.internal.builders import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.FutureUtils.extensions._ import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala index a447b0115..9eca8e3d4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala @@ -23,7 +23,7 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.execution.FutureUtils.extensions._ import monix.execution.exceptions.DummyException diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala index 70c055f61..1418ba5d7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala @@ -22,7 +22,7 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala index 939b9791c..6ffdb6e27 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala @@ -25,11 +25,11 @@ import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Consumer, Observable} +import monix.reactive.{ BaseTestSuite, Consumer, Observable } import scala.concurrent.Promise import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object ResourceCaseObservableSuite extends BaseTestSuite { class Resource(var acquired: Int = 0, var released: Int = 0) { @@ -55,7 +55,8 @@ object ResourceCaseObservableSuite extends BaseTestSuite { .flatMap(_ => Observable(1, 2, 3).doOnEarlyStop(Task { earlyStopDone = true - })) + }) + ) bracketed.take(1L).completedL.runToFuture s.tick() @@ -274,7 +275,8 @@ object ResourceCaseObservableSuite extends BaseTestSuite { .resource(Task.unit)(_ => Task { released = true - }) + } + ) .flatMap { _ => Observable .resource(Task.unit)(_ => Task.raiseError(dummy)) @@ -295,7 +297,8 @@ object ResourceCaseObservableSuite extends BaseTestSuite { .resource(Task.unit)(_ => Task { released = true - }) + } + ) .flatMap { _ => Observable.suspend[Int](Observable.raiseError(dummy)) } @@ -315,7 +318,8 @@ object ResourceCaseObservableSuite extends BaseTestSuite { .resource(Task.unit)(_ => Task { released = true - }) + } + ) .flatMap(_ => Observable(1, 2, 3)) } @@ -398,7 +402,8 @@ object ResourceCaseObservableSuite extends BaseTestSuite { })(_ => Task { log :+= s"Stop: $key" - }) + } + ) .flatMap(Observable.pure) val observable = for { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala index 3dbeea76b..727e3e14f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala @@ -85,7 +85,7 @@ object StateActionObservableSuite extends TestSuite[TestScheduler] { def int(seed: Long): (Int, Long) = { // `&` is bitwise AND. We use the current seed to generate a new seed. - val newSeed = (seed * 0X5DEECE66DL + 0XBL) & 0XFFFFFFFFFFFFL + val newSeed = (seed * 0x5deece66dL + 0xbL) & 0xffffffffffffL // The next state, which is an `RNG` instance created from the new seed. val nextRNG = newSeed // `>>>` is right binary shift with zero fill. The value `n` is our new pseudo-random integer. diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala index aef238eb7..20edfe22f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala @@ -25,7 +25,7 @@ import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration.MILLISECONDS @@ -47,7 +47,7 @@ object UnfoldEvalObservableSuite extends BaseTestSuite { test("unfoldEval and fromAsyncStateAction results should be equal given generated inputs") { implicit s => check2 { (s: Int, i: Int) => val seed = s % (recommendedBatchSize * 2) - val n = i % (recommendedBatchSize * 2) + val n = i % (recommendedBatchSize * 2) val f: Int => Task[Option[(Int, Int)]] = i => if (i < n) Task.delay(Some((i, i + 1))) else Task.now(None) val f2: Int => Task[(Int, Int)] = i => Task.delay((i, i + 1)) @@ -99,7 +99,7 @@ object UnfoldEvalObservableSuite extends BaseTestSuite { test("unfoldEvalF and fromAsyncStateActionF results should be equal given generated inputs") { implicit s => check2 { (s: Int, i: Int) => val seed = s % (recommendedBatchSize * 2) - val n = i % (recommendedBatchSize * 2) + val n = i % (recommendedBatchSize * 2) val f: Int => IO[Option[(Int, Int)]] = i => if (i < n) IO.delay(Some((i, i + 1))) else IO.pure(None) val f2: Int => IO[(Int, Int)] = i => IO.delay((i, i + 1)) @@ -141,7 +141,7 @@ object UnfoldEvalObservableSuite extends BaseTestSuite { def int(seed: Long): (Int, Long) = { // `&` is bitwise AND. We use the current seed to generate a new seed. - val newSeed = (seed * 0X5DEECE66DL + 0XBL) & 0XFFFFFFFFFFFFL + val newSeed = (seed * 0x5deece66dL + 0xbL) & 0xffffffffffffL // The next state, which is an `RNG` instance created from the new seed. val nextRNG = newSeed // `>>>` is right binary shift with zero fill. The value `n` is our new pseudo-random integer. diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala index 5537b228a..10dedc062 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala @@ -22,7 +22,7 @@ import cats.laws.discipline._ import monix.execution.Ack.Continue import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration.MILLISECONDS @@ -82,7 +82,7 @@ object UnfoldObservableSuite extends BaseTestSuite { test("unfold and fromStateAction results should be equal given generated inputs") { implicit s => check2 { (s: Int, i: Int) => val seed = s % (recommendedBatchSize * 2) - val n = i % (recommendedBatchSize * 2) + val n = i % (recommendedBatchSize * 2) val f: Int => Option[(Int, Int)] = i => if (i < n) Some((i, i + 1)) else None val f2: Int => (Int, Int) = i => (i, i + 1) @@ -95,7 +95,7 @@ object UnfoldObservableSuite extends BaseTestSuite { def int(seed: Long): (Int, Long) = { // `&` is bitwise AND. We use the current seed to generate a new seed. - val newSeed = (seed * 0X5DEECE66DL + 0XBL) & 0XFFFFFFFFFFFFL + val newSeed = (seed * 0x5deece66dL + 0xbL) & 0xffffffffffffL // The next state, which is an `RNG` instance created from the new seed. val nextRNG = newSeed // `>>>` is right binary shift with zero fill. The value `n` is our new pseudo-random integer. diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala index ffa9bc771..6b93bd465 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala @@ -18,11 +18,11 @@ package monix.reactive.internal.builders import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler -import monix.execution.{Ack, Cancelable} +import monix.execution.{ Ack, Cancelable } import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala index dce4168c1..1a3473cc4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala @@ -18,13 +18,13 @@ package monix.reactive.internal.operators import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.FutureUtils.extensions._ import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber -import monix.reactive.{BaseTestSuite, Observable, Observer} +import monix.reactive.{ BaseTestSuite, Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Random abstract class BaseOperatorSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala index f88dcf954..3d441e7e2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala @@ -28,7 +28,7 @@ import monix.execution.atomic.Atomic import monix.reactive.Observable import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success object BufferIntrospectiveSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala index 2ce85d12b..b00d34c86 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala @@ -38,7 +38,8 @@ object BufferSlidingDropSuite extends BaseOperatorSuite { val count = 2 + (sc - 4) / 2 val sum = count / 4 * 6 Sample(o, count, sum.toLong, waitFirst, waitNext) - } else + } + else Some { val o = Observable .now(1L) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala index df4836826..bbd4ff761 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala @@ -37,7 +37,8 @@ object BufferSlidingOverlapSuite extends BaseOperatorSuite { val count = 8 + (divBy4 - 8) * 2 val sum = (count / 4) * 6 Sample(o, count, sum.toLong, waitFirst, waitNext) - } else + } + else Some { val o = Observable .now(1L) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala index b095ea019..bbbf1745b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import cats.laws._ import cats.laws.discipline._ import monix.eval.Task -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration._ import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala index bd4620ad8..5fbecc745 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala @@ -20,9 +20,9 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.internal.Platform -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object BufferTimedOrCountedSuite extends BaseOperatorSuite { val waitNext = 1.second @@ -57,7 +57,8 @@ object BufferTimedOrCountedSuite extends BaseOperatorSuite { Observable .intervalAtFixedRate(100.millis, 100.millis) .take(sourceCount.toLong), - ex) + ex + ) .bufferTimedAndCounted(1.second, maxCount = 20) .map(_.sum) @@ -142,7 +143,7 @@ object BufferTimedOrCountedSuite extends BaseOperatorSuite { assert(onNextReceived) p.success(Continue) s.tick(waitForNext) - + case _ => fail() } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala index 3e3561aeb..598b63d4a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala @@ -21,10 +21,10 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.internal.Platform import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success object BufferTimedSuite extends BaseOperatorSuite { @@ -59,7 +59,8 @@ object BufferTimedSuite extends BaseOperatorSuite { Observable .intervalAtFixedRate(100.millis, 100.millis) .take(sourceCount.toLong), - ex) + ex + ) .bufferTimed(1.second) .map(_.sum) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala index 79a9f7bfc..3c5db02a3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala @@ -21,9 +21,9 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.internal.Platform import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object BufferTumblingSuite extends BaseOperatorSuite { val waitNext = Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala index 8d588cf55..9c3033e5d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala @@ -21,9 +21,9 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.concurrent.duration.Duration import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala index 65e5985a4..53ab04f90 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala @@ -21,9 +21,9 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.concurrent.duration.Duration import scala.concurrent.duration._ import cats.laws._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala index 6fe2543d7..ada8ed6f8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala @@ -21,7 +21,7 @@ import monix.reactive.Observable import monix.execution.exceptions.DummyException import scala.concurrent.duration._ -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object BufferWithSelectorSuite extends BaseOperatorSuite { val waitNext = 1.second diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala index a747b9b25..8082c1f92 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala @@ -21,10 +21,10 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.internal.Platform import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object CollectSuite extends BaseOperatorSuite { val waitFirst = Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala index 815ddfd01..2d7007755 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala @@ -22,11 +22,11 @@ import cats.laws.discipline._ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object CollectWhileSuite extends BaseOperatorSuite { def sum(sourceCount: Int): Long = diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala index c48f63d42..9b0e0c03d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ object CombineLatest2Suite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala index 62ad85994..30ab5328e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.eval.Task -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration._ /** Tests for cancelling `concat` / `concatMap` and `mapTask`. */ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala index 726458679..31bfedee9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala @@ -18,8 +18,8 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.execution.exceptions.{CompositeException, DummyException} -import monix.reactive.{BaseTestSuite, Observable, Observer} +import monix.execution.exceptions.{ CompositeException, DummyException } +import monix.reactive.{ BaseTestSuite, Observable, Observer } import scala.concurrent.Future object ConcatDelayErrorsSuite extends BaseTestSuite { @@ -28,7 +28,8 @@ object ConcatDelayErrorsSuite extends BaseTestSuite { .range(0, 100) .flatMapDelayErrors(x => Observable(x, x, x) - .endWithError(DummyException(x.toString))) + .endWithError(DummyException(x.toString)) + ) var result = 0L var errorThrown: Throwable = null diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala index fea10a60e..6ed90f67e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.internal.Platform -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ object ConcatManySuite extends BaseOperatorSuite { @@ -71,7 +71,8 @@ object ConcatManySuite extends BaseOperatorSuite { Observable .range(0L, sourceCount.toLong) .map(_ => 1L) - .delayExecution(1.second)) + .delayExecution(1.second) + ) val count = Platform.recommendedBatchSize * 3 Seq(Sample(o, count, count, 1.seconds, 0.seconds)) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala index 8593f429e..6a693b186 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala @@ -22,11 +22,11 @@ import cats.laws.discipline._ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object ConcatMapIterableSuite extends BaseOperatorSuite { def sum(sourceCount: Int): Long = (1 to sourceCount).flatMap(i => List(i, i * 10)).sum.toLong diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala index 42eb7eef4..7fdeee2c8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala @@ -20,15 +20,15 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ -import monix.execution.{Ack, Scheduler} -import monix.reactive.Observable.{empty, now} +import monix.execution.{ Ack, Scheduler } +import monix.reactive.Observable.{ empty, now } import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ -import scala.util.{Failure, Random, Try} +import scala.util.{ Failure, Random, Try } object ConcatOneSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { @@ -134,7 +134,7 @@ object ConcatOneSuite extends BaseOperatorSuite { test("filterEval can be expressed in terms of flatMap") { implicit s => val obs1 = Observable.range(0, 100).filterEval(i => Task.pure(i % 2 == 0)) - val obs2 = Observable.range(0, 100).flatMap(x => if (x % 2 == 0) now(x) else empty) + val obs2 = Observable.range(0, 100).flatMap(x => if (x % 2 == 0) now(x) else empty) val lst1 = toList(obs1) val lst2 = toList(obs2) @@ -146,7 +146,7 @@ object ConcatOneSuite extends BaseOperatorSuite { test("filterEvalF can be expressed in terms of flatMap") { implicit s => val obs1 = Observable.range(0, 100).filterEvalF[Try](i => Try(i % 2 == 0)) - val obs2 = Observable.range(0, 100).flatMap(x => if (x % 2 == 0) now(x) else empty) + val obs2 = Observable.range(0, 100).flatMap(x => if (x % 2 == 0) now(x) else empty) val lst1 = toList(obs1) val lst2 = toList(obs2) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala index 8203fe108..bd4219db8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala @@ -39,7 +39,8 @@ object DebounceSuite extends BaseOperatorSuite { Observable .interval(2.seconds) .take(sourceCount.toLong), - ex) + ex + ) .debounce(1.second) val count = sourceCount - 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala index 35e777a2c..49bb40894 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala index 73dee390e..0ea1de279 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.eval.Task import scala.concurrent.Future diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala index a742a785b..8bb8d5462 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import minitest.TestSuite import monix.execution.Ack.Continue -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala index bc755d2c4..128299203 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala index d910f7239..6c4e1c8fe 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala @@ -21,7 +21,7 @@ import cats.effect.IO import minitest.TestSuite import monix.eval.Task import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.execution.exceptions.DummyException diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala index d2f5b05b3..112074bb7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala @@ -17,12 +17,12 @@ package monix.reactive.internal.operators -import cats.effect.{ExitCase, IO} +import cats.effect.{ ExitCase, IO } import minitest.TestSuite import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.execution.exceptions.DummyException object DoOnSubscribeSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala index 7f28f4c1c..492749745 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.eval.Task import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala index faf3e338c..f7a1e037e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.operators -import java.io.{OutputStream, PrintStream} +import java.io.{ OutputStream, PrintStream } import monix.reactive.Observable import monix.execution.exceptions.DummyException diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala index 45965381b..31d47d306 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala @@ -21,7 +21,7 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala index 180449d4e..a9595d352 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala @@ -21,7 +21,7 @@ import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Promise object EndWithErrorSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala index e8a9f5859..d8600ebba 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala @@ -21,8 +21,8 @@ import minitest.TestSuite import monix.execution.Ack import monix.execution.Ack.Stop import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} -import scala.concurrent.{Future, Promise} +import monix.reactive.{ Observable, Observer } +import scala.concurrent.{ Future, Promise } import scala.util.Success object ExecuteOnObservableSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala index 07756e3c7..d4b75206b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import minitest.TestSuite import monix.eval.Task import monix.execution.Ack.Continue -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.reactive.OverflowStrategy.Unbounded diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala index 91407b954..211fccbb6 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala @@ -20,11 +20,11 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object FilterNotSuite extends BaseOperatorSuite { def count(sourceCount: Int) = { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala index 620043e12..5a0c4e68b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala @@ -20,11 +20,11 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success object FilterSuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala index 8352b6802..b720efa31 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import cats.laws._ import cats.laws.discipline._ import monix.eval.Task -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.reactive.Observable import scala.concurrent.duration._ import scala.concurrent.duration.Duration._ @@ -38,7 +38,8 @@ object FlatScanDelayErrorSuite extends BaseOperatorSuite { Observable .repeat(acc + elem) .take(3L) - .endWithError(SomeException(10))) + .endWithError(SomeException(10)) + ) val recovered = o.onErrorHandleWith { case composite: CompositeException => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala index 8a2265484..6d902b9f5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala @@ -26,7 +26,9 @@ object FoldWhileObservableSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { val n = sourceCount / 2 val obs = - Observable.range(0L, sourceCount.toLong).foldWhileLeft(0L)((acc, e) => if (e < n) Left(acc + e) else Right(acc + e)) + Observable.range(0L, sourceCount.toLong).foldWhileLeft(0L)((acc, e) => + if (e < n) Left(acc + e) else Right(acc + e) + ) Sample(obs, 1, n * (n + 1) / 2, 0.seconds, 0.seconds) } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala index 5dcb76d63..52c5f9f50 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala @@ -19,9 +19,9 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration.Duration.Zero import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala index a28cd2515..464c21bce 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala @@ -17,14 +17,14 @@ package monix.reactive.internal.operators -import cats.effect.{ExitCase, IO} +import cats.effect.{ ExitCase, IO } import minitest.TestSuite import monix.eval.Task import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform import monix.execution.internal.exceptions.matchError import monix.reactive.observers.Subscriber diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala index 689d44a56..29c618e0b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala @@ -21,7 +21,7 @@ import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration.Duration.Zero import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala index 3f976331c..acc7ca515 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala index 81557d88c..855a65296 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala @@ -24,11 +24,11 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.reactive.{Observable, Observer, OverflowStrategy} +import monix.reactive.{ Observable, Observer, OverflowStrategy } -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ -import scala.util.{Failure, Random} +import scala.util.{ Failure, Random } object MapParallelOrderedSuite extends BaseOperatorSuite { @@ -96,7 +96,8 @@ object MapParallelOrderedSuite extends BaseOperatorSuite { Task { counter += 1 x - }.delayExecution(1.second)) + }.delayExecution(1.second) + ) .toListL .runToFuture diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala index 77e64e38c..0a1b1bd88 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala @@ -24,11 +24,11 @@ import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.internal.Platform import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer, OverflowStrategy} +import monix.reactive.{ Observable, Observer, OverflowStrategy } import scala.concurrent.Promise import scala.concurrent.duration._ -import scala.util.{Failure, Random} +import scala.util.{ Failure, Random } object MapParallelUnorderedSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { @@ -335,7 +335,8 @@ object MapParallelUnorderedSuite extends BaseOperatorSuite { .range(0, totalCount.toLong) .doOnNext(_ => Task { initiated += 1 }) .mapParallelUnordered(parallelism = 4)(x => Task.evalAsync(x))( - OverflowStrategy.DropNew(Platform.recommendedBatchSize)) + OverflowStrategy.DropNew(Platform.recommendedBatchSize) + ) .unsafeSubscribeFn(new Observer[Long] { def onNext(elem: Long) = { received += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala index 9813dd8cd..e501a4ab4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala @@ -20,10 +20,10 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ object MapSuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala index bb55d6b93..9ad49248d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala @@ -25,12 +25,12 @@ import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.Scheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.execution.exceptions.DummyException import scala.concurrent.duration._ -import scala.concurrent.{Future, Promise} -import scala.util.{Failure, Random} +import scala.concurrent.{ Future, Promise } +import scala.util.{ Failure, Random } object MapTaskSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala index e9ce02aa8..5084601d2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala @@ -19,9 +19,9 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue -import monix.reactive.Notification.{OnComplete, OnError, OnNext} +import monix.reactive.Notification.{ OnComplete, OnError, OnNext } import monix.execution.exceptions.DummyException -import monix.reactive.{Notification, Observable, Observer} +import monix.reactive.{ Notification, Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala index 65d03356a..67eaef18e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero object MaxBySuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala index a33048a6f..dc418254a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero object MaxSuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala index 854320d65..7ce58b541 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.CompositeException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.util.Random diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala index b76e9ed1b..c54023d60 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.CompositeException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.util.Random diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala index 0befb8190..e7f9ea806 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala index c315fa73f..dbd24f77b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala @@ -21,10 +21,10 @@ import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.Scheduler -import monix.reactive.Observable.{empty, now} +import monix.reactive.Observable.{ empty, now } import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration.Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala index 2726f8e3a..4e7ba9ac1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala @@ -18,10 +18,10 @@ package monix.reactive.internal.operators import monix.eval.Task -import monix.execution.{Ack, Cancelable, Scheduler} -import monix.execution.Ack.{Continue, Stop} +import monix.execution.{ Ack, Cancelable, Scheduler } +import monix.execution.Ack.{ Continue, Stop } import monix.reactive.observers.Subscriber -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration.Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala index 3eb2f2265..5a0cdf6d2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero object MinBySuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala index 0439896b5..838d73506 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration.Duration.Zero object MinSuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala index d07b4aab6..b73051972 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala @@ -21,7 +21,7 @@ import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } object MiscCompleteSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala index 64fb9b235..72cf421a0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala index 0e2198e13..790bd1c2a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala @@ -21,7 +21,7 @@ import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Promise object MiscFailedSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala index 3bf35c4d7..3c9506283 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala @@ -24,9 +24,9 @@ import monix.execution.Ack.Stop import monix.execution.FutureUtils.extensions._ import monix.execution.Scheduler import monix.execution.atomic.Atomic -import monix.reactive.{BaseTestSuite, Observable, Observer} -import scala.concurrent.{Future, Promise} -import scala.util.{Success, Try} +import monix.reactive.{ BaseTestSuite, Observable, Observer } +import scala.concurrent.{ Future, Promise } +import scala.util.{ Success, Try } object ObservableOpsReturningTaskSuite extends BaseTestSuite { def first[A](obs: Observable[A])(implicit s: Scheduler): Future[Try[Option[A]]] = { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala index b6ef8ea95..ff74612bc 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala @@ -24,7 +24,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.reactive.OverflowStrategy.Unbounded -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } object ObserveOnSuite extends BaseTestSuite { test("equivalence with the source") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala index f1e81a919..54d5b5594 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala @@ -18,11 +18,11 @@ package monix.reactive.internal.operators import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} -import scala.concurrent.{CancellationException, Future} +import monix.reactive.{ Observable, Observer } +import scala.concurrent.{ CancellationException, Future } import scala.concurrent.duration._ object OnCancelTriggerErrorSuite extends TestSuite[TestScheduler] { @@ -46,7 +46,8 @@ object OnCancelTriggerErrorSuite extends TestSuite[TestScheduler] { assertEquals(effect, 0) assert( errorThrow != null && errorThrow.isInstanceOf[CancellationException], - "errorThrow should be CancellationException") + "errorThrow should be CancellationException" + ) } test("cannot cancel after complete") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala index dd29989b1..53d853187 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.reactive.Observable import monix.execution.exceptions.DummyException -import scala.concurrent.duration.{Duration, _} +import scala.concurrent.duration.{ Duration, _ } object OnErrorRetryCountedSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala index 96921b797..0012c5e61 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.reactive.Observable import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import scala.concurrent.duration.{Duration, _} +import scala.concurrent.duration.{ Duration, _ } object OnErrorRetryIfSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala index 92e87088e..7cbd6248e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Pipe} +import monix.reactive.{ Observable, Pipe } import scala.concurrent.duration.Duration.Zero import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala index c3c75ba6b..bb46f8e15 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import cats.effect.IO import monix.execution.atomic.Atomic -import monix.reactive.{BaseTestSuite, Observable, OverflowStrategy} +import monix.reactive.{ BaseTestSuite, Observable, OverflowStrategy } import scala.util.Success object PublishSelectorSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala index 142ff33b3..799cd20e5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala index 306f9d2fd..c527f4c03 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala @@ -21,7 +21,7 @@ import cats.Monoid import cats.laws._ import cats.laws.discipline._ import monix.eval.Task -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } object ScanMapSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala index 0697efa7a..bc4e74aa4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala @@ -20,11 +20,11 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object TakeByPredicateInclusiveSuite extends BaseOperatorSuite { def sum(sourceCount: Int): Long = diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala index 992e425ea..1cc1d3720 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala @@ -20,10 +20,10 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object TakeByPredicateSuite extends BaseOperatorSuite { def sum(sourceCount: Int): Long = diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala index 986b14310..08330ae07 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala @@ -17,9 +17,9 @@ package monix.reactive.internal.operators -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.FutureUtils.extensions._ -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala index 24c9fe971..a2e56384b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala @@ -19,10 +19,10 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.duration._ import scala.concurrent.duration.Duration.Zero -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object TakeLeftSuite extends BaseOperatorSuite { def sum(sourceCount: Int): Long = sourceCount.toLong * (sourceCount + 1) / 2 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala index ba33f8375..58bfdd357 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala @@ -19,11 +19,11 @@ package monix.reactive.internal.operators import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Task, TaskLike} +import monix.eval.{ Task, TaskLike } import monix.reactive.Observable import concurrent.duration._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success object TakeUntilObservableSuite extends BaseOperatorSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala index bb6764104..b1a874753 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala @@ -38,7 +38,8 @@ object TakeWhileNotCanceledSuite extends BaseOperatorSuite { if (sourceCount == 1) Observable.range(1, 10).takeWhileNotCanceled(c).map { x => c.cancel(); x - } else + } + else Observable.range(1L, sourceCount.toLong * 2).takeWhileNotCanceled(c).map { x => if (x == sourceCount) c.cancel(); x } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala index c6e4ea4e0..7e128580c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.execution.FutureUtils.extensions._ import scala.collection.mutable.ArrayBuffer @@ -27,8 +27,8 @@ import scala.concurrent.Future import scala.concurrent.duration._ object ThrottleLatestSuite extends BaseOperatorSuite { - def count(sourceCount: Int):Int = { - sourceCount/2 + def count(sourceCount: Int): Int = { + sourceCount / 2 } def sum(sourceCount: Int): Int = { @@ -37,7 +37,7 @@ object ThrottleLatestSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { val elemsToTake = sourceCount.toLong - 1 - val o:Observable[Long] = { + val o: Observable[Long] = { Observable(1L).delayOnComplete(100.millisecond) ++ Observable.intervalAtFixedRate(500.millisecond).take(elemsToTake) } @@ -57,13 +57,15 @@ object ThrottleLatestSuite extends BaseOperatorSuite { } test("should emit last element onComplete if emitLast is set to true") { implicit s => - val source: Observable[Long] = Observable.intervalAtFixedRate(110.millisecond).take(30).throttleLatest(1.second, true) + val source: Observable[Long] = + Observable.intervalAtFixedRate(110.millisecond).take(30).throttleLatest(1.second, true) var wasCompleted = false val elements = ArrayBuffer[Long]() source.unsafeSubscribeFn(new Observer[Long] { def onNext(elem: Long) = { elements.append(elem) - Continue } + Continue + } def onError(ex: Throwable) = () def onComplete() = { wasCompleted = true } }) @@ -74,13 +76,15 @@ object ThrottleLatestSuite extends BaseOperatorSuite { } test("should not emit last element onComplete if emitLast is set to false") { implicit s => - val source: Observable[Long] = Observable.intervalAtFixedRate(110.millisecond).take(30).throttleLatest(1.second, false) + val source: Observable[Long] = + Observable.intervalAtFixedRate(110.millisecond).take(30).throttleLatest(1.second, false) var wasCompleted = false val elements = ArrayBuffer[Long]() source.unsafeSubscribeFn(new Observer[Long] { def onNext(elem: Long) = { elements.append(elem) - Continue } + Continue + } def onError(ex: Throwable) = () def onComplete() = { wasCompleted = true } }) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala index de59c4ec7..9a9f1277d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.exceptions.UpstreamTimeoutException -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject import scala.concurrent.TimeoutException @@ -83,6 +83,7 @@ object TimeoutOnSlowUpstreamSuite extends BaseOperatorSuite { s.tick(1.second) assert( errorThrown != null && errorThrown.isInstanceOf[TimeoutException], - "errorThrown should be a TimeoutException") + "errorThrown should be a TimeoutException" + ) } } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala index 455d53756..1926b12df 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala @@ -34,9 +34,9 @@ object TransformerSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { val o = - Observable - .range(0L, sourceCount.toLong) - .transform(dummyTransformer) + Observable + .range(0L, sourceCount.toLong) + .transform(dummyTransformer) Sample(o, count(sourceCount), sum(sourceCount), Zero, Zero) } @@ -50,7 +50,7 @@ object TransformerSuite extends BaseOperatorSuite { createObservableEndingInError(Observable.now(1L), ex).transform(dummyTransformer) else createObservableEndingInError(Observable.range(1, sourceCount.toLong + 1, 1), ex) - .transform(dummyTransformer) + .transform(dummyTransformer) Sample(o, count(sourceCount), sum(sourceCount), Zero, Zero) } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala index aac69cc32..c126b113a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.internal.Platform -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } import concurrent.duration._ import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala index d69d613d6..7227686cb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala @@ -68,14 +68,15 @@ object WhileBusyAggregateEventsOperatorSuite extends BaseOperatorSuite { require(sourceCount > 0, "sourceCount should be strictly positive") val o = Observable - .range(0, sourceCount.toLong) - .whileBusyAggregateEvents{ elem => - if (sourceCount == 1) throw ex else elem - }{ case (acc, elem) => + .range(0, sourceCount.toLong) + .whileBusyAggregateEvents { elem => + if (sourceCount == 1) throw ex else elem + } { + case (acc, elem) => if (elem == sourceCount - 1) throw ex else elem + acc - } - .throttle(waitNext, 1) + } + .throttle(waitNext, 1) Sample(o, 0, 0, waitNext, waitNext) } @@ -119,7 +120,7 @@ object WhileBusyAggregateEventsOperatorSuite extends BaseOperatorSuite { s.tick(10.seconds) // 21,24,27 seconds - elements 6,7,8 s.tick(10.seconds) - assertEquals(result.value, Some(Success(List(Chain(0), Chain(1, 2), Chain(3, 4 , 5), Chain(6, 7, 8))))) + assertEquals(result.value, Some(Success(List(Chain(0), Chain(1, 2), Chain(3, 4, 5), Chain(6, 7, 8))))) } test("performs conflation when upstream is unbounded and downstream is slow") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala index d763abb22..3a390e461 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala @@ -21,7 +21,7 @@ import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Promise import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala index 96e542f4f..9dd03644a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala @@ -22,7 +22,7 @@ import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Promise import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala index bfa75748d..695f49581 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala @@ -21,7 +21,7 @@ import monix.execution.Ack.Continue import monix.execution.FutureUtils.extensions._ import monix.execution.exceptions.DummyException import monix.reactive.subjects.PublishSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration.Duration.Zero import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala index 4badfdff6..e78cc4616 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala @@ -18,9 +18,9 @@ package monix.reactive.internal.rstreams import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala index b49704589..322289ec1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala @@ -24,7 +24,7 @@ import monix.execution.rstreams.SingleAssignSubscription import monix.execution.schedulers.TestScheduler import monix.reactive.Observable import monix.reactive.subjects.PublishSubject -import org.reactivestreams.{Subscriber, Subscription} +import org.reactivestreams.{ Subscriber, Subscription } import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala index 80370780b..88b46758a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala @@ -18,14 +18,14 @@ package monix.reactive.internal.rstreams import minitest.TestSuite -import monix.execution.Ack.{Continue, Stop} -import monix.execution.atomic.{Atomic, AtomicBoolean, AtomicInt} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.atomic.{ Atomic, AtomicBoolean, AtomicInt } import monix.execution.schedulers.TestScheduler -import monix.execution.{Ack, Cancelable, Scheduler} -import monix.reactive.{Observable, Observer} -import org.reactivestreams.{Publisher, Subscriber, Subscription} +import monix.execution.{ Ack, Cancelable, Scheduler } +import monix.reactive.{ Observable, Observer } +import org.reactivestreams.{ Publisher, Subscriber, Subscription } -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object PublisherIsObservableSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -115,7 +115,8 @@ object PublisherIsObservableSuite extends TestSuite[TestScheduler] { requestSize: Int, ack: Atomic[Promise[Ack]], active: AtomicBoolean, - received: AtomicInt)(implicit s: Scheduler): Cancelable = { + received: AtomicInt + )(implicit s: Scheduler): Cancelable = { Observable .fromReactivePublisher(p, requestSize) @@ -133,7 +134,8 @@ object PublisherIsObservableSuite extends TestSuite[TestScheduler] { } private def createPublisher(isPublisherActive: AtomicBoolean, requested: AtomicInt, requestSize: Int)( - implicit s: Scheduler): Publisher[Long] = { + implicit s: Scheduler + ): Publisher[Long] = { new Publisher[Long] { override def subscribe(subscriber: Subscriber[_ >: Long]): Unit = diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala index 3cf19a30d..bec1e44a7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala @@ -19,9 +19,9 @@ package monix.reactive.internal.subscribers import monix.execution.ExecutionModel.SynchronousExecution import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Observable} +import monix.reactive.{ BaseTestSuite, Observable } -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object ObservableForeachSuite extends BaseTestSuite { test("foreach subscribes immediately") { scheduler => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala index d3aa221b5..5d7f98b45 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala @@ -21,7 +21,7 @@ import minitest.TestSuite import monix.execution.Ack.Continue import monix.execution.schedulers.TestScheduler import monix.reactive.subjects.ConcurrentSubject -import monix.reactive.{Consumer, Observable} +import monix.reactive.{ Consumer, Observable } import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala index 536b47a2e..07086dc03 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala @@ -24,7 +24,7 @@ import monix.execution.schedulers.TestScheduler import monix.reactive.OverflowStrategy.Unbounded import monix.execution.exceptions.DummyException import monix.reactive.subjects.ConcurrentSubject -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.concurrent.Future import scala.concurrent.duration._ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala index 1ebc06261..7cdeb2d14 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala @@ -17,9 +17,9 @@ package monix.reactive.observers -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Observer} +import monix.reactive.{ BaseTestSuite, Observer } object ContramapObserverSuite extends BaseTestSuite { test("Observer.contramap equivalence with plain Observer") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala index cdcc25e1f..fa44cb0ab 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala @@ -17,7 +17,7 @@ package monix.reactive.observers -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.exceptions.DummyException import monix.reactive.BaseTestSuite diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala index d2aa9c65b..4baa75534 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala @@ -17,7 +17,7 @@ package monix.reactive.observers -import java.io.{OutputStream, PrintStream} +import java.io.{ OutputStream, PrintStream } import minitest.SimpleTestSuite import monix.execution.Ack.Continue diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala index 7933f22f1..29fc5ddd5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala @@ -17,9 +17,9 @@ package monix.reactive.observers -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable -import monix.reactive.{BaseTestSuite, Observer} +import monix.reactive.{ BaseTestSuite, Observer } import scala.concurrent.Future import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala index 26a307256..aecb5b1ae 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala @@ -19,12 +19,12 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success object OverflowStrategyBackPressureBatchedSuite extends TestSuite[TestScheduler] { @@ -136,7 +136,8 @@ object OverflowStrategyBackPressureBatchedSuite extends TestSuite[TestScheduler] if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) @@ -174,7 +175,8 @@ object OverflowStrategyBackPressureBatchedSuite extends TestSuite[TestScheduler] if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala index d29ada18a..4d365ab9d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala @@ -19,12 +19,12 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.reactive.OverflowStrategy.BackPressure import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyBackPressureSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -133,7 +133,8 @@ object OverflowStrategyBackPressureSuite extends TestSuite[TestScheduler] { if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) @@ -171,7 +172,8 @@ object OverflowStrategyBackPressureSuite extends TestSuite[TestScheduler] { if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala index f6756c1b8..df33cc4d3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala @@ -19,16 +19,16 @@ package monix.reactive.observers import minitest.TestSuite import monix.eval.Coeval -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.AtomicLong -import monix.execution.internal.{Platform, RunnableAction} +import monix.execution.internal.{ Platform, RunnableAction } import monix.execution.schedulers.TestScheduler -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.Observer import monix.reactive.OverflowStrategy.ClearBufferAndSignal import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -45,7 +45,8 @@ object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler BufferedSubscriber[Int]( Subscriber(underlying, s), - ClearBufferAndSignal(bufferSize, nr => Coeval { log.set(nr); None })) + ClearBufferAndSignal(bufferSize, nr => Coeval { log.set(nr); None }) + ) } test("should not lose events, test 1") { implicit s => @@ -220,13 +221,16 @@ object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler test("should send onError when in flight") { implicit s => var errorThrown: Throwable = null - val buffer = buildNewWithSignal(5, new Observer[Int] { - def onError(ex: Throwable) = { - errorThrown = ex + val buffer = buildNewWithSignal( + 5, + new Observer[Int] { + def onError(ex: Throwable) = { + errorThrown = ex + } + def onNext(elem: Int) = Continue + def onComplete() = throw new IllegalStateException() } - def onNext(elem: Int) = Continue - def onComplete() = throw new IllegalStateException() - }) + ) buffer.onNext(1) buffer.onError(DummyException("dummy")) @@ -239,13 +243,16 @@ object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler var errorThrown: Throwable = null val promise = Promise[Ack]() - val buffer = buildNewWithSignal(5, new Observer[Int] { - def onError(ex: Throwable) = { - errorThrown = ex + val buffer = buildNewWithSignal( + 5, + new Observer[Int] { + def onError(ex: Throwable) = { + errorThrown = ex + } + def onNext(elem: Int) = promise.future + def onComplete() = throw new IllegalStateException() } - def onNext(elem: Int) = promise.future - def onComplete() = throw new IllegalStateException() - }) + ) for (i <- 1 to 10) assertEquals(buffer.onNext(i), Continue) buffer.onError(DummyException("dummy")) @@ -261,14 +268,17 @@ object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler var wasCompleted = false val startConsuming = Promise[Continue.type]() - val buffer = buildNewWithSignal(10000, new Observer[Int] { - def onNext(elem: Int) = { - sum += elem - startConsuming.future + val buffer = buildNewWithSignal( + 10000, + new Observer[Int] { + def onNext(elem: Int) = { + sum += elem + startConsuming.future + } + def onError(ex: Throwable) = throw ex + def onComplete() = wasCompleted = true } - def onError(ex: Throwable) = throw ex - def onComplete() = wasCompleted = true - }) + ) (0 until 9999).foreach { x => buffer.onNext(x); () } buffer.onComplete() @@ -283,14 +293,17 @@ object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler var sum = 0L var wasCompleted = false - val buffer = buildNewWithSignal(10000, new Observer[Int] { - def onNext(elem: Int) = { - sum += elem - Continue + val buffer = buildNewWithSignal( + 10000, + new Observer[Int] { + def onNext(elem: Int) = { + sum += elem + Continue + } + def onError(ex: Throwable) = throw ex + def onComplete() = wasCompleted = true } - def onError(ex: Throwable) = throw ex - def onComplete() = wasCompleted = true - }) + ) (0 until 9999).foreach { x => buffer.onNext(x); () } buffer.onComplete() @@ -330,14 +343,17 @@ object OverflowStrategyClearBufferAndSignalSuite extends TestSuite[TestScheduler var sum = 0L var errorThrown: Throwable = null - val buffer = buildNewWithSignal(10000, new Observer[Int] { - def onNext(elem: Int) = { - sum += elem - Continue + val buffer = buildNewWithSignal( + 10000, + new Observer[Int] { + def onNext(elem: Int) = { + sum += elem + Continue + } + def onError(ex: Throwable) = errorThrown = ex + def onComplete() = throw new IllegalStateException() } - def onError(ex: Throwable) = errorThrown = ex - def onComplete() = throw new IllegalStateException() - }) + ) (0 until 9999).foreach { x => buffer.onNext(x); () } buffer.onError(DummyException("dummy")) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala index 817b13b1a..7f762c15c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala @@ -19,14 +19,14 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.internal.{Platform, RunnableAction} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.internal.{ Platform, RunnableAction } import monix.execution.schedulers.TestScheduler import monix.reactive.Observer import monix.reactive.OverflowStrategy.ClearBuffer import monix.execution.exceptions.DummyException import monix.reactive.observers.OverflowStrategyClearBufferAndSignalSuite._ -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyClearBufferSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala index 0a93d55c4..a5a282737 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala @@ -19,11 +19,11 @@ package monix.reactive.observers import minitest.TestSuite import monix.eval.Coeval -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.AtomicLong import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.Observer import monix.reactive.OverflowStrategy.DropNewAndSignal import monix.execution.exceptions.DummyException @@ -100,7 +100,8 @@ object OverflowStrategyDropNewAndSignalSuite extends TestSuite[TestScheduler] { if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) @@ -219,13 +220,16 @@ object OverflowStrategyDropNewAndSignalSuite extends TestSuite[TestScheduler] { test("should send onError when in flight") { implicit s => var errorThrown: Throwable = null - val buffer = buildNewForIntWithSignal(5, new Observer[Int] { - def onError(ex: Throwable) = { - errorThrown = ex + val buffer = buildNewForIntWithSignal( + 5, + new Observer[Int] { + def onError(ex: Throwable) = { + errorThrown = ex + } + def onNext(elem: Int) = Continue + def onComplete() = throw new IllegalStateException() } - def onNext(elem: Int) = Continue - def onComplete() = throw new IllegalStateException() - }) + ) buffer.onNext(1) buffer.onError(DummyException("dummy")) @@ -238,13 +242,16 @@ object OverflowStrategyDropNewAndSignalSuite extends TestSuite[TestScheduler] { var errorThrown: Throwable = null val promise = Promise[Ack]() - val buffer = buildNewForIntWithSignal(5, new Observer[Int] { - def onError(ex: Throwable) = { - errorThrown = ex + val buffer = buildNewForIntWithSignal( + 5, + new Observer[Int] { + def onError(ex: Throwable) = { + errorThrown = ex + } + def onNext(elem: Int) = promise.future + def onComplete() = throw new IllegalStateException() } - def onNext(elem: Int) = promise.future - def onComplete() = throw new IllegalStateException() - }) + ) buffer.onNext(1) buffer.onNext(2) @@ -264,14 +271,17 @@ object OverflowStrategyDropNewAndSignalSuite extends TestSuite[TestScheduler] { var wasCompleted = false val startConsuming = Promise[Continue.type]() - val buffer = buildNewForLongWithSignal(10000, new Observer[Long] { - def onNext(elem: Long) = { - sum += elem - startConsuming.future + val buffer = buildNewForLongWithSignal( + 10000, + new Observer[Long] { + def onNext(elem: Long) = { + sum += elem + startConsuming.future + } + def onError(ex: Throwable) = throw ex + def onComplete() = wasCompleted = true } - def onError(ex: Throwable) = throw ex - def onComplete() = wasCompleted = true - }) + ) (0 until 9999).foreach { x => buffer.onNext(x.toLong); () } buffer.onComplete() @@ -286,14 +296,17 @@ object OverflowStrategyDropNewAndSignalSuite extends TestSuite[TestScheduler] { var sum = 0L var wasCompleted = false - val buffer = buildNewForLongWithSignal(10000, new Observer[Long] { - def onNext(elem: Long) = { - sum += elem - Continue + val buffer = buildNewForLongWithSignal( + 10000, + new Observer[Long] { + def onNext(elem: Long) = { + sum += elem + Continue + } + def onError(ex: Throwable) = throw ex + def onComplete() = wasCompleted = true } - def onError(ex: Throwable) = throw ex - def onComplete() = wasCompleted = true - }) + ) (0 until 9999).foreach { x => buffer.onNext(x.toLong); () } buffer.onComplete() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala index f07910735..f7a94115f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala @@ -19,12 +19,12 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.schedulers.TestScheduler import monix.reactive.Observer import monix.reactive.OverflowStrategy.DropNew import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyDropNewSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -86,7 +86,8 @@ object OverflowStrategyDropNewSuite extends TestSuite[TestScheduler] { if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) @@ -148,7 +149,8 @@ object OverflowStrategyDropNewSuite extends TestSuite[TestScheduler] { if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala index 2140109dd..75ff1a0cb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala @@ -19,17 +19,17 @@ package monix.reactive.observers import minitest.TestSuite import monix.eval.Coeval -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer import monix.execution.atomic.AtomicLong -import monix.execution.internal.{Platform, RunnableAction} +import monix.execution.internal.{ Platform, RunnableAction } import monix.execution.schedulers.TestScheduler -import monix.execution.{Ack, Scheduler} +import monix.execution.{ Ack, Scheduler } import monix.reactive.Observer import monix.reactive.OverflowStrategy.DropOldAndSignal import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyDropOldAndSignalSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -233,13 +233,16 @@ object OverflowStrategyDropOldAndSignalSuite extends TestSuite[TestScheduler] { test("should send onError when in flight") { implicit s => var errorThrown: Throwable = null - val buffer = buildNewWithSignal(5, new Observer[Int] { - def onError(ex: Throwable) = { - errorThrown = ex + val buffer = buildNewWithSignal( + 5, + new Observer[Int] { + def onError(ex: Throwable) = { + errorThrown = ex + } + def onNext(elem: Int) = Continue + def onComplete() = throw new IllegalStateException() } - def onNext(elem: Int) = Continue - def onComplete() = throw new IllegalStateException() - }) + ) buffer.onNext(1) buffer.onError(DummyException("dummy")) @@ -252,13 +255,16 @@ object OverflowStrategyDropOldAndSignalSuite extends TestSuite[TestScheduler] { var errorThrown: Throwable = null val promise = Promise[Ack]() - val buffer = buildNewWithSignal(5, new Observer[Int] { - def onError(ex: Throwable) = { - errorThrown = ex + val buffer = buildNewWithSignal( + 5, + new Observer[Int] { + def onError(ex: Throwable) = { + errorThrown = ex + } + def onNext(elem: Int) = promise.future + def onComplete() = throw new IllegalStateException() } - def onNext(elem: Int) = promise.future - def onComplete() = throw new IllegalStateException() - }) + ) for (i <- 1 to 10) assertEquals(buffer.onNext(i), Continue) buffer.onError(DummyException("dummy")) @@ -274,14 +280,17 @@ object OverflowStrategyDropOldAndSignalSuite extends TestSuite[TestScheduler] { var wasCompleted = false val startConsuming = Promise[Continue.type]() - val buffer = buildNewWithSignal(10000, new Observer[Int] { - def onNext(elem: Int) = { - sum += elem - startConsuming.future + val buffer = buildNewWithSignal( + 10000, + new Observer[Int] { + def onNext(elem: Int) = { + sum += elem + startConsuming.future + } + def onError(ex: Throwable) = throw ex + def onComplete() = wasCompleted = true } - def onError(ex: Throwable) = throw ex - def onComplete() = wasCompleted = true - }) + ) (0 until 9999).foreach { x => buffer.onNext(x); () } buffer.onComplete() @@ -296,14 +305,17 @@ object OverflowStrategyDropOldAndSignalSuite extends TestSuite[TestScheduler] { var sum = 0L var wasCompleted = false - val buffer = buildNewWithSignal(10000, new Observer[Int] { - def onNext(elem: Int) = { - sum += elem - Continue + val buffer = buildNewWithSignal( + 10000, + new Observer[Int] { + def onNext(elem: Int) = { + sum += elem + Continue + } + def onError(ex: Throwable) = throw ex + def onComplete() = wasCompleted = true } - def onError(ex: Throwable) = throw ex - def onComplete() = wasCompleted = true - }) + ) (0 until 9999).foreach { x => buffer.onNext(x); () } buffer.onComplete() @@ -343,14 +355,17 @@ object OverflowStrategyDropOldAndSignalSuite extends TestSuite[TestScheduler] { var sum = 0L var errorThrown: Throwable = null - val buffer = buildNewWithSignal(10000, new Observer[Int] { - def onNext(elem: Int) = { - sum += elem - Continue + val buffer = buildNewWithSignal( + 10000, + new Observer[Int] { + def onNext(elem: Int) = { + sum += elem + Continue + } + def onError(ex: Throwable) = errorThrown = ex + def onComplete() = throw new IllegalStateException() } - def onError(ex: Throwable) = errorThrown = ex - def onComplete() = throw new IllegalStateException() - }) + ) (0 until 9999).foreach { x => buffer.onNext(x); () } buffer.onError(DummyException("dummy")) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala index 252ab4494..7d6f4924b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala @@ -19,13 +19,13 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.internal.{Platform, RunnableAction} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.internal.{ Platform, RunnableAction } import monix.execution.schedulers.TestScheduler import monix.reactive.Observer import monix.reactive.OverflowStrategy.DropOld import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyDropOldSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala index 892c30abf..9f262997c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.BufferOverflowException import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler @@ -27,7 +27,7 @@ import monix.reactive.Observer import monix.reactive.OverflowStrategy.Fail import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyFailSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -89,7 +89,8 @@ object OverflowStrategyFailSuite extends TestSuite[TestScheduler] { if (n > 0) s.execute { () => buffer.onNext(n); loop(n - 1) - } else + } + else buffer.onComplete() loop(10000) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala index cee62885a..8f3f07a6e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala @@ -19,14 +19,14 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} -import monix.execution.internal.{Platform, RunnableAction} +import monix.execution.Ack.{ Continue, Stop } +import monix.execution.internal.{ Platform, RunnableAction } import monix.execution.schedulers.TestScheduler import monix.reactive.Observer import monix.reactive.OverflowStrategy.Unbounded import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object OverflowStrategyUnboundedSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() @@ -354,15 +354,18 @@ object OverflowStrategyUnboundedSuite extends TestSuite[TestScheduler] { var received = 0L var wasCompleted = false - val buffer = BufferedSubscriber[Long](new Subscriber[Long] { - def onNext(elem: Long) = { - received += 1 - Continue - } - def onError(ex: Throwable) = () - def onComplete() = wasCompleted = true - val scheduler = s - }, Unbounded) + val buffer = BufferedSubscriber[Long]( + new Subscriber[Long] { + def onNext(elem: Long) = { + received += 1 + Continue + } + def onError(ex: Throwable) = () + def onComplete() = wasCompleted = true + val scheduler = s + }, + Unbounded + ) for (i <- 0 until (Platform.recommendedBatchSize * 2)) buffer.onNext(i.toLong) buffer.onComplete() diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala index bf7db0503..41985d55f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala @@ -20,9 +20,9 @@ package monix.reactive.observers import minitest.TestSuite import monix.execution.Ack import monix.execution.schedulers.TestScheduler -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } import scala.util.Success object SafeSubscriberSuite extends TestSuite[TestScheduler] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala index d1d2d93c5..0aae5b642 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.observers import monix.execution.Ack.Stop import monix.execution.exceptions.DummyException -import monix.reactive.{BaseTestSuite, Observer} +import monix.reactive.{ BaseTestSuite, Observer } object StoppedObserverSuite extends BaseTestSuite { test("Observer.stopped works") { implicit s => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala index 006133c84..51643a4ab 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala @@ -17,7 +17,7 @@ package monix.reactive.observers -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution.compat.internal.toIterator import monix.reactive.BaseTestSuite diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala index ddc12d153..f9b6d9571 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.subjects import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Consumer, Observable, Observer} +import monix.reactive.{ Consumer, Observable, Observer } object AsyncSubjectSuite extends BaseSubjectSuite { def alreadyTerminatedTest(expectedElems: Seq[Long]) = { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala index 78feaccd2..0737cc64b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala @@ -23,7 +23,7 @@ import monix.execution.exceptions.DummyException import monix.execution.Ack.Continue import monix.execution.Scheduler import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.util.Random diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala index 65fb557a1..907e3d65b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala @@ -19,10 +19,10 @@ package monix.reactive.subjects import minitest.TestSuite import monix.eval.Task -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.reactive.{Observable, Observer} +import monix.reactive.{ Observable, Observer } import scala.util.Random diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala index 0b05bc2e9..399ad62fe 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.subjects import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Consumer, Observable, Observer} +import monix.reactive.{ Consumer, Observable, Observer } import scala.concurrent.Future import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala index 69b76d936..e1fe93797 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.subjects import monix.execution.Ack.Continue import monix.execution.Scheduler import monix.execution.exceptions.DummyException -import monix.reactive.{MulticastStrategy, Observer} +import monix.reactive.{ MulticastStrategy, Observer } object ConcurrentAsyncSubjectSuite extends BaseConcurrentSubjectSuite { def alreadyTerminatedTest(expectedElems: Seq[Long])(implicit s: Scheduler) = { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala index 2dce297d4..30bac09a0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala @@ -18,7 +18,7 @@ package monix.reactive.subjects import monix.execution.Scheduler -import monix.reactive.{MulticastStrategy, OverflowStrategy} +import monix.reactive.{ MulticastStrategy, OverflowStrategy } import OverflowStrategy.Unbounded object ConcurrentBehaviorSubjectSuite extends BaseConcurrentSubjectSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala index bd663f5c7..0e75a263d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala @@ -18,7 +18,7 @@ package monix.reactive.subjects import monix.execution.Scheduler -import monix.reactive.{MulticastStrategy, OverflowStrategy} +import monix.reactive.{ MulticastStrategy, OverflowStrategy } import OverflowStrategy.Unbounded object ConcurrentPublishSubjectSuite extends BaseConcurrentSubjectSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala index b70ac332b..1cd443d1f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala @@ -19,7 +19,7 @@ package monix.reactive.subjects import cats.implicits._ import monix.execution.Ack -import monix.execution.Ack.{Continue, Stop} +import monix.execution.Ack.{ Continue, Stop } import monix.execution.exceptions.DummyException import monix.reactive.Observer diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala index 67f8810fa..94a797df4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.subjects import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Observable, Observer, OverflowStrategy} +import monix.reactive.{ Observable, Observer, OverflowStrategy } import scala.concurrent.Future import scala.util.Success diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala index 8a4bda2f6..73d4abfb9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala @@ -20,7 +20,7 @@ package monix.reactive.subjects import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.reactive.{Consumer, Observable, Observer} +import monix.reactive.{ Consumer, Observable, Observer } import scala.concurrent.Future import scala.util.Success diff --git a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala index 8f11f7c2f..385d15b8b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala @@ -20,7 +20,7 @@ package monix.tail import java.io.PrintStream import cats.implicits._ -import cats.effect.{Async, Effect, Sync, _} +import cats.effect.{ Async, Effect, Sync, _ } import cats.{ ~>, Applicative, @@ -36,23 +36,23 @@ import cats.{ Parallel, StackSafeMonad } -import monix.catnap.{ConcurrentChannel, ConsumerF} +import monix.catnap.{ ConcurrentChannel, ConsumerF } import monix.execution.BufferCapacity.Bounded -import monix.execution.{BufferCapacity, ChannelType} -import monix.execution.ChannelType.{MultiProducer, SingleConsumer} +import monix.execution.{ BufferCapacity, ChannelType } +import monix.execution.ChannelType.{ MultiProducer, SingleConsumer } import monix.execution.annotations.UnsafeProtocol import monix.execution.compat.internal._ import scala.util.control.NonFatal -import monix.execution.internal.Platform.{recommendedBatchSize, recommendedBufferChunkSize} -import monix.tail.batches.{Batch, BatchCursor} +import monix.execution.internal.Platform.{ recommendedBatchSize, recommendedBufferChunkSize } +import monix.tail.batches.{ Batch, BatchCursor } import monix.tail.internal._ import monix.tail.internal.Constants.emptyRef import org.reactivestreams.Publisher import scala.collection.immutable.LinearSeq import scala.collection.mutable -import scala.concurrent.duration.{Duration, FiniteDuration} +import scala.concurrent.duration.{ Duration, FiniteDuration } /** The `Iterant` is a type that describes lazy, possibly asynchronous * streaming of elements using a pull-based protocol. @@ -1504,7 +1504,8 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { * throws an error. */ final def onErrorRecoverWith[B >: A](pf: PartialFunction[Throwable, Iterant[F, B]])( - implicit F: Sync[F]): Iterant[F, B] = + implicit F: Sync[F] + ): Iterant[F, B] = onErrorHandleWith { ex => if (pf.isDefinedAt(ex)) pf(ex) else Iterant.raiseError[F, B](ex) @@ -1621,7 +1622,7 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { * right hand side) */ final def parZip[B](rhs: Iterant[F, B])(implicit F: Sync[F], P: Parallel[F]): Iterant[F, (A, B)] = - (self parZipMap rhs)((a, b) => (a, b)) + (self.parZipMap(rhs))((a, b) => (a, b)) /** Lazily zip two iterants together, in parallel, using the given * function `f` to produce output values. @@ -1865,7 +1866,8 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { */ @UnsafeProtocol final def consumeWithConfig(config: ConsumerF.Config)( - implicit F: Concurrent[F], + implicit + F: Concurrent[F], cs: ContextShift[F] ): Resource[F, Consumer[F, A]] = { IterantConsume(self, config)(F, cs) @@ -2184,7 +2186,7 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { * right hand side) */ final def zip[B](rhs: Iterant[F, B])(implicit F: Sync[F]): Iterant[F, (A, B)] = - (self zipMap rhs)((a, b) => (a, b)) + (self.zipMap(rhs))((a, b) => (a, b)) /** Lazily zip two iterants together, using the given function `f` to * produce output values. @@ -2484,7 +2486,8 @@ object Iterant extends IterantInstances { * @param release function that releases the acquired resource */ def resourceCase[F[_], A](acquire: F[A])(release: (A, ExitCase[Throwable]) => F[Unit])( - implicit F: Sync[F]): Iterant[F, A] = { + implicit F: Sync[F] + ): Iterant[F, A] = { Scope[F, A, A](acquire, a => F.pure(Iterant.pure(a)), release) } @@ -2633,7 +2636,8 @@ object Iterant extends IterantInstances { def fromReactivePublisher[F[_], A]( publisher: Publisher[A], requestCount: Int = recommendedBufferChunkSize, - eagerBuffer: Boolean = true)( + eagerBuffer: Boolean = true + )( implicit F: Async[F] ): Iterant[F, A] = { IterantFromReactivePublisher(publisher, requestCount, eagerBuffer) @@ -2723,7 +2727,8 @@ object Iterant extends IterantInstances { * items can be pulled from the queue and processed in batches */ def fromConsumer[F[_], A](consumer: Consumer[F, A], maxBatchSize: Int = recommendedBufferChunkSize)( - implicit F: Async[F]): Iterant[F, A] = { + implicit F: Async[F] + ): Iterant[F, A] = { IterantFromConsumer(consumer, maxBatchSize) } @@ -2747,7 +2752,8 @@ object Iterant extends IterantInstances { def fromChannel[F[_], A]( channel: Channel[F, A], bufferCapacity: BufferCapacity = Bounded(recommendedBufferChunkSize), - maxBatchSize: Int = recommendedBufferChunkSize)(implicit F: Async[F]): Iterant[F, A] = { + maxBatchSize: Int = recommendedBufferChunkSize + )(implicit F: Async[F]): Iterant[F, A] = { val config = ConsumerF.Config( capacity = Some(bufferCapacity), @@ -2839,9 +2845,12 @@ object Iterant extends IterantInstances { def channel[F[_], A]( bufferCapacity: BufferCapacity = Bounded(recommendedBufferChunkSize), maxBatchSize: Int = recommendedBufferChunkSize, - producerType: ChannelType.ProducerSide = MultiProducer)( - implicit F: Concurrent[F], - cs: ContextShift[F]): F[(Producer[F, A], Iterant[F, A])] = { + producerType: ChannelType.ProducerSide = MultiProducer + )( + implicit + F: Concurrent[F], + cs: ContextShift[F] + ): F[(Producer[F, A], Iterant[F, A])] = { val channelF = ConcurrentChannel[F].withConfig[Option[Throwable], A]( producerType = producerType @@ -2941,8 +2950,10 @@ object Iterant extends IterantInstances { * delays and to fetch the current time */ def intervalAtFixedRate[F[_]](initialDelay: FiniteDuration, period: FiniteDuration)( - implicit F: Async[F], - timer: Timer[F]): Iterant[F, Long] = + implicit + F: Async[F], + timer: Timer[F] + ): Iterant[F, Long] = IterantIntervalAtFixedRate(initialDelay, period) /** $intervalWithFixedDelayDesc @@ -2965,8 +2976,10 @@ object Iterant extends IterantInstances { * delays and to fetch the current time */ def intervalWithFixedDelay[F[_]](initialDelay: FiniteDuration, delay: FiniteDuration)( - implicit F: Async[F], - timer: Timer[F]): Iterant[F, Long] = + implicit + F: Async[F], + timer: Timer[F] + ): Iterant[F, Long] = IterantIntervalWithFixedDelay(initialDelay, delay) /** Concatenates list of Iterants into a single stream @@ -2974,8 +2987,8 @@ object Iterant extends IterantInstances { def concat[F[_], A](xs: Iterant[F, A]*)(implicit F: Sync[F]): Iterant[F, A] = xs.foldLeft(Iterant.empty[F, A])((acc, e) => IterantConcat.concat(acc, F.pure(e))(F)) - //------------------------------------------------------------------ - //-- Data constructors + // ------------------------------------------------------------------ + // -- Data constructors /** Data constructor for building a [[Iterant.Next]] value. * @@ -3036,7 +3049,8 @@ object Iterant extends IterantInstances { def scopeS[F[_], A, B]( acquire: F[A], use: A => F[Iterant[F, B]], - release: (A, ExitCase[Throwable]) => F[Unit]): Iterant[F, B] = + release: (A, ExitCase[Throwable]) => F[Unit] + ): Iterant[F, B] = Scope(acquire, use, release) /** Builds a stream state equivalent with [[Iterant.Concat]]. @@ -3126,8 +3140,8 @@ object Iterant extends IterantInstances { final case class Scope[F[_], A, B]( acquire: F[A], use: A => F[Iterant[F, B]], - release: (A, ExitCase[Throwable]) => F[Unit]) - extends Iterant[F, B] { + release: (A, ExitCase[Throwable]) => F[Unit] + ) extends Iterant[F, B] { def accept[R](visitor: Visitor[F, B, R]): R = visitor.visit(this) diff --git a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala index 5b6d02681..3a42be8cd 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala @@ -19,13 +19,13 @@ package monix.tail import cats.Applicative import cats.effect._ -import monix.catnap.{ConsumerF, ProducerF} +import monix.catnap.{ ConsumerF, ProducerF } import monix.execution.BufferCapacity.Bounded import monix.execution.ChannelType.MultiProducer import monix.execution.internal.Platform.recommendedBufferChunkSize -import monix.execution.{BufferCapacity, ChannelType} +import monix.execution.{ BufferCapacity, ChannelType } import monix.tail.Iterant.Channel -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import org.reactivestreams.Publisher import scala.collection.immutable.LinearSeq @@ -91,7 +91,8 @@ object IterantBuilders { def scopeS[A, B]( acquire: F[A], use: A => F[Iterant[F, B]], - close: (A, ExitCase[Throwable]) => F[Unit]): Iterant[F, B] = + close: (A, ExitCase[Throwable]) => F[Unit] + ): Iterant[F, B] = Iterant.scopeS(acquire, use, close) /** Aliased builder, see documentation for [[Iterant.lastS]]. */ @@ -178,7 +179,8 @@ object IterantBuilders { /** Aliased builder, see documentation for [[Iterant.resourceCase]]. */ def resourceCase[A](acquire: F[A])(release: (A, ExitCase[Throwable]) => F[Unit])( - implicit F: Sync[F]): Iterant[F, A] = + implicit F: Sync[F] + ): Iterant[F, A] = Iterant.resourceCase(acquire)(release) /** Aliased builder, see documentation for [[Iterant.fromResource]]. */ @@ -236,8 +238,10 @@ object IterantBuilders { * [[[Iterant.intervalAtFixedRate[F[_]](initialDelay* Iterant.intervalAtFixedRate]]]. */ def intervalAtFixedRate(initialDelay: FiniteDuration, period: FiniteDuration)( - implicit F: Async[F], - timer: Timer[F]): Iterant[F, Long] = + implicit + F: Async[F], + timer: Timer[F] + ): Iterant[F, Long] = Iterant.intervalAtFixedRate(initialDelay, period) /** @@ -252,36 +256,44 @@ object IterantBuilders { * [[[Iterant.intervalWithFixedDelay[F[_]](initialDelay* Iterant.intervalAtFixedRate]]]. */ def intervalWithFixedDelay(initialDelay: FiniteDuration, delay: FiniteDuration)( - implicit F: Async[F], - timer: Timer[F]): Iterant[F, Long] = + implicit + F: Async[F], + timer: Timer[F] + ): Iterant[F, Long] = Iterant.intervalWithFixedDelay(initialDelay, delay) /** Aliased builder, see documentation for [[Iterant.fromReactivePublisher]]. */ def fromReactivePublisher[A]( publisher: Publisher[A], requestCount: Int = recommendedBufferChunkSize, - eagerBuffer: Boolean = true)(implicit F: Async[F]): Iterant[F, A] = + eagerBuffer: Boolean = true + )(implicit F: Async[F]): Iterant[F, A] = Iterant.fromReactivePublisher(publisher, requestCount, eagerBuffer) /** Aliased builder, see documentation for [[Iterant.fromConsumer]]. */ def fromConsumer[A](consumer: ConsumerF[F, Option[Throwable], A], maxBatchSize: Int = recommendedBufferChunkSize)( - implicit F: Async[F]): Iterant[F, A] = + implicit F: Async[F] + ): Iterant[F, A] = Iterant.fromConsumer(consumer, maxBatchSize) /** Aliased builder, see documentation for [[Iterant.fromChannel]]. */ def fromChannel[A]( channel: Channel[F, A], bufferCapacity: BufferCapacity = Bounded(recommendedBufferChunkSize), - maxBatchSize: Int = recommendedBufferChunkSize)(implicit F: Async[F]): Iterant[F, A] = + maxBatchSize: Int = recommendedBufferChunkSize + )(implicit F: Async[F]): Iterant[F, A] = Iterant.fromChannel(channel, bufferCapacity, maxBatchSize) /** Aliased builder, see documentation for [[Iterant.channel]]. */ def channel[A]( bufferCapacity: BufferCapacity = Bounded(recommendedBufferChunkSize), maxBatchSize: Int = recommendedBufferChunkSize, - producerType: ChannelType.ProducerSide = MultiProducer)( - implicit F: Concurrent[F], - cs: ContextShift[F]): F[(ProducerF[F, Option[Throwable], A], Iterant[F, A])] = + producerType: ChannelType.ProducerSide = MultiProducer + )( + implicit + F: Concurrent[F], + cs: ContextShift[F] + ): F[(ProducerF[F, Option[Throwable], A], Iterant[F, A])] = Iterant.channel(bufferCapacity, maxBatchSize, producerType) } } diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala index 8ef91a450..d1cd77097 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala @@ -28,8 +28,8 @@ final class ArrayBatch[@specialized(Boolean, Byte, Char, Int, Long, Double) A]( ref: Array[A], offset: Int, length: Int, - newBuilder: () => ArrayBuilder[A]) - extends Batch[A] { + newBuilder: () => ArrayBuilder[A] +) extends Batch[A] { def this(ref: Array[A], offset: Int, length: Int)(implicit tag: ClassTag[A]) = this(ref, offset, length, () => ArrayBuilder.make[A]) diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala index 8bd3653a3..bf2b5a292 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala @@ -32,8 +32,8 @@ final class ArrayCursor[@specialized(Boolean, Byte, Char, Int, Long, Double) A]( _array: Array[A], _offset: Int, _length: Int, - newBuilder: () => ArrayBuilder[A]) - extends BatchCursor[A] { self => + newBuilder: () => ArrayBuilder[A] +) extends BatchCursor[A] { self => require(_offset + _length <= _array.length, "offset + length <= array.length") require(0 <= _offset && _offset <= _array.length, "0 <= offset <= length") diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala index 0bfb5d9f5..a09e8f51f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala @@ -20,7 +20,7 @@ package batches import monix.execution.compat.internal._ import monix.execution.internal.Platform.recommendedBatchSize -import scala.collection.mutable.{ArrayBuffer, ListBuffer} +import scala.collection.mutable.{ ArrayBuffer, ListBuffer } import scala.reflect.ClassTag /** Similar to Java's and Scala's `Iterator`, the `BatchCursor` type can diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala index 6b97c528b..20f9506ea 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala @@ -21,10 +21,10 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.atomic.Atomic import monix.execution.internal.Platform -import monix.execution.UncaughtExceptionReporter.{default => Logger} +import monix.execution.UncaughtExceptionReporter.{ default => Logger } import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } +import monix.tail.batches.{ Batch, BatchCursor } import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer @@ -75,12 +75,15 @@ private[tail] object IterantAttempt { Suspend(continueWith(ref.rest)) def visit(ref: Concat[F, A]): Iterant[F, Either[Throwable, A]] = - Concat(ref.lh.map(this), F.defer { - if (self.wasErrorHandled) - F.pure(Iterant.empty[F, Attempt]) - else - ref.rh.map(this) - }) + Concat( + ref.lh.map(this), + F.defer { + if (self.wasErrorHandled) + F.pure(Iterant.empty[F, Attempt]) + else + ref.rh.map(this) + } + ) def visit[S](ref: Scope[F, S, A]): Iterant[F, Attempt] = { val Scope(acquire, use, release) = ref @@ -114,8 +117,9 @@ private[tail] object IterantAttempt { case Left(_) => F.unit case Right(s) => try F.handleError(release(s, exit)) { e => - pushError(errors, e) - } catch { + pushError(errors, e) + } + catch { case NonFatal(e) => F.delay(pushError(errors, e)) } @@ -167,7 +171,8 @@ private[tail] object IterantAttempt { private def handleCursor( node: NextCursor[F, A], cursor: BatchCursor[A], - rest: F[Iterant[F, A]]): Iterant[F, Attempt] = { + rest: F[Iterant[F, A]] + ): Iterant[F, Attempt] = { try { val array = extractFromCursor(cursor) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala index d72c2743a..4b691b097 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala @@ -21,7 +21,7 @@ package internal import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.Batch private[tail] object IterantBuffer { @@ -39,7 +39,8 @@ private[tail] object IterantBuffer { count, count, (seq, rest) => NextBatch(Batch.fromArray(seq), rest), - seq => NextBatch(Batch.fromArray(seq), F.pure(Iterant.empty))) + seq => NextBatch(Batch.fromArray(seq), F.pure(Iterant.empty)) + ) } private def build[F[_], A, B]( @@ -47,7 +48,8 @@ private[tail] object IterantBuffer { count: Int, skip: Int, f: (Array[A], F[Iterant[F, B]]) => Iterant[F, B], - last: Array[A] => Iterant[F, B])(implicit F: Sync[F]): Iterant[F, B] = { + last: Array[A] => Iterant[F, B] + )(implicit F: Sync[F]): Iterant[F, B] = { Suspend(F.defer(new BatchVisitor(count, skip, f, last).apply(self))) } @@ -56,7 +58,8 @@ private[tail] object IterantBuffer { count: Int, skip: Int, f: (Array[A], F[Iterant[F, B]]) => Iterant[F, B], - last: Array[A] => Iterant[F, B])(implicit F: Sync[F]) + last: Array[A] => Iterant[F, B] + )(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Iterant[F, B]]] { loop => private[this] val buffer = new Buffer[A](count, skip) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala index 9cd64a870..b171a6cea 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala @@ -21,7 +21,7 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor private[tail] object IterantCompleteL { @@ -35,7 +35,7 @@ private[tail] object IterantCompleteL { private final class Loop[F[_], A](implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Unit]] { - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -55,7 +55,7 @@ private[tail] object IterantCompleteL { case null => F.unit case xs => xs.flatMap(this) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[Unit] = ref.rest.flatMap(this) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala index c3bf35212..03d18d5e9 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.util.control.NonFatal diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala index 351c35f47..998f0ab4c 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala @@ -19,8 +19,8 @@ package monix.tail package internal import cats.implicits._ -import cats.effect.{Concurrent, ContextShift, Resource} -import monix.catnap.{ConcurrentChannel, ConsumerF} +import cats.effect.{ Concurrent, ContextShift, Resource } +import monix.catnap.{ ConcurrentChannel, ConsumerF } import monix.execution.ChannelType.SingleProducer import monix.tail.Iterant.Consumer @@ -29,8 +29,10 @@ private[tail] object IterantConsume { * Implementation for [[Iterant.consume]]. */ def apply[F[_], A](self: Iterant[F, A], cfg: ConsumerF.Config)( - implicit F: Concurrent[F], - cs: ContextShift[F]): Resource[F, Consumer[F, A]] = { + implicit + F: Concurrent[F], + cs: ContextShift[F] + ): Resource[F, Consumer[F, A]] = { /*_*/ val res = Resource.apply { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala index ef81168f9..0ad252bac 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala @@ -21,7 +21,7 @@ import cats.Eq import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.collection.mutable.ArrayBuffer diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala index 1032acfc4..bb2d6beaf 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantDrop { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala index 790ba8339..fd6879834 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.annotation.tailrec import scala.collection.immutable.Queue diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala index d66a0c08c..3dcc7805f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantDropWhile { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala index f8bcf7ba9..adb53fa0f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantDropWhileWithIndex { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala index 880e7133c..84861a358 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala @@ -18,17 +18,18 @@ package monix.tail.internal import java.io.PrintStream -import cats.effect.{ExitCase, Sync} +import cats.effect.{ ExitCase, Sync } import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantDump { /** * Implementation for `Iterant#dump` */ def apply[F[_], A](source: Iterant[F, A], prefix: String, out: PrintStream = System.out)( - implicit F: Sync[F]): Iterant[F, A] = { + implicit F: Sync[F] + ): Iterant[F, A] = { Suspend(F.delay(new Loop(prefix, out).apply(source))) } @@ -74,13 +75,16 @@ private[tail] object IterantDump { out.println(s"$pos: $prefix --> concat") pos += 1 - Concat(F.defer { - prefix = s"$oldPrefix --> concat-lh ($oldPos)" - moveNext(ref.lh) - }, F.defer { - prefix = oldPrefix - moveNext(ref.rh) - }) + Concat( + F.defer { + prefix = s"$oldPrefix --> concat-lh ($oldPos)" + moveNext(ref.lh) + }, + F.defer { + prefix = oldPrefix + moveNext(ref.rh) + } + ) } def visit[S](ref: Scope[F, S, A]): Iterant[F, A] = { @@ -125,19 +129,19 @@ private[tail] object IterantDump { def moveNext(rest: F[Iterant[F, A]]): F[Iterant[F, A]] = F.guaranteeCase(rest) { - case ExitCase.Error(e) => - F.delay { - out.println(s"$pos: $prefix --> effect error --> $e") - pos += 1 - } - case ExitCase.Canceled => - F.delay { - out.println(s"$pos: $prefix --> effect cancelled") - pos += 1 - } - case ExitCase.Completed => - F.unit - } + case ExitCase.Error(e) => + F.delay { + out.println(s"$pos: $prefix --> effect error --> $e") + pos += 1 + } + case ExitCase.Canceled => + F.delay { + out.println(s"$pos: $prefix --> effect cancelled") + pos += 1 + } + case ExitCase.Completed => + F.unit + } .map(this) } } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala index a9ec4aeb0..a62a854d5 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.syntax.all._ import cats.effect.Sync import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantFilter { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala index 8cae58486..16391b7d5 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala @@ -21,7 +21,7 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import scala.collection.mutable import scala.util.control.NonFatal @@ -60,7 +60,7 @@ private[tail] object IterantFoldLeftL { /** Current calculated state. */ private[this] var state = seed - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -80,7 +80,7 @@ private[tail] object IterantFoldLeftL { case null => F.pure(state) case xs => xs.flatMap(loop) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[S] = { state = op(state, ref.item) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala index c2995f86c..5d94f1152 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala @@ -21,7 +21,7 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant -import monix.tail.Iterant.{Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantFoldRightL { /** Implementation for `Iterant.foldRightL`. */ @@ -34,7 +34,7 @@ private[tail] object IterantFoldRightL { private[this] var remainder: Iterant[F, A] = _ private[this] var suspendRef: F[B] = _ - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -53,7 +53,7 @@ private[tail] object IterantFoldRightL { case xs => xs.flatMap(this) } } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[B] = f(ref.item, ref.rest.flatMap(this)) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala index 9cf7e27ef..ff2438b26 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala @@ -21,7 +21,7 @@ package internal import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor private[tail] object IterantFoldWhileLeftL { @@ -56,7 +56,7 @@ private[tail] object IterantFoldWhileLeftL { private[this] var state: S = seed - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -79,7 +79,7 @@ private[tail] object IterantFoldWhileLeftL { case right => F.pure(right) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[Either[S, S]] = f(state, ref.item) match { @@ -153,7 +153,7 @@ private[tail] object IterantFoldWhileLeftL { private[this] var state: S = seed - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -176,7 +176,7 @@ private[tail] object IterantFoldWhileLeftL { case right => F.pure(right) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[Either[S, S]] = f(state, ref.item).flatMap { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala index 50ffca7af..fd62487db 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Async import monix.catnap.ConsumerF import monix.tail.Iterant -import monix.tail.Iterant.{haltS, suspendS, Next, NextBatch} +import monix.tail.Iterant.{ haltS, suspendS, Next, NextBatch } import monix.tail.batches.Batch private[tail] object IterantFromConsumer { @@ -28,7 +28,8 @@ private[tail] object IterantFromConsumer { * Implementation for [[Iterant.fromConsumer]]. */ def apply[F[_], A](consumer: ConsumerF[F, Option[Throwable], A], maxBatchSize: Int)( - implicit F: Async[F]): Iterant[F, A] = { + implicit F: Async[F] + ): Iterant[F, A] = { suspendS( if (maxBatchSize > 1) @@ -47,7 +48,8 @@ private[tail] object IterantFromConsumer { } private def loopMany[F[_], A](consumer: ConsumerF[F, Option[Throwable], A], maxBatchSize: Int)( - implicit F: Async[F]): F[Iterant[F, A]] = { + implicit F: Async[F] + ): F[Iterant[F, A]] = { F.map(consumer.pullMany(1, maxBatchSize)) { case Left(e) => haltS(e) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala index 17da5a9e5..dffaf4920 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala @@ -22,9 +22,9 @@ import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.rstreams.SingleAssignSubscription import monix.tail.Iterant -import monix.tail.Iterant.{Last, Next, NextBatch, Scope} +import monix.tail.Iterant.{ Last, Next, NextBatch, Scope } import monix.tail.batches.Batch -import org.reactivestreams.{Publisher, Subscriber, Subscription} +import org.reactivestreams.{ Publisher, Subscriber, Subscription } import scala.annotation.tailrec import scala.collection.immutable.Queue @@ -33,7 +33,8 @@ private[tail] object IterantFromReactivePublisher { * Implementation for `Iterant.fromReactivePublisher`. */ def apply[F[_], A](pub: Publisher[A], requestCount: Int, eagerBuffer: Boolean)( - implicit F: Async[F]): Iterant[F, A] = { + implicit F: Async[F] + ): Iterant[F, A] = { if (requestCount < 1) { Iterant.raiseError(new IllegalArgumentException("requestSize must be greater than 1")) @@ -148,7 +149,7 @@ private[tail] object IterantFromReactivePublisher { finish(fa) } - case current : Take[F, A] @unchecked => + case current: Take[F, A] @unchecked => if (state.compareAndSet(current, Stop(fa))) current.cb(Right(fa)) else diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala index dc14bba70..f7bb4db99 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala @@ -21,7 +21,7 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor private[tail] object IterantHeadOptionL { @@ -40,7 +40,7 @@ private[tail] object IterantHeadOptionL { private final class Loop[F[_], A](implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Option[A]]] { - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -63,7 +63,7 @@ private[tail] object IterantHeadOptionL { case some => F.pure(some) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[Option[A]] = F.pure(Some(ref.item)) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala index 03adfe3ad..36d7c00a3 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala @@ -21,7 +21,7 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantInterleave { /** @@ -36,7 +36,7 @@ private[tail] object IterantInterleave { def apply(lh: Iterant[F, A], rh: Iterant[F, A]): Iterant[F, A] = lhLoop.visit(lh, rh) - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used by Concat: private[this] var _lhStack: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -60,12 +60,12 @@ private[tail] object IterantInterleave { if (_rhStack == null) null.asInstanceOf[F[Iterant[F, A]]] else _rhStack.pop() - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private[this] val lhLoop = new LHLoop private[this] val rhLoop = new RHLoop - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private final class LHLoop extends Iterant.Visitor[F, A, Iterant[F, A]] { protected var rhRef: F[Iterant[F, A]] = _ diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala index b686ff0c6..181d1bd8f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala @@ -40,52 +40,53 @@ private[tail] object IterantIntersperse { def apply(source: Iterant[F, A]): Iterant[F, A] = { try source match { - case halt @ Halt(opt) => - val next = stack.pop() - if (opt.nonEmpty || next == null) { - halt - } else { - Suspend(next.map(this)) - } - - case Suspend(rest) => - Suspend(rest.map(this)) - - case NextCursor(cursor, rest) if !cursor.hasNext() => - Suspend(rest.map(this)) - - case NextBatch(batch, rest) if !batch.cursor().hasNext() => - Suspend(rest.map(this)) - - case Concat(lh, rh) => - stack.push(rh) - Suspend(lh.map(this)) - - case b @ Scope(_, _, _) => - b.runMap(this) - - case _ if prepend => - prepend = false - Next(separator, F.pure(source).map(this)) - - case ref @ NextCursor(_, _) => - processNonEmptyCursor(ref) - - case NextBatch(batch, rest) => - processNonEmptyCursor(NextCursor(batch.cursor(), rest)) - - case Next(item, rest) => - prepend = true - Next(item, rest.map(this)) - - case last @ Last(a) => - stack.pop() match { - case null => last - case some => - prepend = true - Next(a, some.map(this)) - } - } catch { + case halt @ Halt(opt) => + val next = stack.pop() + if (opt.nonEmpty || next == null) { + halt + } else { + Suspend(next.map(this)) + } + + case Suspend(rest) => + Suspend(rest.map(this)) + + case NextCursor(cursor, rest) if !cursor.hasNext() => + Suspend(rest.map(this)) + + case NextBatch(batch, rest) if !batch.cursor().hasNext() => + Suspend(rest.map(this)) + + case Concat(lh, rh) => + stack.push(rh) + Suspend(lh.map(this)) + + case b @ Scope(_, _, _) => + b.runMap(this) + + case _ if prepend => + prepend = false + Next(separator, F.pure(source).map(this)) + + case ref @ NextCursor(_, _) => + processNonEmptyCursor(ref) + + case NextBatch(batch, rest) => + processNonEmptyCursor(NextCursor(batch.cursor(), rest)) + + case Next(item, rest) => + prepend = true + Next(item, rest.map(this)) + + case last @ Last(a) => + stack.pop() match { + case null => last + case some => + prepend = true + Next(a, some.map(this)) + } + } + catch { case ex if NonFatal(ex) => Halt(Some(ex)) } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala index 6accac848..6659ff58b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala @@ -18,7 +18,7 @@ package monix.tail.internal import cats.syntax.all._ -import cats.effect.{Async, Clock, Timer} +import cats.effect.{ Async, Clock, Timer } import monix.tail.Iterant import monix.tail.Iterant.Suspend import scala.concurrent.duration._ @@ -29,7 +29,8 @@ private[tail] object IterantIntervalAtFixedRate { */ def apply[F[_]]( initialDelay: FiniteDuration, - interval: FiniteDuration)(implicit F: Async[F], timer: Timer[F], clock: Clock[F]): Iterant[F, Long] = { + interval: FiniteDuration + )(implicit F: Async[F], timer: Timer[F], clock: Clock[F]): Iterant[F, Long] = { def loop(time: F[Long], index: Long): F[Iterant[F, Long]] = time.map { startTime => diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala index da9168a8b..1b313a1d2 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala @@ -17,7 +17,7 @@ package monix.tail.internal -import cats.effect.{Async, Timer} +import cats.effect.{ Async, Timer } import monix.tail.Iterant import scala.concurrent.duration._ @@ -26,8 +26,10 @@ private[tail] object IterantIntervalWithFixedDelay { * Implementation for `Iterant.intervalWithFixedDelay`. */ def apply[F[_]](initialDelay: FiniteDuration, delay: FiniteDuration)( - implicit F: Async[F], - timer: Timer[F]): Iterant[F, Long] = { + implicit + F: Async[F], + timer: Timer[F] + ): Iterant[F, Long] = { // Recursive loop def loop(index: Long): Iterant[F, Long] = { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala index ae7cdadf7..aa249fdc3 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala @@ -21,7 +21,7 @@ import cats.arrow.FunctionK import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantLiftMap { /** Implementation for `Iterant#liftMap`. */ @@ -52,7 +52,8 @@ private[tail] object IterantLiftMap { Scope[G, S, A]( f(ref.acquire), s => G.defer(f(ref.use(s)).map(this)), - (s, exitCase) => f(ref.release(s, exitCase))) + (s, exitCase) => f(ref.release(s, exitCase)) + ) def visit(ref: Last[F, A]): Iterant[G, A] = ref.asInstanceOf[Iterant[G, A]] diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala index ff8161a77..f685fde33 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.syntax.all._ import cats.effect.Sync import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantMap { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala index 25266e02e..88e8175f7 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.Batch private[tail] object IterantMapBatch { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala index fcc4452ad..1e26c03d0 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala @@ -22,8 +22,8 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.atomic.Atomic import monix.execution.internal.Platform -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } +import monix.tail.batches.{ Batch, BatchCursor } import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer @@ -89,12 +89,15 @@ private[tail] object IterantOnErrorHandleWith { Suspend(continueWith(ref.rest)) def visit(ref: Concat[F, A]): Iterant[F, A] = - Concat(ref.lh.map(this), F.defer { - if (self.wasErrorHandled) - F.pure(Iterant.empty[F, A]) - else - ref.rh.map(this) - }) + Concat( + ref.lh.map(this), + F.defer { + if (self.wasErrorHandled) + F.pure(Iterant.empty[F, A]) + else + ref.rh.map(this) + } + ) def visit[S](ref: Scope[F, S, A]): Iterant[F, A] = { val Scope(acquire, use, release) = ref @@ -128,8 +131,9 @@ private[tail] object IterantOnErrorHandleWith { case Left(_) => F.unit case Right(s) => try F.handleError(release(s, exit)) { e => - pushError(errors, e) - } catch { + pushError(errors, e) + } + catch { case NonFatal(e) => F.delay(pushError(errors, e)) } @@ -137,14 +141,17 @@ private[tail] object IterantOnErrorHandleWith { } ) - Concat(F.pure(lh), F.delay { - val err = errors.getAndSet(null) - if (err != null && !wasErrorHandled) { - f(err) - } else { - Iterant.empty + Concat( + F.pure(lh), + F.delay { + val err = errors.getAndSet(null) + if (err != null && !wasErrorHandled) { + f(err) + } else { + Iterant.empty + } } - }) + ) }) } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala index e2a4757a8..922ac4330 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala @@ -28,7 +28,8 @@ private[tail] object IterantPushToChannel { * Implementation for [[Iterant.pushToChannel]]. */ def apply[F[_], A](source: Iterant[F, A], channel: ProducerF[F, Option[Throwable], A])( - implicit F: Sync[F]): F[Unit] = { + implicit F: Sync[F] + ): F[Unit] = { F.defer(new Loop(channel).apply(source)) } @@ -36,7 +37,7 @@ private[tail] object IterantPushToChannel { private final class Loop[F[_], A](channel: ProducerF[F, Option[Throwable], A])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Unit]] { loop => - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // For dealing with push results private[this] val trueRef = F.pure(true) private[this] var rest: F[Iterant[F, A]] = _ @@ -50,7 +51,7 @@ private[tail] object IterantPushToChannel { F.flatMap(task)(bindNext) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -73,7 +74,7 @@ private[tail] object IterantPushToChannel { case null => F.unit case xs => F.flatMap(xs)(loop) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Iterant.Next[F, A]): F[Unit] = process(channel.push(ref.item), ref.rest) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala index 9880e305f..9e0ef7e8b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala @@ -21,7 +21,7 @@ package internal import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantReduce { /** Implementation for `Iterant.reduce`. */ @@ -35,7 +35,7 @@ private[tail] object IterantReduce { private[this] var isEmpty = true private[this] var state: A = _ - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -55,7 +55,7 @@ private[tail] object IterantReduce { case null => F.pure(state) case xs => xs.flatMap(this) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def visit(ref: Next[F, A]): F[Option[A]] = { if (isEmpty) { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala index d0e6265d9..afa8189d4 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala @@ -21,8 +21,8 @@ import cats.effect.Sync import cats.syntax.all._ import monix.execution.internal.Platform import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} -import monix.tail.batches.{BatchCursor, GenericBatch, GenericCursor} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } +import monix.tail.batches.{ BatchCursor, GenericBatch, GenericCursor } private[tail] object IterantRepeat { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala index d3dea100f..047993096 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala @@ -20,7 +20,7 @@ package internal import cats.effect.Sync import cats.syntax.all._ -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } private[tail] object IterantRetryIfEmpty { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala index a4ca09334..d27d60e07 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala @@ -23,7 +23,7 @@ import cats.syntax.all._ import monix.execution.internal.collection.ChunkedArrayStack import scala.util.control.NonFatal -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.collection.mutable.ArrayBuffer diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala index f589aeffa..caf4d3e43 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala @@ -19,7 +19,7 @@ package monix.tail.internal import cats.effect.Sync import monix.tail.Iterant -import monix.tail.Iterant.{Last, Next, Suspend} +import monix.tail.Iterant.{ Last, Next, Suspend } private[tail] object IterantTail { /** diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala index ce5d19b52..fbbe03ea4 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.collection.mutable.ArrayBuffer @@ -85,12 +85,15 @@ private[tail] object IterantTake { Suspend(ref.rest.map(this)) def visit(ref: Concat[F, A]): Iterant[F, A] = - Concat(ref.lh.map(this), F.defer { - if (this.toTake > 0) - ref.rh.map(this) - else - F.pure(Iterant.empty) - }) + Concat( + ref.lh.map(this), + F.defer { + if (this.toTake > 0) + ref.rh.map(this) + else + F.pure(Iterant.empty) + } + ) def visit[R](ref: Scope[F, R, A]): Iterant[F, A] = ref.runMap(this) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala index b59096c56..66c4f39cf 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala @@ -20,7 +20,7 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ import monix.tail.Iterant -import monix.tail.Iterant.{Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.collection.mutable.ArrayBuffer diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala index f53f7d75d..7cd08c6e6 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala @@ -19,9 +19,9 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ -import monix.execution.internal.collection.{ChunkedArrayStack, DropHeadOnOverflowQueue} +import monix.execution.internal.collection.{ ChunkedArrayStack, DropHeadOnOverflowQueue } import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor private[tail] object IterantTakeLast { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala index 078e73e64..5d59b61b3 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala @@ -50,12 +50,15 @@ private[tail] object IterantTakeWhile { Suspend(ref.rest.map(this)) def visit(ref: Concat[F, A]): Iterant[F, A] = - Concat(ref.lh.map(this), F.defer { - if (isActive) - ref.rh.map(this) - else - F.pure(Iterant.empty) - }) + Concat( + ref.lh.map(this), + F.defer { + if (isActive) + ref.rh.map(this) + else + F.pure(Iterant.empty) + } + ) def visit[S](ref: Scope[F, S, A]): Iterant[F, A] = ref.runMap(this) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala index bd274e2a6..434e314f2 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala @@ -58,12 +58,15 @@ private[tail] object IterantTakeWhileWithIndex { Suspend(ref.rest.map(this)) def visit(ref: Concat[F, A]): Iterant[F, A] = - Concat(ref.lh.map(this), F.defer { - if (isActive) - ref.rh.map(this) - else - F.pure(Iterant.empty) - }) + Concat( + ref.lh.map(this), + F.defer { + if (isActive) + ref.rh.map(this) + else + F.pure(Iterant.empty) + } + ) def visit[S](ref: Scope[F, S, A]): Iterant[F, A] = ref.runMap(this) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala index 3ae4f4f65..b2be39a19 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala @@ -19,17 +19,17 @@ package monix.tail.internal import cats.effect.Effect import cats.implicits._ -import monix.execution.UncaughtExceptionReporter.{default => Logger} +import monix.execution.UncaughtExceptionReporter.{ default => Logger } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.internal.{AttemptCallback, Platform} +import monix.execution.internal.{ AttemptCallback, Platform } import monix.execution.internal.collection.ChunkedArrayStack import monix.execution.rstreams.Subscription -import monix.execution.{Cancelable, UncaughtExceptionReporter} +import monix.execution.{ Cancelable, UncaughtExceptionReporter } import monix.tail.Iterant import monix.tail.Iterant.Halt -import org.reactivestreams.{Publisher, Subscriber} +import org.reactivestreams.{ Publisher, Subscriber } import scala.annotation.tailrec import scala.util.control.NonFatal @@ -66,8 +66,8 @@ private[tail] object IterantToReactivePublisher { } private final class IterantSubscription[F[_], A](source: Iterant[F, A], out: Subscriber[_ >: A])( - implicit F: Effect[F]) - extends Subscription { parent => + implicit F: Effect[F] + ) extends Subscription { parent => private[this] val cancelable = SingleAssignCancelable() @@ -107,7 +107,9 @@ private[tail] object IterantToReactivePublisher { new IllegalArgumentException( "n must be strictly positive, according to " + "the Reactive Streams contract, rule 3.9" - ))) + ) + ) + ) } else { loop(n) } @@ -152,7 +154,8 @@ private[tail] object IterantToReactivePublisher { cancelable := Cancelable(() => token.unsafeRunAsync( AttemptCallback.empty(UncaughtExceptionReporter.default) - )) + ) + ) () } @@ -161,7 +164,7 @@ private[tail] object IterantToReactivePublisher { private[this] var haltSignal = Option.empty[Option[Throwable]] private[this] var streamErrors = true - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) private[this] var _stack: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -184,7 +187,7 @@ private[tail] object IterantToReactivePublisher { case null => F.pure(state) case xs => xs.flatMap(this) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private def poll(cb: Either[Throwable, Unit] => Unit = null): F[Unit] = { val ref = parent.state diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala index 5e87a2b25..9a4a7c950 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala @@ -18,7 +18,7 @@ package monix.tail.internal import cats.effect.Sync import monix.tail.Iterant -import monix.tail.Iterant.{Concat, NextCursor, Suspend} +import monix.tail.Iterant.{ Concat, NextCursor, Suspend } import cats.implicits._ private[tail] object IterantUncons { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala index f4b6f9bb9..bc57c4307 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala @@ -19,13 +19,13 @@ package monix.tail.internal import cats.effect.Sync import cats.syntax.all._ -import cats.{Applicative, Parallel} +import cats.{ Applicative, Parallel } import monix.execution.internal.Platform import monix.catnap.internal.ParallelApplicative import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } +import monix.tail.batches.{ Batch, BatchCursor } import scala.collection.mutable.ArrayBuffer @@ -42,8 +42,10 @@ private[tail] object IterantZipMap { * Implementation for `Iterant#parZipMap` */ def par[F[_], G[_], A, B, C](lh: Iterant[F, A], rh: Iterant[F, B], f: (A, B) => C)( - implicit F: Sync[F], - P: Parallel[F]): Iterant[F, C] = { + implicit + F: Sync[F], + P: Parallel[F] + ): Iterant[F, C] = { val A = ParallelApplicative(P) Suspend(F.delay(new Loop[F, A, B, C](f)(F, A).apply(lh, rh))) @@ -55,7 +57,7 @@ private[tail] object IterantZipMap { def apply(lh: Iterant[F, A], rh: Iterant[F, B]): Iterant[F, C] = lhLoop.visit(lh, rh) - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used by Concat: private[this] var _lhStack: ChunkedArrayStack[F[Iterant[F, A]]] = _ @@ -79,7 +81,7 @@ private[tail] object IterantZipMap { if (_rhStack == null) null.asInstanceOf[F[Iterant[F, B]]] else _rhStack.pop() - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private[this] val lhLoop = new LHLoop @@ -107,7 +109,7 @@ private[tail] object IterantZipMap { _rhLastLoop } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private final class LHLoop extends Iterant.Visitor[F, A, Iterant[F, C]] { protected var rhRef: Iterant[F, B] = _ @@ -349,7 +351,7 @@ private[tail] object IterantZipMap { Iterant.raiseError(e) } - //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def processPair(a: A, restA: F[Iterant[F, A]], b: B, restB: F[Iterant[F, B]]) = { val rest = A.map2(restA, restB)(loop) @@ -361,7 +363,8 @@ private[tail] object IterantZipMap { a: A, restA: F[Iterant[F, A]], refB: NextCursor[F, B], - loop: Iterant.Visitor[F, B, Iterant[F, C]]): Iterant[F, C] = { + loop: Iterant.Visitor[F, B, Iterant[F, C]] + ): Iterant[F, C] = { val NextCursor(itemsB, restB) = refB if (!itemsB.hasNext()) @@ -383,7 +386,8 @@ private[tail] object IterantZipMap { refA: Last[F, A], itemsB: BatchCursor[B], restB: F[Iterant[F, B]], - loop: Iterant.Visitor[F, B, Iterant[F, C]]): Iterant[F, C] = { + loop: Iterant.Visitor[F, B, Iterant[F, C]] + ): Iterant[F, C] = { if (!itemsB.hasNext()) Suspend(restB.map(loop)) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala index dae57c772..3e88438a8 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala @@ -22,7 +22,7 @@ import cats.syntax.all._ import scala.util.control.NonFatal import monix.tail.Iterant -import monix.tail.Iterant.{Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend} +import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.BatchCursor import scala.collection.mutable.ArrayBuffer @@ -61,34 +61,35 @@ private[tail] object IterantZipWithIndex { def apply(source: Iterant[F, A]): Iterant[F, (A, Long)] = { try source match { - case Next(item, rest) => - val r = Iterant.nextS((item, index), rest.map(this)) - index += 1 - r + case Next(item, rest) => + val r = Iterant.nextS((item, index), rest.map(this)) + index += 1 + r - case Last(item) => - val r = Iterant.lastS[F, (A, Long)]((item, index)) - index += 1 - r + case Last(item) => + val r = Iterant.lastS[F, (A, Long)]((item, index)) + index += 1 + r - case ref @ NextCursor(_, _) => - processSeq(ref) + case ref @ NextCursor(_, _) => + processSeq(ref) - case NextBatch(batch, rest) => - processSeq(NextCursor(batch.cursor(), rest)) + case NextBatch(batch, rest) => + processSeq(NextCursor(batch.cursor(), rest)) - case Suspend(rest) => - Suspend(rest.map(this)) + case Suspend(rest) => + Suspend(rest.map(this)) - case empty @ Halt(_) => - empty.asInstanceOf[Iterant[F, (A, Long)]] + case empty @ Halt(_) => + empty.asInstanceOf[Iterant[F, (A, Long)]] - case node @ Scope(_, _, _) => - node.runMap(this) + case node @ Scope(_, _, _) => + node.runMap(this) - case node @ Concat(_, _) => - node.runMap(this) - } catch { + case node @ Concat(_, _) => + node.runMap(this) + } + catch { case ex if NonFatal(ex) => Iterant.raiseError(ex) } } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala index d156fcf8e..a8bcf7e5f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala @@ -19,7 +19,7 @@ package monix.tail import cats.syntax.all._ import cats.effect.Sync -import monix.tail.Iterant.{Concat, Scope} +import monix.tail.Iterant.{ Concat, Scope } package object internal { /** diff --git a/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala b/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala index 0e8910225..7482d89b7 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala @@ -18,20 +18,21 @@ package monix.tail import cats.Eq -import cats.effect.{IO, Sync} +import cats.effect.{ IO, Sync } import cats.syntax.eq._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler -import monix.tail.Iterant.{Halt, Last} -import monix.tail.batches.{Batch, BatchCursor} -import org.scalacheck.{Arbitrary, Cogen} +import monix.tail.Iterant.{ Halt, Last } +import monix.tail.batches.{ Batch, BatchCursor } +import org.scalacheck.{ Arbitrary, Cogen } trait ArbitraryInstances extends monix.eval.ArbitraryInstances { import ArbitraryInstances.materialize def arbitraryListToIterant[F[_], A](list: List[A], idx: Int, allowErrors: Boolean = true)( - implicit F: Sync[F]): Iterant[F, A] = { + implicit F: Sync[F] + ): Iterant[F, A] = { def loop(list: List[A], idx: Int): Iterant[F, A] = list match { @@ -42,7 +43,7 @@ trait ArbitraryInstances extends monix.eval.ArbitraryInstances { Iterant[F].haltS(Some(DummyException("arbitrary"))) case x :: Nil if math.abs(idx % 2) == 1 => - if (idx % 4 == 1) + if (idx % 4 == 1) Iterant[F].lastS(x) else Iterant.Concat(F.delay(Iterant[F].lastS(x)), F.delay(Halt(None))) diff --git a/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala index 9e800345d..9fd7c4e22 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala @@ -17,7 +17,7 @@ package monix.tail -import cats.effect.laws.discipline.{Parameters => EffectParameters} +import cats.effect.laws.discipline.{ Parameters => EffectParameters } import minitest.SimpleTestSuite import minitest.api.IgnoredException import minitest.laws.Checkers diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala index ca1dcb32f..0150ebcc6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala @@ -20,7 +20,7 @@ package monix.tail import java.util.NoSuchElementException import minitest.SimpleTestSuite -import monix.tail.batches.{BatchCursor, EmptyCursor} +import monix.tail.batches.{ BatchCursor, EmptyCursor } object BatchCursorEmptySuite extends SimpleTestSuite { test("BatchCursor.empty.current") { diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala index cf1387954..054575fa9 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala @@ -25,8 +25,8 @@ abstract class BatchCursorSuite[A: ClassTag]( implicit arbA: Arbitrary[A], arbAtoA: Arbitrary[A => A], - arbAtoBoolean: Arbitrary[A => Boolean]) - extends BaseTestSuite { + arbAtoBoolean: Arbitrary[A => Boolean] +) extends BaseTestSuite { type Cursor <: BatchCursor[A] diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala index 74512869b..c72b20494 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala @@ -20,7 +20,7 @@ package monix.tail import java.util.NoSuchElementException import minitest.SimpleTestSuite -import monix.tail.batches.{Batch, EmptyBatch} +import monix.tail.batches.{ Batch, EmptyBatch } object BatchEmptySuite extends SimpleTestSuite { test("Batch.empty.cursor().current") { diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala index bec616649..5bee80145 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala @@ -26,8 +26,8 @@ abstract class BatchSuite[A: ClassTag]( implicit arbA: Arbitrary[A], arbAtoA: Arbitrary[A => A], - arbAtoBoolean: Arbitrary[A => Boolean]) - extends BaseTestSuite { + arbAtoBoolean: Arbitrary[A => Boolean] +) extends BaseTestSuite { type Batch <: batches.Batch[A] diff --git a/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala index cf311d5b7..4c5c8eb0a 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala @@ -17,7 +17,7 @@ package monix.tail -import cats.effect.{IO, Timer} +import cats.effect.{ IO, Timer } import monix.eval.Task import scala.util.Success @@ -177,7 +177,8 @@ object IntervalIntervalSuite extends BaseTestSuite { .mapEval(e => timer.sleep(100.millis).map { _ => effect += 1; e - }) + } + ) .take(3) .toListL .unsafeToFuture() @@ -230,7 +231,8 @@ object IntervalIntervalSuite extends BaseTestSuite { .mapEval(e => timer.sleep(100.millis).map { _ => effect += 1; e - }) + } + ) .take(3) .toListL .unsafeToFuture() @@ -284,7 +286,8 @@ object IntervalIntervalSuite extends BaseTestSuite { .mapEval(e => timer.sleep(2.seconds).map { _ => effect += 1; e - }) + } + ) .take(3) .toListL .unsafeToFuture() diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala index e1bba7973..f2e8db135 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala @@ -20,9 +20,9 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ import cats.effect.IO -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object IterantBasicSuite extends BaseTestSuite { test("arbitraryListToTaskStream works") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala index 2017218ba..698594412 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala @@ -37,7 +37,7 @@ object IterantBufferSuite extends BaseTestSuite { test("bufferSliding(c, s) is consistent with List.sliding(c, s)") { implicit s => check4 { (list: List[Int], idx: Int, c: Int, s: Int) => val count = math.abs(c % 4) + 2 - val skip = math.abs(s % 4) + 2 + val skip = math.abs(s % 4) + 2 val stream = arbitraryListToIterant[Coeval, Int](list, idx, allowErrors = false) stream.bufferSliding(count, skip).map(_.toList).toListL <-> diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala index ae7a50be1..860436732 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala @@ -18,13 +18,13 @@ package monix.tail import cats.implicits._ -import cats.effect.{ContextShift, IO, Timer} +import cats.effect.{ ContextShift, IO, Timer } import minitest.SimpleTestSuite import monix.catnap.ProducerF -import monix.execution.BufferCapacity.{Bounded, Unbounded} -import monix.execution.ChannelType.{MultiProducer, SingleProducer} +import monix.execution.BufferCapacity.{ Bounded, Unbounded } +import monix.execution.ChannelType.{ MultiProducer, SingleProducer } import monix.execution.internal.Platform -import monix.execution.{BufferCapacity, Scheduler} +import monix.execution.{ BufferCapacity, Scheduler } import monix.catnap.SchedulerEffect object IterantChannelSuite extends SimpleTestSuite { diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala index 2c4c24be2..fa1e880e4 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.Iterant.Suspend import monix.tail.batches.BatchCursor diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala index b67569047..1f98766a1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala @@ -89,12 +89,15 @@ object IterantCompleteLSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals(stream.completedL.value(), ()) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala index ef26ed5aa..26e919091 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } object IterantConcatSuite extends BaseTestSuite { test("Iterant.prepend") { implicit s => @@ -58,7 +58,7 @@ object IterantConcatSuite extends BaseTestSuite { } test("Iterant ++ Iterant is stack safe") { implicit s => - lazy val nats: Iterant[Coeval, Long] = Iterant[Coeval].of(1L) ++ nats.map(_ + 1L) take (4) + lazy val nats: Iterant[Coeval, Long] = (Iterant[Coeval].of(1L) ++ nats.map(_ + 1L)).take(4) assertEquals(nats.toListL.value(), List(1, 2, 3, 4)) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala index 99f0daab3..15253e97f 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.tail.batches.BatchCursor diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala index 8e1943b1f..96f629a26 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala @@ -19,10 +19,10 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import org.scalacheck.Test import org.scalacheck.Test.Parameters diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala index 49294f7fc..aede21ae3 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import monix.tail.batches.BatchCursor diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala index 3c01ea8e5..ee0a02cc5 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import monix.tail.batches.BatchCursor diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala index 39b5df68d..33355d380 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala @@ -17,14 +17,14 @@ package monix.tail -import java.io.{OutputStream, PrintStream} +import java.io.{ OutputStream, PrintStream } import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.AtomicInt import monix.execution.exceptions.DummyException -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } object IterantDumpSuite extends BaseTestSuite { def dummyOut(count: AtomicInt = null) = { diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala index fd382a03c..c569c9e2c 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala @@ -20,7 +20,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.Iterant.Suspend import monix.tail.batches.BatchCursor diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala index 2fb9bbde6..d3268f7b8 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala @@ -19,11 +19,11 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.batches.BatchCursor -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object IterantFlatMapSuite extends BaseTestSuite { test("Iterant[Task].flatMap equivalence with List.flatMap") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala index ee7803f4c..623c5dee6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala @@ -19,10 +19,10 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import scala.util.Failure object IterantFoldLeftSuite extends BaseTestSuite { @@ -90,7 +90,8 @@ object IterantFoldLeftSuite extends BaseTestSuite { val stream = Iterant[Task] .nextS( 1, - Task.evalAsync(Iterant[Task].nextCursorS(BatchCursor(2, 3), Task.now(Iterant[Task].empty[Int])).guarantee(c))) + Task.evalAsync(Iterant[Task].nextCursorS(BatchCursor(2, 3), Task.now(Iterant[Task].empty[Int])).guarantee(c)) + ) .guarantee(c) .mapEval(x => Task.evalAsync(x)) @@ -192,7 +193,8 @@ object IterantFoldLeftSuite extends BaseTestSuite { val stream = Iterant[Coeval] .nextS( 1, - Coeval(Iterant[Coeval].nextCursorS(BatchCursor(2, 3), Coeval.now(Iterant[Coeval].empty[Int])).guarantee(c))) + Coeval(Iterant[Coeval].nextCursorS(BatchCursor(2, 3), Coeval.now(Iterant[Coeval].empty[Int])).guarantee(c)) + ) .guarantee(c) .mapEval(x => Coeval(x)) @@ -276,12 +278,15 @@ object IterantFoldLeftSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals(stream.toListL.value(), List(1)) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala index f98ead879..f4eb408c6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala @@ -23,7 +23,7 @@ import cats.effect.Sync import monix.eval.Coeval import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object IterantFoldRightSuite extends BaseTestSuite { def exists(ref: Iterant[Coeval, Int], p: Int => Boolean): Coeval[Boolean] = diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala index 664421480..ee4bc6243 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala @@ -22,7 +22,7 @@ import cats.laws.discipline._ import monix.eval.Coeval import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object IterantFoldWhileLeftSuite extends BaseTestSuite { def exists(fa: Iterant[Coeval, Int], p: Int => Boolean): Coeval[Boolean] = @@ -408,12 +408,15 @@ object IterantFoldWhileLeftSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals(stream.foldWhileLeftL(List.empty[Int])((acc, i) => Left(i :: acc)).value(), List(1)) } @@ -449,16 +452,20 @@ object IterantFoldWhileLeftSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals( stream.foldWhileLeftEvalL(Coeval(List.empty[Int]))((acc, i) => Coeval(Left(i :: acc))).value(), - List(1)) + List(1) + ) } test("foldWhileLeftEvalL handles Scope's release after use is finished") { implicit s => @@ -481,6 +488,7 @@ object IterantFoldWhileLeftSuite extends BaseTestSuite { assertEquals( (0 +: stream :+ 2).foldWhileLeftEvalL(Coeval(List.empty[Int]))((acc, i) => Coeval(Left(i :: acc))).value(), - List(2, 1, 0)) + List(2, 1, 0) + ) } } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala index 92f5605f6..63f9ff603 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } object IterantFromIndexedSeqSuite extends BaseTestSuite { test("Iterant[Task].fromIndexedSeq") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala index bded0615e..59324d8bc 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import scala.util.Failure diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala index e7d50b6f5..a13b5de20 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } object IterantFromListSuite extends BaseTestSuite { test("Iterant[Task].fromList") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala index 790062897..8dcb6c79d 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala @@ -24,11 +24,11 @@ import monix.eval.Task import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import org.reactivestreams.{Publisher, Subscriber, Subscription} -import org.scalacheck.{Arbitrary, Gen} +import org.reactivestreams.{ Publisher, Subscriber, Subscription } +import org.scalacheck.{ Arbitrary, Gen } import scala.concurrent.Promise -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } import scala.concurrent.duration._ object IterantFromReactivePublisherSuite extends BaseTestSuite { @@ -123,8 +123,8 @@ object IterantFromReactivePublisherSuite extends BaseTestSuite { } class RangePublisher(from: Int, until: Int, step: Int, finish: Option[Throwable], onCancel: Promise[Unit])( - implicit sc: Scheduler) - extends Publisher[Int] { + implicit sc: Scheduler + ) extends Publisher[Int] { def this(range: Range, finish: Option[Throwable])(implicit sc: Scheduler) = this(range.start, range.end, range.step, finish, null) diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala index 93651240c..5d93ec1b9 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala @@ -24,9 +24,9 @@ import monix.execution.Scheduler.global import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import org.reactivestreams.{Publisher, Subscriber, Subscription} +import org.reactivestreams.{ Publisher, Subscriber, Subscription } -import scala.concurrent.{Future, Promise} +import scala.concurrent.{ Future, Promise } object IterantFromReactiveStreamAsyncSuite extends TestSuite[Scheduler] { def setup(): Scheduler = global @@ -181,8 +181,8 @@ object IterantFromReactiveStreamAsyncSuite extends TestSuite[Scheduler] { } class RangePublisher(from: Int, until: Int, step: Int, finish: Option[Throwable], onCancel: Promise[Unit])( - implicit sc: Scheduler) - extends Publisher[Int] { + implicit sc: Scheduler + ) extends Publisher[Int] { def this(range: Range, finish: Option[Throwable])(implicit sc: Scheduler) = this(range.start, range.end, range.step, finish, null) @@ -221,7 +221,8 @@ object IterantFromReactiveStreamAsyncSuite extends TestSuite[Scheduler] { } } - if (!isInRange(index.toLong, until.toLong, step.toLong) && + if ( + !isInRange(index.toLong, until.toLong, step.toLong) && !isCanceled && finished.compareAndSet(expect = false, update = true) ) { diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala index dd1dd79d7..2c8bb0a46 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.execution.internal.Platform.recommendedBatchSize import monix.tail.Iterant.NextBatch @@ -63,7 +63,7 @@ object IterantFromStateActionSuite extends BaseTestSuite { test("Iterant.fromStateActionL should evolve state") { implicit s => check3 { (seed: Int, f: Int => (Int, Int), i: Int) => val n = i % (recommendedBatchSize * 2) - val stream = Iterant[Task].fromStateActionL[Int, Int](f andThen Task.now)(Task.now(seed)) + val stream = Iterant[Task].fromStateActionL[Int, Int](f.andThen(Task.now))(Task.now(seed)) val expected = Iterator .continually(0) .scanLeft(f(seed)) { case ((_, newSeed), _) => f(newSeed) } @@ -79,7 +79,7 @@ object IterantFromStateActionSuite extends BaseTestSuite { check3 { (seed: Int, f: Int => (Int, Int), i: Int) => val n = i % (recommendedBatchSize * 2) val stream = Iterant[Task].fromStateAction[Int, Int](f)(seed) - val streamL = Iterant[Task].fromStateActionL[Int, Int](f andThen Task.now)(Task.now(seed)) + val streamL = Iterant[Task].fromStateActionL[Int, Int](f.andThen(Task.now))(Task.now(seed)) stream.take(n) <-> streamL.take(n) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala index 70692c89a..0d9aa914b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala @@ -19,10 +19,10 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import scala.util.Failure @@ -106,12 +106,15 @@ object IterantHeadOptionSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals(stream.headOptionL.value(), None) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala index aab20f1ac..4f40caa22 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala @@ -19,10 +19,10 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import scala.util.Failure @@ -106,12 +106,15 @@ object IterantLastOptionSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals(stream.lastOptionL.value(), None) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala index 7cf7766a5..0ed3e274a 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala @@ -20,7 +20,7 @@ package monix.tail import cats.effect.IO import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } object IterantLiftMapSuite extends BaseTestSuite { test("liftMap(f) converts Iterant[Coeval, ?] to Iterant[Task, ?]") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala index 811f70a76..5adf7dfb6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala @@ -19,19 +19,19 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.execution.internal.Platform.recommendedBatchSize -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import scala.util.Failure object IterantMapBatchSuite extends BaseTestSuite { test("Iterant[Task].mapBatch(f) equivalence with List.flatMap(f andThen (_.toList))") { implicit s => check2 { (stream: Iterant[Task, Array[Int]], f: Array[Int] => Long) => - val g = f andThen (Batch.apply(_)) + val g = f.andThen(Batch.apply(_)) stream.mapBatch(g).toListL <-> - stream.toListL.map(_.flatMap(g andThen (_.toList))) + stream.toListL.map(_.flatMap(g.andThen(_.toList))) } } @@ -41,7 +41,7 @@ object IterantMapBatchSuite extends BaseTestSuite { Iterant[Task].nextBatchS(Batch.fromSeq(list, recommendedBatchSize), Task.delay(Iterant[Task].lastS[Int](elem))) val f: Int => List[Int] = List.fill(recommendedBatchSize * 2)(_) - val received = stream.mapBatch(f andThen (Batch.fromSeq(_))).toListL + val received = stream.mapBatch(f.andThen(Batch.fromSeq(_))).toListL val expected = stream.toListL.map(_.flatMap(f)) received <-> expected diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala index 3863a1ce3..b3af31dd1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala @@ -19,10 +19,10 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.Iterant.Suspend -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import scala.util.Failure object IterantMapEvalSuite extends BaseTestSuite { diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala index fb343498a..ffeede702 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala @@ -19,9 +19,9 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import scala.util.Failure object IterantMapSuite extends BaseTestSuite { diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala index 26c5918db..948058378 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala @@ -22,10 +22,10 @@ import cats.syntax.either._ import cats.syntax.eq._ import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} -import monix.execution.exceptions.{CompositeException, DummyException} +import monix.eval.{ Coeval, Task } +import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } object IterantOnErrorSuite extends BaseTestSuite { test("fa.attempt <-> fa.map(Right) for successful streams") { implicit s => @@ -54,7 +54,8 @@ object IterantOnErrorSuite extends BaseTestSuite { _.fold( e => Iterant[Coeval].raiseError[Int](e), a => Iterant[Coeval].pure(a) - )) + ) + ) r <-> fa } @@ -128,11 +129,14 @@ object IterantOnErrorSuite extends BaseTestSuite { var effect = 0 val errorInTail = Iterant[Coeval] - .nextS(1, Coeval { - Iterant[Coeval] - .nextS(2, Coeval { (throw DummyException("Dummy")): Iterant[Coeval, Int] }) - .guarantee(Coeval { effect += 2 }) - }) + .nextS( + 1, + Coeval { + Iterant[Coeval] + .nextS(2, Coeval { (throw DummyException("Dummy")): Iterant[Coeval, Int] }) + .guarantee(Coeval { effect += 2 }) + } + ) .guarantee(Coeval { effect += 1 }) errorInTail.onErrorHandleWith(_ => Iterant[Coeval].empty[Int]).completedL.value() @@ -153,11 +157,14 @@ object IterantOnErrorSuite extends BaseTestSuite { var effect = 0 val errorInTail = Iterant[Coeval] - .nextS(1, Coeval { - Iterant[Coeval] - .nextS(2, Coeval { (throw DummyException("Dummy")): Iterant[Coeval, Int] }) - .guarantee(Coeval { effect += 2 }) - }) + .nextS( + 1, + Coeval { + Iterant[Coeval] + .nextS(2, Coeval { (throw DummyException("Dummy")): Iterant[Coeval, Int] }) + .guarantee(Coeval { effect += 2 }) + } + ) .guarantee(Coeval { effect += 1 }) errorInTail.attempt.completedL.value() @@ -224,7 +231,7 @@ object IterantOnErrorSuite extends BaseTestSuite { assertEquals(result, Some(Left(dummy))) } - //noinspection ScalaUnreachableCode + // noinspection ScalaUnreachableCode def semiBrokenIterator(ex: Throwable): Iterator[Int] = { def end: Iterator[Int] = new Iterator[Int] { override def hasNext: Boolean = true @@ -246,7 +253,8 @@ object IterantOnErrorSuite extends BaseTestSuite { Right(1), Right(2), Left(dummy) - )) + ) + ) } test("Resource.attempt with broken acquire") { _ => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala index c97f2b34a..e11ee2de6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala @@ -178,12 +178,15 @@ object IterantReduceSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val stream = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val stream = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) assertEquals(stream.reduceL(_ + _).value(), Some(1)) } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala index b6a614296..15cfe0258 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala @@ -20,11 +20,11 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ import cats.syntax.eq._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } object IterantRepeatSuite extends BaseTestSuite { test("Iterant.repeat works for one item") { _ => @@ -46,7 +46,8 @@ object IterantRepeatSuite extends BaseTestSuite { Iterant[Coeval].fromIterable( (0 until (count / list.length + 1)) .flatMap(_ => list) - .take(count)) + .take(count) + ) } fa <-> expected diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala index 324d5392d..9211b715c 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala @@ -21,7 +21,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.eval.Coeval import monix.execution.exceptions.DummyException -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } object IterantResourceSuite extends BaseTestSuite { class Resource(var acquired: Int = 0, var released: Int = 0) { @@ -49,7 +49,8 @@ object IterantResourceSuite extends BaseTestSuite { .of(1, 2, 3) .guarantee(Coeval { earlyStopDone = true - })) + }) + ) bracketed.take(1).completedL.value() assert(earlyStopDone) diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala index 9c6271d46..c5fd3213b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } object IterantRetryIfEmptySuite extends BaseTestSuite { test("Iterant.pure(1).retryIfEmpty mirrors source") { _ => @@ -57,7 +57,8 @@ object IterantRetryIfEmptySuite extends BaseTestSuite { Coeval { assertEquals(acquired, 1) acquired -= 1 - }) + } + ) .flatMap(_ => Iterant[Coeval].empty[Int]) val r = (empty ++ resource).retryIfEmpty(Some(2)).toListL.value() diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala index 2bb18442f..6c51aa5c8 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala @@ -63,7 +63,8 @@ object IterantScanEvalSuite extends BaseTestSuite { .map(ls => ls.take(19) .map(x => requestPersonDetails(x).value()) - .collect { case Some(p) => p.name }) + .collect { case Some(p) => p.name } + ) fa <-> expected } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala index 01f1f4a55..f827c7753 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala @@ -17,11 +17,11 @@ package monix.tail -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.batches.BatchCursor -import scala.util.{Failure, Success} +import scala.util.{ Failure, Success } object IterantStatesSuite extends BaseTestSuite { test("Iterant[Task].suspend(Task.evalAsync(list))") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala index 66f2114ee..8457be3d1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala @@ -22,7 +22,7 @@ import cats.laws.discipline._ import monix.eval.Coeval import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException -import monix.tail.batches.{EmptyBatch, EmptyCursor} +import monix.tail.batches.{ EmptyBatch, EmptyCursor } object IterantSwitchIfEmptySuite extends BaseTestSuite { val backupStream: Iterant[Coeval, Int] = Iterant[Coeval].of(42) @@ -80,7 +80,8 @@ object IterantSwitchIfEmptySuite extends BaseTestSuite { Iterant[Coeval].nextCursorS( EmptyCursor, Coeval(emptyInts) - )) + ) + ) } test("Iterant.switchIfEmpty chooses fallback for empty batches") { implicit s => @@ -88,7 +89,8 @@ object IterantSwitchIfEmptySuite extends BaseTestSuite { Iterant[Coeval].nextBatchS( EmptyBatch, Coeval(emptyInts) - )) + ) + ) } test("Iterant.switchIfEmpty consistent with toListL.isEmpty") { implicit s => diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala index 440914c4a..c900f212c 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.Iterant.Suspend diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala index 73603cdec..51138bc05 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala @@ -20,7 +20,7 @@ package monix.tail import cats.effect.Sync import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.execution.internal.Platform diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala index 332057356..eb44c32b9 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala @@ -20,7 +20,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.exceptions.DummyException import monix.tail.batches.BatchCursor diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala index 30ae9a960..865f2b2a4 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala @@ -19,12 +19,12 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import monix.tail.Iterant.Suspend -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import org.scalacheck.Test import org.scalacheck.Test.Parameters diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala index 3f7d2b3f6..3e300f8f2 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala @@ -19,11 +19,11 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import org.scalacheck.Test import org.scalacheck.Test.Parameters diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala index a3af7e60f..f06a7352b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala @@ -20,11 +20,11 @@ package monix.tail import cats.effect.Sync import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import org.scalacheck.Test import org.scalacheck.Test.Parameters @@ -126,8 +126,8 @@ object IterantTakeWhileWithIndexSuite extends BaseTestSuite { val suffix = Iterant[Coeval].nextCursorS[Int](new ThrowExceptionCursor(dummy), Coeval.now(Iterant[Coeval].empty)) val stream = (iter.onErrorIgnore ++ suffix).guarantee(Coeval.eval(cancelable.cancel())) - intercept[DummyException] { - stream.takeWhileWithIndex((_, _) => true).toListL.value() + intercept[DummyException] { + stream.takeWhileWithIndex((_, _) => true).toListL.value() () } cancelable.isCanceled diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala index e575f2bff..e01fbb76d 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala @@ -27,8 +27,8 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import monix.execution.rstreams.SingleAssignSubscription import monix.tail.batches.Batch -import org.reactivestreams.{Subscriber, Subscription} -import scala.util.{Failure, Success} +import org.reactivestreams.{ Subscriber, Subscription } +import scala.util.{ Failure, Success } object IterantToReactivePublisherSuite extends BaseTestSuite { test("sum with Task and request(1)") { implicit s => @@ -392,7 +392,8 @@ object IterantToReactivePublisherSuite extends BaseTestSuite { override def liftIO[A](ioa: IO[A]): IO[A] = ioa override def bracketCase[A, B](acquire: IO[A])(use: A => IO[B])( - release: (A, ExitCase[Throwable]) => IO[Unit]): IO[B] = + release: (A, ExitCase[Throwable]) => IO[Unit] + ): IO[B] = acquire.bracketCase(use)(release) } } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala index 0f68658af..44dc1a57b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala @@ -19,7 +19,7 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException import monix.execution.internal.Platform @@ -109,12 +109,15 @@ object IterantZipMapSuite extends BaseTestSuite { (_, _) => Coeval(triggered.set(true)) ) - val scope = Iterant[Coeval].concatS(Coeval(lh), Coeval { - if (!triggered.getAndSet(true)) - Iterant[Coeval].raiseError[Int](fail) - else - Iterant[Coeval].empty[Int] - }) + val scope = Iterant[Coeval].concatS( + Coeval(lh), + Coeval { + if (!triggered.getAndSet(true)) + Iterant[Coeval].raiseError[Int](fail) + else + Iterant[Coeval].empty[Int] + } + ) 0 +: scope :+ 2 } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala index 9efcc9134..d88c90bd4 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala @@ -19,11 +19,11 @@ package monix.tail import cats.laws._ import cats.laws.discipline._ -import monix.eval.{Coeval, Task} +import monix.eval.{ Coeval, Task } import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.DummyException import monix.execution.internal.Platform -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.batches.{ Batch, BatchCursor } import org.scalacheck.Test import org.scalacheck.Test.Parameters diff --git a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala index 144f4086d..d19a32528 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala @@ -18,7 +18,7 @@ package monix.tail import monix.execution.atomic.Atomic -import monix.tail.batches.{BatchCursor, GenericBatch} +import monix.tail.batches.{ BatchCursor, GenericBatch } /** Batch that throws exception on access. */ final class ThrowExceptionBatch[A](ex: Throwable) extends GenericBatch[A] { diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 2ceee8f18..4d733cee6 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -17,7 +17,9 @@ object MimaFilters { lazy val changesFor_3_3_0 = Seq( // Upgraded JCTools to 3.0.0 - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPMC.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPMC.this" + ), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java7.this"), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#MPMC.this"), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java8SPSC.this"), @@ -25,16 +27,26 @@ object MimaFilters { exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.this"), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.apply"), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPSC.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPSC.this" + ), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.apply"), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.apply"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#MPMC.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#MPMC.this" + ), exclude[MissingTypesProblem]("monix.execution.internal.collection.queues.QueueDrain"), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java8MPSC.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8MPSC.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#Java7.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8MPSC.this" + ), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java7.this" + ), exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java8SPMC.this"), - exclude[IncompatibleMethTypeProblem]("monix.reactive.observers.buffers.ConcurrentQueue#FromMessagePassingQueue.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.reactive.observers.buffers.ConcurrentQueue#FromMessagePassingQueue.this" + ), // Fixed annoying incremental compilation error with Coeval deprecations exclude[MissingTypesProblem]("monix.eval.CoevalInstancesLevel0"), exclude[MissingTypesProblem]("monix.eval.Coeval$DeprecatedExtensions"), diff --git a/project/MonixBuildUtils.scala b/project/MonixBuildUtils.scala index 5894d877b..019399810 100644 --- a/project/MonixBuildUtils.scala +++ b/project/MonixBuildUtils.scala @@ -8,7 +8,7 @@ import scala.collection.mutable import scala.collection.immutable.SortedSet import scala.util.matching.Regex import scala.xml.Elem -import scala.xml.transform.{RewriteRule, RuleTransformer} +import scala.xml.transform.{ RewriteRule, RuleTransformer } final case class MonixScalaVersion(value: String) { lazy val parts = value.split("[.]").filter(_.nonEmpty).toList @@ -49,7 +49,7 @@ object MonixBuildUtils { */ def filterOutMultipleDependenciesFromGeneratedPomXml(list: List[(String, Regex)]*) = list.foldLeft(List.empty[Def.Setting[_]]) { (acc, elem) => - acc ++ filterOutDependencyFromGeneratedPomXml(elem:_*) + acc ++ filterOutDependencyFromGeneratedPomXml(elem: _*) } /** @@ -68,12 +68,14 @@ object MonixBuildUtils { def filterOutDependencyFromGeneratedPomXml(conditions: (String, Regex)*) = { def shouldExclude(e: Elem) = e.label == "dependency" && { - conditions.forall { case (key, regex) => - e.child.exists(child => child.label == key && regex.findFirstIn(child.text).isDefined) + conditions.forall { + case (key, regex) => + e.child.exists(child => child.label == key && regex.findFirstIn(child.text).isDefined) } } - if (conditions.isEmpty) Nil else { + if (conditions.isEmpty) Nil + else { Seq( // For evicting Scoverage out of the generated POM // See: https://github.com/scoverage/sbt-scoverage/issues/153 @@ -118,7 +120,7 @@ object MonixBuildUtils { .toSeq assert(scalaVersions.nonEmpty, "build.yml is corrupt, suitable scala_version_* keys missing") - SortedSet(scalaVersions:_*) + SortedSet(scalaVersions: _*) } } } diff --git a/project/plugins.sbt b/project/plugins.sbt index 7b90d2580..e3abc29b5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,6 +10,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.30") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") -addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0") +addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.12") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") From 72ba9546030c482079fc7ba7f86282177a66a402 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sun, 15 May 2022 14:51:52 +0300 Subject: [PATCH 40/69] Licensing headers (#1574) --- CONTRIBUTING.md | 2 +- README.md | 2 +- build.sbt | 2 +- .../scala/monix/catnap/internal/FutureLiftForPlatform.scala | 2 +- .../scala/monix/catnap/internal/FutureLiftForPlatform.scala | 2 +- .../src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala | 2 +- .../src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala | 2 +- .../src/test/scala/monix/catnap/ConcurrentQueueJVMSuite.scala | 2 +- .../jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala | 2 +- monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala | 2 +- .../jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala | 2 +- .../shared/src/main/scala/monix/catnap/CancelableF.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/ChannelF.scala | 2 +- .../shared/src/main/scala/monix/catnap/CircuitBreaker.scala | 2 +- .../shared/src/main/scala/monix/catnap/ConcurrentChannel.scala | 2 +- .../shared/src/main/scala/monix/catnap/ConcurrentQueue.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala | 2 +- .../shared/src/main/scala/monix/catnap/FutureLift.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/ProducerF.scala | 2 +- .../shared/src/main/scala/monix/catnap/SchedulerEffect.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala | 2 +- .../scala/monix/catnap/cancelables/AssignableCancelableF.scala | 2 +- .../scala/monix/catnap/cancelables/BooleanCancelableF.scala | 2 +- .../monix/catnap/cancelables/SingleAssignCancelableF.scala | 2 +- .../src/main/scala/monix/catnap/internal/AsyncUtils.scala | 2 +- .../main/scala/monix/catnap/internal/ParallelApplicative.scala | 2 +- .../src/main/scala/monix/catnap/internal/QueueHelpers.scala | 2 +- monix-catnap/shared/src/main/scala/monix/catnap/syntax.scala | 2 +- .../scala/monix/execution/CancelableFutureCatsInstances.scala | 2 +- .../shared/src/main/scala/monix/execution/package.scala | 2 +- .../shared/src/test/scala/monix/catnap/CancelableFSuite.scala | 2 +- .../src/test/scala/monix/catnap/CircuitBreakerSuite.scala | 2 +- .../src/test/scala/monix/catnap/ConcurrentChannelSuite.scala | 2 +- .../src/test/scala/monix/catnap/ConcurrentQueueSuite.scala | 2 +- .../shared/src/test/scala/monix/catnap/FutureLiftSuite.scala | 2 +- .../src/test/scala/monix/catnap/MVarConcurrentSuite.scala | 2 +- monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala | 2 +- .../test/scala/monix/catnap/ReferenceSchedulerEffectSuite.scala | 2 +- .../shared/src/test/scala/monix/catnap/SemaphoreSuite.scala | 2 +- .../src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala | 2 +- .../monix/catnap/cancelables/AssignableCancelableFSuite.scala | 2 +- .../monix/catnap/cancelables/BooleanCancelableFSuite.scala | 2 +- .../monix/catnap/cancelables/SingleAssignCancelableFSuite.scala | 2 +- .../src/test/scala/monix/execution/CallbackInstanceSuite.scala | 2 +- .../monix/execution/TypeClassLawsForCancelableFutureSuite.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala | 2 +- .../js/src/main/scala/monix/eval/internal/TracingPlatform.scala | 2 +- .../jvm/src/main/java/monix/eval/internal/TracingPlatform.java | 2 +- .../src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala | 2 +- .../src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala | 2 +- .../jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala | 2 +- .../scala/monix/eval/TaskExecuteWithLocalContextSuite.scala | 2 +- .../jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala | 2 +- .../test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala | 2 +- .../jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala | 2 +- .../monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/Coeval.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/Fiber.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/Task.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala | 2 +- .../src/main/scala/monix/eval/instances/CatsAsyncForTask.scala | 2 +- .../src/main/scala/monix/eval/instances/CatsBaseForTask.scala | 2 +- .../src/main/scala/monix/eval/instances/CatsEffectForTask.scala | 2 +- .../src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala | 2 +- .../main/scala/monix/eval/instances/CatsParallelForTask.scala | 2 +- .../src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala | 2 +- .../src/main/scala/monix/eval/internal/CoevalBracket.scala | 2 +- .../src/main/scala/monix/eval/internal/CoevalDeprecated.scala | 2 +- .../src/main/scala/monix/eval/internal/CoevalRunLoop.scala | 2 +- .../scala/monix/eval/internal/CoevalStackTracedContext.scala | 2 +- .../src/main/scala/monix/eval/internal/CoevalTracing.scala | 2 +- .../src/main/scala/monix/eval/internal/ForkedRegister.scala | 2 +- .../src/main/scala/monix/eval/internal/ForwardCancelable.scala | 2 +- .../src/main/scala/monix/eval/internal/FrameIndexRef.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/LazyVal.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/StackFrame.scala | 2 +- .../src/main/scala/monix/eval/internal/StackTracedContext.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskBracket.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskCancellation.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskConnection.scala | 2 +- .../scala/monix/eval/internal/TaskConnectionComposite.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskConnectionRef.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskConversions.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskCreate.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskDeferAction.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskDeprecated.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskDoOnCancel.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskEffect.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskEvalAsync.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskExecuteOn.scala | 2 +- .../main/scala/monix/eval/internal/TaskExecuteWithModel.scala | 2 +- .../main/scala/monix/eval/internal/TaskExecuteWithOptions.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskFromFuture.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskMemoize.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskParSequence.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskParSequenceN.scala | 2 +- .../scala/monix/eval/internal/TaskParSequenceUnordered.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskRace.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskRaceList.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskRacePair.scala | 2 +- .../main/scala/monix/eval/internal/TaskRestartCallback.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala | 2 +- .../scala/monix/eval/internal/TaskRunToFutureWithLocal.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskSequence.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskShift.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskSleep.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskStart.scala | 2 +- .../src/main/scala/monix/eval/internal/TaskStartAndForget.scala | 2 +- .../scala/monix/eval/internal/TaskToReactivePublisher.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TaskTracing.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/TracedAsync.scala | 2 +- .../src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala | 2 +- .../shared/src/main/scala/monix/eval/internal/package.scala | 2 +- monix-eval/shared/src/main/scala/monix/eval/package.scala | 2 +- .../shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala | 2 +- .../shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala | 2 +- .../src/main/scala/monix/eval/tracing/PrintingOptions.scala | 2 +- .../shared/src/main/scala/monix/eval/tracing/TaskEvent.scala | 2 +- .../shared/src/main/scala/monix/eval/tracing/TaskTrace.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/BaseTestSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalBracketSuite.scala | 2 +- .../src/test/scala/monix/eval/CoevalCatsConversions.scala | 2 +- .../src/test/scala/monix/eval/CoevalConversionsKSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalErrorSuite.scala | 2 +- .../src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalLeftSuite.scala | 2 +- .../src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala | 2 +- .../src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalMiscSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalNowSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalOptionSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalRightSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalRunSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalToStringSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/CoevalZipSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskAsyncBoundarySuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskAsyncSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskBracketSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskCallbackSafetySuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskCancelableSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskCancellationSuite.scala | 2 +- .../scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskCoevalForeachSuite.scala | 2 +- .../test/scala/monix/eval/TaskConnectionCompositeSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskConnectionRefSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskConnectionSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskConversionsKSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskConversionsSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskCreateSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskDelaySuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskEffectInstanceSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskErrorSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskExecuteAsyncSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskExecuteOnSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskExecutionModelSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/TaskLeftSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskLikeConversionsSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskLocalSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskMapBothSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskOptionSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskOptionsSuite.scala | 2 +- .../test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskParSequenceNSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala | 2 +- .../test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala | 2 +- .../test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskParZipSuite.scala | 2 +- monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskRightSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskSequenceSuite.scala | 2 +- .../src/test/scala/monix/eval/TaskStartAndForgetSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskStartSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskTimedSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskToFutureSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskToStringSuite.scala | 2 +- .../shared/src/test/scala/monix/eval/TaskTraverseSuite.scala | 2 +- .../src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala | 2 +- .../monix/eval/TypeClassLawsForParallelApplicativeSuite.scala | 2 +- .../src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala | 2 +- .../monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala | 2 +- .../test/scala/monix/eval/tracing/StackTracedContextSuite.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicAny.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicBoolean.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicBuilder.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicByte.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicChar.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicDouble.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicFloat.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicInt.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicLong.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicNumberAny.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/AtomicShort.scala | 2 +- .../js/src/main/scala/monix/execution/atomic/package.scala | 2 +- .../scala/monix/execution/cancelables/ChainedCancelable.scala | 2 +- .../monix/execution/internal/CancelableFutureForPlatform.scala | 2 +- .../execution/internal/DefaultUncaughtExceptionReporter.scala | 2 +- .../scala/monix/execution/internal/FutureUtilsForPlatform.scala | 2 +- .../js/src/main/scala/monix/execution/internal/Platform.scala | 2 +- .../monix/execution/internal/collection/JSArrayQueue.scala | 2 +- .../collection/queues/LowLevelConcurrentQueueBuilders.scala | 2 +- .../js/src/main/scala/monix/execution/misc/ThreadLocal.scala | 2 +- .../main/scala/monix/execution/schedulers/AsyncScheduler.scala | 2 +- .../js/src/main/scala/monix/execution/schedulers/CanBlock.scala | 2 +- .../js/src/main/scala/monix/execution/schedulers/JSTimer.scala | 2 +- .../monix/execution/schedulers/SchedulerCompanionImpl.scala | 2 +- .../main/scala/monix/execution/schedulers/StandardContext.scala | 2 +- .../monix/execution/schedulers/TrampolineExecutionContext.scala | 2 +- .../js/src/main/scala/org/reactivestreams/Processor.scala | 2 +- .../js/src/main/scala/org/reactivestreams/Publisher.scala | 2 +- .../js/src/main/scala/org/reactivestreams/Subscriber.scala | 2 +- .../js/src/main/scala/org/reactivestreams/Subscription.scala | 2 +- .../js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala | 2 +- .../main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala | 2 +- .../js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala | 2 +- .../main/scala_3.0/monix/execution/atomic/AtomicNumber.scala | 2 +- .../scala/monix/execution/internal/AsyncSchedulerJSSuite.scala | 2 +- .../src/test/scala/monix/execution/internal/PlatformSuite.scala | 2 +- .../monix/execution/internal/collection/JSArrayQueueSuite.scala | 2 +- .../jvm/src/main/java/monix/execution/internal/InternalApi.java | 2 +- .../monix/execution/internal/atomic/BoxPaddingStrategy.java | 2 +- .../src/main/java/monix/execution/internal/atomic/BoxedInt.java | 2 +- .../main/java/monix/execution/internal/atomic/BoxedLong.java | 2 +- .../main/java/monix/execution/internal/atomic/BoxedObject.java | 2 +- .../src/main/java/monix/execution/internal/atomic/Factory.java | 2 +- .../monix/execution/internal/atomic/Left128Java7BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Left128Java7BoxedLong.java | 2 +- .../execution/internal/atomic/Left128Java7BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Left128Java8BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Left128Java8BoxedLong.java | 2 +- .../execution/internal/atomic/Left128Java8BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Left128JavaXBoxedInt.java | 2 +- .../monix/execution/internal/atomic/Left128JavaXBoxedLong.java | 2 +- .../execution/internal/atomic/Left128JavaXBoxedObject.java | 2 +- .../monix/execution/internal/atomic/Left64Java7BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Left64Java7BoxedLong.java | 2 +- .../monix/execution/internal/atomic/Left64Java7BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Left64Java8BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Left64Java8BoxedLong.java | 2 +- .../monix/execution/internal/atomic/Left64Java8BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Left64JavaXBoxedInt.java | 2 +- .../monix/execution/internal/atomic/Left64JavaXBoxedLong.java | 2 +- .../monix/execution/internal/atomic/Left64JavaXBoxedObject.java | 2 +- .../java/monix/execution/internal/atomic/LeftPadding120.java | 2 +- .../java/monix/execution/internal/atomic/LeftPadding56.java | 2 +- .../execution/internal/atomic/LeftRight128Java7BoxedInt.java | 2 +- .../execution/internal/atomic/LeftRight128Java7BoxedLong.java | 2 +- .../execution/internal/atomic/LeftRight128Java7BoxedObject.java | 2 +- .../execution/internal/atomic/LeftRight128Java8BoxedInt.java | 2 +- .../execution/internal/atomic/LeftRight128Java8BoxedLong.java | 2 +- .../execution/internal/atomic/LeftRight128Java8BoxedObject.java | 2 +- .../execution/internal/atomic/LeftRight128JavaXBoxedInt.java | 2 +- .../execution/internal/atomic/LeftRight128JavaXBoxedLong.java | 2 +- .../execution/internal/atomic/LeftRight128JavaXBoxedObject.java | 2 +- .../execution/internal/atomic/LeftRight256Java7BoxedInt.java | 2 +- .../execution/internal/atomic/LeftRight256Java7BoxedLong.java | 2 +- .../execution/internal/atomic/LeftRight256Java7BoxedObject.java | 2 +- .../execution/internal/atomic/LeftRight256Java8BoxedInt.java | 2 +- .../execution/internal/atomic/LeftRight256Java8BoxedLong.java | 2 +- .../execution/internal/atomic/LeftRight256Java8BoxedObject.java | 2 +- .../execution/internal/atomic/LeftRight256JavaXBoxedInt.java | 2 +- .../execution/internal/atomic/LeftRight256JavaXBoxedLong.java | 2 +- .../execution/internal/atomic/LeftRight256JavaXBoxedObject.java | 2 +- .../monix/execution/internal/atomic/NormalJava7BoxedInt.java | 2 +- .../monix/execution/internal/atomic/NormalJava7BoxedLong.java | 2 +- .../monix/execution/internal/atomic/NormalJava7BoxedObject.java | 2 +- .../monix/execution/internal/atomic/NormalJava8BoxedInt.java | 2 +- .../monix/execution/internal/atomic/NormalJava8BoxedLong.java | 2 +- .../monix/execution/internal/atomic/NormalJava8BoxedObject.java | 2 +- .../monix/execution/internal/atomic/NormalJavaXBoxedInt.java | 2 +- .../monix/execution/internal/atomic/NormalJavaXBoxedLong.java | 2 +- .../monix/execution/internal/atomic/NormalJavaXBoxedObject.java | 2 +- .../monix/execution/internal/atomic/Right128Java7BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Right128Java7BoxedLong.java | 2 +- .../execution/internal/atomic/Right128Java7BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Right128Java8BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Right128Java8BoxedLong.java | 2 +- .../execution/internal/atomic/Right128Java8BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Right128JavaXBoxedInt.java | 2 +- .../monix/execution/internal/atomic/Right128JavaXBoxedLong.java | 2 +- .../execution/internal/atomic/Right128JavaXBoxedObject.java | 2 +- .../monix/execution/internal/atomic/Right64Java7BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Right64Java7BoxedLong.java | 2 +- .../execution/internal/atomic/Right64Java7BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Right64Java8BoxedInt.java | 2 +- .../monix/execution/internal/atomic/Right64Java8BoxedLong.java | 2 +- .../execution/internal/atomic/Right64Java8BoxedObject.java | 2 +- .../monix/execution/internal/atomic/Right64JavaXBoxedInt.java | 2 +- .../monix/execution/internal/atomic/Right64JavaXBoxedLong.java | 2 +- .../execution/internal/atomic/Right64JavaXBoxedObject.java | 2 +- .../main/java/monix/execution/internal/atomic/UnsafeAccess.java | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicBoolean.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicBuilder.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicDouble.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala | 2 +- .../src/main/scala/monix/execution/atomic/AtomicNumberAny.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala | 2 +- .../jvm/src/main/scala/monix/execution/atomic/package.scala | 2 +- .../scala/monix/execution/cancelables/ChainedCancelable.scala | 2 +- .../monix/execution/internal/CancelableFutureForPlatform.scala | 2 +- .../execution/internal/DefaultUncaughtExceptionReporter.scala | 2 +- .../scala/monix/execution/internal/FutureUtilsForPlatform.scala | 2 +- .../jvm/src/main/scala/monix/execution/internal/Platform.scala | 2 +- .../scala/monix/execution/internal/ScheduledExecutors.scala | 2 +- .../internal/collection/queues/FromCircularQueue.scala | 2 +- .../execution/internal/collection/queues/FromJavaQueue.scala | 2 +- .../internal/collection/queues/FromMessagePassingQueue.scala | 2 +- .../collection/queues/LowLevelConcurrentQueueBuilders.scala | 2 +- .../monix/execution/internal/collection/queues/QueueDrain.scala | 2 +- .../monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala | 2 +- .../monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala | 2 +- .../internal/forkJoin/DynamicWorkerThreadFactory.scala | 2 +- .../internal/forkJoin/StandardWorkerThreadFactory.scala | 2 +- .../jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala | 2 +- .../monix/execution/schedulers/AdaptedThreadPoolExecutor.scala | 2 +- .../main/scala/monix/execution/schedulers/AsyncScheduler.scala | 2 +- .../src/main/scala/monix/execution/schedulers/CanBlock.scala | 2 +- .../src/main/scala/monix/execution/schedulers/Defaults.scala | 2 +- .../scala/monix/execution/schedulers/ExecutorScheduler.scala | 2 +- .../monix/execution/schedulers/SchedulerCompanionImpl.scala | 2 +- .../scala/monix/execution/schedulers/ThreadFactoryBuilder.scala | 2 +- .../monix/execution/schedulers/TrampolineExecutionContext.scala | 2 +- .../jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala | 2 +- .../main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala | 2 +- .../jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala | 2 +- .../main/scala_3.0/monix/execution/atomic/AtomicNumber.scala | 2 +- .../jvm/src/test/scala/monix/execution/AckJVMSuite.scala | 2 +- .../jvm/src/test/scala/monix/execution/AsyncQueueJVMSuite.scala | 2 +- .../src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala | 2 +- .../test/scala/monix/execution/CancelableFutureJVMSuite.scala | 2 +- .../monix/execution/CompletableFutureConversionsSuite.scala | 2 +- .../jvm/src/test/scala/monix/execution/FeaturesJVMSuite.scala | 2 +- .../src/test/scala/monix/execution/FutureUtilsJVMSuite.scala | 2 +- .../monix/execution/atomic/ConcurrentAtomicNumberSuite.scala | 2 +- .../scala/monix/execution/atomic/ConcurrentAtomicSuite.scala | 2 +- .../monix/execution/cancelables/ChainedCancelableJVMSuite.scala | 2 +- .../src/test/scala/monix/execution/internal/PlatformSuite.scala | 2 +- .../jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala | 2 +- .../monix/execution/schedulers/AsyncSchedulerJVMSuite.scala | 2 +- .../monix/execution/schedulers/ExecutorSchedulerSuite.scala | 2 +- .../schedulers/JVMUncaughtExceptionReporterSuite.scala | 2 +- .../scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala | 2 +- .../schedulers/ScheduledExecutorToSchedulerSuite.scala | 2 +- .../execution/schedulers/TestSchedulerCompanionSuite.scala | 2 +- .../execution/schedulers/TracingSchedulerServiceSuite.scala | 2 +- .../execution/schedulers/TrampolineExecutionContextSuite.scala | 2 +- monix-execution/shared/src/main/scala/monix/execution/Ack.scala | 2 +- .../shared/src/main/scala/monix/execution/AsyncQueue.scala | 2 +- .../shared/src/main/scala/monix/execution/AsyncSemaphore.scala | 2 +- .../shared/src/main/scala/monix/execution/AsyncVar.scala | 2 +- .../shared/src/main/scala/monix/execution/BufferCapacity.scala | 2 +- .../shared/src/main/scala/monix/execution/Callback.scala | 2 +- .../shared/src/main/scala/monix/execution/Cancelable.scala | 2 +- .../src/main/scala/monix/execution/CancelableFuture.scala | 2 +- .../src/main/scala/monix/execution/CancelablePromise.scala | 2 +- .../shared/src/main/scala/monix/execution/ChannelType.scala | 2 +- .../shared/src/main/scala/monix/execution/ExecutionModel.scala | 2 +- .../shared/src/main/scala/monix/execution/Features.scala | 2 +- .../shared/src/main/scala/monix/execution/FutureUtils.scala | 2 +- .../shared/src/main/scala/monix/execution/Scheduler.scala | 2 +- .../main/scala/monix/execution/UncaughtExceptionReporter.scala | 2 +- .../src/main/scala/monix/execution/annotations/Unsafe.scala | 2 +- .../src/main/scala/monix/execution/atomic/PaddingStrategy.scala | 2 +- .../monix/execution/cancelables/AssignableCancelable.scala | 2 +- .../scala/monix/execution/cancelables/BooleanCancelable.scala | 2 +- .../scala/monix/execution/cancelables/CompositeCancelable.scala | 2 +- .../monix/execution/cancelables/MultiAssignCancelable.scala | 2 +- .../scala/monix/execution/cancelables/OrderedCancelable.scala | 2 +- .../scala/monix/execution/cancelables/RefCountCancelable.scala | 2 +- .../scala/monix/execution/cancelables/SerialCancelable.scala | 2 +- .../monix/execution/cancelables/SingleAssignCancelable.scala | 2 +- .../scala/monix/execution/cancelables/StackedCancelable.scala | 2 +- .../src/main/scala/monix/execution/cancelables/package.scala | 2 +- .../execution/exceptions/APIContractViolationException.scala | 2 +- .../monix/execution/exceptions/BufferOverflowException.scala | 2 +- .../scala/monix/execution/exceptions/CompositeException.scala | 2 +- .../monix/execution/exceptions/DownstreamTimeoutException.scala | 2 +- .../main/scala/monix/execution/exceptions/DummyException.scala | 2 +- .../monix/execution/exceptions/ExecutionRejectedException.scala | 2 +- .../monix/execution/exceptions/UncaughtErrorException.scala | 2 +- .../monix/execution/exceptions/UpstreamTimeoutException.scala | 2 +- .../main/scala/monix/execution/internal/AttemptCallback.scala | 2 +- .../src/main/scala/monix/execution/internal/Constants.scala | 2 +- .../main/scala/monix/execution/internal/GenericSemaphore.scala | 2 +- .../src/main/scala/monix/execution/internal/GenericVar.scala | 2 +- .../main/scala/monix/execution/internal/InterceptRunnable.scala | 2 +- .../src/main/scala/monix/execution/internal/Newtype1.scala | 2 +- .../src/main/scala/monix/execution/internal/RingBuffer.scala | 2 +- .../main/scala/monix/execution/internal/RunnableAction.scala | 2 +- .../src/main/scala/monix/execution/internal/Trampoline.scala | 2 +- .../main/scala/monix/execution/internal/collection/Buffer.scala | 2 +- .../monix/execution/internal/collection/ChunkedArrayQueue.scala | 2 +- .../monix/execution/internal/collection/ChunkedArrayStack.scala | 2 +- .../execution/internal/collection/DropAllOnOverflowQueue.scala | 2 +- .../execution/internal/collection/DropHeadOnOverflowQueue.scala | 2 +- .../monix/execution/internal/collection/EvictingQueue.scala | 2 +- .../scala/monix/execution/internal/collection/LinkedMap.scala | 2 +- .../execution/internal/collection/LowLevelConcurrentQueue.scala | 2 +- .../src/main/scala/monix/execution/internal/exceptions.scala | 2 +- .../shared/src/main/scala/monix/execution/internal/math.scala | 2 +- .../src/main/scala/monix/execution/misc/CanBindLocals.scala | 2 +- .../src/main/scala/monix/execution/misc/LocalDeprecated.scala | 2 +- .../shared/src/main/scala/monix/execution/misc/package.scala | 2 +- .../scala/monix/execution/rstreams/ReactivePullStrategy.scala | 2 +- .../monix/execution/rstreams/SingleAssignSubscription.scala | 2 +- .../src/main/scala/monix/execution/rstreams/Subscription.scala | 2 +- .../src/main/scala/monix/execution/rstreams/package.scala | 2 +- .../scala/monix/execution/schedulers/BatchingScheduler.scala | 2 +- .../scala/monix/execution/schedulers/ExecuteExtensions.scala | 2 +- .../scala/monix/execution/schedulers/ReferenceScheduler.scala | 2 +- .../scala/monix/execution/schedulers/SchedulerService.scala | 2 +- .../main/scala/monix/execution/schedulers/ShiftedRunnable.scala | 2 +- .../monix/execution/schedulers/StartAsyncBatchRunnable.scala | 2 +- .../main/scala/monix/execution/schedulers/TestScheduler.scala | 2 +- .../main/scala/monix/execution/schedulers/TracingRunnable.scala | 2 +- .../scala/monix/execution/schedulers/TracingScheduler.scala | 2 +- .../monix/execution/schedulers/TracingSchedulerService.scala | 2 +- .../scala/monix/execution/schedulers/TrampolineScheduler.scala | 2 +- .../scala/monix/execution/schedulers/TrampolinedRunnable.scala | 2 +- .../shared/src/main/scala_2.13+/monix/execution/compat.scala | 2 +- .../shared/src/main/scala_2.13-/monix/execution/compat.scala | 2 +- .../scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala | 2 +- .../src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala | 2 +- .../shared/src/main/scala_3.0-/monix/execution/misc/Local.scala | 2 +- .../src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala | 2 +- .../scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala | 2 +- .../shared/src/main/scala_3.0/monix/execution/compat.scala | 2 +- .../shared/src/main/scala_3.0/monix/execution/misc/Local.scala | 2 +- .../shared/src/test/scala/monix/execution/AckSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/AsyncQueueSuite.scala | 2 +- .../src/test/scala/monix/execution/AsyncSemaphoreSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/AsyncVarSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/BaseLawsSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/CallbackSuite.scala | 2 +- .../src/test/scala/monix/execution/CancelableFutureSuite.scala | 2 +- .../src/test/scala/monix/execution/CancelablePromiseSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/CancelableSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/FeaturesSuite.scala | 2 +- .../src/test/scala/monix/execution/FutureUtilsSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/TestUtils.scala | 2 +- .../test/scala/monix/execution/atomic/AtomicBuilderSuite.scala | 2 +- .../test/scala/monix/execution/atomic/AtomicNumberSuite.scala | 2 +- .../src/test/scala/monix/execution/atomic/BoxedLong.scala | 2 +- .../test/scala/monix/execution/atomic/GenericAtomicSuite.scala | 2 +- .../monix/execution/cancelables/AssignableCancelableSuite.scala | 2 +- .../monix/execution/cancelables/BooleanCancelableSuite.scala | 2 +- .../monix/execution/cancelables/ChainedCancelableSuite.scala | 2 +- .../monix/execution/cancelables/CompositeCancelableSuite.scala | 2 +- .../execution/cancelables/MultiAssignCancelableSuite.scala | 2 +- .../monix/execution/cancelables/OrderedCancelableSuite.scala | 2 +- .../monix/execution/cancelables/RefCountCancelableSuite.scala | 2 +- .../monix/execution/cancelables/SerialCancelableSuite.scala | 2 +- .../execution/cancelables/SingleAssignCancelableSuite.scala | 2 +- .../monix/execution/cancelables/StackedCancelableSuite.scala | 2 +- .../src/test/scala/monix/execution/internal/MathSuite.scala | 2 +- .../test/scala/monix/execution/internal/RingBufferSuite.scala | 2 +- .../execution/internal/collection/ChunkedArrayQueueSuite.scala | 2 +- .../execution/internal/collection/ChunkedArrayStackSuite.scala | 2 +- .../internal/collection/DropAllOnOverflowQueueSuite.scala | 2 +- .../internal/collection/DropHeadOnOverflowQueueSuite.scala | 2 +- .../test/scala/monix/execution/misc/CanBindLocalsSuite.scala | 2 +- .../shared/src/test/scala/monix/execution/misc/LocalSuite.scala | 2 +- .../src/test/scala/monix/execution/misc/ThreadLocalSuite.scala | 2 +- .../execution/rstreams/SingleAssignSubscriptionSuite.scala | 2 +- .../test/scala/monix/execution/rstreams/SubscriptionSuite.scala | 2 +- .../scala/monix/execution/schedulers/ExecutionModelSuite.scala | 2 +- .../monix/execution/schedulers/ReferenceSchedulerSuite.scala | 2 +- .../scala/monix/execution/schedulers/TestSchedulerSuite.scala | 2 +- .../monix/execution/schedulers/TracingSchedulerSuite.scala | 2 +- .../monix/execution/schedulers/TrampolineSchedulerSuite.scala | 2 +- .../execution/schedulers/UncaughtExceptionReporterSuite.scala | 2 +- .../test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala | 2 +- monix-java/src/main/scala/monix/java8/eval/package.scala | 2 +- monix-java/src/main/scala/monix/java8/execution/package.scala | 2 +- .../buffers/AbstractBackPressuredBufferedSubscriber.scala | 2 +- .../observers/buffers/BackPressuredBufferedSubscriber.scala | 2 +- .../reactive/observers/buffers/BatchedBufferedSubscriber.scala | 2 +- .../scala/monix/reactive/observers/buffers/BuildersImpl.scala | 2 +- .../reactive/observers/buffers/SyncBufferedSubscriber.scala | 2 +- .../monix/reactive/observers/buffers/CommonBufferMembers.java | 2 +- .../scala/monix/reactive/compression/CompressionException.scala | 2 +- .../monix/reactive/compression/CompressionParameters.scala | 2 +- .../monix/reactive/compression/internal/operators/Deflate.scala | 2 +- .../compression/internal/operators/DeflateOperator.scala | 2 +- .../compression/internal/operators/GunzipOperator.scala | 2 +- .../reactive/compression/internal/operators/GzipOperator.scala | 2 +- .../compression/internal/operators/InflateOperator.scala | 2 +- .../jvm/src/main/scala/monix/reactive/compression/package.scala | 2 +- .../buffers/AbstractBackPressuredBufferedSubscriber.scala | 2 +- .../observers/buffers/BackPressuredBufferedSubscriber.scala | 2 +- .../reactive/observers/buffers/BatchedBufferedSubscriber.scala | 2 +- .../scala/monix/reactive/observers/buffers/BuildersImpl.scala | 2 +- .../monix/reactive/observers/buffers/ConcurrentQueue.scala | 2 +- .../reactive/observers/buffers/DropNewBufferedSubscriber.scala | 2 +- .../reactive/observers/buffers/EvictingBufferedSubscriber.scala | 2 +- .../reactive/observers/buffers/SimpleBufferedSubscriber.scala | 2 +- .../src/test/scala/monix/reactive/BaseConcurrencySuite.scala | 2 +- .../jvm/src/test/scala/monix/reactive/SerializableSuite.scala | 2 +- .../monix/reactive/compression/BaseDecompressionSuite.scala | 2 +- .../reactive/compression/CompressionIntegrationSuite.scala | 2 +- .../scala/monix/reactive/compression/CompressionTestData.scala | 2 +- .../monix/reactive/compression/DeflateIntegrationSuite.scala | 2 +- .../scala/monix/reactive/compression/DeflateOperatorSuite.scala | 2 +- .../scala/monix/reactive/compression/DeflateTestUtils.scala | 2 +- .../scala/monix/reactive/compression/GunzipOperatorSuite.scala | 2 +- .../scala/monix/reactive/compression/GzipIntegrationTest.scala | 2 +- .../scala/monix/reactive/compression/GzipOperatorSuite.scala | 2 +- .../test/scala/monix/reactive/compression/GzipTestsUtils.scala | 2 +- .../scala/monix/reactive/compression/InflateOperatorSuite.scala | 2 +- .../consumers/LoadBalanceConsumerConcurrencySuite.scala | 2 +- .../reactive/internal/operators/ConcatMapConcurrencySuite.scala | 2 +- .../reactive/internal/operators/FlatScanConcurrencySuite.scala | 2 +- .../internal/operators/MapParallelOrderedConcurrencySuite.scala | 2 +- .../operators/MapParallelUnorderedConcurrencySuite.scala | 2 +- .../reactive/internal/operators/MapTaskConcurrencySuite.scala | 2 +- .../reactive/internal/operators/ScanTaskConcurrencySuite.scala | 2 +- .../src/test/scala/monix/reactive/issues/Issue1167Suite.scala | 2 +- .../src/test/scala/monix/reactive/issues/Issue908Suite.scala | 2 +- .../OverflowStrategyBackPressuredConcurrencySuite.scala | 2 +- .../OverflowStrategyDropNewAndSignalConcurrencySuite.scala | 2 +- .../observers/OverflowStrategyDropNewConcurrencySuite.scala | 2 +- .../observers/OverflowStrategyFailConcurrencySuite.scala | 2 +- .../observers/OverflowStrategyUnboundedConcurrencySuite.scala | 2 +- .../monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala | 2 +- .../shared/src/main/scala/monix/reactive/Consumer.scala | 2 +- .../src/main/scala/monix/reactive/MulticastStrategy.scala | 2 +- .../shared/src/main/scala/monix/reactive/Notification.scala | 2 +- .../shared/src/main/scala/monix/reactive/Observable.scala | 2 +- .../shared/src/main/scala/monix/reactive/ObservableLike.scala | 2 +- .../shared/src/main/scala/monix/reactive/Observer.scala | 2 +- .../shared/src/main/scala/monix/reactive/OverflowStrategy.scala | 2 +- monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala | 2 +- .../monix/reactive/instances/CatsProfunctorForSubject.scala | 2 +- .../reactive/internal/builders/AsyncStateActionObservable.scala | 2 +- .../internal/builders/BufferedIteratorAsObservable.scala | 2 +- .../reactive/internal/builders/CharsReaderObservable.scala | 2 +- .../reactive/internal/builders/CombineLatest2Observable.scala | 2 +- .../reactive/internal/builders/CombineLatest3Observable.scala | 2 +- .../reactive/internal/builders/CombineLatest4Observable.scala | 2 +- .../reactive/internal/builders/CombineLatest5Observable.scala | 2 +- .../reactive/internal/builders/CombineLatest6Observable.scala | 2 +- .../internal/builders/CombineLatestListObservable.scala | 2 +- .../scala/monix/reactive/internal/builders/ConsObservable.scala | 2 +- .../monix/reactive/internal/builders/CreateObservable.scala | 2 +- .../monix/reactive/internal/builders/DeferObservable.scala | 2 +- .../monix/reactive/internal/builders/EmptyObservable.scala | 2 +- .../monix/reactive/internal/builders/ErrorObservable.scala | 2 +- .../monix/reactive/internal/builders/EvalAlwaysObservable.scala | 2 +- .../monix/reactive/internal/builders/EvalOnceObservable.scala | 2 +- .../reactive/internal/builders/ExecuteAsyncObservable.scala | 2 +- .../reactive/internal/builders/ExecuteWithModelObservable.scala | 2 +- .../reactive/internal/builders/FirstStartedObservable.scala | 2 +- .../monix/reactive/internal/builders/FutureAsObservable.scala | 2 +- .../reactive/internal/builders/InputStreamObservable.scala | 2 +- .../reactive/internal/builders/Interleave2Observable.scala | 2 +- .../internal/builders/IntervalFixedDelayObservable.scala | 2 +- .../internal/builders/IntervalFixedRateObservable.scala | 2 +- .../monix/reactive/internal/builders/IterableAsObservable.scala | 2 +- .../monix/reactive/internal/builders/IteratorAsObservable.scala | 2 +- .../reactive/internal/builders/LinesReaderObservable.scala | 2 +- .../internal/builders/MergePrioritizedListObservable.scala | 2 +- .../monix/reactive/internal/builders/NeverObservable.scala | 2 +- .../scala/monix/reactive/internal/builders/NowObservable.scala | 2 +- .../reactive/internal/builders/PaginateEvalObservable.scala | 2 +- .../monix/reactive/internal/builders/PaginateObservable.scala | 2 +- .../internal/builders/PipeThroughSelectorObservable.scala | 2 +- .../monix/reactive/internal/builders/RangeObservable.scala | 2 +- .../monix/reactive/internal/builders/ReactiveObservable.scala | 2 +- .../monix/reactive/internal/builders/RepeatEvalObservable.scala | 2 +- .../monix/reactive/internal/builders/RepeatObservable.scala | 2 +- .../monix/reactive/internal/builders/RepeatOneObservable.scala | 2 +- .../reactive/internal/builders/RepeatedValueObservable.scala | 2 +- .../reactive/internal/builders/ResourceCaseObservable.scala | 2 +- .../monix/reactive/internal/builders/RunnableObservable.scala | 2 +- .../reactive/internal/builders/StateActionObservable.scala | 2 +- .../monix/reactive/internal/builders/TailRecMObservable.scala | 2 +- .../monix/reactive/internal/builders/TaskAsObservable.scala | 2 +- .../monix/reactive/internal/builders/UnfoldEvalObservable.scala | 2 +- .../monix/reactive/internal/builders/UnfoldObservable.scala | 2 +- .../reactive/internal/builders/UnsafeCreateObservable.scala | 2 +- .../scala/monix/reactive/internal/builders/Zip2Observable.scala | 2 +- .../scala/monix/reactive/internal/builders/Zip3Observable.scala | 2 +- .../scala/monix/reactive/internal/builders/Zip4Observable.scala | 2 +- .../scala/monix/reactive/internal/builders/Zip5Observable.scala | 2 +- .../scala/monix/reactive/internal/builders/Zip6Observable.scala | 2 +- .../monix/reactive/internal/consumers/CancelledConsumer.scala | 2 +- .../monix/reactive/internal/consumers/CompleteConsumer.scala | 2 +- .../monix/reactive/internal/consumers/ContraMapConsumer.scala | 2 +- .../monix/reactive/internal/consumers/CreateConsumer.scala | 2 +- .../reactive/internal/consumers/FirstNotificationConsumer.scala | 2 +- .../monix/reactive/internal/consumers/FoldLeftConsumer.scala | 2 +- .../reactive/internal/consumers/FoldLeftTaskConsumer.scala | 2 +- .../reactive/internal/consumers/ForeachAsyncConsumer.scala | 2 +- .../monix/reactive/internal/consumers/ForeachConsumer.scala | 2 +- .../reactive/internal/consumers/FromObserverConsumer.scala | 2 +- .../scala/monix/reactive/internal/consumers/HeadConsumer.scala | 2 +- .../monix/reactive/internal/consumers/HeadOptionConsumer.scala | 2 +- .../monix/reactive/internal/consumers/LoadBalanceConsumer.scala | 2 +- .../scala/monix/reactive/internal/consumers/MapConsumer.scala | 2 +- .../monix/reactive/internal/consumers/MapTaskConsumer.scala | 2 +- .../monix/reactive/internal/consumers/RaiseErrorConsumer.scala | 2 +- .../reactive/internal/consumers/TransformInputConsumer.scala | 2 +- .../internal/deprecated/ObservableDeprecatedBuilders.scala | 2 +- .../internal/deprecated/ObservableDeprecatedMethods.scala | 2 +- .../reactive/internal/operators/AsyncBoundaryOperator.scala | 2 +- .../internal/operators/BufferIntrospectiveObservable.scala | 2 +- .../reactive/internal/operators/BufferSlidingOperator.scala | 2 +- .../reactive/internal/operators/BufferTimedObservable.scala | 2 +- .../monix/reactive/internal/operators/BufferWhileOperator.scala | 2 +- .../internal/operators/BufferWithSelectorObservable.scala | 2 +- .../monix/reactive/internal/operators/CollectOperator.scala | 2 +- .../reactive/internal/operators/CollectWhileOperator.scala | 2 +- .../monix/reactive/internal/operators/CompletedOperator.scala | 2 +- .../reactive/internal/operators/ConcatMapIterableOperator.scala | 2 +- .../monix/reactive/internal/operators/ConcatMapObservable.scala | 2 +- .../monix/reactive/internal/operators/ConcatObservable.scala | 2 +- .../scala/monix/reactive/internal/operators/CountOperator.scala | 2 +- .../monix/reactive/internal/operators/DebounceObservable.scala | 2 +- .../reactive/internal/operators/DefaultIfEmptyOperator.scala | 2 +- .../reactive/internal/operators/DelayBySelectorObservable.scala | 2 +- .../reactive/internal/operators/DelayByTimespanObservable.scala | 2 +- .../internal/operators/DelayExecutionByTimespanObservable.scala | 2 +- .../operators/DelayExecutionWithTriggerObservable.scala | 2 +- .../reactive/internal/operators/DelayOnCompleteObservable.scala | 2 +- .../reactive/internal/operators/DematerializeOperator.scala | 2 +- .../internal/operators/DistinctUntilChangedByKeyOperator.scala | 2 +- .../internal/operators/DistinctUntilChangedOperator.scala | 2 +- .../reactive/internal/operators/DoOnCompleteOperator.scala | 2 +- .../reactive/internal/operators/DoOnEarlyStopOperator.scala | 2 +- .../monix/reactive/internal/operators/DoOnErrorOperator.scala | 2 +- .../monix/reactive/internal/operators/DoOnNextAckOperator.scala | 2 +- .../monix/reactive/internal/operators/DoOnStartOperator.scala | 2 +- .../reactive/internal/operators/DoOnSubscribeObservable.scala | 2 +- .../internal/operators/DoOnSubscriptionCancelObservable.scala | 2 +- .../reactive/internal/operators/DoOnTerminateOperator.scala | 2 +- .../internal/operators/DownstreamTimeoutObservable.scala | 2 +- .../reactive/internal/operators/DropByPredicateOperator.scala | 2 +- .../internal/operators/DropByPredicateWithIndexOperator.scala | 2 +- .../reactive/internal/operators/DropByTimespanObservable.scala | 2 +- .../monix/reactive/internal/operators/DropFirstOperator.scala | 2 +- .../monix/reactive/internal/operators/DropLastOperator.scala | 2 +- .../monix/reactive/internal/operators/DropUntilObservable.scala | 2 +- .../monix/reactive/internal/operators/DumpObservable.scala | 2 +- .../monix/reactive/internal/operators/EchoObservable.scala | 2 +- .../reactive/internal/operators/EndWithErrorOperator.scala | 2 +- .../monix/reactive/internal/operators/ExecuteOnObservable.scala | 2 +- .../monix/reactive/internal/operators/FailedOperator.scala | 2 +- .../monix/reactive/internal/operators/FilterOperator.scala | 2 +- .../monix/reactive/internal/operators/FlatScanObservable.scala | 2 +- .../monix/reactive/internal/operators/FoldLeftObservable.scala | 2 +- .../reactive/internal/operators/FoldWhileLeftObservable.scala | 2 +- .../monix/reactive/internal/operators/GroupByOperator.scala | 2 +- .../reactive/internal/operators/GuaranteeCaseObservable.scala | 2 +- .../reactive/internal/operators/IntersperseObservable.scala | 2 +- .../monix/reactive/internal/operators/IsEmptyOperator.scala | 2 +- .../reactive/internal/operators/LiftByOperatorObservable.scala | 2 +- .../reactive/internal/operators/MapAccumulateObservable.scala | 2 +- .../scala/monix/reactive/internal/operators/MapOperator.scala | 2 +- .../internal/operators/MapParallelOrderedObservable.scala | 2 +- .../internal/operators/MapParallelUnorderedObservable.scala | 2 +- .../monix/reactive/internal/operators/MapTaskObservable.scala | 2 +- .../monix/reactive/internal/operators/MaterializeOperator.scala | 2 +- .../monix/reactive/internal/operators/MergeMapObservable.scala | 2 +- .../monix/reactive/internal/operators/ObserveOnObservable.scala | 2 +- .../internal/operators/OnCancelTriggerErrorObservable.scala | 2 +- .../internal/operators/OnErrorRecoverWithObservable.scala | 2 +- .../internal/operators/OnErrorRetryCountedObservable.scala | 2 +- .../reactive/internal/operators/OnErrorRetryIfObservable.scala | 2 +- .../reactive/internal/operators/PipeThroughObservable.scala | 2 +- .../monix/reactive/internal/operators/ReduceOperator.scala | 2 +- .../reactive/internal/operators/RepeatSourceObservable.scala | 2 +- .../reactive/internal/operators/RestartUntilObservable.scala | 2 +- .../monix/reactive/internal/operators/ScanObservable.scala | 2 +- .../monix/reactive/internal/operators/ScanTaskObservable.scala | 2 +- .../reactive/internal/operators/SearchByOrderOperator.scala | 2 +- .../reactive/internal/operators/SubscribeOnObservable.scala | 2 +- .../reactive/internal/operators/SwitchIfEmptyObservable.scala | 2 +- .../monix/reactive/internal/operators/SwitchMapObservable.scala | 2 +- .../reactive/internal/operators/TakeByPredicateOperator.scala | 2 +- .../reactive/internal/operators/TakeEveryNthOperator.scala | 2 +- .../monix/reactive/internal/operators/TakeLastObservable.scala | 2 +- .../internal/operators/TakeLeftByTimespanObservable.scala | 2 +- .../monix/reactive/internal/operators/TakeLeftOperator.scala | 2 +- .../monix/reactive/internal/operators/TakeUntilObservable.scala | 2 +- .../internal/operators/TakeWhileNotCanceledOperator.scala | 2 +- .../reactive/internal/operators/ThrottleFirstOperator.scala | 2 +- .../reactive/internal/operators/ThrottleLastObservable.scala | 2 +- .../reactive/internal/operators/ThrottleLatestObservable.scala | 2 +- .../reactive/internal/operators/UncancelableObservable.scala | 2 +- .../reactive/internal/operators/UpstreamTimeoutObservable.scala | 2 +- .../internal/operators/WhileBusyAggregateEventsOperator.scala | 2 +- .../operators/WhileBusyDropEventsAndSignalOperator.scala | 2 +- .../internal/operators/WhileBusyDropEventsOperator.scala | 2 +- .../reactive/internal/operators/WithLatestFromObservable.scala | 2 +- .../reactive/internal/operators/ZipWithIndexOperator.scala | 2 +- .../internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala | 2 +- .../internal/rstreams/SubscriberAsReactiveSubscriber.scala | 2 +- .../monix/reactive/internal/subscribers/ForeachSubscriber.scala | 2 +- .../src/main/scala/monix/reactive/internal/util/Instances.scala | 2 +- .../scala/monix/reactive/internal/util/PromiseCounter.scala | 2 +- .../scala/monix/reactive/observables/CachedObservable.scala | 2 +- .../scala/monix/reactive/observables/ChainedObservable.scala | 2 +- .../scala/monix/reactive/observables/CombineObservable.scala | 2 +- .../monix/reactive/observables/ConnectableObservable.scala | 2 +- .../scala/monix/reactive/observables/GroupedObservable.scala | 2 +- .../scala/monix/reactive/observables/RefCountObservable.scala | 2 +- .../scala/monix/reactive/observers/BufferedSubscriber.scala | 2 +- .../monix/reactive/observers/CacheUntilConnectSubscriber.scala | 2 +- .../scala/monix/reactive/observers/ConnectableSubscriber.scala | 2 +- .../main/scala/monix/reactive/observers/SafeSubscriber.scala | 2 +- .../src/main/scala/monix/reactive/observers/Subscriber.scala | 2 +- .../main/scala/monix/reactive/observers/buffers/package.scala | 2 +- .../src/main/scala/monix/reactive/subjects/AsyncSubject.scala | 2 +- .../main/scala/monix/reactive/subjects/BehaviorSubject.scala | 2 +- .../main/scala/monix/reactive/subjects/ConcurrentSubject.scala | 2 +- .../src/main/scala/monix/reactive/subjects/PublishSubject.scala | 2 +- .../scala/monix/reactive/subjects/PublishToOneSubject.scala | 2 +- .../src/main/scala/monix/reactive/subjects/ReplaySubject.scala | 2 +- .../shared/src/main/scala/monix/reactive/subjects/Subject.scala | 2 +- .../shared/src/main/scala/monix/reactive/subjects/Var.scala | 2 +- .../shared/src/test/scala/monix/reactive/BaseTestSuite.scala | 2 +- .../scala/monix/reactive/ObservableLikeConversionsSuite.scala | 2 +- .../shared/src/test/scala/monix/reactive/PipeSuite.scala | 2 +- .../scala/monix/reactive/TypeClassLawsForConsumerSuite.scala | 2 +- .../scala/monix/reactive/TypeClassLawsForObservableSuite.scala | 2 +- .../scala/monix/reactive/TypeClassLawsForSubjectSuite.scala | 2 +- .../scala/monix/reactive/consumers/CancelConsumerSuite.scala | 2 +- .../scala/monix/reactive/consumers/CompleteConsumerSuite.scala | 2 +- .../scala/monix/reactive/consumers/ContramapConsumerSuite.scala | 2 +- .../reactive/consumers/FirstNotificationConsumerSuite.scala | 2 +- .../scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala | 2 +- .../monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala | 2 +- .../monix/reactive/consumers/ForeachAsyncConsumerSuite.scala | 2 +- .../scala/monix/reactive/consumers/ForeachConsumerSuite.scala | 2 +- .../reactive/consumers/ForeachParallelAsyncConsumerSuite.scala | 2 +- .../monix/reactive/consumers/ForeachParallelConsumerSuite.scala | 2 +- .../monix/reactive/consumers/FromObserverConsumerSuite.scala | 2 +- .../test/scala/monix/reactive/consumers/HeadConsumerSuite.scala | 2 +- .../monix/reactive/consumers/HeadOptionConsumerSuite.scala | 2 +- .../test/scala/monix/reactive/consumers/ListConsumerSuite.scala | 2 +- .../monix/reactive/consumers/LoadBalanceConsumerSuite.scala | 2 +- .../test/scala/monix/reactive/consumers/MapConsumerSuite.scala | 2 +- .../scala/monix/reactive/consumers/MapEvalConsumerSuite.scala | 2 +- .../scala/monix/reactive/consumers/MapTaskConsumerSuite.scala | 2 +- .../monix/reactive/consumers/RaiseErrorConsumerSuite.scala | 2 +- .../monix/reactive/consumers/TransformInputConsumerSuite.scala | 2 +- .../internal/builders/AsyncStateActionObservableSuite.scala | 2 +- .../reactive/internal/builders/BracketObservableSuite.scala | 2 +- .../internal/builders/BufferedIteratorAsObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/CatsConversionsSuite.scala | 2 +- .../reactive/internal/builders/CharsReaderObservableSuite.scala | 2 +- .../reactive/internal/builders/CreateObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/EmptyObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/ErrorObservableSuite.scala | 2 +- .../reactive/internal/builders/EvalAlwaysObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/EvalObservableSuite.scala | 2 +- .../reactive/internal/builders/EvalOnceObservableSuite.scala | 2 +- .../internal/builders/ExecuteAsyncObservableSuite.scala | 2 +- .../internal/builders/FirstStartedObservableSuite.scala | 2 +- .../internal/builders/FromResourceObservableSuite.scala | 2 +- .../reactive/internal/builders/FutureAsObservableSuite.scala | 2 +- .../reactive/internal/builders/InputStreamObservableSuite.scala | 2 +- .../reactive/internal/builders/IntervalObservableSuite.scala | 2 +- .../reactive/internal/builders/IterableAsObservableSuite.scala | 2 +- .../reactive/internal/builders/IteratorAsObservableSuite.scala | 2 +- .../reactive/internal/builders/LinesReaderObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/NeverObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/NowObservableSuite.scala | 2 +- .../internal/builders/PaginateEvalObservableSuite.scala | 2 +- .../reactive/internal/builders/PaginateObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/RangeObservableSuite.scala | 2 +- .../monix/reactive/internal/builders/RepeatEvalFSuite.scala | 2 +- .../reactive/internal/builders/RepeatEvalObservableSuite.scala | 2 +- .../reactive/internal/builders/RepeatOneObservableSuite.scala | 2 +- .../internal/builders/RepeatedValueObservableSuite.scala | 2 +- .../internal/builders/ResourceCaseObservableSuite.scala | 2 +- .../reactive/internal/builders/StateActionObservableSuite.scala | 2 +- .../reactive/internal/builders/UnfoldEvalObservableSuite.scala | 2 +- .../reactive/internal/builders/UnfoldObservableSuite.scala | 2 +- .../internal/builders/UnsafeCreateObservableSuite.scala | 2 +- .../monix/reactive/internal/operators/AsyncBoundarySuite.scala | 2 +- .../monix/reactive/internal/operators/BaseOperatorSuite.scala | 2 +- .../reactive/internal/operators/BufferIntrospectiveSuite.scala | 2 +- .../reactive/internal/operators/BufferSlidingDropSuite.scala | 2 +- .../reactive/internal/operators/BufferSlidingOverlapSuite.scala | 2 +- .../monix/reactive/internal/operators/BufferSlidingSuite.scala | 2 +- .../reactive/internal/operators/BufferTimedOrCountedSuite.scala | 2 +- .../monix/reactive/internal/operators/BufferTimedSuite.scala | 2 +- .../monix/reactive/internal/operators/BufferTumblingSuite.scala | 2 +- .../reactive/internal/operators/BufferWhileInclusiveSuite.scala | 2 +- .../monix/reactive/internal/operators/BufferWhileSuite.scala | 2 +- .../reactive/internal/operators/BufferWithSelectorSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/CacheSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/CollectSuite.scala | 2 +- .../monix/reactive/internal/operators/CollectWhileSuite.scala | 2 +- .../monix/reactive/internal/operators/CombineLatest2Suite.scala | 2 +- .../monix/reactive/internal/operators/CombineLatest3Suite.scala | 2 +- .../monix/reactive/internal/operators/CombineLatest4Suite.scala | 2 +- .../monix/reactive/internal/operators/CombineLatest5Suite.scala | 2 +- .../monix/reactive/internal/operators/CombineLatest6Suite.scala | 2 +- .../reactive/internal/operators/CombineLatestListSuite.scala | 2 +- .../reactive/internal/operators/ConcatCancellationSuite.scala | 2 +- .../reactive/internal/operators/ConcatDelayErrorsSuite.scala | 2 +- .../monix/reactive/internal/operators/ConcatManySuite.scala | 2 +- .../reactive/internal/operators/ConcatMapIterableSuite.scala | 2 +- .../monix/reactive/internal/operators/ConcatOneSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/CountSuite.scala | 2 +- .../reactive/internal/operators/DebounceFlattenSuite.scala | 2 +- .../reactive/internal/operators/DebounceRepeatedSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/DebounceSuite.scala | 2 +- .../reactive/internal/operators/DelayBySelectorSuite.scala | 2 +- .../reactive/internal/operators/DelayByTimespanSuite.scala | 2 +- .../monix/reactive/internal/operators/DelayExecutionSuite.scala | 2 +- .../reactive/internal/operators/DelayExecutionWithSuite.scala | 2 +- .../reactive/internal/operators/DelayOnCompleteSuite.scala | 2 +- .../monix/reactive/internal/operators/DematerializeSuite.scala | 2 +- .../internal/operators/DistinctUntilChangedByKeySuite.scala | 2 +- .../reactive/internal/operators/DistinctUntilChangedSuite.scala | 2 +- .../monix/reactive/internal/operators/DoOnCompleteSuite.scala | 2 +- .../monix/reactive/internal/operators/DoOnEarlyStopSuite.scala | 2 +- .../monix/reactive/internal/operators/DoOnErrorSuite.scala | 2 +- .../monix/reactive/internal/operators/DoOnNextAckSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/DoOnNextSuite.scala | 2 +- .../monix/reactive/internal/operators/DoOnStartSuite.scala | 2 +- .../monix/reactive/internal/operators/DoOnSubscribeSuite.scala | 2 +- .../internal/operators/DoOnSubscriptionCancelSuite.scala | 2 +- .../internal/operators/DropByPredicateInclusiveSuite.scala | 2 +- .../reactive/internal/operators/DropByPredicateSuite.scala | 2 +- .../internal/operators/DropByPredicateWithIndexSuite.scala | 2 +- .../monix/reactive/internal/operators/DropByTimespanSuite.scala | 2 +- .../monix/reactive/internal/operators/DropFirstSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/DropLastSuite.scala | 2 +- .../monix/reactive/internal/operators/DropUntilSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/DumpSuite.scala | 2 +- .../monix/reactive/internal/operators/EchoRepeatedSuite.scala | 2 +- .../monix/reactive/internal/operators/EndWithErrorSuite.scala | 2 +- .../reactive/internal/operators/ExecuteOnObservableSuite.scala | 2 +- .../monix/reactive/internal/operators/ExecuteOnSuite.scala | 2 +- .../monix/reactive/internal/operators/FilterNotSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/FilterSuite.scala | 2 +- .../reactive/internal/operators/FlatScanDelayErrorSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/FlatScanSuite.scala | 2 +- .../reactive/internal/operators/FoldLeftObservableSuite.scala | 2 +- .../reactive/internal/operators/FoldWhileObservableSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/GroupBySuite.scala | 2 +- .../monix/reactive/internal/operators/GuaranteeCaseSuite.scala | 2 +- .../monix/reactive/internal/operators/Interleave2Suite.scala | 2 +- .../monix/reactive/internal/operators/IntersperseSuite.scala | 2 +- .../monix/reactive/internal/operators/MapAccumulateSuite.scala | 2 +- .../monix/reactive/internal/operators/MapEffectSuite.scala | 2 +- .../reactive/internal/operators/MapParallelOrderedSuite.scala | 2 +- .../reactive/internal/operators/MapParallelUnorderedSuite.scala | 2 +- .../test/scala/monix/reactive/internal/operators/MapSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/MapTaskSuite.scala | 2 +- .../monix/reactive/internal/operators/MaterializeSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/MaxBySuite.scala | 2 +- .../test/scala/monix/reactive/internal/operators/MaxSuite.scala | 2 +- .../reactive/internal/operators/MergeDelayErrorManySuite.scala | 2 +- .../reactive/internal/operators/MergeDelayErrorOneSuite.scala | 2 +- .../monix/reactive/internal/operators/MergeManySuite.scala | 2 +- .../scala/monix/reactive/internal/operators/MergeOneSuite.scala | 2 +- .../reactive/internal/operators/MergePrioritizedListSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/MinBySuite.scala | 2 +- .../test/scala/monix/reactive/internal/operators/MinSuite.scala | 2 +- .../monix/reactive/internal/operators/MiscCompleteSuite.scala | 2 +- .../reactive/internal/operators/MiscDefaultIfEmptySuite.scala | 2 +- .../monix/reactive/internal/operators/MiscFailedSuite.scala | 2 +- .../monix/reactive/internal/operators/MiscIsEmptySuite.scala | 2 +- .../monix/reactive/internal/operators/MiscNonEmptySuite.scala | 2 +- .../internal/operators/ObservableOpsReturningTaskSuite.scala | 2 +- .../monix/reactive/internal/operators/ObserveOnSuite.scala | 2 +- .../reactive/internal/operators/OnCancelTriggerErrorSuite.scala | 2 +- .../reactive/internal/operators/OnErrorFallbackToSuite.scala | 2 +- .../reactive/internal/operators/OnErrorRecoverWithSuite.scala | 2 +- .../reactive/internal/operators/OnErrorRetryCountedSuite.scala | 2 +- .../monix/reactive/internal/operators/OnErrorRetryIfSuite.scala | 2 +- .../internal/operators/OnErrorRetryUnlimitedSuite.scala | 2 +- .../monix/reactive/internal/operators/PipeThroughSuite.scala | 2 +- .../reactive/internal/operators/PublishSelectorSuite.scala | 2 +- .../reactive/internal/operators/RecursiveConcatSuite.scala | 2 +- .../monix/reactive/internal/operators/RecursiveConsSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/ReduceSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/RepeatSuite.scala | 2 +- .../monix/reactive/internal/operators/SampleOnceSuite.scala | 2 +- .../monix/reactive/internal/operators/SampleRepeatedSuite.scala | 2 +- .../monix/reactive/internal/operators/ScanEffectSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/ScanMapSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/ScanSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/ScanTaskSuite.scala | 2 +- .../test/scala/monix/reactive/internal/operators/SumSuite.scala | 2 +- .../monix/reactive/internal/operators/SwitchIfEmptySuite.scala | 2 +- .../monix/reactive/internal/operators/SwitchMapSuite.scala | 2 +- .../internal/operators/TakeByPredicateInclusiveSuite.scala | 2 +- .../reactive/internal/operators/TakeByPredicateSuite.scala | 2 +- .../monix/reactive/internal/operators/TakeByTimespanSuite.scala | 2 +- .../reactive/internal/operators/TakeEveryNthOperatorSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/TakeLastSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/TakeLeftSuite.scala | 2 +- .../reactive/internal/operators/TakeUntilObservableSuite.scala | 2 +- .../reactive/internal/operators/TakeWhileNotCanceledSuite.scala | 2 +- .../monix/reactive/internal/operators/ThrottleFirstSuite.scala | 2 +- .../monix/reactive/internal/operators/ThrottleLatestSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/ThrottleSuite.scala | 2 +- .../internal/operators/TimeoutOnSlowDownstreamSuite.scala | 2 +- .../internal/operators/TimeoutOnSlowUpstreamSuite.scala | 2 +- .../monix/reactive/internal/operators/TransformerSuite.scala | 2 +- .../monix/reactive/internal/operators/UncancelableSuite.scala | 2 +- .../operators/WhileBusyAggregateEventsOperatorSuite.scala | 2 +- .../operators/WhileBusyDropEventsAndSignalOverflowSuite.scala | 2 +- .../reactive/internal/operators/WhileBusyDropEventsSuite.scala | 2 +- .../reactive/internal/operators/WithLatestFrom2Suite.scala | 2 +- .../reactive/internal/operators/WithLatestFrom3Suite.scala | 2 +- .../reactive/internal/operators/WithLatestFrom4Suite.scala | 2 +- .../reactive/internal/operators/WithLatestFrom5Suite.scala | 2 +- .../reactive/internal/operators/WithLatestFrom6Suite.scala | 2 +- .../monix/reactive/internal/operators/WithLatestFromSuite.scala | 2 +- .../scala/monix/reactive/internal/operators/Zip2Suite.scala | 2 +- .../scala/monix/reactive/internal/operators/Zip3Suite.scala | 2 +- .../scala/monix/reactive/internal/operators/Zip4Suite.scala | 2 +- .../scala/monix/reactive/internal/operators/Zip5Suite.scala | 2 +- .../scala/monix/reactive/internal/operators/Zip6Suite.scala | 2 +- .../scala/monix/reactive/internal/operators/ZipListSuite.scala | 2 +- .../monix/reactive/internal/operators/ZipWithIndexSuite.scala | 2 +- .../internal/rstreams/MonixSubscriberAsReactiveSuite.scala | 2 +- .../reactive/internal/rstreams/ObservableIsPublisherSuite.scala | 2 +- .../reactive/internal/rstreams/PublisherIsObservableSuite.scala | 2 +- .../reactive/internal/subscribers/ObservableForeachSuite.scala | 2 +- .../monix/reactive/observables/ChainedObservableSuite.scala | 2 +- .../monix/reactive/observables/ConnectableObservableSuite.scala | 2 +- .../monix/reactive/observables/RefCountObservableSuite.scala | 2 +- .../monix/reactive/observers/ConnectableSubscriberSuite.scala | 2 +- .../scala/monix/reactive/observers/ContramapObserverSuite.scala | 2 +- .../monix/reactive/observers/ContramapSubscriberSuite.scala | 2 +- .../test/scala/monix/reactive/observers/DumpObserverSuite.scala | 2 +- .../test/scala/monix/reactive/observers/ObserverFeedSuite.scala | 2 +- .../observers/OverflowStrategyBackPressureBatchedSuite.scala | 2 +- .../reactive/observers/OverflowStrategyBackPressureSuite.scala | 2 +- .../observers/OverflowStrategyClearBufferAndSignalSuite.scala | 2 +- .../reactive/observers/OverflowStrategyClearBufferSuite.scala | 2 +- .../observers/OverflowStrategyDropNewAndSignalSuite.scala | 2 +- .../monix/reactive/observers/OverflowStrategyDropNewSuite.scala | 2 +- .../observers/OverflowStrategyDropOldAndSignalSuite.scala | 2 +- .../monix/reactive/observers/OverflowStrategyDropOldSuite.scala | 2 +- .../monix/reactive/observers/OverflowStrategyFailSuite.scala | 2 +- .../reactive/observers/OverflowStrategyUnboundedSuite.scala | 2 +- .../scala/monix/reactive/observers/SafeSubscriberSuite.scala | 2 +- .../scala/monix/reactive/observers/StoppedObserverSuite.scala | 2 +- .../scala/monix/reactive/observers/SubscriberFeedSuite.scala | 2 +- .../test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala | 2 +- .../monix/reactive/subjects/BaseConcurrentSubjectSuite.scala | 2 +- .../test/scala/monix/reactive/subjects/BaseSubjectSuite.scala | 2 +- .../scala/monix/reactive/subjects/BehaviorSubjectSuite.scala | 2 +- .../monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala | 2 +- .../reactive/subjects/ConcurrentBehaviorSubjectSuite.scala | 2 +- .../monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala | 2 +- .../reactive/subjects/ConcurrentReplayLimitedSubjectSuite.scala | 2 +- .../monix/reactive/subjects/ConcurrentReplaySubjectSuite.scala | 2 +- .../scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala | 2 +- .../scala/monix/reactive/subjects/PublishSubjectSuite.scala | 2 +- .../test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala | 2 +- .../src/test/scala/monix/reactive/subjects/VarSuite.scala | 2 +- monix-tail/shared/src/main/scala/monix/tail/Iterant.scala | 2 +- .../shared/src/main/scala/monix/tail/IterantBuilders.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/ArrayBatch.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/ArrayCursor.scala | 2 +- monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/BatchCursor.scala | 2 +- .../src/main/scala/monix/tail/batches/BooleansBatch.scala | 2 +- .../src/main/scala/monix/tail/batches/BooleansCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/BytesBatch.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/BytesCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/CharsBatch.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/CharsCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/DoublesBatch.scala | 2 +- .../src/main/scala/monix/tail/batches/DoublesCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/EmptyBatch.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/EmptyCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/GenericBatch.scala | 2 +- .../src/main/scala/monix/tail/batches/GenericCursor.scala | 2 +- .../src/main/scala/monix/tail/batches/IntegersBatch.scala | 2 +- .../src/main/scala/monix/tail/batches/IntegersCursor.scala | 2 +- .../src/main/scala/monix/tail/batches/IteratorCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/LongsBatch.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/LongsCursor.scala | 2 +- .../shared/src/main/scala/monix/tail/batches/SeqBatch.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/AndThen.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/Constants.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantAttempt.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantBuffer.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantCollect.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantCompleteL.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantConcat.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantConsume.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantDeprecated.scala | 2 +- .../scala/monix/tail/internal/IterantDistinctUntilChanged.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/IterantDrop.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantDropLast.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantDropWhile.scala | 2 +- .../scala/monix/tail/internal/IterantDropWhileWithIndex.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/IterantDump.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantFilter.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantFoldLeftL.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantFoldRightL.scala | 2 +- .../main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala | 2 +- .../main/scala/monix/tail/internal/IterantFromConsumer.scala | 2 +- .../monix/tail/internal/IterantFromReactivePublisher.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantHeadOptionL.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantInterleave.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantIntersperse.scala | 2 +- .../scala/monix/tail/internal/IterantIntervalAtFixedRate.scala | 2 +- .../monix/tail/internal/IterantIntervalWithFixedDelay.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantLiftMap.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/IterantMap.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantMapBatch.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantMapEval.scala | 2 +- .../scala/monix/tail/internal/IterantOnErrorHandleWith.scala | 2 +- .../main/scala/monix/tail/internal/IterantPushToChannel.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantReduce.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantRepeat.scala | 2 +- .../main/scala/monix/tail/internal/IterantRetryIfEmpty.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/IterantScan.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantScanEval.scala | 2 +- .../main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/IterantTail.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/IterantTake.scala | 2 +- .../main/scala/monix/tail/internal/IterantTakeEveryNth.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantTakeLast.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantTakeWhile.scala | 2 +- .../scala/monix/tail/internal/IterantTakeWhileWithIndex.scala | 2 +- .../scala/monix/tail/internal/IterantToReactivePublisher.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantUncons.scala | 2 +- .../src/main/scala/monix/tail/internal/IterantZipMap.scala | 2 +- .../main/scala/monix/tail/internal/IterantZipWithIndex.scala | 2 +- .../shared/src/main/scala/monix/tail/internal/package.scala | 2 +- monix-tail/shared/src/test/scala/monix/tail/AndThenSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/ArbitraryInstances.scala | 2 +- monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala | 2 +- monix-tail/shared/src/test/scala/monix/tail/BaseTestSuite.scala | 2 +- .../src/test/scala/monix/tail/BatchCursorBuildersSuite.scala | 2 +- .../src/test/scala/monix/tail/BatchCursorEmptySuite.scala | 2 +- .../shared/src/test/scala/monix/tail/BatchCursorSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/BatchEmptySuite.scala | 2 +- monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala | 2 +- .../src/test/scala/monix/tail/IntervalIntervalSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantBasicSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantBufferSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantChannelSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantCollectSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantCompleteLSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantConcatSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantConsumeSuite.scala | 2 +- .../scala/monix/tail/IterantDistinctUntilChangedSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantDropLastSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantDropSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantDropWhileSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantDumpSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantFilterSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantFoldRightSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantFromIterableSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantFromListSuite.scala | 2 +- .../scala/monix/tail/IterantFromReactivePublisherSuite.scala | 2 +- .../scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantFromResourceSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantFromStateActionSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantHeadOptionSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantInterleaveSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantIntersperseSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantLastOptionSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantMapSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantRangesSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantReduceSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantRepeatSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantResourceSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantScanMapSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantScanSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantStatesSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantTailSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantTakeSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantTakeWhileSuite.scala | 2 +- .../test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala | 2 +- .../test/scala/monix/tail/IterantToReactivePublisherSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantUnconsSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/IterantZipMapSuite.scala | 2 +- .../src/test/scala/monix/tail/IterantZipWithIndexSuite.scala | 2 +- .../shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala | 2 +- .../shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala | 2 +- .../scala/monix/tail/TypeClassLawsForIterantCoevalSuite.scala | 2 +- .../test/scala/monix/tail/TypeClassLawsForIterantIOSuite.scala | 2 +- .../scala/monix/tail/TypeClassLawsForIterantTaskSuite.scala | 2 +- monix/shared/src/main/scala/monix/package.scala | 2 +- 1146 files changed, 1146 insertions(+), 1146 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cbb32eba2..be02012b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ The Monix project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with Apache 2.0 -(see LICENSE.txt). +(see `LICENSE.txt`). ## Code of Conduct diff --git a/README.md b/README.md index e8ba65d7a..722771b83 100644 --- a/README.md +++ b/README.md @@ -155,4 +155,4 @@ Submit a PR ❤️ ## License All code in this repository is licensed under the Apache License, -Version 2.0. See [LICENCE.txt](./LICENSE.txt). +Version 2.0. See [LICENSE](./LICENSE.txt). diff --git a/build.sbt b/build.sbt index 579e567ac..699549ee0 100644 --- a/build.sbt +++ b/build.sbt @@ -277,7 +277,7 @@ lazy val sharedSettings = pgpSettings ++ Seq( licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), homepage := Some(url("https://monix.io")), headerLicense := Some(HeaderLicense.Custom(""" - |Copyright (c) 2014-2021 by The Monix Project Developers. + |Copyright (c) 2014-2022 Monix Contributors. |See the project homepage at: https://monix.io | |Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/js/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/js/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala index fa235fe9b..fa0d4a7fd 100644 --- a/monix-catnap/js/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala +++ b/monix-catnap/js/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala index 9838d8d4a..f9804b54c 100644 --- a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala +++ b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala index 9639da0b0..d0c07e961 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala index 4b606ffc6..70cc77eed 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentChannelJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentQueueJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentQueueJVMSuite.scala index 27b4fcc4c..be46a6bce 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentQueueJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/ConcurrentQueueJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala index 2300585ef..d15582156 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/FutureLiftJava8Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala index fe3f59f6a..e2756e8d5 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/MVarJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala index 50dedb21e..696c9d7a2 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/SemaphoreJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala index 796773b7f..ff5a83131 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ChannelF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ChannelF.scala index 44557eb94..7f7626283 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ChannelF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ChannelF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala index 0c7ebf5d0..bc545dcfe 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala index 25b4933da..a9ad06807 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala index 9f94fc00a..888e68512 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala index 3d978d96e..539524a9b 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConsumerF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala index 872546af3..9743c65fe 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala index bbdccef2f..aaf362317 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala b/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala index c0d3debee..26148f125 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ProducerF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ProducerF.scala index c6a0cb759..25cfe3d9d 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ProducerF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ProducerF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala b/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala index 1c3b5389f..b424b8323 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/SchedulerEffect.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala index ee66f0f33..7881f14f9 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala index 257bea47a..a608baba4 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala index fc0debc35..06770a818 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala index 0e85ecc5b..b73075599 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala index d41b4dcde..d6f38a6b5 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/AsyncUtils.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala index 2b61c497f..178ed57e0 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/ParallelApplicative.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala index 8bd01ddac..ec8f4da1a 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/syntax.scala b/monix-catnap/shared/src/main/scala/monix/catnap/syntax.scala index 2b095894c..c582b1631 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/syntax.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/syntax.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala b/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala index da23db36b..f423d2be5 100644 --- a/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala +++ b/monix-catnap/shared/src/main/scala/monix/execution/CancelableFutureCatsInstances.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/main/scala/monix/execution/package.scala b/monix-catnap/shared/src/main/scala/monix/execution/package.scala index b14e56e5e..5b5a529bb 100644 --- a/monix-catnap/shared/src/main/scala/monix/execution/package.scala +++ b/monix-catnap/shared/src/main/scala/monix/execution/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala index 388c030ab..b89fe523d 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala index 1bcc5cc03..3948cf178 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala index 84ad11fe1..15e39a676 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala index 8d26e195b..e542b46e5 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala index 97c6f769d..4d3d611bc 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala index 035dbff80..ec672ebf6 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala b/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala index 08e4bb46a..d80b66fc3 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/Overrides.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ReferenceSchedulerEffectSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ReferenceSchedulerEffectSuite.scala index 7fd58f0dc..02b9b3ab9 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ReferenceSchedulerEffectSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ReferenceSchedulerEffectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala index 87c4f9182..88f2c4af9 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala index 6c60a2a0c..d4f13bc6f 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/AssignableCancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/AssignableCancelableFSuite.scala index e1501f1d1..0739f87fb 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/AssignableCancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/AssignableCancelableFSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/BooleanCancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/BooleanCancelableFSuite.scala index 97e0caad5..6d8285d77 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/BooleanCancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/BooleanCancelableFSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala index b6398505a..f20bcad7d 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala b/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala index ed13f7f40..33924e5a5 100644 --- a/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala b/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala index a36231372..26cf05189 100644 --- a/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala b/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala index 9f7e43a44..b4530f99b 100644 --- a/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala +++ b/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/js/src/main/scala/monix/eval/internal/TracingPlatform.scala b/monix-eval/js/src/main/scala/monix/eval/internal/TracingPlatform.scala index b69e351d9..c7da918ad 100644 --- a/monix-eval/js/src/main/scala/monix/eval/internal/TracingPlatform.scala +++ b/monix-eval/js/src/main/scala/monix/eval/internal/TracingPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/main/java/monix/eval/internal/TracingPlatform.java b/monix-eval/jvm/src/main/java/monix/eval/internal/TracingPlatform.java index 84b05b4c6..acd8c1e59 100644 --- a/monix-eval/jvm/src/main/java/monix/eval/internal/TracingPlatform.java +++ b/monix-eval/jvm/src/main/java/monix/eval/internal/TracingPlatform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala b/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala index 7d70d9058..4a5e4bacb 100644 --- a/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala +++ b/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala index d568b082c..e0e8412ff 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskAsyncAutoShiftJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala index 4139d864b..c8d5ea58f 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskBlockingSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala index 28f39ab9f..4b52ebbc4 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskCallbackSafetyJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskExecuteWithLocalContextSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskExecuteWithLocalContextSuite.scala index d434a4d7f..864ef1826 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskExecuteWithLocalContextSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskExecuteWithLocalContextSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala index e7f18d4d9..679fc6394 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskIssue993Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala index 51b795cef..3afdbb1f2 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskLikeConversionsJava8Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala index 2113e5cbc..d78919916 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskLocalJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala index f0be607c5..3195aeb95 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TaskRejectedExecutionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala b/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala index 71d7ab3be..48e4ec07f 100644 --- a/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala +++ b/monix-eval/jvm/src/test/scala/monix/eval/TypeClassLawsForTaskRunSyncUnsafeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala index ec701fdf2..a7e743fea 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala b/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala index 56536b3f1..24ad0c005 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/CoevalLift.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala b/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala index fc5f72ee7..3c1aff0c3 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/CoevalLike.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/Fiber.scala b/monix-eval/shared/src/main/scala/monix/eval/Fiber.scala index f1d18ca07..500ec97ae 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Fiber.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Fiber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/Task.scala b/monix-eval/shared/src/main/scala/monix/eval/Task.scala index ad8203a21..3da9f8ba5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Task.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Task.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala index 9d8f9554e..647e72c1f 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala index 7a71a1eb4..adf824248 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala index 8ae59980a..d1ff6cdd9 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLike.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala index 3b1469d1c..50385ea3d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala index cdb02e1a2..2dfa693ab 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsAsyncForTask.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala index 3cef5381e..37fb82e6e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsBaseForTask.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala index 7ed256f98..cb8ab6989 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala index ce247edf0..672668bc8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsMonadToMonoid.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala index 5148b0013..9a035a6d5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsParallelForTask.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala index 7beaeb6dc..ace8f9eba 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsSyncForCoeval.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala index 8fdc85dd0..00caa73d9 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala index f8395ee8d..23fba249d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalDeprecated.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala index 881246954..e658a4af7 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala index ea24895cf..f6bc92c54 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala index 8c18e9a25..d1bfe5e84 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala index e001563c8..0ac4e2a8e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala index 8418614ea..69fd504da 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala index 7405945ac..ddbdfd264 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala index dd0408a61..c5319c85b 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala index 54b0e1667..1d6395dad 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala index 91dc98d2a..28a466c4c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala index 43e07f67a..5ed8e002c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala index 162ed6786..70882091a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala index 16b7cdf70..4e78f3e09 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala index 9f93f6587..76b249192 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala index 3a4cfb19e..8a58d0f22 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala index 1c41c283f..99154e880 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala index 67463119e..654b5654a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala index 49e7f8634..1b9650299 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala index 353a116c4..4c98ebf89 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala index e9bc493f0..9c69a8417 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala index a9e37d6dd..171bcf7cc 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala index 2b3e959fa..85441fbf9 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala index dd20f13f8..5c55944fb 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala index c9a6ef5a0..c1be60435 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala index 6199c0c29..e61b7a328 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala index bea085975..6465fc7d1 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala index d0c540fd5..3a43f3077 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala index 770e4d465..9b0def2ac 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala index 0f93b3380..54b522420 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala index 8ce7ce93a..4fd1ddb86 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala index 1b42245a0..802adde18 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala index af54bcf21..224c142d3 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala index 804840487..14cc727e6 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala index c70587a3c..2acc1acce 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala index 181132d0f..ca5140f17 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala index a246b61c4..41279d2ce 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala index 2014a2b40..7a25dea03 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala index 502dd3249..1ac181261 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala index 78c24e0c5..223023fb4 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala index ac5b552ba..23f65bedf 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala index d1697d6c3..d9c546395 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala index 498ecfc77..ce926e3f5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala index 63e39db92..2ee9f111b 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala index 5c04b8322..fc93fc1f0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala index 312f43e85..6125714e0 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala index 994e90d79..4de8dfd34 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/package.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/package.scala index 514754d3d..c05e6c217 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/package.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/package.scala b/monix-eval/shared/src/main/scala/monix/eval/package.scala index 304a00a75..a1ff29b7c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/package.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala index e70d08016..eaa133241 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalEvent.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala index e42e6be58..513ecb12d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala index b71f41a98..be15d80da 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/PrintingOptions.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskEvent.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskEvent.scala index e0cc78bee..6347c9fb9 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskEvent.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskEvent.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala index 890492369..3a170facd 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala index a0ff4c83a..cfe41709a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/BaseTestSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/BaseTestSuite.scala index 03b430d6a..5c90d4287 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/BaseTestSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/BaseTestSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala index 73050841e..64dd75024 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala index fc13f03e9..1f9ad27a2 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala index 79d756a89..1b2ff9ab4 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalConversionsKSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala index 36b6be333..80cff49d0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala index 27d706cb1..d536bf532 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala index 36c83feab..baa3bcdc5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala index 19efff530..368b4c80e 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala index 61d04e813..1c58d006d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalGuaranteeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala index a1f4bf2a4..d4f4d4da3 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala index ab557dd9f..3d2239b94 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalLikeConversionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala index 77a6b533f..8b57604d1 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala index e18fc0897..48e64397a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala index 6746687ca..db7e7c850 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala index e11c43b05..a18d623e9 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala index 6417ffa5e..28c400dfc 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala index acf2b2040..a98387ea5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala index ce91e531c..42480087a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala index 417e6d813..41ca644a5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalToStringSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalToStringSuite.scala index cfbcf9525..23d85ff4d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalToStringSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalToStringSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala index 35b8c6649..eff6643a7 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala index bd8734593..aee16a0d8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskAppSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncBoundarySuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncBoundarySuite.scala index 9932a2e5e..25106c3ec 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncBoundarySuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncBoundarySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala index de2805b3c..5c0a6392b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskAsyncSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala index 7ac909f1e..b5f431730 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala index 51c3d3245..ce8bdde91 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala index 5089c154c..02688140b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala index 7d93d06c9..96871eb1e 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala index be8af914b..7f740184d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala index fa1f24066..9d78f499b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala index d8aaa47bf..6d7c2c7e2 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionCompositeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionCompositeSuite.scala index 8fdc806e3..c97937f7b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionCompositeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionCompositeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala index 62e916ec6..884c9dc28 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala index 32e949cdc..891956831 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala index 65518cf24..7529856bb 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala index 5321239d5..977f7a962 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala index 6f0f6fb25..928020fdb 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala index 74cad0655..69bb8df83 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskDeferActionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala index 86da0cb68..0b701580f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskDelaySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala index 8fd944d5b..7d535c831 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskDoOnCancelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala index e25d824dc..d5b38ee40 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEffectInstanceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala index bb7ecc9de..6dbf7f7a5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala index c38baacc9..55eeafb7a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala index e38c9d278..ae573d953 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAsyncSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala index ed798ba3f..65e9d2c4f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalOnceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteAsyncSuite.scala index e098e0b0f..7e9ae2aaa 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteAsyncSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteOnSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteOnSuite.scala index 49fcfc72b..6efa35c0c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteOnSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteOnSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala index 292edc01d..0591f688c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithModelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala index 4e5cad600..f425934ea 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecutionModelSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecutionModelSuite.scala index f0da538bd..8f7d169e7 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecutionModelSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecutionModelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala index f35375781..ea5c23722 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala index 72a87b8f4..69e9a11ee 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala index a8d941180..5b0868dea 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala index 52fc29987..b271d635c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLeftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLeftSuite.scala index b40bd3a4b..b1e9438db 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLeftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLeftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala index aa2481376..132ffebb5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala index 261443d59..547a8ccad 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala index 760641719..f41a6b7de 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala index 53b174f5a..d4af15231 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMapBothSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala index 9c15ccb77..c80a0b1f8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala index 580d15dcb..398fb30be 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala index fc67981e7..692482bff 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala index c2387c5fa..eea619a3c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionSuite.scala index ca013d472..bc0b4e206 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala index 7a554d942..10d611d33 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala index 0b0253c93..e63012684 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala index 7e944af6a..b936d01df 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala index 2af8a8318..3d91443b9 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala index d012aed2b..93f7cb036 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala index a9f00ca61..dae9b4046 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala index 5fec87e84..94e0f1bb6 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala index 3ecc021f1..dcd3796f0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala index 4dc77135c..2beda35e8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala index b5853cc15..593b715ae 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRightSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRightSuite.scala index 118259d50..9b59ca998 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRightSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRightSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala index 49077ebe8..71477fa7b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala index 6e92e7ed8..8968c2954 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskSequenceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskStartAndForgetSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskStartAndForgetSuite.scala index 68c21ed88..57f34f329 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskStartAndForgetSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskStartAndForgetSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskStartSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskStartSuite.scala index 6817fc305..f8661d900 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskStartSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskStartSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala index c2d03797b..a941606b1 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskTimedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala index 59cdc692c..0011fdf98 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskToStringSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskToStringSuite.scala index f8a893bdc..33d9b7f98 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskToStringSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskToStringSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala index 3265c77b3..26f96ecd0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala index f1c27f6fb..353e611d4 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForCoevalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala index ecd69fccb..23448c094 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala index ba22348a7..d0f255e4b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala index c945c681e..100e360b0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala index 78fcfc7b0..038269e81 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/tracing/StackTracedContextSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala index 4719035b4..7b2d7fb16 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index fbc84ea07..686cb8666 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index f916921d2..17d4373fd 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicByte.scala index 64482d056..a662fca27 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicChar.scala index cbd555501..4fc8db4fe 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala index b99fa4d14..a0ef22119 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 5a503428f..e07749e0c 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicInt.scala index 1d8d66ae3..fc51a256a 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicLong.scala index d26713984..74c9000bd 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index 234b24863..5098a3fcb 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicShort.scala index 1bc29c968..788bb7c84 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/package.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/package.scala index 0ffd2d776..999c88406 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/package.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index da3773b0b..c36ddb147 100644 --- a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala b/monix-execution/js/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala index 0e575728a..58fe4c7d4 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala b/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala index d5667d2a2..f10d67056 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala b/monix-execution/js/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala index fcb7739bc..e0918fbc4 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala index bc2dd45a3..20e6520a3 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala b/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala index 372c52b9b..88bf7fbbd 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index a72f88c4f..369ca9e43 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala b/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala index 790f994ec..c22def015 100644 --- a/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala +++ b/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala index 4cba1bad7..87a50b52b 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala index b552f274d..05940e5a7 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala index d0a0bd3fa..c87cba475 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala index b2c380218..8d741fdf5 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala index 8d89958d7..cf4e9c9ea 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index 2053b32b0..f50883ad7 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/org/reactivestreams/Processor.scala b/monix-execution/js/src/main/scala/org/reactivestreams/Processor.scala index bb85cf9aa..6597ceadd 100644 --- a/monix-execution/js/src/main/scala/org/reactivestreams/Processor.scala +++ b/monix-execution/js/src/main/scala/org/reactivestreams/Processor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala b/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala index f8ebed184..98aecf18c 100644 --- a/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala +++ b/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/org/reactivestreams/Subscriber.scala b/monix-execution/js/src/main/scala/org/reactivestreams/Subscriber.scala index a301b34f3..774f6e20d 100644 --- a/monix-execution/js/src/main/scala/org/reactivestreams/Subscriber.scala +++ b/monix-execution/js/src/main/scala/org/reactivestreams/Subscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala/org/reactivestreams/Subscription.scala b/monix-execution/js/src/main/scala/org/reactivestreams/Subscription.scala index 4704d2e62..042de50f4 100644 --- a/monix-execution/js/src/main/scala/org/reactivestreams/Subscription.scala +++ b/monix-execution/js/src/main/scala/org/reactivestreams/Subscription.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index 45e39f1d2..7bae43f6d 100644 --- a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala index 191c18b4a..7cbeaaacf 100644 --- a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala +++ b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala index 3d78d383a..2a51a1599 100644 --- a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala index 60040a1c7..bc5d20fd4 100644 --- a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala +++ b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala index 815275e10..1940fd937 100644 --- a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala +++ b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/test/scala/monix/execution/internal/PlatformSuite.scala b/monix-execution/js/src/test/scala/monix/execution/internal/PlatformSuite.scala index e8680ae89..33fa63b62 100644 --- a/monix-execution/js/src/test/scala/monix/execution/internal/PlatformSuite.scala +++ b/monix-execution/js/src/test/scala/monix/execution/internal/PlatformSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/js/src/test/scala/monix/execution/internal/collection/JSArrayQueueSuite.scala b/monix-execution/js/src/test/scala/monix/execution/internal/collection/JSArrayQueueSuite.scala index e6f578cec..ad411f438 100644 --- a/monix-execution/js/src/test/scala/monix/execution/internal/collection/JSArrayQueueSuite.scala +++ b/monix-execution/js/src/test/scala/monix/execution/internal/collection/JSArrayQueueSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java b/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java index 63b92df66..d06ea293b 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java index c51f0e17b..8dfc79143 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java index d8c358d8e..6ec986e1a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java index cb5bf3fb0..e835e12e1 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java index 91b916657..cf3b797e3 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java index 26b3335f0..fde45bbc9 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java index 9ad14fd8a..4fb734e51 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java index d4c8f2534..4c676813b 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java index 82bd73d1a..4fdacac8e 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java index 3c9e25e9d..d6a9a50e4 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java index 54c8b7363..05b3f42cf 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java index 18c798aa9..95724a541 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java index 35cdc9a52..349b9c6ab 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java index 25613d178..022465073 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java index a1f319d38..e0af9e48e 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java index c02d98000..e13517c22 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java index efee26e1b..6d5684ed8 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java index 58b6aa32f..ccdc0969a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java index fbefe1162..5c7a51955 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java index 1adc54488..d21c7f85e 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java index fff31a96e..662f93d3a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java index abf49809d..5cf4feb45 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java index 94d9596d1..2dd79fed2 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java index d040a6fd2..48e3a9f7a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java index 623ff561b..af6945452 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java index a84fc320d..22aa158cc 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java index 7c0daa50b..55ad807fc 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java index 1b19b664c..75f402062 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java index 2716a919c..5372145c9 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java index 0bca0d655..910896345 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java index aa2d5d8fc..bf104d8f5 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java index 0ad133610..8a52f6bb8 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java index 60dc88649..bf0d40e93 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java index d5ea21cb8..d97bb7d50 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java index 7862cafd5..71f69be6d 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java index f0307bf03..f1824d651 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java index af4b971a3..10201cbca 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java index ba77a5263..d44e66f9b 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java index 3684f8888..6ee97a7b7 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java index 9fe8e3389..145bd6510 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java index 6679e892b..ce1384e7e 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java index 5fb91556b..46f4ab330 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java index 2a2db927a..04d756e43 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java index 2bf4e885c..adfad39a7 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java index e4a627806..58d7fe398 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java index 069a3c745..71655c434 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java index 48bc50ec8..ad6f68f88 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java index 39cfab7e9..9dba5e10f 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java index a60b1768b..dcbf6df88 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java index 10aa5f42d..9ff33ea30 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java index d0a1c1e97..e6e13cc94 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java index ef5525aa1..388b9d274 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java index 12368acd2..1d42994ff 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java index 347bbe82b..5383bd3e6 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java index d1d62d8a1..8dc6c68bd 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java index 044dd9e6d..42612f9ae 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java index ecda8c0eb..18444399f 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java index 86c0a41a0..0737e9a23 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java index 792da0eb7..a0de19783 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java index f4b121584..d5a471499 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java index 4448412b3..ead08c7d0 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java index 0df549f19..2aeb91433 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java index 9c9b92650..9dfa01760 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java index e9b5b1df5..96d37bdb9 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java index 037bac470..1b69bda29 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java index f7838101a..b8e6a4d21 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java index 8400074a4..9ca25ceaa 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java index ecdef6a79..93c9ade70 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java index e96b2b82f..14e16a528 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java index e3892b265..89ad99013 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java index de464ad6b..18b9984e7 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java index a7c3e6bb4..bd876bc66 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala index 368212c34..25212df10 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index a73b4873e..f8ce7ffc4 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index 7a580eb58..e92d05a96 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala index 91eced7e2..aafb1f0f3 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala index 55b728e4c..e1d3c307b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala index d85606cc1..1efaa0895 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 2c795e6c0..3a8289bce 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala index b4497832e..4649f84cd 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala index d08243824..02a67606b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index f0311002a..462ba068d 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala index 2eab0d37b..e0c6b4c94 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala index 25bf901b8..c0760cec7 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index 9936cfd8b..11815aadd 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala index b31b05762..f0bb32c68 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/CancelableFutureForPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala index 2d32a2b04..08c1f3b62 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala index c1714bbf8..3126101a3 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/FutureUtilsForPlatform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala index 73d580d7b..6dcf6e8f1 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala index a97f781bb..38f91e867 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/ScheduledExecutors.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala index 2d843fb6a..04c74ea49 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromJavaQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromJavaQueue.scala index e2d30aa4f..16d190c89 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromJavaQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromJavaQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala index a112294b9..982406e9c 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index bc519d29b..f2b07f866 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala index fa42a2f73..a2184b764 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala index ff88044b1..1355e243b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala index 659812b9f..63e082b09 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinTask.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala index 77b4d1d64..bc9e75bea 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala index dca3386cb..91816567b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala b/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala index ab69bce17..8cc527066 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala index 7bde71c5a..0f88be68f 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala index 1fa80a438..315937e08 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AsyncScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala index fb7914d99..1e4670d03 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/CanBlock.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala index 8c1593746..82995d5e0 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/Defaults.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala index 7c7232817..bceb2410c 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ExecutorScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala index f666e1bd2..611ba4d76 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala index 6ac2305e4..3a6304195 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index a163ddb0a..5fb9073fa 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index b946c1c5d..0d698d48b 100644 --- a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala index 191c18b4a..7cbeaaacf 100644 --- a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala +++ b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala index 591d0d422..666dbe035 100644 --- a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala index 60040a1c7..bc5d20fd4 100644 --- a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala +++ b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala index 8d36deb77..c7ad060ab 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/AckJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/AsyncQueueJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/AsyncQueueJVMSuite.scala index e285c0aae..26a3f0148 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/AsyncQueueJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/AsyncQueueJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala index 1997297d3..f3e27d3ff 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala index be5e43052..36e652041 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala index fe2b22ff2..a0b7aa7af 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/FeaturesJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/FeaturesJVMSuite.scala index dec28e227..5542559a3 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/FeaturesJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/FeaturesJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala index 640ef5e04..477bb9a48 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala index b300bec63..4e1178eda 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala index 2b4fdb782..a539be5aa 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/cancelables/ChainedCancelableJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/cancelables/ChainedCancelableJVMSuite.scala index e97913e9e..fc1ebae6f 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/cancelables/ChainedCancelableJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/cancelables/ChainedCancelableJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/internal/PlatformSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/internal/PlatformSuite.scala index 617f3cf20..5f5a8ca73 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/internal/PlatformSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/internal/PlatformSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala index 8e250fbcd..2c79bdd85 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/misc/LocalJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala index 30cc539ba..337e838a6 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala index feadb0a6c..24ff47af1 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala index 518a5dcfd..e89ea87fb 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/JVMUncaughtExceptionReporterSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala index 9cb81540e..d99c8855f 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala index 8a701fb09..0b37af829 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala index 98f67b7e2..3bd427784 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TracingSchedulerServiceSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TracingSchedulerServiceSuite.scala index b58234a0b..c3ded3e03 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TracingSchedulerServiceSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TracingSchedulerServiceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala index 228401cbf..d852e21d3 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala index 31f3be8f4..55a2fcfdf 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala index 3cbc92b19..577a88d68 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala index eeb75ce25..416467a6f 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncSemaphore.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala index be9e16a3e..4ae2ff1be 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncVar.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/BufferCapacity.scala b/monix-execution/shared/src/main/scala/monix/execution/BufferCapacity.scala index 8100d817b..931b606a5 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/BufferCapacity.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/BufferCapacity.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index 436cf3f45..a4543604c 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala index c2b7dc9f7..dd0d0d2bf 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala index 0a6aca8cb..520f4cfbf 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala index 41928f397..b8f639a1c 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/ChannelType.scala b/monix-execution/shared/src/main/scala/monix/execution/ChannelType.scala index e2449e28d..2017dd6fa 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/ChannelType.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/ChannelType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/ExecutionModel.scala b/monix-execution/shared/src/main/scala/monix/execution/ExecutionModel.scala index 4bcf2abc1..0b6a9c223 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/ExecutionModel.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/ExecutionModel.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/Features.scala b/monix-execution/shared/src/main/scala/monix/execution/Features.scala index a4821509c..605dbe13e 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Features.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Features.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala index 05f77bdc1..c284f1716 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala index 8b468fee0..e677b31a9 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Scheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala b/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala index 8582dc35a..5eaac0199 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala b/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala index d45bd064a..43e9d83e6 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala b/monix-execution/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala index 022af8cb6..c437507b7 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala index 983cb7bc0..0ef68aac9 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala index 4e9a514cd..06a2ce40f 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala index 9f47623a3..075c3ada2 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala index 7c5697081..854a35dd4 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala index 6ad81da15..63dae8a74 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala index e00421429..a1117e951 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala index 0c0b031a4..7d7139216 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala index 45677eb52..a97a59b8a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala index 184c6eb6a..e5c91cb8b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/package.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/package.scala index 604d70c27..5d469b5d3 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/package.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala index 10fb1d3e8..d452f2b32 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/BufferOverflowException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/BufferOverflowException.scala index 815976184..3c3c47759 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/BufferOverflowException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/BufferOverflowException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/CompositeException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/CompositeException.scala index b0d3d1908..fbed0b54c 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/CompositeException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/CompositeException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/DownstreamTimeoutException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/DownstreamTimeoutException.scala index 3537f6221..acaf89c42 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/DownstreamTimeoutException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/DownstreamTimeoutException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/DummyException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/DummyException.scala index c4ba1aab9..e94225aab 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/DummyException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/DummyException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/ExecutionRejectedException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/ExecutionRejectedException.scala index 305206cb3..8fd812dfb 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/ExecutionRejectedException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/ExecutionRejectedException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/UncaughtErrorException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/UncaughtErrorException.scala index 164cd5225..72b8d3241 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/UncaughtErrorException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/UncaughtErrorException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/UpstreamTimeoutException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/UpstreamTimeoutException.scala index 5fbd621d4..48601c417 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/UpstreamTimeoutException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/UpstreamTimeoutException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala index b01470705..731bb064d 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/AttemptCallback.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala index 08dab8627..a00f78336 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Constants.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala index 47e9cf914..b35c05eaf 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala index 7bd3126c2..ecfc2bf09 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/InterceptRunnable.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/InterceptRunnable.scala index 549d999ce..161ef3aaf 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/InterceptRunnable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/InterceptRunnable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala index 717bf203c..4264f37c8 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala index 5367c46f7..0a225db90 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/RunnableAction.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/RunnableAction.scala index 28c687bad..2d0bc56a4 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/RunnableAction.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/RunnableAction.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala index ead027dc2..6d14e9155 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/Buffer.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/Buffer.scala index 88a3e79d9..5e4975573 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/Buffer.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/Buffer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala index 05b95d637..2ea6fb01d 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala index d5ba04948..e9047073b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala index 5369118ea..3374948e3 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala index ec3999279..56cc53d19 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/EvictingQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/EvictingQueue.scala index 18a300e3e..4d59a71ef 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/EvictingQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/EvictingQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala index 3d28f4f6b..f7bba6372 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LowLevelConcurrentQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LowLevelConcurrentQueue.scala index d0e54a569..07d4d520a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LowLevelConcurrentQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LowLevelConcurrentQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala index 81ecfce87..101ebe2b0 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/exceptions.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala index a886eae87..200955a4e 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/math.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala index c1e7e5a98..a23c6ecbb 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala index 5dc932311..4d403e472 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/package.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/package.scala index 16efdde65..ba091b148 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/package.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/rstreams/ReactivePullStrategy.scala b/monix-execution/shared/src/main/scala/monix/execution/rstreams/ReactivePullStrategy.scala index ddae90dad..5f935cf4b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/rstreams/ReactivePullStrategy.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/rstreams/ReactivePullStrategy.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala b/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala index 0367799d1..5590835ab 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/rstreams/Subscription.scala b/monix-execution/shared/src/main/scala/monix/execution/rstreams/Subscription.scala index 6f779f21f..dbc2fcfee 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/rstreams/Subscription.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/rstreams/Subscription.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/rstreams/package.scala b/monix-execution/shared/src/main/scala/monix/execution/rstreams/package.scala index 3aeb9b617..ba73c4ffe 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/rstreams/package.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/rstreams/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala index b2247cf19..d3538c081 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ExecuteExtensions.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ExecuteExtensions.scala index df78e496a..e3597809d 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ExecuteExtensions.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ExecuteExtensions.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala index e9fa2eafe..eb0580c8b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala index 0a58d6fa1..58792a87c 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ShiftedRunnable.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ShiftedRunnable.scala index 74f474837..897f023e5 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ShiftedRunnable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ShiftedRunnable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/StartAsyncBatchRunnable.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/StartAsyncBatchRunnable.scala index bfaa11da3..603646729 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/StartAsyncBatchRunnable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/StartAsyncBatchRunnable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala index 922dc3ed6..66ad234fe 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingRunnable.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingRunnable.scala index 84ad773b1..d8d625c63 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingRunnable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingRunnable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala index cf817d59b..2d45e014b 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala index b505423d1..67f7f547e 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingSchedulerService.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala index 7c365c1ec..a06b40f67 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolinedRunnable.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolinedRunnable.scala index 9c04fe07d..522a2f979 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolinedRunnable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolinedRunnable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala index b966d90b7..26680a630 100644 --- a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala index 6e7d17020..ff00eb59c 100644 --- a/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala index a152f8b22..e3cdc8019 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala index d081f1832..f36bd3609 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala index b9f0fff14..81ac6bb2f 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala index 237f44fc7..fc6d89ca1 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala index 60222586d..0370d7fe5 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala b/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala index 315643034..be3e4264a 100644 --- a/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala index 58df9e7c3..b922c2553 100644 --- a/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala index 92711c440..510bb612d 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala index 3ee9d0836..23c32a6b7 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala index 95e056aa4..666983728 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AsyncSemaphoreSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/AsyncVarSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AsyncVarSuite.scala index 0710eda91..de0a9fa28 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AsyncVarSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AsyncVarSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala index cd7466248..7e71377bd 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala index 2393892ca..ff997995e 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala index a6f07d96d..d7a0cdbb8 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala index 00957597c..b2df86462 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala index 1d91505a1..04cd2e603 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala index 1ef7b7368..da1a2a8d0 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/FeaturesSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala index a84331c20..50137d10c 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala b/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala index 5e3949b22..071e343ab 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/TestUtils.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala index 020be9b31..684772160 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala index 0343449f1..7ab59fe9e 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala index e48a9908c..c86a99a72 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala index 93f86b3b9..7ac63712a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/AssignableCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/AssignableCancelableSuite.scala index 1a3cf066f..be092127c 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/AssignableCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/AssignableCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/BooleanCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/BooleanCancelableSuite.scala index 0ef9121d6..0865f25f9 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/BooleanCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/BooleanCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/ChainedCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/ChainedCancelableSuite.scala index e422cae8e..1314e7f78 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/ChainedCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/ChainedCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala index 3a7f01244..29dda7a35 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala index e710c0400..46217133f 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/OrderedCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/OrderedCancelableSuite.scala index 623a164c4..9e9587dbd 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/OrderedCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/OrderedCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/RefCountCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/RefCountCancelableSuite.scala index fd24235fa..7ff5d6cf2 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/RefCountCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/RefCountCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/SerialCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/SerialCancelableSuite.scala index 26caa5397..09ff92a08 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/SerialCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/SerialCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala index f5116c783..7908af8c3 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala index b98e344dd..3dd88ee06 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/MathSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/MathSuite.scala index d422d32b0..0aca92857 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/MathSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/MathSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala index 0871235ef..f3ae311a1 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayQueueSuite.scala index 2ebca3618..c7de86379 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayQueueSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayStackSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayStackSuite.scala index 0e6f365a0..5203febfb 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayStackSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/ChunkedArrayStackSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala index 0132e649e..3877ae051 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala index f913308b8..7955b6c2f 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/misc/CanBindLocalsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/misc/CanBindLocalsSuite.scala index 4a2f1ce42..3e4cc0604 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/misc/CanBindLocalsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/misc/CanBindLocalsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala index 6f011496c..91ff35b19 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/misc/LocalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/misc/ThreadLocalSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/misc/ThreadLocalSuite.scala index 6b567a286..88400952f 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/misc/ThreadLocalSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/misc/ThreadLocalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/rstreams/SingleAssignSubscriptionSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/rstreams/SingleAssignSubscriptionSuite.scala index 685891a7c..a55281575 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/rstreams/SingleAssignSubscriptionSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/rstreams/SingleAssignSubscriptionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala index b9f19553d..59825ba31 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/rstreams/SubscriptionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala index aa0776392..125c5cf87 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala index c0d56d610..575d38b7f 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala index d81724bcc..f53b4b627 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala index a7500f8d6..52e83b570 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TracingSchedulerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala index b8e19574a..79865cf03 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala index c63dcf04a..c5dc02ffb 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala b/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala index 6b6f3a476..aaf31e8e0 100644 --- a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala +++ b/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-java/src/main/scala/monix/java8/eval/package.scala b/monix-java/src/main/scala/monix/java8/eval/package.scala index c34e66807..4fb2a4ee2 100644 --- a/monix-java/src/main/scala/monix/java8/eval/package.scala +++ b/monix-java/src/main/scala/monix/java8/eval/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-java/src/main/scala/monix/java8/execution/package.scala b/monix-java/src/main/scala/monix/java8/execution/package.scala index 3f8cf03ad..4b019f10f 100644 --- a/monix-java/src/main/scala/monix/java8/execution/package.scala +++ b/monix-java/src/main/scala/monix/java8/execution/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index 453e1cc80..1caf3c372 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala index 4d8f31914..cb3247bf7 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala index ea6ee5dc8..c41e7c577 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala index f6210e73b..05bf5fa0a 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala index c53fe1450..40adf10e3 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/java/monix/reactive/observers/buffers/CommonBufferMembers.java b/monix-reactive/jvm/src/main/java/monix/reactive/observers/buffers/CommonBufferMembers.java index bafe7ce25..3d448e702 100644 --- a/monix-reactive/jvm/src/main/java/monix/reactive/observers/buffers/CommonBufferMembers.java +++ b/monix-reactive/jvm/src/main/java/monix/reactive/observers/buffers/CommonBufferMembers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionException.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionException.scala index ff56034e6..28a574658 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionException.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionException.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionParameters.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionParameters.scala index 6d0947560..a53fb13bc 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionParameters.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/CompressionParameters.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala index 8ae9c3fe4..88e3e63ce 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/Deflate.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala index 140473062..d2e34b88b 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala index ceedf9d74..9cbdf2942 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala index 546f2f563..bcedd6b1c 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala index ae226feca..d2df96730 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala index 66437fcda..e7de4e909 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index aa6463e4e..b56fcc212 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala index 8100383f2..29773329c 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BackPressuredBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala index 37dbac1e1..5af6bbd1a 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala index cb3e768c5..86ff738fb 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala index 7708492a0..5c7bbaa5a 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala index e74be7e78..9318a33f0 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala index 5e28c8419..21ec23881 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala index 1626b2e57..8821fba15 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala index 46f2643ef..82d0ccb34 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/BaseConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala index b46622fb4..26c540cd7 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/SerializableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/BaseDecompressionSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/BaseDecompressionSuite.scala index 04a6dc6a9..7e9addacf 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/BaseDecompressionSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/BaseDecompressionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionIntegrationSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionIntegrationSuite.scala index a590b993c..8f745ce52 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionIntegrationSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionIntegrationSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionTestData.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionTestData.scala index d3f848427..a648ea9e5 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionTestData.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/CompressionTestData.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateIntegrationSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateIntegrationSuite.scala index 48bf1e042..624777647 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateIntegrationSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateIntegrationSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala index 767a6cf18..c1151d1af 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala index 91ef1b297..0aef3c312 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/DeflateTestUtils.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala index eaf9c9080..fe8122ac3 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GunzipOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala index f820a4ddd..0c7472d02 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipIntegrationTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala index c619cbf69..87e39789f 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala index bd18e6d75..6215f454b 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/GzipTestsUtils.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala index 2edf6f369..1807f2265 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/compression/InflateOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala index 769b0befd..181744ed1 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala index a6711ae92..5e1ea5c00 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ConcatMapConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala index f64aa9091..af10f5477 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/FlatScanConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala index 7a9ea13af..e3a365f5c 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala index 99aac2497..5d80ebc43 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala index 4e58cde44..7eed839f9 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/MapTaskConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala index 216dca23c..c60799252 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/internal/operators/ScanTaskConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala index 6435f1b50..5f289592e 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue1167Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala index 545dd9310..c6544384c 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/issues/Issue908Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala index 7cc5bb4f2..c07af9e58 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressuredConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala index 0b398fe72..48377b16c 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala index f65fb2540..1179ad01e 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala index 343769a6f..4f6cc054c 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyFailConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala index b4b86e0a8..586ae8c40 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala index e75641a3d..a0fad8126 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/subjects/ReplaySubjectConcurrencySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala index 2fe20fc7d..a95a8b3ce 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/MulticastStrategy.scala b/monix-reactive/shared/src/main/scala/monix/reactive/MulticastStrategy.scala index 27bebbe4b..89b821ad0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/MulticastStrategy.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/MulticastStrategy.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Notification.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Notification.scala index 46f327b7b..a64930ed4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Notification.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Notification.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index dfcefd90f..7b9d78e1b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala b/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala index 63ba1b642..9d7b7984a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala index 2f77c5486..b239d60a0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala b/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala index 1afda71db..e7dfa2c60 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala index 38970d402..80aab3687 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala index 6cceb627b..6754fcdd0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/instances/CatsProfunctorForSubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala index 5a5a0a1f7..59a6abbf0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/AsyncStateActionObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala index 56377d3bb..ea262d310 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala index 65d6f0841..100e1adbf 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala index 3d2e174e1..78dad91a9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala index 4dfb949e1..2db986748 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala index d4351d4e3..03aca8f92 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala index 68e180232..aff043418 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala index be19373be..cb4168479 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala index 6ab4df109..9ec237c7c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatestListObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala index 1f637ddf7..e82ca628e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala index 17b4c35f9..5c0cd52e9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CreateObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala index 140cb32fe..90104a7e8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EmptyObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EmptyObservable.scala index 565ab85b5..312804695 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EmptyObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EmptyObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ErrorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ErrorObservable.scala index 3c3d55209..eaf6d8d87 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ErrorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ErrorObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala index 8c462474c..064f5901d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala index 6347e0d94..a6223f11a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteAsyncObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteAsyncObservable.scala index f0db9495b..ad10da69d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteAsyncObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteAsyncObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala index be8233eca..322fd5df1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala index c15d038e6..6f04baf1e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala index 4afe84073..c53ec7d1b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala index 30cc40e54..dde20807d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala index 456d803a8..58794d0b3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala index b92d8c73d..5aebf96c2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala index 0ce74c9d3..668909338 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IterableAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IterableAsObservable.scala index df06ab546..a9fcf5ce2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IterableAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IterableAsObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala index 5efdb35af..311fdf57b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala index 9b92f29f6..8d165729a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala index 6f47d8700..c22529007 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NeverObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NeverObservable.scala index 8aa3978b9..f890d1f11 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NeverObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NeverObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala index 3b280d626..55827cbfd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala index bd52d7d3a..bd2ccae4d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala index 19df42b9e..485b29249 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala index adfd719cf..64cdf185b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala index cfb22a089..5041bf896 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala index 3c685f67e..d40041550 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ReactiveObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala index e93d29bed..85c9d0649 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala index e8027b0e1..5aa1eb7b7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala index 5f33395a3..d75199759 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala index c448aa3bd..406a5728c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala index af6150952..a9f5b3cb1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala index e75728c72..5401cfa51 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala index d1a7796d8..1e625ae1c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala index 0343a8f9d..8b90a24b0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala index ec01e91c1..4c9a1a765 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala index 88d4cc545..3f7e04d7b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldEvalObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala index 3bb6e5560..d42f3c3a0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala index 50fc652b3..8f9e19cf5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala index 7d5d5346d..28017c863 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala index f0f1d7e9f..bd1a0b5a0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala index 8975cc282..2eafa9f30 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala index 16dd8b763..7ea6a1946 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala index 7ddc0292f..ba4ebacea 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala index ad2d1ecc1..349f15b58 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala index f40a43ee5..0ad9e20f6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala index baa4b4d15..4366c2e28 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala index 8cf1bbc83..f9ac4a7ae 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CreateConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala index b6b599673..ffb2dd7f7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala index e9aba94d3..472734ebc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala index ef4c157fe..47575e8d6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala index 8134c7d97..d01940059 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala index 09196433d..5fb0a5927 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala index e04c00c06..aa0117ba0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala index 2ee5b7f88..ee643947e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala index 8a718997b..e8207dc14 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala index 600aa60ed..799990b37 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala index d4b5540a8..7b87f8f37 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala index 593fff1f8..eca1ac2a7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/MapTaskConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala index e010daa4c..0e8b4f02a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala index ad14744dd..9af8e2118 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala index 33f308898..6f97ac672 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala index f15046eee..8247dcf38 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala index 9e5162925..beb6480e2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/AsyncBoundaryOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala index 8f5f12566..4db807d25 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferIntrospectiveObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala index 0e9a07cfa..0f95bc53a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala index e5d36a546..ae3780ead 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala index 629dcc2d6..b4860c903 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala index 3c0594671..cb1c20baa 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala index 24a3a1f46..2cd0f0f6b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala index 611407d1a..5568b19a7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala index 162f5ea1c..195ad2bc8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala index 4645ad01e..782c0ddd1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala index 13b3e096d..a338ee5b0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala index 07ed5adee..28bf4690a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala index a245a11e2..65914a563 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala index 780aca411..30fa26cea 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala index ccc9ec8f4..4248a3da2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala index 11207d3db..53c87295e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala index 181f2d3c3..fa1dc5dc8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala index f4371500a..7875cd14d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionByTimespanObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala index ac7af78b9..7c559589d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala index 85d1ab650..10389565f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala index 57fd1ca38..9afaab74b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala index ed5916f87..3a9d9ee2f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala index ff641fc9b..7c6456565 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala index 26fabb6d0..f93b5dc1e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala index dab6e0a83..5d7082d6c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala index 8277357a6..22b7cc00d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala index 47b95338c..81fc9727f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala index 5c28f3928..bdb688cfd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala index d279fcef3..3be686f09 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala index 7279b6ab0..7979b40d1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala index 104f34117..70fa8112a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala index c8e5d286f..28cbb4f00 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala index 61da594e9..1ac197d89 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala index b558d33e6..07034268f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala index 62c735098..d4f629ec3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala index ea41cdc6b..7400afd5d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala index 5ba96af44..cf1b925f0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala index b17b8ad75..3f7c68d20 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala index 945032005..ace92bf15 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala index 779257186..60a5aee60 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala index e8bb9e393..afde4a5e2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala index 8be501c3b..4b5098a6e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ExecuteOnObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala index 0676a8815..fe57b516c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala index cb58b0bd5..512f36a58 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala index a77813ee3..5f7b97efa 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala index 27e597bc8..6329b8bf6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala index f9a408226..9e3573407 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala index 879b512ee..bec619a25 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala index a4435d63c..874552065 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala index a2026bcf0..df293fd01 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala index c128fe188..540441df2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/LiftByOperatorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/LiftByOperatorObservable.scala index 017f0adba..e49c770f0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/LiftByOperatorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/LiftByOperatorObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala index 345cf7fe9..d09aa1473 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala index 73601bdbf..e36c01865 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala index beb94b4eb..9916d8654 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala index f0aa4ec31..ba5827cf2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala index c04a298dc..7905f5f86 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala index 6b511c3c7..46534e99e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala index 971856c72..ce43cfa7c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala index 6bc7f129b..0fd4744fc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala index a2143868b..04ea7f637 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala index c9f685821..4fff4a242 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala index b9775482c..b0a51c0f3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala index ec6bd28ef..e2cb311a4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala index ec93da264..849769e07 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala index 0e006e544..ceddfbdaa 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala index 0ba337ff9..5999ee06b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala index fa8f30921..f4d8b50bc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala index 99055284a..cc64a81f0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala index 99530c4da..f07ded03b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala index fef1a5f46..68167850f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala index ba1df0c7f..9aa87d643 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SubscribeOnObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala index 1ca31b22c..abba57d70 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala index a1ea2f7e5..e7cff9a66 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala index e8e76fdb2..eab9a758c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala index 58ea891e0..ddd0da6eb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala index 8b9020ace..97ea5632c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala index b78de0491..21464abeb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala index 7764554a2..80705b882 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala index aa53ea109..3e5371263 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala index c3f9440e1..a0922a313 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala index aaa1eff96..6585c8229 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala index 0f81cffb3..589f47ad6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala index 633711883..dc90871fe 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala index ab1f8325b..7c33dd00b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala index 4ed26797c..863d879fd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala index 7b6c6a1e1..f9b530723 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala index f89ee0735..abd6467b6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala index 1c6b5a464..83a12aa29 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala index 3a0c3dac8..455bca62b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala index ee0e8ff4a..57345e50b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala index cc737f377..ca8538222 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala index 746025a9f..e67d0caaa 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala index e2248c305..83fb92fde 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/Instances.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/Instances.scala index 3a150e97f..343ffa838 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/Instances.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/Instances.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala index 5f6067767..1038fa5eb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala index 9a548c9ba..a98509a0d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala index 949568cf5..12f509504 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala index 289b65bcb..b371f647d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CombineObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala index 19b835f84..bf0369a5c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala index 55d59d423..b9fb4e0c2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala index e0c3f1e47..ece7b42a4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala index b847416dc..423215628 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/BufferedSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala index 73d4389ed..dbb50cd0d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala index 826ef3374..894dc048c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala index c59129be4..0f9a620f4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala index ebc21521b..aaf8aad1b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/buffers/package.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/buffers/package.scala index e7bba7119..a52467e8c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/buffers/package.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/buffers/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala index c564f4278..d26790b69 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala index bed5d200c..ed7a338b7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala index 0534fa6f3..6ab232ff1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala index 3fb0eb589..dcaa524d0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala index 69063c6e5..fd652e68b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala index d3fbfdc3b..716e81cab 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala index e4cedccba..18ccdf4fc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala index 89c9a9b45..2563125a5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala index 26442d4cc..eb6cdc99f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/BaseTestSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala index 2b2c87183..11641d543 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/PipeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/PipeSuite.scala index 04ee1c63b..e61871ead 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/PipeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/PipeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala index 2bf09b073..56d40139f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala index f786386a4..1bfa6e923 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForSubjectSuite.scala index 8c9ab2866..27b4f252a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/TypeClassLawsForSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala index 1fb1219a7..f2ac0b60c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CancelConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala index b9bd13d89..38b9a5a64 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/CompleteConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala index 3b8b7e090..40145bd7e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ContramapConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala index 55e1b8b8c..67256fde8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FirstNotificationConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala index 98174de1b..dc284f79b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala index 6da5b3ad8..7f5ef964c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FoldLeftTaskConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala index 6ba594e95..69064f6bb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachAsyncConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala index 6f0809fd2..4c22b4b73 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala index b57dbd098..325a64831 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelAsyncConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala index 2a9347ee4..f826f99b7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ForeachParallelConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala index 01faceb4e..03d12d95f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/FromObserverConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala index c696246b0..cddbad805 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala index 07b0c0f5e..69374a055 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/HeadOptionConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala index 83b5db645..7f5f88e3b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/ListConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala index c8e55e5f5..d3e5e68b7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala index a04c6555d..7a51cd941 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala index a4cd953ec..64d18c7ee 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapEvalConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala index b6a30dbf7..3c3cebe78 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/MapTaskConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala index 36fb3b127..db8df9d73 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/RaiseErrorConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala index c38e80bd8..2471ce2e2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/TransformInputConsumerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala index 66e1bec21..06b26bef0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala index 5572415c7..cf87aba41 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala index a7bc7afe0..36f073c67 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala index f93c30ae1..34ac62b8f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CatsConversionsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala index 1bfc717b8..0cbe7ab78 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CreateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CreateObservableSuite.scala index c2a656241..9469e290e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CreateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CreateObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala index e3df740b6..20748ef78 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EmptyObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala index fe4750fa3..db3d99b74 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ErrorObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala index 06e4c11be..885152a3b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalAlwaysObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala index e1d5a5cb8..091b117fe 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala index 1a367eb8e..42ef42867 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/EvalOnceObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala index 96bb99b92..e2399e471 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ExecuteAsyncObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala index 140e5dcf4..9dc1084d9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FirstStartedObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala index f2e5191f8..c6dfbfd35 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FromResourceObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala index 6dfdf1b5f..df46fdccc 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/FutureAsObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala index 19a725a94..1c59a879e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala index e05050cfa..743415c86 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IntervalObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala index 0be907b23..2776ec431 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala index 07f59fb6b..cb7d3a5b8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala index 2e1071964..7a09bfa16 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala index d7e7f4466..2ed6be581 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NeverObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala index 3df38b002..86b8da0b1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/NowObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala index 5e3955b4a..d1c48eb61 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala index 7b9e13927..bb58f5933 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala index 4b3d46f34..5e56d6131 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala index 9eca8e3d4..844c21e46 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalFSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala index a9a281f9d..c0a6702e0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala index 75d957c71..640a14e21 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala index 1418ba5d7..2f34c52ac 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatedValueObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala index 6ffdb6e27..ba17515eb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala index 727e3e14f..266245dc8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala index 20edfe22f..a3b6a36d1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala index 10dedc062..534128bb7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala index 6b93bd465..eed3a1e23 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnsafeCreateObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/AsyncBoundarySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/AsyncBoundarySuite.scala index a686cc348..c5d0ce4dd 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/AsyncBoundarySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/AsyncBoundarySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala index 1a3473cc4..3859db353 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala index 3d441e7e2..aebcfc80e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala index b00d34c86..a0dcbcb2a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingDropSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala index bbd4ff761..335e1db16 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingOverlapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala index bbbf1745b..5441b2cf3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferSlidingSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala index 5fbecc745..1b270b80b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedOrCountedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala index 598b63d4a..236ba0010 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala index 3c5db02a3..0f664878d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTumblingSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala index 9c3033e5d..834f4d598 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileInclusiveSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala index 53ab04f90..73e3fcbdb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWhileSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala index ada8ed6f8..46bb48cb6 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferWithSelectorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CacheSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CacheSuite.scala index 2a6b830d6..60c1b8b1d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CacheSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CacheSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala index 8082c1f92..7579fc9ad 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala index 2d7007755..ddc7a0194 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CollectWhileSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala index 9b0e0c03d..2a3a1ba72 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest2Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest3Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest3Suite.scala index 79b0b3add..f164f537f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest3Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest3Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest4Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest4Suite.scala index 123a60fd4..a0ec4cb10 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest4Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest4Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest5Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest5Suite.scala index e5772844d..734b92cc6 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest5Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest5Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest6Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest6Suite.scala index 43b5263f0..4ce396519 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest6Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatest6Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala index 56f60d632..e4c0b0d8f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala index 30ab5328e..1cc61796c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatCancellationSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala index 31bfedee9..1f1700dff 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatDelayErrorsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala index 6ed90f67e..d190d62d8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatManySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala index 6a693b186..b4158b567 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatMapIterableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala index 7fdeee2c8..450403f0e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CountSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CountSuite.scala index 1059efb1b..2d24fca65 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CountSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CountSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceFlattenSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceFlattenSuite.scala index 92d960e46..c62365b21 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceFlattenSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceFlattenSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceRepeatedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceRepeatedSuite.scala index f35ff629a..ce9efca70 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceRepeatedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceRepeatedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala index bd4219db8..a4b2b8b0d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DebounceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayBySelectorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayBySelectorSuite.scala index 8d9245ccc..5de0ea134 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayBySelectorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayBySelectorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayByTimespanSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayByTimespanSuite.scala index 4c8db1469..831f369aa 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayByTimespanSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayByTimespanSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala index 49bb40894..f4f06a00b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala index 0ea1de279..d690055a4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayExecutionWithSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala index 8bb8d5462..bdc81461e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DelayOnCompleteSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala index 128299203..7174438e6 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DematerializeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeySuite.scala index 2d058a266..4944d7364 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedSuite.scala index d0df20f59..4ea60b0af 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DistinctUntilChangedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnCompleteSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnCompleteSuite.scala index c770d7d7d..3d9863ae1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnCompleteSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnCompleteSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala index 6c4e1c8fe..bcea6121f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnErrorSuite.scala index 5658132db..229d9550e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextAckSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextAckSuite.scala index ac88b0b1a..b835c410d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextAckSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextAckSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextSuite.scala index ba6fd02cd..fefb8039c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnNextSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnStartSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnStartSuite.scala index 8b8a254cf..e060c17c4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnStartSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnStartSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala index 112074bb7..25144d831 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscribeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelSuite.scala index d390ceee8..1b8a9c040 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateInclusiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateInclusiveSuite.scala index 8b2ad50a1..eaf18096d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateInclusiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateInclusiveSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateSuite.scala index 7efda5c44..e2351871e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateWithIndexSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateWithIndexSuite.scala index 6e6ffe349..ad274b0f1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateWithIndexSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateWithIndexSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByTimespanSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByTimespanSuite.scala index f5e2519fb..fe2b6b323 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByTimespanSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByTimespanSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropFirstSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropFirstSuite.scala index 8f17b3b35..fd0bcb5ec 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropFirstSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropFirstSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropLastSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropLastSuite.scala index 025c5135a..4d9a273d8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropLastSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropLastSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala index 492749745..1cb206e3c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala index f7a1e037e..8c4502e2b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DumpSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala index 31d47d306..bae29dadf 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EchoRepeatedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala index a9595d352..a1a94fdfa 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/EndWithErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala index d8600ebba..4d14b83c8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala index d4b75206b..a325fe9e2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ExecuteOnSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala index 211fccbb6..0e6ab3b91 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterNotSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala index 5a0c4e68b..7175d20e9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FilterSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala index b720efa31..03770b31f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanDelayErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanSuite.scala index 5a012b2d3..f2b171be2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FlatScanSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldLeftObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldLeftObservableSuite.scala index 625f21468..fe34048e4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldLeftObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldLeftObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala index 6d902b9f5..13d89ab74 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/FoldWhileObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala index 52c5f9f50..1856b15e9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GroupBySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala index 464c21bce..2cc26dfae 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/GuaranteeCaseSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala index 29c618e0b..d6b8dadcf 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Interleave2Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala index acc7ca515..cb5245faf 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/IntersperseSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapAccumulateSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapAccumulateSuite.scala index bcdabbb6e..870635303 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapAccumulateSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapAccumulateSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapEffectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapEffectSuite.scala index 908f9f27b..805a9d132 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapEffectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapEffectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala index 855a65296..c746e704b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala index 0a1b1bd88..49777fb1b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala index e501a4ab4..3a0a185f7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala index 9ad49248d..c41c62dcb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala index 5084601d2..c4a727d12 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaterializeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala index 67eaef18e..aec9fd268 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxBySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala index dc418254a..dfb46a140 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MaxSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala index 7ce58b541..ae8312fcc 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorManySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala index c54023d60..6463ce2cb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeDelayErrorOneSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala index e7f9ea806..b8e48aa4d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeManySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala index dbd24f77b..43bf15162 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergeOneSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala index 4e7ba9ac1..a22ee03b1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala index 5a0cdf6d2..3cf6b2348 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinBySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala index 838d73506..1aee0ac33 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MinSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala index b73051972..84d751675 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscCompleteSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala index 72cf421a0..b566df0d6 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscDefaultIfEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala index 790bd1c2a..64ad9f46b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscFailedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscIsEmptySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscIsEmptySuite.scala index f0d84ad54..2a9ff817e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscIsEmptySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscIsEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscNonEmptySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscNonEmptySuite.scala index 0bfd8995d..a991095f0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscNonEmptySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MiscNonEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala index 3c9506283..7ee473e7f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala index ff74612bc..5e53524e5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObserveOnSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala index 54d5b5594..71389b367 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnCancelTriggerErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorFallbackToSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorFallbackToSuite.scala index 60baf00c4..da1018a2a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorFallbackToSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorFallbackToSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRecoverWithSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRecoverWithSuite.scala index 04c5acf1d..4f20b9d2a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRecoverWithSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRecoverWithSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala index 53d853187..37b07aa8f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryCountedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala index 0012c5e61..a9b627989 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryIfSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryUnlimitedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryUnlimitedSuite.scala index ae442e40e..b68010857 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryUnlimitedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/OnErrorRetryUnlimitedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala index 7cbd6248e..2e3a53154 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PipeThroughSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala index bb46f8e15..b61d1db10 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/PublishSelectorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConcatSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConcatSuite.scala index d28b7d938..37c931ffd 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConcatSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConcatSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConsSuite.scala index a4b74208b..ba2be2ced 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RecursiveConsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ReduceSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ReduceSuite.scala index 2704e7069..fac34efa9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ReduceSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ReduceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RepeatSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RepeatSuite.scala index df56b7326..a1eea2450 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RepeatSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/RepeatSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala index 799cd20e5..36d3dd184 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleOnceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleRepeatedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleRepeatedSuite.scala index f115fb7d4..f8abf55a0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleRepeatedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SampleRepeatedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanEffectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanEffectSuite.scala index 65a8f2e03..d97e94c3c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanEffectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanEffectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala index c527f4c03..d2b4fa02a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanSuite.scala index f5ab2dbfe..63e4ae6e5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala index 5e96c2008..e72c34851 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ScanTaskSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SumSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SumSuite.scala index e65674a22..ebbbb83bd 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SumSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SumSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchIfEmptySuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchIfEmptySuite.scala index 89ac98ffc..a4b2cdb25 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchIfEmptySuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchIfEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchMapSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchMapSuite.scala index 6fcf28e6e..d52239224 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchMapSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/SwitchMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala index bc4e74aa4..f48b4167b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateInclusiveSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala index 1cc1d3720..60cd25d58 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByPredicateSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala index 08330ae07..08e0117d4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeByTimespanSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeEveryNthOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeEveryNthOperatorSuite.scala index 13bb780d6..2b7ea8eb1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeEveryNthOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeEveryNthOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLastSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLastSuite.scala index cb1e99647..604e06727 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLastSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLastSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala index a2e56384b..59f98f94f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeLeftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala index 58bfdd357..ead9544a5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeUntilObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala index b1a874753..4eeb66448 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TakeWhileNotCanceledSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleFirstSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleFirstSuite.scala index 7435093ab..13164c19b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleFirstSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleFirstSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala index 7e128580c..b2ea1dcf9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleLatestSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleSuite.scala index e6f12f14e..8f9ad0a3b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ThrottleSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala index ecd9ea785..f05780a04 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowDownstreamSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala index 9a9f1277d..d9604f877 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TimeoutOnSlowUpstreamSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala index 1926b12df..48575b011 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/TransformerSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala index c126b113a..1d316beff 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/UncancelableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala index 7227686cb..f529d156e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperatorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala index 3a390e461..0c1533a21 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOverflowSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala index 9dd03644a..19cf4cc66 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WhileBusyDropEventsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom2Suite.scala index 0029754ae..922ac793d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom2Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom3Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom3Suite.scala index 50b4dd269..1d326b53a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom3Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom3Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom4Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom4Suite.scala index 7087a54ca..fb4d1a8ab 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom4Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom4Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom5Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom5Suite.scala index 83eead3ab..af2a8df3d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom5Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom5Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom6Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom6Suite.scala index 0e8d23f4b..5aa64dbe2 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom6Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFrom6Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFromSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFromSuite.scala index bcc4db70e..83fb5d482 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFromSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/WithLatestFromSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala index 695f49581..4686f6f6d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip2Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip3Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip3Suite.scala index cac53ad50..571df973c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip3Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip3Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip4Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip4Suite.scala index 4808619f5..5289d2179 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip4Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip4Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip5Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip5Suite.scala index e67282bd7..cecd8042c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip5Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip5Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip6Suite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip6Suite.scala index ef6ec76bb..3fd578efa 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip6Suite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/Zip6Suite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala index 78b4df13a..a57793c8d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipListSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipWithIndexSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipWithIndexSuite.scala index b093aaeeb..60507adfb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipWithIndexSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ZipWithIndexSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala index e78cc4616..54271d7c7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala index 322289ec1..9e7e8b66e 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala index 88b46758a..d6c47dc17 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala index bec1e44a7..100a4c6c1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observables/ChainedObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observables/ChainedObservableSuite.scala index 59addef8c..2ea8b3895 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observables/ChainedObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observables/ChainedObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala index 5d7f98b45..2a5ad8f6c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observables/ConnectableObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala index 07086dc03..f89b1eb45 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observables/RefCountObservableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ConnectableSubscriberSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ConnectableSubscriberSuite.scala index 7db551302..90af3f861 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ConnectableSubscriberSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ConnectableSubscriberSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala index 7cdeb2d14..f6a23f2d4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapObserverSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala index fa44cb0ab..8e9acfe5f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ContramapSubscriberSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala index 4baa75534..298af2a7b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/DumpObserverSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala index 29fc5ddd5..1ca618150 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala index aecb5b1ae..a5a8f8fee 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureBatchedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala index 4d365ab9d..00b5770ba 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyBackPressureSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala index df33cc4d3..9b6831869 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferAndSignalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala index 7f762c15c..3440cc7ea 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyClearBufferSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala index a5a282737..9f2079f90 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewAndSignalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala index f7a94115f..0df5f55bf 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropNewSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala index 75ff1a0cb..d4b6e02e3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldAndSignalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala index 7d6f4924b..66e304228 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyDropOldSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala index 9f262997c..1e29677ad 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyFailSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala index 8f3f07a6e..cf81d8aff 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/OverflowStrategyUnboundedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala index 41985d55f..93c44b4e4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SafeSubscriberSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala index 0aae5b642..742611fd9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/StoppedObserverSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala index 51643a4ab..31c589807 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala index f9b6d9571..fa5fc458b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/AsyncSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala index 0737cc64b..5e23ff56f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseConcurrentSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala index 907e3d65b..154e7aa8c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala index 399ad62fe..d19324ea7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala index e1fe93797..5f9b3489c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentAsyncSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala index 30bac09a0..bf7ad7758 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentBehaviorSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala index 0e75a263d..eedfe6a0b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentPublishSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplayLimitedSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplayLimitedSubjectSuite.scala index a6f3e38d2..f4e13ac99 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplayLimitedSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplayLimitedSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplaySubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplaySubjectSuite.scala index 68d0fe64c..d4ff99d23 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplaySubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplaySubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala index 1cd443d1f..80b02f020 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala index 94a797df4..05e55a5d7 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala index 73d4abfb9..89bc62f4d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/VarSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/VarSuite.scala index 0fe376d31..2adf1da86 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/VarSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/VarSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala index 385d15b8b..f540664c9 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala index 3a42be8cd..95b9f95ca 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala index d1cd77097..f80b19a77 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala index bf2b5a292..558cf12a2 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala index e3274d130..b4812f1c6 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala index a09e8f51f..450221675 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansBatch.scala index 06c94db2c..3ba1d9b69 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansCursor.scala index f83c51b7d..af8ebde6c 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BooleansCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BytesBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BytesBatch.scala index 6ec56d442..08b12529d 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BytesBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BytesBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BytesCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BytesCursor.scala index 0b0a6f52c..46898b2f3 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BytesCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BytesCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/CharsBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/CharsBatch.scala index 208a74226..c490c43a5 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/CharsBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/CharsBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/CharsCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/CharsCursor.scala index 7d7270539..c4a1aa182 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/CharsCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/CharsCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesBatch.scala index b4dda98c4..5f8b2f7eb 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesCursor.scala index b1b5beb8b..166c4bb0a 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/DoublesCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyBatch.scala index 171e1ffee..e9d2903b4 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyCursor.scala index ce313d939..7d7ce6396 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/EmptyCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/GenericBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/GenericBatch.scala index 1a4c8feb7..6c8cb2fad 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/GenericBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/GenericBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala index 321ba349a..a9bde9c5c 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersBatch.scala index c7c0b5163..514973d4a 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersCursor.scala index 5a368db9e..a42f29627 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/IntegersCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/IteratorCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/IteratorCursor.scala index f92c987fa..72266fb92 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/IteratorCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/IteratorCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/LongsBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/LongsBatch.scala index 8562fd357..c5f354f16 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/LongsBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/LongsBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/LongsCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/LongsCursor.scala index 78f76b466..7e9047ccb 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/LongsCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/LongsCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/SeqBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/SeqBatch.scala index 707cdad3f..cdf415ca5 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/SeqBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/SeqBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/AndThen.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/AndThen.scala index 69eb7926b..5abbb782b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/AndThen.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/AndThen.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/Constants.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/Constants.scala index 67618c162..8ff7c09e0 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/Constants.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/Constants.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala index 20f9506ea..adfe3f73d 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala index 4b691b097..7c3b42a7a 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCollect.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCollect.scala index b644f1d05..bde829862 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCollect.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCollect.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala index b171a6cea..6c2297e58 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala index 03d18d5e9..bc597ca70 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConcat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala index 998f0ab4c..81f4e7b2a 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantConsume.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecated.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecated.scala index 95120b8aa..862e3624f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecated.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecated.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala index 0ad252bac..ac3afe169 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala index bb2d6beaf..3bbd051ed 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala index fd6879834..08fbd7c64 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala index 3dcc7805f..34e7903ff 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala index adb53fa0f..e89035b7f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala index 84861a358..8a8eac353 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala index a62a854d5..6f199052c 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFilter.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala index 16391b7d5..9f1f77404 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala index 5d94f1152..8bf65b223 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala index ff2438b26..45476c690 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala index fd62487db..6220e2184 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala index dffaf4920..2dcfbbba2 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala index f7bb4db99..7877fb262 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala index 36d7c00a3..d220517d1 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala index 181d1bd8f..144e929c3 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala index 6659ff58b..6c928a071 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalAtFixedRate.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala index 1b313a1d2..74ea61dfd 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntervalWithFixedDelay.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala index aa249fdc3..76fc6e358 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantLiftMap.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala index f685fde33..c67c0cc2b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMap.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala index 88e8175f7..849726117 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala index 037d1c47c..031b5880d 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala index 1e26c03d0..20cb2a958 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala index 922ac4330..075b4a7f1 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala index 9e0ef7e8b..47dbb51a0 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala index afa8189d4..549cb3856 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala index 047993096..42f631215 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala index d27d60e07..091c145c4 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala index cfa9d2da8..3c77decb9 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala index cae11fb61..52e375320 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala index caf4d3e43..9bcf6c708 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala index fbbe03ea4..63f5424dd 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala index 66c4f39cf..5f4ea01f4 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala index 7cd08c6e6..c8caf0594 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala index 5d59b61b3..0a9de6a9e 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala index 434e314f2..cc7c7fd2f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala index b2be39a19..93c275ba1 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala index 9a4a7c950..29f026989 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantUncons.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala index bc57c4307..da54e9312 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala index 3e88438a8..1805e7ff2 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala index a8bcf7e5f..96be9d49b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/AndThenSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/AndThenSuite.scala index 1c027a251..064e77f62 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/AndThenSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/AndThenSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala b/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala index 7482d89b7..7cc91eaf3 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ArbitraryInstances.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala index 9fd7c4e22..8ce196c03 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BaseLawsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BaseTestSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BaseTestSuite.scala index c2bd8c1a6..4da8a4341 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BaseTestSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BaseTestSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala index fd51f6b34..e2ed965dc 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala index 0150ebcc6..cd9c6f7d9 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala index 054575fa9..d135ed787 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala index c72b20494..a92fb00cc 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala index 5bee80145..bf83a3448 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala index 4c5c8eb0a..6db296633 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IntervalIntervalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala index f2e8db135..35d9450d6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantBasicSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala index 698594412..af407d8df 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantBufferSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala index 860436732..5a24f5373 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantChannelSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala index fa1e880e4..c470206e2 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantCollectSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala index 1f98766a1..7f3593638 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantCompleteLSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala index 26e919091..d14c1b6da 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantConsumeSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantConsumeSuite.scala index 546543dc6..1cb541ee1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantConsumeSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantConsumeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDistinctUntilChangedSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDistinctUntilChangedSuite.scala index afd85585a..f4383af01 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDistinctUntilChangedSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDistinctUntilChangedSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala index 15253e97f..644012947 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropLastSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala index 96f629a26..2fd1857fb 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala index aede21ae3..29f89580f 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileIndexSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala index ee0a02cc5..8b3ca72e7 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDropWhileSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala index 33355d380..ffd9fcd00 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantDumpSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala index c569c9e2c..1d5ce58a9 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFilterSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala index d3268f7b8..3101a68bd 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFlatMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala index 623c5dee6..5a847839b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldLeftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala index f4eb408c6..a70d16cdb 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldRightSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala index ee4bc6243..2a00afe08 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFoldWhileLeftSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala index 63f9ff603..e119a6f04 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIndexedSeqSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala index 59324d8bc..cd20a3d17 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromIterableSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala index a13b5de20..8b75d3c73 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromListSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala index 8dcb6c79d..888ed5b0f 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala index 5d93ec1b9..3ffea2724 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromResourceSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromResourceSuite.scala index 61c96afb7..5cfb06a29 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromResourceSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromResourceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala index 18559fc30..896254e6a 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala index 2c8bb0a46..071b573ed 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromStateActionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala index 0d9aa914b..873a5b9a6 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantInterleaveSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantInterleaveSuite.scala index bbc0876a0..f88f5271b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantInterleaveSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantInterleaveSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantIntersperseSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantIntersperseSuite.scala index 2d493a06a..9df76d040 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantIntersperseSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantIntersperseSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala index 4f40caa22..ce57c9c61 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala index 0ed3e274a..55fbf67b8 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantLiftMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala index 5adf7dfb6..b4df7301c 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantMapBatchSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala index b3af31dd1..9ef6a33ba 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantMapEvalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala index ffeede702..904ee8fdb 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala index 948058378..7d61bf5ff 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantRangesSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantRangesSuite.scala index ef5238499..f27336460 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantRangesSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantRangesSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala index e11ee2de6..8913a5f0a 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantReduceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala index 15cfe0258..98032c388 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantRepeatSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala index 9211b715c..b471be759 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantResourceSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala index c5fd3213b..950343c25 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantRetryIfEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala index 6c51aa5c8..24205c2b2 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantScanEvalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantScanMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantScanMapSuite.scala index 070b322e4..d33c2294b 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantScanMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantScanMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantScanSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantScanSuite.scala index 284527f2b..5b539d63c 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantScanSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantScanSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala index f827c7753..f29a596cd 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantStatesSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala index 8457be3d1..fb0035819 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantSwitchIfEmptySuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala index c900f212c..7221db6f7 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTailSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala index 51138bc05..4334be067 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeEveryNthSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala index eb44c32b9..07a970e19 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeLastSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala index 865f2b2a4..05c8788ef 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala index 3e300f8f2..8dd3c9eab 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala index f06a7352b..3f6fc3fad 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantTakeWhileWithIndexSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala index e01fbb76d..6cbb956b4 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantUnconsSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantUnconsSuite.scala index 54b703e0b..e3cfde3d1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantUnconsSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantUnconsSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala index 44dc1a57b..dd688f0fc 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantZipMapSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala index d88c90bd4..c565b4778 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantZipWithIndexSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala index d19a32528..035012e01 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala index 755e7639e..afec0cfb3 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantCoevalSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantCoevalSuite.scala index 14e5ec49d..6221c36b0 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantCoevalSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantCoevalSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantIOSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantIOSuite.scala index bac2bbdc3..9cbb13686 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantIOSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantIOSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantTaskSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantTaskSuite.scala index 38d8c8637..f79d20155 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantTaskSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/TypeClassLawsForIterantTaskSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/monix/shared/src/main/scala/monix/package.scala b/monix/shared/src/main/scala/monix/package.scala index febe0aa0a..bea6a2f07 100644 --- a/monix/shared/src/main/scala/monix/package.scala +++ b/monix/shared/src/main/scala/monix/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); From cf7182397a7e69b7cdb39f83e749288fbc98fa7a Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 18 May 2022 22:23:35 +0300 Subject: [PATCH 41/69] Fix formatting --- .../benchmarks/ArrayStackBenchmark.scala | 28 +++++++++---------- .../ChunkedEvalFilterMapSumBenchmark.scala | 14 +++++----- .../ChunkedMapFilterSumBenchmark.scala | 8 +++--- .../benchmarks/CoevalDeepBindBenchmark.scala | 4 +-- .../benchmarks/CoevalMapCallsBenchmark.scala | 2 +- .../MapParallelObservableBenchmark.scala | 6 ++-- .../ObservableConcatMapBenchmark.scala | 2 +- .../ObservableMapAccumulateBenchmark.scala | 25 +++++++++-------- .../ObservableMapTaskBenchmark.scala | 28 +++++++++---------- .../benchmarks/ObservableMergeBenchmark.scala | 10 +++---- .../benchmarks/TaskAttemptBenchmark.scala | 28 +++++++++---------- .../benchmarks/TaskDeepBindBenchmark.scala | 28 +++++++++---------- .../benchmarks/TaskHandleErrorBenchmark.scala | 28 +++++++++---------- .../benchmarks/TaskMapCallsBenchmark.scala | 28 +++++++++---------- .../benchmarks/TaskMapStreamBenchmark.scala | 28 +++++++++---------- .../benchmarks/TaskSequenceBenchmark.scala | 4 +-- .../benchmarks/TaskShallowBindBenchmark.scala | 28 +++++++++---------- .../main/scala/monix/benchmarks/package.scala | 4 +-- .../benchmarks/AsyncQueueBenchmark.scala | 7 ++--- .../ObservableIteratorBenchmark.scala | 2 +- .../monix/benchmarks/TaskShiftBenchmark.scala | 2 +- .../benchmarks/AsyncQueueBenchmark.scala | 3 +- .../monix/benchmarks/TaskShiftBenchmark.scala | 28 +++++++++---------- project/build.properties | 2 +- .../tracing/CachedStackTracingSuite.scala | 16 +++++++---- .../src/test/scala/tracing/TracingSuite.scala | 16 +++++------ 26 files changed, 191 insertions(+), 188 deletions(-) diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ArrayStackBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ArrayStackBenchmark.scala index a2cad2728..0aeb2ac98 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ArrayStackBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ArrayStackBenchmark.scala @@ -23,19 +23,19 @@ import monix.execution.internal.collection.ArrayStack import org.openjdk.jmh.annotations._ /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark ArrayStackBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.ArrayStackBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark ArrayStackBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.ArrayStackBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -68,4 +68,4 @@ class ArrayStackBenchmark { sum } } - */ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala index 094ed0312..ceaac0403 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala @@ -20,17 +20,17 @@ package monix.benchmarks import java.util.concurrent.TimeUnit import akka.actor.ActorSystem -import akka.stream.scaladsl.{Keep, RunnableGraph, Sink => AkkaSink, Source => AkkaSource} -import fs2.{Stream => FS2Stream} -import monix.eval.{Task => MonixTask} -import monix.reactive.{Observable => MonixObservable} +import akka.stream.scaladsl.{ Keep, RunnableGraph, Sink => AkkaSink, Source => AkkaSource } +import fs2.{ Stream => FS2Stream } +import monix.eval.{ Task => MonixTask } +import monix.reactive.{ Observable => MonixObservable } import org.openjdk.jmh.annotations._ -import zio.stream.{Stream => ZStream} -import zio.{Chunk, UIO} +import zio.stream.{ Stream => ZStream } +import zio.{ Chunk, UIO } import scala.collection.immutable.IndexedSeq import scala.concurrent.duration.Duration -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } /** * Benchmark designed to execute these operations: diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala index 80d2e8434..c733bca2f 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala @@ -20,18 +20,18 @@ package monix.benchmarks import java.util.concurrent.TimeUnit import akka.actor.ActorSystem -import akka.stream.scaladsl.{Keep, Sink => AkkaSink, Source => AkkaSource} -import fs2.{Stream => FS2Stream} +import akka.stream.scaladsl.{ Keep, Sink => AkkaSink, Source => AkkaSource } +import fs2.{ Stream => FS2Stream } import monix.benchmarks import monix.execution.Ack.Continue import monix.reactive.Observable import monix.reactive.observers.Subscriber import org.openjdk.jmh.annotations._ -import zio.stream.{Stream => ZStream} +import zio.stream.{ Stream => ZStream } import scala.collection.immutable.IndexedSeq import scala.concurrent.duration.Duration -import scala.concurrent.{Await, Promise} +import scala.concurrent.{ Await, Promise } /** To do comparative benchmarks between versions: * diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalDeepBindBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalDeepBindBenchmark.scala index 8bdc6677e..3cdc4740e 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalDeepBindBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalDeepBindBenchmark.scala @@ -57,7 +57,7 @@ class CoevalDeepBindBenchmark { def loop(i: Int): Coeval[Int] = for { j <- Coeval.pure(i) - _ <- if(j > size) Coeval.pure(j) else loop(j + 1) + _ <- if (j > size) Coeval.pure(j) else loop(j + 1) } yield j loop(0).value() @@ -68,7 +68,7 @@ class CoevalDeepBindBenchmark { def loop(i: Int): Coeval[Int] = for { j <- Coeval(i) - _ <- if(j > size) Coeval(j) else loop(j + 1) + _ <- if (j > size) Coeval(j) else loop(j + 1) } yield j loop(0).value() diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalMapCallsBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalMapCallsBenchmark.scala index 227bb4672..02cde315a 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalMapCallsBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/CoevalMapCallsBenchmark.scala @@ -78,4 +78,4 @@ object CoevalMapCallsBenchmark { } sum } -} \ No newline at end of file +} diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala index 96004e214..a230c0db2 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala @@ -27,7 +27,7 @@ import monix.reactive.observers.Subscriber import org.openjdk.jmh.annotations._ import scala.concurrent.duration._ -import scala.concurrent.{Await, Promise} +import scala.concurrent.{ Await, Promise } /** To do comparative benchmarks between versions: * @@ -65,13 +65,13 @@ class MapParallelObservableBenchmark { @Benchmark def mapOrdered(): Long = { - val stream = Observable.range(0, size.toLong).mapParallelOrdered(parallelism)(x => Task.eval(x + 1)) + val stream = Observable.range(0, size.toLong).mapParallelOrdered(parallelism)(x => Task.eval(x + 1)) sum(stream) } @Benchmark def mapUnordered(): Long = { - val stream = Observable.range(0, size.toLong).mapParallelUnordered(parallelism)(x => Task.eval(x + 1)) + val stream = Observable.range(0, size.toLong).mapParallelUnordered(parallelism)(x => Task.eval(x + 1)) sum(stream) } diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala index 93c34044b..95cef489e 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala @@ -25,7 +25,7 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import org.openjdk.jmh.annotations._ import scala.concurrent.duration._ -import scala.concurrent.{Await, Promise} +import scala.concurrent.{ Await, Promise } /** To do comparative benchmarks between versions: * diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapAccumulateBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapAccumulateBenchmark.scala index 6250a7eb6..36126930e 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapAccumulateBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapAccumulateBenchmark.scala @@ -19,10 +19,10 @@ package monix.benchmarks import java.util.concurrent.TimeUnit -import fs2.{Stream => FS2Stream} +import fs2.{ Stream => FS2Stream } import monix.reactive.Observable import org.openjdk.jmh.annotations._ -import zio.stream.{Stream => ZStream} +import zio.stream.{ Stream => ZStream } /** To do comparative benchmarks between versions: * @@ -49,9 +49,10 @@ class ObservableMapAccumulateBenchmark { def monixObservable() = { Observable .fromIterable(0 until n) - .mapAccumulate(0) { case (acc, i) => - val added = acc + i - (added, added) + .mapAccumulate(0) { + case (acc, i) => + val added = acc + i + (added, added) } .completedL .runSyncUnsafe() @@ -61,9 +62,10 @@ class ObservableMapAccumulateBenchmark { def fs2Stream() = { FS2Stream .emits(0 until n) - .mapAccumulate(0) { case (acc, i) => - val added = acc + i - (added, added) + .mapAccumulate(0) { + case (acc, i) => + val added = acc + i + (added, added) } .compile .drain @@ -73,9 +75,10 @@ class ObservableMapAccumulateBenchmark { def zioStream() = { val stream = ZStream .fromIterable(0 until n) - .mapAccum(0) { case (acc, i) => - val added = acc + i - (added, added) + .mapAccum(0) { + case (acc, i) => + val added = acc + i + (added, added) } .runDrain diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala index e05ab9e22..c294fe16e 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala @@ -31,19 +31,19 @@ import scala.concurrent.duration._ import scala.concurrent.{Await, Promise} /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark ObservableMapTaskBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.ObservableMapTaskBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark ObservableMapTaskBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.ObservableMapTaskBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -77,4 +77,4 @@ class ObservableMapTaskBenchmark { Await.result(p.future, Duration.Inf) } } -*/ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMergeBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMergeBenchmark.scala index 9a8dbd863..52db6c230 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMergeBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMergeBenchmark.scala @@ -20,15 +20,15 @@ package monix.benchmarks import java.util.concurrent.TimeUnit import akka.actor.ActorSystem -import akka.stream.scaladsl.{Keep, Sink => AkkaSink, Source => AkkaSource} -import fs2.{Stream => FS2Stream} -import monix.eval.{Task => MonixTask} +import akka.stream.scaladsl.{ Keep, Sink => AkkaSink, Source => AkkaSource } +import fs2.{ Stream => FS2Stream } +import monix.eval.{ Task => MonixTask } import monix.reactive.Observable import org.openjdk.jmh.annotations._ import zio.ZIO -import zio.stream.{Stream => ZStream} +import zio.stream.{ Stream => ZStream } -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } import scala.concurrent.duration.Duration import scala.util.Try diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskAttemptBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskAttemptBenchmark.scala index 487411be8..5f5b56d5e 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskAttemptBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskAttemptBenchmark.scala @@ -25,19 +25,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskAttemptBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskAttemptBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskAttemptBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskAttemptBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -71,4 +71,4 @@ class TaskAttemptBenchmark { Await.result(loop(0).runAsync, Duration.Inf) } } -*/ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskDeepBindBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskDeepBindBenchmark.scala index 4287d04b2..6b6a63e06 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskDeepBindBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskDeepBindBenchmark.scala @@ -25,19 +25,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskDeepBindBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskDeepBindBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskDeepBindBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskDeepBindBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -78,4 +78,4 @@ class TaskDeepBindBenchmark { Await.result(loop(0).runAsync, Duration.Inf) } } -*/ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskHandleErrorBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskHandleErrorBenchmark.scala index 035f5291b..c36f59b76 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskHandleErrorBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskHandleErrorBenchmark.scala @@ -25,19 +25,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskHandleErrorBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskHandleErrorBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskHandleErrorBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskHandleErrorBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -74,4 +74,4 @@ class TaskHandleErrorBenchmark { Await.result(loop(0).runAsync, Duration.Inf) } } -*/ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapCallsBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapCallsBenchmark.scala index 5f2d0014f..f8ab70891 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapCallsBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapCallsBenchmark.scala @@ -25,19 +25,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskMapCallsBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskMapCallsBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskMapCallsBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskMapCallsBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -71,4 +71,4 @@ object TaskMapCallsBenchmark { sum } } -*/ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapStreamBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapStreamBenchmark.scala index a5b1d0be0..1d78babb6 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapStreamBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskMapStreamBenchmark.scala @@ -27,19 +27,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskMapStreamBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskMapStreamBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskMapStreamBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskMapStreamBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -92,4 +92,4 @@ object TaskMapStreamBenchmark { Task.pure(acc) } } - */ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskSequenceBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskSequenceBenchmark.scala index 23c536a2e..15084f9eb 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskSequenceBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskSequenceBenchmark.scala @@ -92,7 +92,6 @@ class TaskSequenceBenchmark { result.runSyncUnsafe() } - @Benchmark def monixParSequence(): Long = { val tasks = (0 until count).map(_ => Task.eval(1)).toList @@ -100,7 +99,6 @@ class TaskSequenceBenchmark { result.runSyncUnsafe() } - @Benchmark def monixParSequenceUnordered(): Long = { val tasks = (0 until count).map(_ => Task.eval(1)).toList @@ -143,4 +141,4 @@ class TaskSequenceBenchmark { Await.result(f, Duration.Inf) } -} \ No newline at end of file +} diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskShallowBindBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskShallowBindBenchmark.scala index e5cea724d..880214e6b 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/TaskShallowBindBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/TaskShallowBindBenchmark.scala @@ -27,19 +27,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskShallowBindBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskShallowBindBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskShallowBindBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskShallowBindBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -79,4 +79,4 @@ class TaskShallowBindBenchmark { Await.result(task.runToFuture, Duration.Inf) } } -*/ \ No newline at end of file + */ diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/package.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/package.scala index b3ca039a9..6837f174e 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/package.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/package.scala @@ -17,12 +17,12 @@ package monix -import cats.effect.{ContextShift, IO} +import cats.effect.{ ContextShift, IO } import monix.execution.ExecutionModel.SynchronousExecution import monix.execution.Scheduler import monix.execution.Scheduler.Implicits.global import zio.BootstrapRuntime -import zio.internal.{Platform, Tracing} +import zio.internal.{ Platform, Tracing } import scala.concurrent.ExecutionContext diff --git a/benchmarks/vnext/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala b/benchmarks/vnext/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala index 15d3c7063..671c9d19a 100644 --- a/benchmarks/vnext/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala +++ b/benchmarks/vnext/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala @@ -18,11 +18,11 @@ package monix.benchmarks import java.util.concurrent.TimeUnit -import monix.execution.ChannelType.{MPMC, SPMC, SPSC} -import monix.execution.{AsyncQueue, CancelableFuture, ChannelType, BufferCapacity} +import monix.execution.ChannelType.{ MPMC, SPMC, SPSC } +import monix.execution.{ AsyncQueue, BufferCapacity, CancelableFuture, ChannelType } import org.openjdk.jmh.annotations._ import scala.concurrent.duration.Duration -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } /** To do comparative benchmarks between versions: * @@ -93,4 +93,3 @@ class AsyncQueueBenchmark { Await.result(r, Duration.Inf) } } - diff --git a/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala b/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala index 36d31d1e1..7a3f9e44d 100644 --- a/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala +++ b/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala @@ -27,7 +27,7 @@ import org.openjdk.jmh.annotations._ import scala.collection.immutable.IndexedSeq import scala.concurrent.duration.Duration -import scala.concurrent.{Await, Promise} +import scala.concurrent.{ Await, Promise } /** To do comparative benchmarks between versions: * diff --git a/benchmarks/vnext/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala b/benchmarks/vnext/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala index da576a660..1f302202f 100644 --- a/benchmarks/vnext/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala +++ b/benchmarks/vnext/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala @@ -146,4 +146,4 @@ object TaskShiftBenchmark { val trampolinedShift2: Task[Unit] = Task.Async((_, cb) => cb.onSuccess(())) -} \ No newline at end of file +} diff --git a/benchmarks/vprev/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala b/benchmarks/vprev/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala index cdbb9fec9..c2555256f 100644 --- a/benchmarks/vprev/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala +++ b/benchmarks/vprev/src/main/scala/monix/benchmarks/AsyncQueueBenchmark.scala @@ -22,7 +22,7 @@ import monix.execution.CancelableFuture import monix.execution.AsyncQueue import org.openjdk.jmh.annotations._ import scala.concurrent.duration.Duration -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } /** To do comparative benchmarks between versions: * @@ -92,4 +92,3 @@ class AsyncQueueBenchmark { Await.result(r, Duration.Inf) } } - diff --git a/benchmarks/vprev/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala b/benchmarks/vprev/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala index 7f8fe311a..b3cbc9f77 100644 --- a/benchmarks/vprev/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala +++ b/benchmarks/vprev/src/main/scala/monix/benchmarks/TaskShiftBenchmark.scala @@ -27,19 +27,19 @@ import scala.concurrent.Await import scala.concurrent.duration.Duration /** To do comparative benchmarks between versions: - * - * benchmarks/run-benchmark TaskShiftBenchmark - * - * This will generate results in `benchmarks/results`. - * - * Or to run the benchmark from within SBT: - * - * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskShiftBenchmark - * - * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". - * Please note that benchmarks should be usually executed at least in - * 10 iterations (as a rule of thumb), but more is better. - */ + * + * benchmarks/run-benchmark TaskShiftBenchmark + * + * This will generate results in `benchmarks/results`. + * + * Or to run the benchmark from within SBT: + * + * jmh:run -i 10 -wi 10 -f 2 -t 1 monix.benchmarks.TaskShiftBenchmark + * + * Which means "10 iterations", "10 warm-up iterations", "2 forks", "1 thread". + * Please note that benchmarks should be usually executed at least in + * 10 iterations (as a rule of thumb), but more is better. + */ @State(Scope.Thread) @BenchmarkMode(Array(Mode.Throughput)) @OutputTimeUnit(TimeUnit.SECONDS) @@ -155,4 +155,4 @@ object TaskShiftBenchmark { ctx.scheduler.executeTrampolined(() => cb.onSuccess(())) } } - */ \ No newline at end of file + */ diff --git a/project/build.properties b/project/build.properties index 08e68ae69..d5499e90d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -15,4 +15,4 @@ # limitations under the License. # -sbt.version=1.5.2 +sbt.version=1.6.2 diff --git a/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala b/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala index be71c8006..408826b86 100644 --- a/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala +++ b/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala @@ -17,8 +17,8 @@ package tracing -import monix.eval.tracing.{TaskEvent, TaskTrace} -import monix.eval.{BaseTestSuite, Task} +import monix.eval.tracing.{ TaskEvent, TaskTrace } +import monix.eval.{ BaseTestSuite, Task } /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan @@ -36,7 +36,8 @@ object CachedStackTracingSuite extends BaseTestSuite { assertEquals(r.captured, 4) assertEquals( r.events.collect { case e: TaskEvent.StackTrace => e }.count(_.stackTrace.exists(_.getMethodName == "map")), - 3) + 3 + ) } test.runToFuture @@ -66,7 +67,8 @@ object CachedStackTracingSuite extends BaseTestSuite { assertEquals(r.captured, 5) assertEquals( r.events.collect { case e: TaskEvent.StackTrace => e }.count(_.stackTrace.exists(_.getMethodName == "async")), - 1) + 1 + ) } test.runToFuture @@ -81,7 +83,8 @@ object CachedStackTracingSuite extends BaseTestSuite { assertEquals( r.events.collect { case e: TaskEvent.StackTrace => e } .count(_.stackTrace.exists(_.getMethodName == "bracket")), - 1) + 1 + ) } test.runToFuture @@ -97,7 +100,8 @@ object CachedStackTracingSuite extends BaseTestSuite { assertEquals( r.events.collect { case e: TaskEvent.StackTrace => e } .count(_.stackTrace.exists(_.getMethodName == "bracketCase")), - 1) + 1 + ) } test.runToFuture diff --git a/tracingTests/src/test/scala/tracing/TracingSuite.scala b/tracingTests/src/test/scala/tracing/TracingSuite.scala index 72dafcb34..e19a94405 100644 --- a/tracingTests/src/test/scala/tracing/TracingSuite.scala +++ b/tracingTests/src/test/scala/tracing/TracingSuite.scala @@ -18,7 +18,7 @@ package tracing import monix.eval.tracing.TaskTrace -import monix.eval.{BaseTestSuite, Task} +import monix.eval.{ BaseTestSuite, Task } import scala.util.control.NoStackTrace import cats.syntax.all._ @@ -51,13 +51,13 @@ object TracingSuite extends BaseTestSuite { testAsync("enhanced exceptions are not augmented more than once") { _ => val task = for { - _ <- Task.pure(1) - _ <- Task.pure(2) - _ <- Task.pure(3) - _ <- Task.shift - _ <- Task.pure(1) - _ <- Task.pure(2) - _ <- Task.pure(3) + _ <- Task.pure(1) + _ <- Task.pure(2) + _ <- Task.pure(3) + _ <- Task.shift + _ <- Task.pure(1) + _ <- Task.pure(2) + _ <- Task.pure(3) e1 <- Task.raiseError(new Throwable("Encountered an error")).attempt e2 <- Task.pure(e1).rethrow.attempt } yield (e1, e2) From c688df5a45d9a4c2c13c76590e6877b4814abe15 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 18 May 2022 22:45:36 +0300 Subject: [PATCH 42/69] Introduce `monix-execution-atomic` (#1561) --- .github/workflows/build.yml | 3 +- .gitignore | 1 + build.sbt | 45 +++- .../catnap/CatsEffectIssue380Suite.scala | 4 +- .../monix/execution/atomic/AtomicAny.scala | 0 .../execution/atomic/AtomicBoolean.scala | 0 .../execution/atomic/AtomicBuilder.scala | 0 .../monix/execution/atomic/AtomicByte.scala | 0 .../monix/execution/atomic/AtomicChar.scala | 0 .../monix/execution/atomic/AtomicDouble.scala | 0 .../monix/execution/atomic/AtomicFloat.scala | 0 .../monix/execution/atomic/AtomicInt.scala | 0 .../monix/execution/atomic/AtomicLong.scala | 0 .../execution/atomic/AtomicNumberAny.scala | 0 .../monix/execution/atomic/AtomicShort.scala | 0 .../monix/execution/atomic/package.scala | 0 .../monix/execution/atomic/Atomic.scala | 168 ++++++------ .../monix/execution/atomic/AtomicNumber.scala | 0 .../monix/execution/atomic/Atomic.scala | 184 +++++++++++++ .../monix/execution/atomic/AtomicNumber.scala | 0 .../atomic/internal}/BoxPaddingStrategy.java | 6 +- .../execution/atomic/internal}/BoxedInt.java | 6 +- .../execution/atomic/internal}/BoxedLong.java | 6 +- .../atomic/internal}/BoxedObject.java | 6 +- .../execution/atomic/internal}/Factory.java | 5 +- .../internal}/Left128Java7BoxedInt.java | 5 +- .../internal}/Left128Java7BoxedLong.java | 4 +- .../internal}/Left128Java7BoxedObject.java | 5 +- .../internal}/Left128Java8BoxedInt.java | 5 +- .../internal}/Left128Java8BoxedLong.java | 5 +- .../internal}/Left128Java8BoxedObject.java | 5 +- .../internal}/Left128JavaXBoxedInt.java | 5 +- .../internal}/Left128JavaXBoxedLong.java | 5 +- .../internal}/Left128JavaXBoxedObject.java | 5 +- .../atomic/internal}/Left64Java7BoxedInt.java | 4 +- .../internal}/Left64Java7BoxedLong.java | 5 +- .../internal}/Left64Java7BoxedObject.java | 5 +- .../atomic/internal}/Left64Java8BoxedInt.java | 4 +- .../internal}/Left64Java8BoxedLong.java | 5 +- .../internal}/Left64Java8BoxedObject.java | 7 +- .../atomic/internal}/Left64JavaXBoxedInt.java | 5 +- .../internal}/Left64JavaXBoxedLong.java | 5 +- .../internal}/Left64JavaXBoxedObject.java | 5 +- .../atomic/internal}/LeftPadding120.java | 5 +- .../atomic/internal}/LeftPadding56.java | 5 +- .../internal}/LeftRight128Java7BoxedInt.java | 5 +- .../internal}/LeftRight128Java7BoxedLong.java | 5 +- .../LeftRight128Java7BoxedObject.java | 5 +- .../internal}/LeftRight128Java8BoxedInt.java | 5 +- .../internal}/LeftRight128Java8BoxedLong.java | 5 +- .../LeftRight128Java8BoxedObject.java | 5 +- .../internal}/LeftRight128JavaXBoxedInt.java | 6 +- .../internal}/LeftRight128JavaXBoxedLong.java | 6 +- .../LeftRight128JavaXBoxedObject.java | 6 +- .../internal}/LeftRight256Java7BoxedInt.java | 5 +- .../internal}/LeftRight256Java7BoxedLong.java | 5 +- .../LeftRight256Java7BoxedObject.java | 5 +- .../internal}/LeftRight256Java8BoxedInt.java | 6 +- .../internal}/LeftRight256Java8BoxedLong.java | 5 +- .../LeftRight256Java8BoxedObject.java | 5 +- .../internal}/LeftRight256JavaXBoxedInt.java | 6 +- .../internal}/LeftRight256JavaXBoxedLong.java | 6 +- .../LeftRight256JavaXBoxedObject.java | 6 +- .../atomic/internal}/NormalJava7BoxedInt.java | 4 +- .../internal}/NormalJava7BoxedLong.java | 4 +- .../internal}/NormalJava7BoxedObject.java | 4 +- .../atomic/internal}/NormalJava8BoxedInt.java | 4 +- .../internal}/NormalJava8BoxedLong.java | 4 +- .../internal}/NormalJava8BoxedObject.java | 4 +- .../atomic/internal}/NormalJavaXBoxedInt.java | 5 +- .../internal}/NormalJavaXBoxedLong.java | 5 +- .../internal}/NormalJavaXBoxedObject.java | 5 +- .../internal}/Right128Java7BoxedInt.java | 5 +- .../internal}/Right128Java7BoxedLong.java | 5 +- .../internal}/Right128Java7BoxedObject.java | 6 +- .../internal}/Right128Java8BoxedInt.java | 5 +- .../internal}/Right128Java8BoxedLong.java | 5 +- .../internal}/Right128Java8BoxedObject.java | 5 +- .../internal}/Right128JavaXBoxedInt.java | 6 +- .../internal}/Right128JavaXBoxedLong.java | 6 +- .../internal}/Right128JavaXBoxedObject.java | 6 +- .../internal}/Right64Java7BoxedInt.java | 6 +- .../internal}/Right64Java7BoxedLong.java | 6 +- .../internal}/Right64Java7BoxedObject.java | 6 +- .../internal}/Right64Java8BoxedInt.java | 6 +- .../internal}/Right64Java8BoxedLong.java | 6 +- .../internal}/Right64Java8BoxedObject.java | 6 +- .../internal}/Right64JavaXBoxedInt.java | 6 +- .../internal}/Right64JavaXBoxedLong.java | 6 +- .../internal}/Right64JavaXBoxedObject.java | 6 +- .../atomic/internal}/UnsafeAccess.java | 5 +- .../monix/execution/atomic/AtomicAny.scala | 2 +- .../execution/atomic/AtomicBoolean.scala | 2 +- .../execution/atomic/AtomicBuilder.scala | 0 .../monix/execution/atomic/AtomicByte.scala | 2 +- .../monix/execution/atomic/AtomicChar.scala | 2 +- .../monix/execution/atomic/AtomicDouble.scala | 4 +- .../monix/execution/atomic/AtomicFloat.scala | 2 +- .../monix/execution/atomic/AtomicInt.scala | 2 +- .../monix/execution/atomic/AtomicLong.scala | 2 +- .../execution/atomic/AtomicNumberAny.scala | 2 +- .../monix/execution/atomic/AtomicShort.scala | 2 +- .../monix/execution/atomic/package.scala | 2 +- .../monix/execution/atomic/Atomic.scala | 196 +++++++------- .../monix/execution/atomic/AtomicNumber.scala | 0 .../monix/execution/atomic/Atomic.scala | 215 +++++++++++++++ .../monix/execution/atomic/AtomicNumber.scala | 0 .../atomic/ConcurrentAtomicNumberSuite.scala | 0 .../atomic/ConcurrentAtomicSuite.scala | 0 .../execution/atomic/PaddingStrategy.scala | 0 .../atomic/internal/AtomicDocs.scala | 249 ++++++++++++++++++ .../internal}/HygieneUtilMacros.scala | 4 +- .../execution/internal}/InlineMacros.scala | 4 +- .../monix/execution/internal}/TestBox.scala | 7 +- .../internal}/TestInlineMacros.scala | 5 +- .../execution/atomic/AtomicBuilderSuite.scala | 0 .../execution/atomic/AtomicNumberSuite.scala | 0 .../monix/execution/atomic/BoxedLong.scala | 0 .../execution/atomic/GenericAtomicSuite.scala | 0 .../atomic/internal}/InlineMacrosTest.scala | 8 +- .../monix/execution/atomic/Atomic.scala | 191 -------------- .../monix/execution/internal/InternalApi.java | 47 ---- .../collection/queues/FromCircularQueue.scala | 2 +- .../queues/FromMessagePassingQueue.scala | 2 +- .../LowLevelConcurrentQueueBuilders.scala | 2 +- .../monix/execution/atomic/Atomic.scala | 221 ---------------- .../monix/execution/misc/Local.scala | 32 +-- .../observers/buffers/ConcurrentQueue.scala | 2 +- .../rstreams/PublisherIsObservableSuite.scala | 7 +- .../monix/tail/ThrowExceptionCursor.scala | 2 +- project/MonixBuildUtils.scala | 6 +- project/plugins.sbt | 2 +- .../IterantToPublisherTest.scala | 18 +- .../ObservableToPublisherTest.scala | 2 +- .../SubscriberWhiteBoxAsyncTest.scala | 2 +- .../SubscriberWhiteBoxSyncTest.scala | 2 +- 136 files changed, 1001 insertions(+), 1028 deletions(-) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicAny.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicByte.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicChar.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicInt.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicLong.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/AtomicShort.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala/monix/execution/atomic/package.scala (100%) rename monix-execution/{ => atomic}/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala (61%) rename monix-execution/{ => atomic}/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala (100%) create mode 100644 monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala rename monix-execution/{ => atomic}/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala (100%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/BoxPaddingStrategy.java (89%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/BoxedInt.java (90%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/BoxedLong.java (90%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/BoxedObject.java (90%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Factory.java (98%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128Java7BoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128Java7BoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128Java7BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128Java8BoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128Java8BoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128Java8BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128JavaXBoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128JavaXBoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left128JavaXBoxedObject.java (94%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64Java7BoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64Java7BoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64Java7BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64Java8BoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64Java8BoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64Java8BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64JavaXBoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64JavaXBoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Left64JavaXBoxedObject.java (94%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftPadding120.java (92%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftPadding56.java (92%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128Java7BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128Java7BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128Java7BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128Java8BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128Java8BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128Java8BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128JavaXBoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128JavaXBoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight128JavaXBoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256Java7BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256Java7BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256Java7BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256Java8BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256Java8BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256Java8BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256JavaXBoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256JavaXBoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/LeftRight256JavaXBoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJava7BoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJava7BoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJava7BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJava8BoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJava8BoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJava8BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJavaXBoxedInt.java (94%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJavaXBoxedLong.java (94%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/NormalJavaXBoxedObject.java (94%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128Java7BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128Java7BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128Java7BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128Java8BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128Java8BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128Java8BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128JavaXBoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128JavaXBoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right128JavaXBoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64Java7BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64Java7BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64Java7BoxedObject.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64Java8BoxedInt.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64Java8BoxedLong.java (96%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64Java8BoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64JavaXBoxedInt.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64JavaXBoxedLong.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/Right64JavaXBoxedObject.java (95%) rename monix-execution/{jvm/src/main/java/monix/execution/internal/atomic => atomic/jvm/src/main/java/monix/execution/atomic/internal}/UnsafeAccess.java (97%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala (100%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala (99%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala (99%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala (99%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala (98%) rename monix-execution/{ => atomic}/jvm/src/main/scala/monix/execution/atomic/package.scala (97%) rename monix-execution/{ => atomic}/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala (62%) rename monix-execution/{ => atomic}/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala (100%) create mode 100644 monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala rename monix-execution/{ => atomic}/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala (100%) rename monix-execution/{ => atomic}/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala (100%) rename monix-execution/{ => atomic}/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala (100%) rename monix-execution/{ => atomic}/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala (100%) create mode 100644 monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala rename monix-execution/{shared/src/main/scala_3.0-/monix/execution/misc => atomic/shared/src/main/scala_3.0-/monix/execution/internal}/HygieneUtilMacros.scala (94%) rename monix-execution/{shared/src/main/scala_3.0-/monix/execution/misc => atomic/shared/src/main/scala_3.0-/monix/execution/internal}/InlineMacros.scala (97%) rename monix-execution/{shared/src/main/scala_3.0-/monix/execution/misc/test => atomic/shared/src/main/scala_3.0-/monix/execution/internal}/TestBox.scala (89%) rename monix-execution/{shared/src/main/scala_3.0-/monix/execution/misc/test => atomic/shared/src/main/scala_3.0-/monix/execution/internal}/TestInlineMacros.scala (98%) rename monix-execution/{ => atomic}/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala (100%) rename monix-execution/{ => atomic}/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala (100%) rename monix-execution/{ => atomic}/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala (100%) rename monix-execution/{ => atomic}/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala (100%) rename monix-execution/{shared/src/test/scala_3.0-/monix/execution/misc => atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal}/InlineMacrosTest.scala (94%) delete mode 100644 monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java delete mode 100644 monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6769ff8ca..303c4e604 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -214,8 +214,7 @@ jobs: matrix: include: - { java: 8, scala: 2.13.8 } - # TODO: enable this after it works! - # - { java: 8, scala: 3.1.2 } + - { java: 8, scala: 3.1.2 } steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 3801a9d30..94aa24606 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ TAGS metals.sbt .vscode .bsp +*.sublime* diff --git a/build.sbt b/build.sbt index 699549ee0..96c74260e 100644 --- a/build.sbt +++ b/build.sbt @@ -168,7 +168,7 @@ lazy val isDotty = lazy val sharedSettings = pgpSettings ++ Seq( organization := "io.monix", // Value extracted from .github/workflows/build.yml - scalaVersion := crossScalaVersionsFromBuildYaml.value.head.value, + scalaVersion := crossScalaVersionsFromBuildYaml.value.flatMap(_.filterPrefix("2.13.")).head.value, // Value extracted from .github/workflows/build.yml crossScalaVersions := crossScalaVersionsFromBuildYaml.value.toIndexedSeq.map(_.value), gitHubTreeTagOrHash := { @@ -358,7 +358,14 @@ lazy val assemblyShadeSettings = Seq( lazy val unidocSettings = Seq( ScalaUnidoc / unidoc / unidocProjectFilter := - inProjects(executionJVM, catnapJVM, evalJVM, tailJVM, reactiveJVM), + inProjects( + executionAtomicJVM, + executionJVM, + catnapJVM, + evalJVM, + tailJVM, + reactiveJVM, + ), // Exclude monix.*.internal from ScalaDoc ScalaUnidoc / unidoc / sources ~= (_.filterNot { file => @@ -398,11 +405,12 @@ lazy val sharedJSSettings = Seq( ) def mimaSettings(projectName: String) = Seq( - mimaPreviousArtifacts := Set("io.monix" %% projectName % monixSeries), - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_0_1, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_2_0, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_3_0, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0 + ThisBuild / mimaFailOnNoPrevious := false, + // mimaPreviousArtifacts := Set("io.monix" %% projectName % monixSeries), + // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_0_1, + // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_2_0, + // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_3_0, + // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0 ) lazy val doctestTestSettings = Seq( @@ -579,6 +587,25 @@ lazy val executionShadedJCTools = project ) ) +// -------------------------------------------- +// monix-execution-atomic + +lazy val executionAtomicProfile = + crossModule( + projectName = "monix-execution-atomic", + withDocTests = false, + crossSettings = Seq( + description := "Sub-module of Monix, exposing low-level atomic references. See: https://monix.io", + )) + +lazy val executionAtomicJVM = project.in(file("monix-execution/atomic/jvm")) + .configure(executionAtomicProfile.jvm) + .settings(macroDependencies) + +lazy val executionAtomicJS = project.in(file("monix-execution/atomic/js")) + .configure(executionProfile.js) + .settings(macroDependencies) + // -------------------------------------------- // monix-execution @@ -597,12 +624,16 @@ lazy val executionJVM = project .configure(executionProfile.jvm) .settings(macroDependencies) .dependsOn(executionShadedJCTools) + .aggregate(executionAtomicJVM) + .dependsOn(executionAtomicJVM) .settings(libraryDependencies += reactiveStreamsLib) lazy val executionJS = project .in(file("monix-execution/js")) .configure(executionProfile.js) .settings(macroDependencies) + .aggregate(executionAtomicJS) + .dependsOn(executionAtomicJS) // -------------------------------------------- // monix-catnap diff --git a/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala b/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala index d0c07e961..c10049fa7 100644 --- a/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala +++ b/monix-catnap/jvm/src/test/scala/monix/catnap/CatsEffectIssue380Suite.scala @@ -50,7 +50,7 @@ object CatsEffectIssue380Suite extends SimpleTestSuite { val dt = 10.seconds assert(task.unsafeRunTimed(dt).nonEmpty, s"timed-out after $dt") } finally { - cancelLoop := true + cancelLoop.set(true) } } } finally { @@ -82,7 +82,7 @@ object CatsEffectIssue380Suite extends SimpleTestSuite { val dt = 10.seconds assert(task.unsafeRunTimed(dt).nonEmpty, s"timed-out after $dt") } finally { - cancelLoop := true + cancelLoop.set(true) } } } finally { diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicAny.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicByte.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicChar.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicInt.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicLong.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/AtomicShort.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/package.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/package.scala similarity index 100% rename from monix-execution/js/src/main/scala/monix/execution/atomic/package.scala rename to monix-execution/atomic/js/src/main/scala/monix/execution/atomic/package.scala diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala similarity index 61% rename from monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala rename to monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index 7bae43f6d..afd0fff1f 100644 --- a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -17,112 +17,80 @@ package monix.execution.atomic -import monix.execution.misc._ +import monix.execution.atomic.internal._ import scala.reflect.macros.whitebox import monix.execution.atomic.PaddingStrategy.NoPadding /** * Base trait of all atomic references, no matter the type. */ -abstract class Atomic[A] extends Serializable { - /** Get the current value persisted by this Atomic. */ +abstract class Atomic[A] extends Serializable with internal.AtomicDocs { + /** $atomicGetDesc */ def get(): A - /** Get the current value persisted by this Atomic, an alias for `get()`. */ - final def apply(): A = macro Atomic.Macros.applyMacro[A] - - /** Updates the current value. - * - * @param update will be the new value returned by `get()` - */ + /** $atomicSetDesc */ def set(update: A): Unit - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - final def update(value: A): Unit = macro Atomic.Macros.setMacro[A] - - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - final def `:=`(value: A): Unit = macro Atomic.Macros.setMacro[A] - - /** Does a compare-and-set operation on the current value. For more info, checkout the related - * [[https://en.wikipedia.org/wiki/Compare-and-swap Compare-and-swap Wikipedia page]]. - * - * It's an atomic, worry free operation. + /** $compareAndSetDesc + * + * $atomicBestPractices * - * @param expect is the value you expect to be persisted when the operation happens - * @param update will be the new value, should the check for `expect` succeeds - * @return either true in case the operation succeeded or false otherwise + * @param expect $atomicCASExpectParam + * @param update $atomicCASUpdateParam + * @return $atomicCASReturn $atomicCASReturn */ def compareAndSet(expect: A, update: A): Boolean - /** Sets the persisted value to `update` and returns the old value that was in place. - * It's an atomic, worry free operation. + /** $atomicGetAndSetDesc + * + * @param update $atomicGetAndSetParam + * @return $atomicGetAndSetReturn */ def getAndSet(update: A): A - /** Eventually sets to the given value. - * Has weaker visibility guarantees than the normal `set()`. - */ + /** $atomicLazySetDesc */ final def lazySet(value: A): Unit = macro Atomic.Macros.setMacro[A] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by your callback. + /** $atomicTransformExtractDesc * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + * $atomicTransformBestPractices * - * @param cb is a callback that receives the current value as input and returns a tuple that specifies - * the update + what should this method return when the operation succeeds. - * @return whatever was specified by your callback, once the operation succeeds + * @param f $atomicTransformExtractParamF + * + * @return $atomicTransformExtractReturn */ - final def transformAndExtract[U](cb: (A) => (U, A)): U = + final def transformAndExtract[U](f: A => (U, A)): U = macro Atomic.Macros.transformAndExtractMacro[A, U] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + /** $atomicTransformAndGetDesc + * + * $atomicTransformBestPractices * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return whatever the update is, after the operation succeeds + * @param f $atomicTransformParam + * + * @return $atomicTransformAndGetReturn */ - final def transformAndGet(cb: (A) => A): A = + final def transformAndGet(f: A => A): A = macro Atomic.Macros.transformAndGetMacro[A] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. + /** $atomicGetAndTransformDesc * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + * $atomicTransformBestPractices * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return the old value, just prior to when the successful update happened + * @param f $atomicTransformParam + * + * @return $atomicGetAndTransformReturn */ - final def getAndTransform(cb: (A) => A): A = + final def getAndTransform(f: A => A): A = macro Atomic.Macros.getAndTransformMacro[A] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + /** $atomicTransformDesc * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam */ - final def transform(cb: (A) => A): Unit = + final def transform(f: A => A): Unit = macro Atomic.Macros.transformMacro[A] } @@ -179,11 +147,37 @@ object Atomic { def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = builder + implicit final class DeprecatedExtensions[A](val self: Atomic[A]) extends AnyVal { + /** DEPRECATED - switch to [[Atomic.get]]. */ + @deprecated("Switch to .get()", "4.0.0") + def apply(): A = { + // $COVERAGE-OFF$ + self.get() + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def update(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def `:=`(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + } + /** Macros implementations for the [[Atomic]] type */ class Macros(override val c: whitebox.Context) extends InlineMacros with HygieneUtilMacros { import c.universe._ - def transformMacro[A: c.WeakTypeTag](cb: c.Expr[A => A]): c.Expr[Unit] = { + def transformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") @@ -191,16 +185,16 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) + if (util.isClean(f)) q""" val $self = $selfExpr - $self.set($cb($self.get())) + $self.set($f($self.get())) """ else { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f $self.set($fn($self.get())) """ } @@ -208,7 +202,7 @@ object Atomic { inlineAndReset[Unit](tree) } - def transformAndGetMacro[A: c.WeakTypeTag](cb: c.Expr[A => A]): c.Expr[A] = { + def transformAndGetMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -218,11 +212,11 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr val $current = $self.get() - val $update = $cb($current) + val $update = $f($current) $self.set($update) $update """ @@ -230,7 +224,7 @@ object Atomic { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f val $current = $self.get() val $update = $fn($current) $self.set($update) @@ -241,7 +235,7 @@ object Atomic { inlineAndReset[A](tree) } - def getAndTransformMacro[A: c.WeakTypeTag](cb: c.Expr[A => A]): c.Expr[A] = { + def getAndTransformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -251,11 +245,11 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr val $current = $self.get() - val $update = $cb($current) + val $update = $f($current) $self.set($update) $current """ @@ -263,7 +257,7 @@ object Atomic { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f val $current = $self.get() val $update = $fn($current) $self.set($update) @@ -274,7 +268,7 @@ object Atomic { inlineAndReset[A](tree) } - def transformAndExtractMacro[S: c.WeakTypeTag, A: c.WeakTypeTag](cb: c.Expr[S => (A, S)]): c.Expr[A] = { + def transformAndExtractMacro[S: c.WeakTypeTag, A: c.WeakTypeTag](f: c.Expr[S => (A, S)]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[S]](c.prefix.tree) val self = util.name("self") @@ -286,11 +280,11 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr val $current = $self.get() - val ($result, $update) = $cb($current) + val ($result, $update) = $f($current) $self.set($update) $result """ @@ -298,7 +292,7 @@ object Atomic { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f val $current = $self.get() val ($result, $update) = $fn($current) $self.set($update) diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala new file mode 100644 index 000000000..471f96524 --- /dev/null +++ b/monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.atomic + +/** + * Base trait of all atomic references, no matter the type. + */ +abstract class Atomic[A] extends Serializable with internal.AtomicDocs { + /** $atomicGetDesc */ + def get(): A + + /** $atomicSetDesc */ + def set(update: A): Unit + + /** $compareAndSetDesc + * + * $atomicBestPractices + * + * @param expect $atomicCASExpectParam + * @param update $atomicCASUpdateParam + * @return $atomicCASReturn $atomicCASReturn + */ + def compareAndSet(expect: A, update: A): Boolean + + /** $atomicGetAndSetDesc + * + * @param update $atomicGetAndSetParam + * @return $atomicGetAndSetReturn + */ + def getAndSet(update: A): A + + /** $atomicLazySetDesc */ + def lazySet(update: A): Unit = set(update) + + /** $atomicTransformExtractDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformExtractParamF + * + * @return $atomicTransformExtractReturn + */ + inline final def transformAndExtract[U](inline f: A => (U, A)): U = { + val current = get() + val (result, update) = f(current) + set(update) + result + } + + /** $atomicTransformAndGetDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam + * + * @return $atomicTransformAndGetReturn + */ + inline final def transformAndGet(inline f: (A) => A): A = { + val current = get() + val update = f(current) + set(update) + update + } + + /** $atomicGetAndTransformDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam + * + * @return $atomicGetAndTransformReturn + */ + inline final def getAndTransform(inline f: (A) => A): A = { + val current = get() + val update = f(current) + + set(update) + current + } + + /** $atomicTransformDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam + */ + inline final def transform(inline f: (A) => A): Unit = + set(f(get())) +} + +object Atomic { + /** Constructs an `Atomic[A]` reference. + * + * Based on the `initialValue`, it will return the best, most + * specific type. E.g. you give it a number, it will return + * something inheriting from `AtomicNumber[A]`. That's why it takes + * an `AtomicBuilder[T, R]` as an implicit parameter - but worry + * not about such details as it just works. + * + * @param initialValue is the initial value with which to + * initialize the Atomic reference + * + * @param builder is the builder that helps us to build the + * best reference possible, based on our `initialValue` + */ + inline def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = + builder.buildInstance(initialValue, PaddingStrategy.NoPadding, allowPlatformIntrinsics = true) + + /** Constructs an `Atomic[A]` reference, applying the provided + * [[PaddingStrategy]] in order to counter the "false sharing" + * problem. + * + * Based on the `initialValue`, it will return the best, most + * specific type. E.g. you give it a number, it will return + * something inheriting from `AtomicNumber[A]`. That's why it takes + * an `AtomicBuilder[A, R]` as an implicit parameter - but worry + * not about such details as it just works. + * + * Note that for ''Scala.js'' we aren't applying any padding, as it + * doesn't make much sense, since Javascript execution is single + * threaded, but this builder is provided for syntax compatibility + * anyway across the JVM and Javascript and we never know how + * Javascript engines will evolve. + * + * @param initialValue is the initial value with which to + * initialize the Atomic reference + * + * @param padding is the [[PaddingStrategy]] to apply + * + * @param builder is the builder that helps us to build the + * best reference possible, based on our `initialValue` + */ + inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( + implicit builder: AtomicBuilder[A, R] + ): R = + builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) + + /** Returns the builder that would be chosen to construct Atomic + * references for the given `initialValue`. + */ + def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = + builder + + extension [A](self: Atomic[A]) { + /** DEPRECATED - switch to [[Atomic.get]]. */ + @deprecated("Switch to .get()", "4.0.0") + def apply(): A = { + // $COVERAGE-OFF$ + self.get() + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def update(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def `:=`(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + } +} diff --git a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxPaddingStrategy.java similarity index 89% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxPaddingStrategy.java index 8dfc79143..afb63a4fe 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxPaddingStrategy.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxPaddingStrategy.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; /** * INTERNAL API — used in the implementation of @@ -28,7 +26,7 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public enum BoxPaddingStrategy { +public enum BoxPaddingStrategy { NO_PADDING, LEFT_64, RIGHT_64, LEFT_RIGHT_128, LEFT_128, RIGHT_128, LEFT_RIGHT_256 } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedInt.java similarity index 90% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedInt.java index 6ec986e1a..956473a33 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; /** * INTERNAL API — used in the implementation of @@ -28,7 +26,7 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public interface BoxedInt { +public interface BoxedInt { int volatileGet(); void volatileSet(int update); void lazySet(int update); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedLong.java similarity index 90% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedLong.java index e835e12e1..d5571d75a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; /** * INTERNAL API — used in the implementation of @@ -28,7 +26,7 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public interface BoxedLong { +public interface BoxedLong { long volatileGet(); void volatileSet(long update); void lazySet(long update); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedObject.java similarity index 90% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedObject.java index cf3b797e3..f557abcb7 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/BoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; /** * INTERNAL API — used in the implementation of @@ -28,7 +26,7 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public interface BoxedObject { +public interface BoxedObject { Object volatileGet(); void volatileSet(Object update); void lazySet(Object update); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java similarity index 98% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java index fde45bbc9..c5375edfe 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import scala.MatchError; /** @@ -29,7 +28,7 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public final class Factory { +public final class Factory { public static BoxedObject newBoxedObject(Object initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java index 4fb734e51..495565b30 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128Java7BoxedInt extends LeftPadding120 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java index 4c676813b..a2b72ea50 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128Java7BoxedLong extends LeftPadding120 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java index 4fdacac8e..518df0f21 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128Java7BoxedObject extends LeftPadding120 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java index d6a9a50e4..92f0517fb 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128Java8BoxedInt extends LeftPadding120 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java index 05b3f42cf..3afce1c1f 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128Java8BoxedLong extends LeftPadding120 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java index 95724a541..efa5e2e8f 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128Java8BoxedObject extends LeftPadding120 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java index 349b9c6ab..b24f9ac52 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128JavaXBoxedInt extends LeftPadding120 implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java index 022465073..5dd9b7e72 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128JavaXBoxedLong extends LeftPadding120 implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java similarity index 94% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java index e0af9e48e..a0a5fffb6 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left128JavaXBoxedObject extends LeftPadding120 implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java index e13517c22..42bdfa4c1 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64Java7BoxedInt extends LeftPadding56 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java index 6d5684ed8..ccd46cde7 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64Java7BoxedLong extends LeftPadding56 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java index ccdc0969a..0975aa666 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64Java7BoxedObject extends LeftPadding56 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java index 5c7a51955..db5d76a57 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -31,7 +30,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64Java8BoxedInt extends LeftPadding56 implements BoxedInt { private static final long OFFSET; private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java index d21c7f85e..5dfa207c3 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java @@ -15,12 +15,10 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -32,7 +30,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64Java8BoxedLong extends LeftPadding56 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java index 662f93d3a..d934cacfc 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64Java8BoxedObject extends LeftPadding56 implements BoxedObject { public volatile Object value; private static final long OFFSET; @@ -69,4 +66,4 @@ public boolean compareAndSet(Object current, Object update) { public Object getAndSet(Object update) { return UNSAFE.getAndSetObject(this, OFFSET, update); } -} \ No newline at end of file +} diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java index 5cf4feb45..4efa1a831 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64JavaXBoxedInt extends LeftPadding56 implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java index 2dd79fed2..b3e5d9444 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64JavaXBoxedLong extends LeftPadding56 implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java similarity index 94% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java index 48e3a9f7a..539a384be 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Left64JavaXBoxedObject extends LeftPadding56 implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftPadding120.java similarity index 92% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftPadding120.java index af6945452..46a68c44e 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding120.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftPadding120.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; /** * INTERNAL API — used in the implementation of @@ -28,7 +26,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftPadding120 { public volatile long p01, p02, p03, p04, p05, p06, p07, p08 = 7; public volatile long p09, p10, p11, p12, p13, p14, p15 = 8; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftPadding56.java similarity index 92% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftPadding56.java index 22aa158cc..be839b0cf 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftPadding56.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftPadding56.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; /** * INTERNAL API — used in the implementation of @@ -28,7 +26,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftPadding56 { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java index 55ad807fc..cc9d09026 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128Java7BoxedInt extends LeftRight128Java7BoxedIntImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +50,6 @@ final class LeftRight128Java7BoxedInt extends LeftRight128Java7BoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128Java7BoxedIntImpl extends LeftPadding56 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java index 75f402062..e87bb177d 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128Java7BoxedLong extends LeftRight128Java7BoxedLongImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +50,6 @@ final class LeftRight128Java7BoxedLong extends LeftRight128Java7BoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128Java7BoxedLongImpl extends LeftPadding56 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java index 5372145c9..922d41b8b 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128Java7BoxedObject extends LeftRight128Java7BoxedObjectImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +50,6 @@ final class LeftRight128Java7BoxedObject extends LeftRight128Java7BoxedObjectImp * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128Java7BoxedObjectImpl extends LeftPadding56 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java index 910896345..cfb04dd15 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128Java8BoxedInt extends LeftRight128Java8BoxedIntImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +50,6 @@ final class LeftRight128Java8BoxedInt extends LeftRight128Java8BoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128Java8BoxedIntImpl extends LeftPadding56 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java index bf104d8f5..7500b5719 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128Java8BoxedLong extends LeftRight128Java8BoxedLongImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +50,6 @@ final class LeftRight128Java8BoxedLong extends LeftRight128Java8BoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128Java8BoxedLongImpl extends LeftPadding56 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java index 8a52f6bb8..bcf932573 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128Java8BoxedObject extends LeftRight128Java8BoxedObjectImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +50,6 @@ final class LeftRight128Java8BoxedObject extends LeftRight128Java8BoxedObjectImp * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128Java8BoxedObjectImpl extends LeftPadding56 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java index bf0d40e93..52585e451 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128JavaXBoxedInt extends LeftRight128JavaXBoxedIntImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +49,6 @@ final class LeftRight128JavaXBoxedInt extends LeftRight128JavaXBoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128JavaXBoxedIntImpl extends LeftPadding56 implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java index d97bb7d50..2010186ab 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128JavaXBoxedLong extends LeftRight128JavaXBoxedLongImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +49,6 @@ final class LeftRight128JavaXBoxedLong extends LeftRight128JavaXBoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128JavaXBoxedLongImpl extends LeftPadding56 implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java index 71f69be6d..9db4ccbf3 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight128JavaXBoxedObject extends LeftRight128JavaXBoxedObjectImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -52,7 +49,6 @@ final class LeftRight128JavaXBoxedObject extends LeftRight128JavaXBoxedObjectImp * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight128JavaXBoxedObjectImpl extends LeftPadding56 implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java index f1824d651..581097aa8 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256Java7BoxedInt extends LeftRight256Java7BoxedIntImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -55,7 +53,6 @@ final class LeftRight256Java7BoxedInt extends LeftRight256Java7BoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256Java7BoxedIntImpl extends LeftPadding120 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java index 10201cbca..6fda6111a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256Java7BoxedLong extends LeftRight256Java7BoxedLongImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -56,7 +54,6 @@ final class LeftRight256Java7BoxedLong extends LeftRight256Java7BoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256Java7BoxedLongImpl extends LeftPadding120 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java index d44e66f9b..f31dad768 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256Java7BoxedObject extends LeftRight256Java7BoxedObjectImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -56,7 +54,6 @@ final class LeftRight256Java7BoxedObject extends LeftRight256Java7BoxedObjectImp * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256Java7BoxedObjectImpl extends LeftPadding120 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java index 6ee97a7b7..2fa5ae48e 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256Java8BoxedInt extends LeftRight256Java8BoxedIntImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -57,7 +54,6 @@ final class LeftRight256Java8BoxedInt extends LeftRight256Java8BoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256Java8BoxedIntImpl extends LeftPadding120 implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java index 145bd6510..b590c2ae8 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256Java8BoxedLong extends LeftRight256Java8BoxedLongImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -56,7 +54,6 @@ final class LeftRight256Java8BoxedLong extends LeftRight256Java8BoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256Java8BoxedLongImpl extends LeftPadding120 implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java index ce1384e7e..799f16491 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256Java8BoxedObject extends LeftRight256Java8BoxedObjectImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -57,7 +55,6 @@ final class LeftRight256Java8BoxedObject extends LeftRight256Java8BoxedObjectImp * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256Java8BoxedObjectImpl extends LeftPadding120 implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java index 46f4ab330..c1ff8da10 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256JavaXBoxedInt extends LeftRight256JavaXBoxedIntImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -56,7 +53,6 @@ final class LeftRight256JavaXBoxedInt extends LeftRight256JavaXBoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256JavaXBoxedIntImpl extends LeftPadding120 implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java index 04d756e43..a7a77e1d6 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256JavaXBoxedLong extends LeftRight256JavaXBoxedLongImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -56,7 +53,6 @@ final class LeftRight256JavaXBoxedLong extends LeftRight256JavaXBoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256JavaXBoxedLongImpl extends LeftPadding120 implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java index adfad39a7..3f8785d4d 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class LeftRight256JavaXBoxedObject extends LeftRight256JavaXBoxedObjectImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -56,7 +53,6 @@ final class LeftRight256JavaXBoxedObject extends LeftRight256JavaXBoxedObjectImp * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class LeftRight256JavaXBoxedObjectImpl extends LeftPadding120 implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java index 58d7fe398..beb1c80c1 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJava7BoxedInt implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java index 71655c434..7ee24bfd0 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJava7BoxedLong implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java index ad6f68f88..a56974673 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJava7BoxedObject implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java index 9dba5e10f..cdada9824 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJava8BoxedInt implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java index dcbf6df88..33b6921b8 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJava8BoxedLong implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java index 9ff33ea30..1d38e50e1 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJava8BoxedObject implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java similarity index 94% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java index e6e13cc94..568b4168a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJavaXBoxedInt implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java similarity index 94% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java index 388b9d274..00cab30de 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJavaXBoxedLong implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java similarity index 94% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java index 1d42994ff..c12eb7716 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class NormalJavaXBoxedObject implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java index 5383bd3e6..d26041000 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128Java7BoxedInt extends Right128Java7BoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +51,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128Java7BoxedIntImpl implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java index 8dc6c68bd..5980e2a01 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128Java7BoxedLong extends Right128Java7BoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +51,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128Java7BoxedLongImpl implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java index 42612f9ae..ad64b09b1 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128Java7BoxedObject extends Right128Java7BoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -54,7 +51,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128Java7BoxedObjectImpl implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java index 18444399f..473150327 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128Java8BoxedInt extends Right128Java8BoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +51,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128Java8BoxedIntImpl implements BoxedInt { public volatile int value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java index 0737e9a23..415f54f49 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128Java8BoxedLong extends Right128Java8BoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +51,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128Java8BoxedLongImpl implements BoxedLong { public volatile long value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java index a0de19783..343f4130f 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; import java.lang.reflect.Field; @@ -30,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128Java8BoxedObject extends Right128Java8BoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +51,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128Java8BoxedObjectImpl implements BoxedObject { public volatile Object value; private static final long OFFSET; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java index d5a471499..b24646f75 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128JavaXBoxedInt extends Right128JavaXBoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +50,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128JavaXBoxedIntImpl implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java index ead08c7d0..bd6d297ce 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128JavaXBoxedLong extends Right128JavaXBoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +50,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128JavaXBoxedLongImpl implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java index 2aeb91433..f3017410d 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right128JavaXBoxedObject extends Right128JavaXBoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -53,7 +50,6 @@ public long sum() { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right128JavaXBoxedObjectImpl implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java index 9dfa01760..4f7a04ec8 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64Java7BoxedIntImpl implements BoxedInt { public volatile int value; private static final long OFFSET; @@ -91,7 +88,6 @@ public int getAndAdd(int delta) { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64Java7BoxedInt extends Right64Java7BoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java index 96d37bdb9..20cea12b1 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64Java7BoxedLongImpl implements BoxedLong { public volatile long value; private static final long OFFSET; @@ -91,7 +88,6 @@ public long getAndAdd(long delta) { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64Java7BoxedLong extends Right64Java7BoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java index 1b69bda29..14e4296cf 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64Java7BoxedObjectImpl implements BoxedObject { public volatile Object value; private static final long OFFSET; @@ -83,7 +80,6 @@ public Object getAndSet(Object update) { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64Java7BoxedObject extends Right64Java7BoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java index b8e6a4d21..6a66edd2c 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64Java8BoxedIntImpl implements BoxedInt { public volatile int value; private static final long OFFSET; @@ -84,7 +81,6 @@ public int getAndAdd(int delta) { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64Java8BoxedInt extends Right64Java8BoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java similarity index 96% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java index 9ca25ceaa..25364563a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64Java8BoxedLongImpl implements BoxedLong { public volatile long value; private static final long OFFSET; @@ -84,7 +81,6 @@ public long getAndAdd(long delta) { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64Java8BoxedLong extends Right64Java8BoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java index 93c9ade70..f4ad8db90 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java8BoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java @@ -15,11 +15,9 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import sun.misc.Unsafe; - import java.lang.reflect.Field; /** @@ -31,7 +29,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64Java8BoxedObjectImpl implements BoxedObject { public volatile Object value; private static final long OFFSET; @@ -80,7 +77,6 @@ public Object getAndSet(Object update) { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64Java8BoxedObject extends Right64Java8BoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java index 14e16a528..642b89291 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64JavaXBoxedInt extends Right64JavaXBoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } @@ -49,7 +46,6 @@ final class Right64JavaXBoxedInt extends Right64JavaXBoxedIntImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64JavaXBoxedIntImpl implements BoxedInt { public volatile int value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java index 89ad99013..63aadb29a 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicLongFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64JavaXBoxedLong extends Right64JavaXBoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } @@ -49,7 +46,6 @@ final class Right64JavaXBoxedLong extends Right64JavaXBoxedLongImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64JavaXBoxedLongImpl implements BoxedLong { public volatile long value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java similarity index 95% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java index 18b9984e7..f02a95437 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java @@ -15,9 +15,7 @@ * limitations under the License. */ -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; +package monix.execution.atomic.internal; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; @@ -30,7 +28,6 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi final class Right64JavaXBoxedObject extends Right64JavaXBoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } @@ -49,7 +46,6 @@ final class Right64JavaXBoxedObject extends Right64JavaXBoxedObjectImpl { * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi abstract class Right64JavaXBoxedObjectImpl implements BoxedObject { public volatile Object value; diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java similarity index 97% rename from monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java rename to monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java index bd876bc66..3b739284c 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/UnsafeAccess.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java @@ -15,9 +15,8 @@ * limitations under the License. */ -package monix.execution.internal.atomic; +package monix.execution.atomic.internal; -import monix.execution.internal.InternalApi; import scala.util.control.NonFatal; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -31,7 +30,7 @@ * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public final class UnsafeAccess { +public final class UnsafeAccess { private static final Object UNSAFE; /** True in case the underlying platform supports diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala index 25212df10..70955e940 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedObject, Factory } +import monix.execution.atomic.internal.{ BoxedObject, Factory } /** Atomic references wrapping `AnyRef` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index f8ce7ffc4..b053461d5 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedInt, Factory } +import monix.execution.atomic.internal.{ BoxedInt, Factory } /** Atomic references wrapping `Boolean` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala similarity index 100% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala index aafb1f0f3..7057f9695 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedInt, Factory } +import monix.execution.atomic.internal.{ BoxedInt, Factory } /** Atomic references wrapping `Byte` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala index e1d3c307b..bcfd408b0 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedInt, Factory } +import monix.execution.atomic.internal.{ BoxedInt, Factory } /** Atomic references wrapping `Char` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala similarity index 99% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala index 1efaa0895..b1897a19f 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -17,10 +17,10 @@ package monix.execution.atomic +import monix.execution.atomic.internal.{ BoxedLong, Factory } import monix.execution.atomic.PaddingStrategy.NoPadding -import scala.annotation.tailrec import java.lang.Double.{ doubleToLongBits, longBitsToDouble } -import monix.execution.internal.atomic.{ BoxedLong, Factory } +import scala.annotation.tailrec /** Atomic references wrapping `Double` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala similarity index 99% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 3a8289bce..8d49357cf 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -17,10 +17,10 @@ package monix.execution.atomic +import monix.execution.atomic.internal.{ BoxedInt, Factory } import monix.execution.atomic.PaddingStrategy.NoPadding import scala.annotation.tailrec import java.lang.Float.{ floatToIntBits, intBitsToFloat } -import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Float` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala index 4649f84cd..5472e539a 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedInt, Factory } +import monix.execution.atomic.internal.{ BoxedInt, Factory } /** Atomic references wrapping `Int` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala index 02a67606b..38962ee8f 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedLong, Factory } +import monix.execution.atomic.internal.{ BoxedLong, Factory } /** Atomic references wrapping `Long` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala similarity index 99% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index 462ba068d..0eaa1d615 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedObject, Factory } +import monix.execution.atomic.internal.{ BoxedObject, Factory } import scala.annotation.tailrec /** Atomic references wrapping any values implementing diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala similarity index 98% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala index e0c6b4c94..d8e08ada5 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{ BoxedInt, Factory } +import monix.execution.atomic.internal.{ BoxedInt, Factory } /** Atomic references wrapping `Short` values. * diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala similarity index 97% rename from monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala rename to monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala index c0760cec7..c57f80a67 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/package.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala @@ -18,7 +18,7 @@ package monix.execution import monix.execution.atomic.PaddingStrategy._ -import monix.execution.internal.atomic.BoxPaddingStrategy +import monix.execution.atomic.internal.BoxPaddingStrategy /** A small toolkit of classes that support compare-and-swap semantics * for safe mutation of variables. diff --git a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala similarity index 62% rename from monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala rename to monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index 0d698d48b..cd0f5f743 100644 --- a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -18,109 +18,78 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.misc._ - +import monix.execution.atomic.internal._ import scala.reflect.macros.whitebox /** * Base trait of all atomic references, no matter the type. */ -abstract class Atomic[A] extends Serializable { - /** Get the current value persisted by this Atomic. */ +abstract class Atomic[A] extends Serializable with internal.AtomicDocs { + /** $atomicGetDesc */ def get(): A - /** Get the current value persisted by this Atomic, an alias for `get()`. */ - final def apply(): A = macro Atomic.Macros.applyMacro[A] - - /** Updates the current value. - * - * @param update will be the new value returned by `get()` - */ + /** $atomicSetDesc */ def set(update: A): Unit - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - final def update(value: A): Unit = macro Atomic.Macros.setMacro[A] - - /** Alias for [[set]]. Updates the current value. + /** $compareAndSetDesc + * + * $atomicBestPractices * - * @param value will be the new value returned by `get()` - */ - final def `:=`(value: A): Unit = macro Atomic.Macros.setMacro[A] - - /** Does a compare-and-set operation on the current value. For more info, checkout the related - * [[https://en.wikipedia.org/wiki/Compare-and-swap Compare-and-swap Wikipedia page]]. - * - * It's an atomic, worry free operation. - * - * @param expect is the value you expect to be persisted when the operation happens - * @param update will be the new value, should the check for `expect` succeeds - * @return either true in case the operation succeeded or false otherwise + * @param expect $atomicCASExpectParam + * @param update $atomicCASUpdateParam + * @return $atomicCASReturn $atomicCASReturn */ def compareAndSet(expect: A, update: A): Boolean - /** Sets the persisted value to `update` and returns the old value that was in place. - * It's an atomic, worry free operation. + /** $atomicGetAndSetDesc + * + * @param update $atomicGetAndSetParam + * @return $atomicGetAndSetReturn */ def getAndSet(update: A): A - /** Eventually sets to the given value. - * Has weaker visibility guarantees than the normal `set()`. - */ + /** $atomicLazySetDesc */ def lazySet(update: A): Unit - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by your callback. + /** $atomicTransformExtractDesc * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + * $atomicTransformBestPractices * - * @param cb is a callback that receives the current value as input and returns a tuple that specifies - * the update + what should this method return when the operation succeeds. - * @return whatever was specified by your callback, once the operation succeeds + * @param f $atomicTransformExtractParamF + * + * @return $atomicTransformExtractReturn */ - def transformAndExtract[U](cb: (A) => (U, A)): U = macro Atomic.Macros.transformAndExtractMacro[A, U] + def transformAndExtract[U](f: (A) => (U, A)): U = + macro Atomic.Macros.transformAndExtractMacro[A, U] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. + /** $atomicTransformAndGetDesc * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + * $atomicTransformBestPractices * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return whatever the update is, after the operation succeeds + * @param f $atomicTransformParam + * + * @return $atomicTransformAndGetReturn */ - def transformAndGet(cb: (A) => A): A = macro Atomic.Macros.transformAndGetMacro[A] + def transformAndGet(f: A => A): A = + macro Atomic.Macros.transformAndGetMacro[A] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. + /** $atomicGetAndTransformDesc * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return the old value, just prior to when the successful update happened + * @param f $atomicTransformParam + * + * @return $atomicGetAndTransformReturn */ - final def getAndTransform(cb: (A) => A): A = macro Atomic.Macros.getAndTransformMacro[A] + final def getAndTransform(f: A => A): A = + macro Atomic.Macros.getAndTransformMacro[A] - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. + /** $atomicTransformDesc * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam */ - final def transform(cb: (A) => A): Unit = macro Atomic.Macros.transformMacro[A] + final def transform(f: A => A): Unit = + macro Atomic.Macros.transformMacro[A] } object Atomic { @@ -165,8 +134,8 @@ object Atomic { * @param builder is the builder that helps us to build the * best reference possible, based on our `initialValue` */ - def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R] + def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)(implicit + builder: AtomicBuilder[A, R] ): R = macro Atomic.Macros.buildAnyWithPaddingMacro[A, R] /** Returns the builder that would be chosen to construct Atomic @@ -175,11 +144,37 @@ object Atomic { def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = builder + implicit final class DeprecatedExtensions[A](val self: Atomic[A]) extends AnyVal { + /** DEPRECATED - switch to [[Atomic.get]]. */ + @deprecated("Switch to .get()", "4.0.0") + def apply(): A = { + // $COVERAGE-OFF$ + self.get() + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def update(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def `:=`(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + } + /** Macros implementations for the [[Atomic]] type */ class Macros(override val c: whitebox.Context) extends HygieneUtilMacros with InlineMacros { import c.universe._ - def transformMacro[A: c.WeakTypeTag](cb: c.Expr[A => A]): c.Expr[Unit] = { + def transformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -189,22 +184,22 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr var $current = $self.get() - var $update = $cb($current) + var $update = $f($current) while (!$self.compareAndSet($current, $update)) { $current = $self.get() - $update = $cb($current) + $update = $f($current) } """ } else { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f var $current = $self.get() var $update = $fn($current) @@ -219,7 +214,7 @@ object Atomic { inlineAndReset[Unit](tree) } - def transformAndGetMacro[A: c.WeakTypeTag](cb: c.Expr[A => A]): c.Expr[A] = { + def transformAndGetMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -229,15 +224,15 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr var $current = $self.get() - var $update = $cb($current) + var $update = $f($current) while (!$self.compareAndSet($current, $update)) { $current = $self.get() - $update = $cb($current) + $update = $f($current) } $update @@ -246,7 +241,7 @@ object Atomic { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f var $current = $self.get() var $update = $fn($current) @@ -262,7 +257,7 @@ object Atomic { inlineAndReset[A](tree) } - def getAndTransformMacro[A: c.WeakTypeTag](cb: c.Expr[A => A]): c.Expr[A] = { + def getAndTransformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -272,15 +267,15 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr var $current = $self.get() - var $update = $cb($current) + var $update = $f($current) while (!$self.compareAndSet($current, $update)) { $current = $self.get() - $update = $cb($current) + $update = $f($current) } $current @@ -289,7 +284,7 @@ object Atomic { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f var $current = $self.get() var $update = $fn($current) @@ -305,8 +300,9 @@ object Atomic { inlineAndReset[A](tree) } - def transformAndExtractMacro[S: c.WeakTypeTag, A: c.WeakTypeTag](cb: c.Expr[S => (A, S)]): c.Expr[A] = { - + def transformAndExtractMacro[S: c.WeakTypeTag, A: c.WeakTypeTag]( + f: c.Expr[S => (A, S)] + ): c.Expr[A] = { val selfExpr = c.Expr[Atomic[S]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -319,15 +315,15 @@ object Atomic { * then inline them directly, otherwise bind arguments to a val for safety. */ val tree = - if (util.isClean(cb)) { + if (util.isClean(f)) { q""" val $self = $selfExpr var $current = $self.get() - var ($resultVar, $updateVar) = $cb($current) + var ($resultVar, $updateVar) = $f($current) while (!$self.compareAndSet($current, $updateVar)) { $current = $self.get() - val ($resultTmp, $updateTmp) = $cb($current) + val ($resultTmp, $updateTmp) = $f($current) $updateVar = $updateTmp $resultVar = $resultTmp } @@ -338,7 +334,7 @@ object Atomic { val fn = util.name("fn") q""" val $self = $selfExpr - val $fn = $cb + val $fn = $f var $current = $self.get() var ($resultVar, $updateVar) = $fn($current) @@ -360,11 +356,13 @@ object Atomic { def buildAnyMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag](initialValue: c.Expr[A])( builder: c.Expr[AtomicBuilder[A, R]] ): c.Expr[R] = { - val expr = reify { - builder.splice.buildInstance(initialValue.splice, NoPadding, allowPlatformIntrinsics = true) + builder.splice.buildInstance( + initialValue.splice, + NoPadding, + allowPlatformIntrinsics = true + ) } - inlineAndReset[R](expr.tree) } @@ -372,11 +370,9 @@ object Atomic { initialValue: c.Expr[A], padding: c.Expr[PaddingStrategy] )(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { - val expr = reify { builder.splice.buildInstance(initialValue.splice, padding.splice, allowPlatformIntrinsics = true) } - inlineAndReset[R](expr.tree) } diff --git a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala new file mode 100644 index 000000000..e6af72d6c --- /dev/null +++ b/monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.atomic + +/** + * Base trait of all atomic references, no matter the type. + */ +abstract class Atomic[A] extends Serializable with internal.AtomicDocs { + /** $atomicGetDesc */ + def get(): A + + /** $atomicSetDesc */ + def set(update: A): Unit + + /** $compareAndSetDesc + * + * $atomicBestPractices + * + * @param expect $atomicCASExpectParam + * @param update $atomicCASUpdateParam + * @return $atomicCASReturn $atomicCASReturn + */ + def compareAndSet(expect: A, update: A): Boolean + + /** $atomicGetAndSetDesc + * + * @param update $atomicGetAndSetParam + * @return $atomicGetAndSetReturn + */ + def getAndSet(update: A): A + + /** $atomicLazySetDesc */ + def lazySet(update: A): Unit + + /** $atomicTransformExtractDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformExtractParamF + * + * @return $atomicTransformExtractReturn + */ + inline final def transformAndExtract[U](inline f: A => (U, A)): U = { + var current = get() + var result = null.asInstanceOf[U] + var continue = true + + while (continue) { + val (resultTmp, update) = f(current) + if (compareAndSet(current, update)) { + result = resultTmp + continue = false + } else { + current = get() + } + } + result + } + + /** $atomicTransformAndGetDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam + * + * @return $atomicTransformAndGetReturn + */ + inline final def transformAndGet(inline cb: (A) => A): A = { + var current = get() + var update = null.asInstanceOf[A] + var continue = true + + while (continue) { + update = cb(current) + if (compareAndSet(current, update)) + continue = false + else + current = get() + } + update + } + + /** $atomicGetAndTransformDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam + * + * @return $atomicGetAndTransformReturn + */ + inline final def getAndTransform(inline f: A => A): A = { + var current = get() + var continue = true + + while (continue) { + val update = f(current) + if (compareAndSet(current, update)) + continue = false + else + current = get() + } + current + } + + /** $atomicTransformDesc + * + * $atomicTransformBestPractices + * + * @param f $atomicTransformParam + */ + inline final def transform(inline f: A => A): Unit = { + var continue = true + + while (continue) { + val current = get() + val update = f(current) + continue = !compareAndSet(current, update) + } + } +} + +object Atomic { + /** Constructs an `Atomic[A]` reference. + * + * Based on the `initialValue`, it will return the best, most + * specific type. E.g. you give it a number, it will return + * something inheriting from `AtomicNumber[A]`. That's why it takes + * an `AtomicBuilder[T, R]` as an implicit parameter - but worry + * not about such details as it just works. + * + * @param initialValue is the initial value with which to + * initialize the Atomic reference + * + * @param builder is the builder that helps us to build the + * best reference possible, based on our `initialValue` + */ + inline def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = + builder.buildInstance(initialValue, PaddingStrategy.NoPadding, allowPlatformIntrinsics = true) + + /** Constructs an `Atomic[A]` reference, applying the provided + * [[PaddingStrategy]] in order to counter the "false sharing" + * problem. + * + * Based on the `initialValue`, it will return the best, most + * specific type. E.g. you give it a number, it will return + * something inheriting from `AtomicNumber[A]`. That's why it takes + * an `AtomicBuilder[A, R]` as an implicit parameter - but worry + * not about such details as it just works. + * + * Note that for ''Scala.js'' we aren't applying any padding, as it + * doesn't make much sense, since Javascript execution is single + * threaded, but this builder is provided for syntax compatibility + * anyway across the JVM and Javascript and we never know how + * Javascript engines will evolve. + * + * @param initialValue is the initial value with which to + * initialize the Atomic reference + * + * @param padding is the [[PaddingStrategy]] to apply + * + * @param builder is the builder that helps us to build the + * best reference possible, based on our `initialValue` + */ + inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)(implicit + builder: AtomicBuilder[A, R] + ): R = + builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) + + /** Returns the builder that would be chosen to construct Atomic + * references for the given `initialValue`. + */ + def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = + builder + + extension [A](self: Atomic[A]) { + /** DEPRECATED - switch to [[Atomic.get]]. */ + @deprecated("Switch to .get()", "4.0.0") + def apply(): A = { + // $COVERAGE-OFF$ + self.get() + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def update(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + + /** DEPRECATED — switch to [[Atomic.set]]. */ + @deprecated("Switch to .set()", "4.0.0") + def `:=`(value: A): Unit = { + // $COVERAGE-OFF$ + self.set(value) + // $COVERAGE-ON$ + } + } +} diff --git a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala similarity index 100% rename from monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala rename to monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala similarity index 100% rename from monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala rename to monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala diff --git a/monix-execution/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala similarity index 100% rename from monix-execution/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala rename to monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala diff --git a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala new file mode 100644 index 000000000..ef5146c41 --- /dev/null +++ b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala @@ -0,0 +1,249 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.atomic +package internal + +/** + * + * @define atomicGetDesc Get the current value persisted by this atomic + * reference. + * + * This is a "volatile read", with all visibility guarantees that come + * from that. + * + * @define atomicSetDesc Stores the given value in the atomic reference. + * + * This is a "volatile write", with all visibility guarantees that come + * with it. For garbage-collecting purposes, but without the strong + * visibility guarantees, you might want to use [[lazySet]]. + * + * @define atomicGetAndSetDesc Sets the given value and returns + * the value visible just prior to the update. + * + * This is an atomic operation that's equivalent to: + * {{{ + * import monix.execution.atomic._ + * + * def getAndSet[A](ref: Atomic[A], update: A): A = { + * val current = ref.get() + * if (!compareAndSet(current, update)) + * getAndSet(ref, update) // update failed, repeat! + * else + * current + * } + * }}} + * + * NOTE — on top of the JVM this operation is a platform intrinsic, + * meaning that it's more efficient than a `compareAndSet`-driven loop. + * Therefore it isn't just a shortcut. If you can describe your logic + * in terms of `getAndSet`, instead of `compareAndSet`, then you should, + * but you'll also find this to be more challenging 😉 + * + * @define atomicGetAndSetParam the value that's going to be stored in + * the atomic reference once the transaction succeeds. + * + * @define atomicGetAndSetReturn the old value that was visible in the + * atomic reference, prior to the succeeding update. + * + * @define atomicLazySetDesc Eventually sets to the given value. + * + * Equivalent with [[set]], but on top of the JVM this operation isn't a + * volatile write, and thus has more relaxed visibility guarantees. For + * nullifying values, in order to allow garbage collection, this method is + * more efficient and should be prefered. But only if you know what you're + * doing, otherwise just use normal [[set]]. + * + * @define compareAndSetDesc Does a compare-and-set operation on the + * current value. For more info, checkout the related + * [[https://en.wikipedia.org/wiki/Compare-and-swap Compare-and-swap Wikipedia page]]. + * + * It's an atomic, worry-free, but low-level operation. Use only if + * you know what you're doing. + * + * Sample: {{{ + * import monix.execution.atomic._ + * import scala.collection.immutable.Queue + * + * class ConcurrentQueue[A] private (ref: Atomic[Queue[A]]) { + * def enqueue(value: A): Unit = { + * val current = ref.get() + * val update = current.enqueue(value) + * if (!ref.compareAndSet(current, update)) + * enqueue(value) // transaction failed, retry! + * } + * + * def dequeue(): Option[A] = { + * val current = ref.get() + * if (current.isEmpty) + * None + * else { + * val (elem, update) = current.dequeue + * if (!ref.compareAndSet(current, update)) + * dequeue() // transaction failed, retry! + * else + * Some(elem) + * } + * } + * } + * }}} + * + * @define atomicBestPractices BEST PRACTICES: + * + * (1) state stored in this atomic reference MUST BE immutable, or + * treated as such. Storing mutable data in an atomic reference + * doesn't work — unless you understand Java's memory model, and if + * you have to wonder, then you don't. + * + * (2) in `compareAndSet`-driven loops, transformation/update functions + * get repeated, so those update functions MUST BE pure. If you have + * to trigger side-effects, then trigger them only AFTER the update + * has succeeded, not before or during the update. Failure to do so + * risks repeating those side-effects more than once. Working with + * an atomic reference is very unlike working with plain locks / + * / mutexes / `synchronize` blocks. + * + * (3) the operation is not based on Java's `Object#equals` or Scala's `==`. + * For primitives, value equality is going to be used, but reference + * equality is used for anything else, so ensure that the `expect` reference + * is the same as the one received via `get()`. + * + * @define atomicCASExpectParam is the value you expect to be persisted when + * the operation happens. + * + * @define atomicCASUpdateParam will be the new value, should the + * (reference) equality check for `expect` succeeds. + * + * @define atomicCASReturn either `true` in case the operation succeeded or + * `false` otherwise. If this returns `false`, it means that another + * concurrent transaction won the race and updated the atomic reference + * first, so you probably need to repeat the transaction. + * + * @define atomicTransformExtractDesc Updates this atomic reference in a + * transaction, modeled with a `compareAndSet`-driven loop. + * This "transformation" specifies a custom extractor. + * + * Sample: {{{ + * import monix.execution.atomic._ + * import scala.collection.immutable.Queue + * + * final class ConcurrentQueue[A] private (state: AtomicRef[Queue[A]]) { + * def enqueue(value: A): Unit = + * state.transform(_.enqueue(value)) + * + * def dequeue(): Option[A] = + * state.transformAndExtract { queue => + * if (queue.isEmpty) + * (None, queue) + * else + * (Some(queue.dequeue), queue) + * } + * } + * }}} + * + * @see [[getAndTransform]] and [[transformAndGet]]. + * + * @define atomicTransformBestPractices Best practices ... + * + * (1) This method will loop until the transaction succeeds in replacing + * the current value. If the atomic reference is contended by multiple + * actors trying to update the underlying value, then the transaction + * gets repeated until it succeeds. Therefore the given function + * MUST BE pure (i.e. MUST NOT do any I/O). + * + * (2) State stored in this atomic reference must be an immutable + * data-structure, or at least an effectively mutable one. If you + * mutate the state stored in this atomic reference, working with it + * is useless, as it cannot provide any transactional or visibility + * guarantees. The only updates that you should allow are the updates + * managed via this atomic reference. + * + * @define atomicTransformExtractParamF is a function that receives the + * current value as input and + * returns a tuple, representing (1) what the transaction yields + * after it succeeds and (2) what the update is. Note that this + * function mirrors `S => (A, S)`, which is the signature of the + * "state monad" 😉 + * + * @define atomicTransformExtractReturn whatever was extracted by your + * function, once the operation succeeds. + * + * @define atomicTransformAndGetDesc Updates this atomic reference in a + * transaction, modeled with a `compareAndSet`-driven loop. + * Returns the updated value. + * + * Sample: + * {{{ + * import monix.execution.atomic._ + * + * final class CountDown private (state: AtomicLong) { + * def next(): Boolean = { + * val n = state.transformAndGet(n => math.max(n - 1, 0)) + * n > 0 + * } + * } + * }}} + * + * @see [[getAndTransform]] and [[transformAndExtract]]. + * + * @define atomicTransformParam is a function that receives the current + * value as input and returns the `update` which is the new value that + * should be persisted. WARN — function could be called multiple times + * and should be pure! + * + * @define atomicTransformAndGetReturn returns the updated value, once + * the transaction succeeds. + * + * @define atomicGetAndTransformDesc Updates this atomic reference in a + * transaction, modeled with a `compareAndSet`-driven loop. + * Returns the value visible prior to the update. + * + * Sample: + * {{{ + * import monix.execution.atomic._ + * + * final class CountDown private (state: AtomicLong, n: Int) { + * def next(): Boolean = { + * val i = state.getAndTransform(i => math.min(n, i + 1)) + * i < n + * } + * } + * }}} + * + * @see [[transformAndGet]] and [[transformAndExtract]]. + * + * @define atomicGetAndTransformReturn the old value, that was visible + * just prior to when the update happened. + * + * @define atomicTransformDesc Updates this atomic reference in a + * transaction, modeled with a `compareAndSet`-driven loop. + * + * Similar with [[getAndTransform]], [[transformAndGet]], or + * [[transformAndExtract]], except this version doesn't return anything. + * To use whenever we only care about the side-effect. + * + * Sample: + * {{{ + * import monix.execution.atomic._ + * + * final class Counter private (state: AtomicLong) { + * def mark(i: Int = 1): Unit = state.transform(_ + i) + * def get(): Long = state.get() + * } + * }}} + */ +private[atomic] trait AtomicDocs { this: Atomic[_] => } diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/HygieneUtilMacros.scala similarity index 94% rename from monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala rename to monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/HygieneUtilMacros.scala index e3cdc8019..31f2c2904 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/HygieneUtilMacros.scala +++ b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/HygieneUtilMacros.scala @@ -15,12 +15,12 @@ * limitations under the License. */ -package monix.execution.misc +package monix.execution.atomic.internal import scala.reflect.macros.whitebox /** Utilities for macro-hygiene. */ -trait HygieneUtilMacros { +private[atomic] trait HygieneUtilMacros { val c: whitebox.Context import c.universe._ diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/InlineMacros.scala similarity index 97% rename from monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala rename to monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/InlineMacros.scala index f36bd3609..d608d1d87 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/InlineMacros.scala +++ b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/InlineMacros.scala @@ -15,11 +15,11 @@ * limitations under the License. */ -package monix.execution.misc +package monix.execution.atomic.internal import scala.reflect.macros.whitebox -trait InlineMacros { +private[atomic] trait InlineMacros { val c: whitebox.Context import c.universe._ diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala similarity index 89% rename from monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala rename to monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala index fc6d89ca1..db1a5029c 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestBox.scala +++ b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala @@ -15,15 +15,14 @@ * limitations under the License. */ -package monix.execution.misc.test +package monix.execution.atomic.internal -import monix.execution.misc.{ HygieneUtilMacros, InlineMacros } import scala.reflect.macros.whitebox /** Represents a boxed value, to be used in the testing * of [[InlineMacros]]. */ -private[execution] final case class TestBox[A](value: A) { +private[atomic] final case class TestBox[A](value: A) { def map[B](f: A => B): TestBox[B] = macro TestBox.Macros.mapMacroImpl[A, B] def collect[B](f: PartialFunction[A, B]): TestBox[B] = macro TestBox.Macros.mapMacroImpl[A, B] } @@ -31,7 +30,7 @@ private[execution] final case class TestBox[A](value: A) { /** Represents a boxed value, to be used in the testing * of [[InlineMacros]]. */ -private[execution] object TestBox { +private[atomic] object TestBox { class Macros(override val c: whitebox.Context) extends InlineMacros with HygieneUtilMacros { import c.universe._ diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestInlineMacros.scala similarity index 98% rename from monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala rename to monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestInlineMacros.scala index 0370d7fe5..f5bf0f34b 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/test/TestInlineMacros.scala +++ b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestInlineMacros.scala @@ -15,12 +15,11 @@ * limitations under the License. */ -package monix.execution.misc.test +package monix.execution.atomic.internal -import monix.execution.misc._ import scala.reflect.macros.whitebox -private[execution] object TestInlineMacros { +private[atomic] object TestInlineMacros { def testInlineSingleArg(): Either[String, Unit] = macro Macros.testInlineSingleArg diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala b/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala similarity index 100% rename from monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala rename to monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/AtomicBuilderSuite.scala diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala b/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala similarity index 100% rename from monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala rename to monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala b/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala similarity index 100% rename from monix-execution/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala rename to monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala b/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala similarity index 100% rename from monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala rename to monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala diff --git a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala b/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala similarity index 94% rename from monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala rename to monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala index aaf31e8e0..29dac623e 100644 --- a/monix-execution/shared/src/test/scala_3.0-/monix/execution/misc/InlineMacrosTest.scala +++ b/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala @@ -15,14 +15,14 @@ * limitations under the License. */ -package monix.execution.misc +package monix.execution.atomic.internal import minitest.SimpleTestSuite -import monix.execution.exceptions.DummyException -import monix.execution.misc.test.{ TestBox, TestInlineMacros } import scala.util.control.NonFatal object InlineMacrosTest extends SimpleTestSuite { + class DummyException(msg: String) extends RuntimeException(msg) + test("inline a function code gen") { val result = TestInlineMacros.testInlineSingleArg() result match { @@ -114,7 +114,7 @@ object InlineMacrosTest extends SimpleTestSuite { test("Inline NonFatal clause") { val box = TestBox(1) - val dummy = DummyException("dummy") + val dummy = new DummyException("dummy") def increment(x: Int): Int = throw dummy val mapped = box.map { x => diff --git a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala deleted file mode 100644 index 2a51a1599..000000000 --- a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic - -/** - * Base trait of all atomic references, no matter the type. - */ -abstract class Atomic[A] extends Serializable { - /** Get the current value persisted by this Atomic. */ - def get(): A - - /** Get the current value persisted by this Atomic, an alias for `get()`. */ - inline final def apply(): A = get() - - /** Updates the current value. - * - * @param update will be the new value returned by `get()` - */ - def set(update: A): Unit - - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - inline final def update(value: A): Unit = set(value) - - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - inline final def `:=`(value: A): Unit = set(value) - - /** Does a compare-and-set operation on the current value. For more info, checkout the related - * [[https://en.wikipedia.org/wiki/Compare-and-swap Compare-and-swap Wikipedia page]]. - * - * It's an atomic, worry free operation. - * - * @param expect is the value you expect to be persisted when the operation happens - * @param update will be the new value, should the check for `expect` succeeds - * @return either true in case the operation succeeded or false otherwise - */ - def compareAndSet(expect: A, update: A): Boolean - - /** Sets the persisted value to `update` and returns the old value that was in place. - * It's an atomic, worry free operation. - */ - def getAndSet(update: A): A - - /** Eventually sets to the given value. - * Has weaker visibility guarantees than the normal `set()`. - */ - def lazySet(update: A): Unit = set(update) - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by your callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns a tuple that specifies - * the update + what should this method return when the operation succeeds. - * @return whatever was specified by your callback, once the operation succeeds - */ - inline final def transformAndExtract[U](inline cb: (A) => (U, A)): U = { - val current = get() - val (result, update) = cb(current) - set(update) - result - } - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return whatever the update is, after the operation succeeds - */ - inline final def transformAndGet(inline cb: (A) => A): A = { - val current = get() - val update = cb(current) - - set(update) - update - } - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return the old value, just prior to when the successful update happened - */ - inline final def getAndTransform(inline cb: (A) => A): A = { - val current = get() - val update = cb(current) - - set(update) - current - } - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - */ - inline final def transform(inline cb: (A) => A): Unit = - set(cb(get())) -} - -object Atomic { - /** Constructs an `Atomic[A]` reference. - * - * Based on the `initialValue`, it will return the best, most - * specific type. E.g. you give it a number, it will return - * something inheriting from `AtomicNumber[A]`. That's why it takes - * an `AtomicBuilder[T, R]` as an implicit parameter - but worry - * not about such details as it just works. - * - * @param initialValue is the initial value with which to - * initialize the Atomic reference - * - * @param builder is the builder that helps us to build the - * best reference possible, based on our `initialValue` - */ - inline def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = - builder.buildInstance(initialValue, PaddingStrategy.NoPadding, allowPlatformIntrinsics = true) - - /** Constructs an `Atomic[A]` reference, applying the provided - * [[PaddingStrategy]] in order to counter the "false sharing" - * problem. - * - * Based on the `initialValue`, it will return the best, most - * specific type. E.g. you give it a number, it will return - * something inheriting from `AtomicNumber[A]`. That's why it takes - * an `AtomicBuilder[A, R]` as an implicit parameter - but worry - * not about such details as it just works. - * - * Note that for ''Scala.js'' we aren't applying any padding, as it - * doesn't make much sense, since Javascript execution is single - * threaded, but this builder is provided for syntax compatibility - * anyway across the JVM and Javascript and we never know how - * Javascript engines will evolve. - * - * @param initialValue is the initial value with which to - * initialize the Atomic reference - * - * @param padding is the [[PaddingStrategy]] to apply - * - * @param builder is the builder that helps us to build the - * best reference possible, based on our `initialValue` - */ - inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R] - ): R = - builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) - - /** Returns the builder that would be chosen to construct Atomic - * references for the given `initialValue`. - */ - def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = - builder -} diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java b/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java deleted file mode 100644 index d06ea293b..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/InternalApi.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal; - -import java.lang.annotation.Documented; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import static java.lang.annotation.ElementType.*; -import static java.lang.annotation.RetentionPolicy.CLASS; - -/** - * Marks APIs that are considered internal to Monix and may change at - * any point in time without any warning. - * - * For example, this annotation should be used when the Scala - * `private[monix]` access restriction is used, as Java has no way of - * representing this package restricted access and such methods and - * classes are represented as public in byte-code. - * - * If a method/class annotated with this method has a javadoc/scaladoc - * comment, the first line MUST include INTERNAL API in order to be - * easily identifiable from generated documentation. Additional - * information may be put on the same line as the INTERNAL API comment - * in order to clarify further. - * - * Copied from the [[https://akka.io/ Akka project]]. - */ -@Documented -@Retention(value=CLASS) -@Target(value={METHOD,CONSTRUCTOR,FIELD,TYPE,PACKAGE}) -public @interface InternalApi {} diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala index 04c74ea49..a1e026c44 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala @@ -19,7 +19,7 @@ package monix.execution.internal.collection.queues import monix.execution.ChannelType import monix.execution.ChannelType.{ SingleConsumer, SingleProducer } -import monix.execution.internal.atomic.UnsafeAccess +import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue import sun.misc.Unsafe diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala index 982406e9c..951a8d78a 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala @@ -19,7 +19,7 @@ package monix.execution.internal.collection.queues import monix.execution.ChannelType import monix.execution.ChannelType.{ SingleConsumer, SingleProducer } -import monix.execution.internal.atomic.UnsafeAccess +import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue import sun.misc.Unsafe diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index f2b07f866..28eac27f3 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -21,7 +21,7 @@ import java.util.concurrent.ConcurrentLinkedQueue import monix.execution.{ BufferCapacity, ChannelType } import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } import monix.execution.internal.Platform -import monix.execution.internal.atomic.UnsafeAccess +import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues._ import monix.execution.internal.jctools.queues.atomic._ diff --git a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala deleted file mode 100644 index 666dbe035..000000000 --- a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic - -/** - * Base trait of all atomic references, no matter the type. - */ -abstract class Atomic[A] extends Serializable { - /** Get the current value persisted by this Atomic. */ - def get(): A - - /** Get the current value persisted by this Atomic, an alias for `get()`. */ - inline final def apply(): A = get() - - /** Updates the current value. - * - * @param update will be the new value returned by `get()` - */ - def set(update: A): Unit - - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - inline final def update(value: A): Unit = set(value) - - /** Alias for [[set]]. Updates the current value. - * - * @param value will be the new value returned by `get()` - */ - inline final def `:=`(value: A): Unit = set(value) - - /** Does a compare-and-set operation on the current value. For more info, checkout the related - * [[https://en.wikipedia.org/wiki/Compare-and-swap Compare-and-swap Wikipedia page]]. - * - * It's an atomic, worry free operation. - * - * @param expect is the value you expect to be persisted when the operation happens - * @param update will be the new value, should the check for `expect` succeeds - * @return either true in case the operation succeeded or false otherwise - */ - def compareAndSet(expect: A, update: A): Boolean - - /** Sets the persisted value to `update` and returns the old value that was in place. - * It's an atomic, worry free operation. - */ - def getAndSet(update: A): A - - /** Eventually sets to the given value. - * Has weaker visibility guarantees than the normal `set()`. - */ - def lazySet(update: A): Unit - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by your callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns a tuple that specifies - * the update + what should this method return when the operation succeeds. - * @return whatever was specified by your callback, once the operation succeeds - */ - inline final def transformAndExtract[U](inline cb: (A) => (U, A)): U = { - var current = get() - var result = null.asInstanceOf[U] - var continue = true - - while (continue) { - val (resultTmp, update) = cb(current) - if (compareAndSet(current, update)) { - result = resultTmp - continue = false - } else { - current = get() - } - } - result - } - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return whatever the update is, after the operation succeeds - */ - inline final def transformAndGet(inline cb: (A) => A): A = { - var current = get() - var update = null.asInstanceOf[A] - var continue = true - - while (continue) { - update = cb(current) - if (compareAndSet(current, update)) - continue = false - else - current = get() - } - update - } - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - * @return the old value, just prior to when the successful update happened - */ - inline final def getAndTransform(inline cb: (A) => A): A = { - var current = get() - var continue = true - - while (continue) { - val update = cb(current) - if (compareAndSet(current, update)) - continue = false - else - current = get() - } - current - } - - /** Abstracts over `compareAndSet`. You specify a transformation by specifying a callback to be - * executed, a callback that transforms the current value. This method will loop until it will - * succeed in replacing the current value with the one produced by the given callback. - * - * Note that the callback will be executed on each iteration of the loop, so it can be called - * multiple times - don't do destructive I/O or operations that mutate global state in it. - * - * @param cb is a callback that receives the current value as input and returns the `update` which is the - * new value that should be persisted - */ - inline final def transform(inline cb: (A) => A): Unit = { - var continue = true - - while (continue) { - val current = get() - val update = cb(current) - continue = !compareAndSet(current, update) - } - } -} - -object Atomic { - /** Constructs an `Atomic[A]` reference. - * - * Based on the `initialValue`, it will return the best, most - * specific type. E.g. you give it a number, it will return - * something inheriting from `AtomicNumber[A]`. That's why it takes - * an `AtomicBuilder[T, R]` as an implicit parameter - but worry - * not about such details as it just works. - * - * @param initialValue is the initial value with which to - * initialize the Atomic reference - * - * @param builder is the builder that helps us to build the - * best reference possible, based on our `initialValue` - */ - inline def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = - builder.buildInstance(initialValue, PaddingStrategy.NoPadding, allowPlatformIntrinsics = true) - - /** Constructs an `Atomic[A]` reference, applying the provided - * [[PaddingStrategy]] in order to counter the "false sharing" - * problem. - * - * Based on the `initialValue`, it will return the best, most - * specific type. E.g. you give it a number, it will return - * something inheriting from `AtomicNumber[A]`. That's why it takes - * an `AtomicBuilder[A, R]` as an implicit parameter - but worry - * not about such details as it just works. - * - * Note that for ''Scala.js'' we aren't applying any padding, as it - * doesn't make much sense, since Javascript execution is single - * threaded, but this builder is provided for syntax compatibility - * anyway across the JVM and Javascript and we never know how - * Javascript engines will evolve. - * - * @param initialValue is the initial value with which to - * initialize the Atomic reference - * - * @param padding is the [[PaddingStrategy]] to apply - * - * @param builder is the builder that helps us to build the - * best reference possible, based on our `initialValue` - */ - inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( - implicit builder: AtomicBuilder[A, R] - ): R = - builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) - - /** Returns the builder that would be chosen to construct Atomic - * references for the given `initialValue`. - */ - def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = - builder -} diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala index 81ac6bb2f..1691094c6 100644 --- a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala @@ -18,9 +18,7 @@ package monix.execution.misc import monix.execution.atomic.AtomicAny - import scala.annotation.tailrec -import scala.reflect.macros.whitebox /** @define canBindLocalsDesc The implementation uses the [[CanBindLocals]] * type class because in case of asynchronous data types that @@ -133,32 +131,10 @@ object Local extends LocalCompanionDeprecated { /** If `b` evaluates to `true`, execute a block of code using a current * state of `Local.Context` and restore the current state when complete. */ - private[monix] def bindCurrentIf[R](b: Boolean)(f: => R): R = - macro Macros.localLetCurrentIf - - /** Macros implementations for [[bind]] and [[bindClear]]. */ - private class Macros(override val c: whitebox.Context) extends InlineMacros with HygieneUtilMacros { - import c.universe._ - - def localLet(ctx: Tree)(f: Tree): Tree = - c.abort(c.macroApplication.pos, "Macro no longer implemented!") - def localLetClear(f: Tree): Tree = - c.abort(c.macroApplication.pos, "Macro no longer implemented!") - def isolate(f: Tree): Tree = - c.abort(c.macroApplication.pos, "Macro no longer implemented!") - - def localLetCurrentIf(b: Tree)(f: Tree): Tree = { - val Local = symbolOf[Local[_]].companion - val CanBindLocals = symbolOf[CanBindLocals[_]].companion - - resetTree( - q"""if (!$b) { $f } else { - import $CanBindLocals.Implicits.synchronousAsDefault - $Local.isolate($f) - }""" - ) - } - } + private[monix] def bindCurrentIf[R](b: Boolean)(f: => R)(implicit + cb: CanBindLocals[R] = CanBindLocals.synchronous[R] + ): R = + if (!b) f else Local.isolate(f) /** Represents the current state of all [[Local locals]] for a given * execution context. diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala index 5c7bbaa5a..34bb27f9b 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/ConcurrentQueue.scala @@ -19,7 +19,7 @@ package monix.reactive.observers.buffers import java.util import monix.execution.internal.Platform -import monix.execution.internal.atomic.UnsafeAccess +import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.math.nextPowerOf2 import monix.execution.internal.jctools.queues._ import monix.execution.internal.jctools.queues.MessagePassingQueue.Consumer diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala index d6c47dc17..0c29ff9f5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala @@ -129,7 +129,7 @@ object PublisherIsObservableSuite extends TestSuite[TestScheduler] { def onError(ex: Throwable): Unit = throw ex def onComplete(): Unit = - active := false + active.set(false) }) } @@ -141,14 +141,15 @@ object PublisherIsObservableSuite extends TestSuite[TestScheduler] { override def subscribe(subscriber: Subscriber[_ >: Long]): Unit = subscriber.onSubscribe(new Subscription { override def cancel(): Unit = - isPublisherActive := false + isPublisherActive.set(false) override def request(n: Long): Unit = { assertEquals(n, requestSize.toLong) requested.increment(requestSize) if (isPublisherActive.get()) { s.executeTrampolined { () => - for (_ <- 0 until n.toInt) subscriber.onNext(1L) + for (_ <- 0 until n.toInt) + subscriber.onNext(1L) } } } diff --git a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala index afec0cfb3..692cf79b0 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala @@ -26,7 +26,7 @@ final class ThrowExceptionCursor[A](ex: Throwable) extends BatchCursor[A] { self def isTriggered: Boolean = triggered.get() private def triggerError(): Nothing = { - triggered := true + triggered.set(true) throw ex } diff --git a/project/MonixBuildUtils.scala b/project/MonixBuildUtils.scala index 019399810..06f920f49 100644 --- a/project/MonixBuildUtils.scala +++ b/project/MonixBuildUtils.scala @@ -11,7 +11,11 @@ import scala.xml.Elem import scala.xml.transform.{ RewriteRule, RuleTransformer } final case class MonixScalaVersion(value: String) { - lazy val parts = value.split("[.]").filter(_.nonEmpty).toList + lazy val parts = + value.split("[.]").filter(_.nonEmpty).toList + + def filterPrefix(prefix: String): Option[MonixScalaVersion] = + if (value.startsWith(prefix)) Some(this) else None } object MonixScalaVersion { diff --git a/project/plugins.sbt b/project/plugins.sbt index e3abc29b5..2980d6d9e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") -addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0") diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala index 5b3c1bda4..c167cb912 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala @@ -22,8 +22,8 @@ import monix.execution.Scheduler.Implicits.global import monix.eval.Task import monix.execution.exceptions.DummyException import monix.tail.Iterant -import monix.tail.Iterant.{Halt, Last} -import monix.tail.batches.{Batch, BatchCursor} +import monix.tail.Iterant.{ Halt, Last } +import monix.tail.batches.{ Batch, BatchCursor } import org.reactivestreams.Publisher import org.reactivestreams.tck.PublisherVerification import org.scalatestplus.testng.TestNGSuiteLike @@ -38,8 +38,7 @@ class IterantToPublisherTest extends PublisherVerification[Long](env()) val list: List[Long] = (0 until elements.toInt).map(_.toLong).toList arbitraryListToIterant[Task, Long](list, Random.nextInt(), allowErrors = false) .toReactivePublisher - } - else if (elements <= Int.MaxValue) + } else if (elements <= Int.MaxValue) repeat(1L).take(elements.toInt).toReactivePublisher else repeat(1L).toReactivePublisher @@ -53,8 +52,9 @@ class IterantToPublisherTest extends PublisherVerification[Long](env()) .toReactivePublisher } - def arbitraryListToIterant[F[_], A](list: List[A], idx: Int, allowErrors: Boolean = true) - (implicit F: Sync[F]): Iterant[F, A] = { + def arbitraryListToIterant[F[_], A](list: List[A], idx: Int, allowErrors: Boolean = true)(implicit + F: Sync[F] + ): Iterant[F, A] = { def loop(list: List[A], idx: Int): Iterant[F, A] = list match { @@ -73,15 +73,15 @@ class IterantToPublisherTest extends PublisherVerification[Long](env()) case ns => math.abs(idx % 16) match { case 0 | 1 => - Iterant[F].nextS(ns.head, F.delay(loop(ns.tail, idx+1))) + Iterant[F].nextS(ns.head, F.delay(loop(ns.tail, idx + 1))) case 2 | 3 => - Iterant[F].suspend(F.delay(loop(list, idx+1))) + Iterant[F].suspend(F.delay(loop(list, idx + 1))) case 4 | 5 => Iterant[F].suspendS(F.delay(loop(ns, idx + 1))) case n @ 6 => val (headSeq, tail) = list.splitAt(3) val cursor = BatchCursor.fromIterator(headSeq.toVector.iterator, n - 2) - Iterant[F].nextCursorS(cursor, F.delay(loop(tail, idx+1))) + Iterant[F].nextCursorS(cursor, F.delay(loop(tail, idx + 1))) case n @ (7 | 8 | 9) => val (headSeq, tail) = list.splitAt(3) val batch = Batch.fromSeq(headSeq.toVector, n - 6) diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala index 299d9f620..e33563643 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala @@ -49,4 +49,4 @@ class ObservableToPublisherTest extends PublisherVerification[Long](env()) .asInstanceOf[Observable[Long]] .toReactivePublisher } -} \ No newline at end of file +} diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala index 089e2dc13..6d9f1cb8b 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala @@ -24,7 +24,7 @@ import monix.reactive.Observer import monix.reactiveTests.SubscriberWhiteBoxAsyncTest.Value import org.reactivestreams.tck.SubscriberWhiteboxVerification.WhiteboxSubscriberProbe import org.reactivestreams.tck.SubscriberWhiteboxVerification -import org.reactivestreams.{Subscriber, Subscription} +import org.reactivestreams.{ Subscriber, Subscription } import org.scalatestplus.testng.TestNGSuiteLike import scala.concurrent.Future diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala index 1ce7f36d7..551665224 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala @@ -23,7 +23,7 @@ import monix.execution.Ack.Continue import monix.reactiveTests.SubscriberWhiteBoxSyncTest.Value import org.reactivestreams.tck.SubscriberWhiteboxVerification.WhiteboxSubscriberProbe import org.reactivestreams.tck.SubscriberWhiteboxVerification -import org.reactivestreams.{Subscriber, Subscription} +import org.reactivestreams.{ Subscriber, Subscription } import org.scalatestplus.testng.TestNGSuiteLike class SubscriberWhiteBoxSyncTest From 518b8daf43a12ef8a49ed0df2d2d77540a8af175 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Thu, 19 May 2022 12:16:56 +0300 Subject: [PATCH 43/69] Fixes (#1575) --- build.sbt | 6 ++---- .../scala/monix/execution/atomic/package.scala | 13 ++++++------- .../scala/monix/execution/atomic/package.scala | 16 +++++++--------- .../execution/atomic/internal/AtomicDocs.scala | 16 +++++++++------- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/build.sbt b/build.sbt index 96c74260e..19da9d907 100644 --- a/build.sbt +++ b/build.sbt @@ -593,7 +593,7 @@ lazy val executionShadedJCTools = project lazy val executionAtomicProfile = crossModule( projectName = "monix-execution-atomic", - withDocTests = false, + withDocTests = true, crossSettings = Seq( description := "Sub-module of Monix, exposing low-level atomic references. See: https://monix.io", )) @@ -603,7 +603,7 @@ lazy val executionAtomicJVM = project.in(file("monix-execution/atomic/jvm")) .settings(macroDependencies) lazy val executionAtomicJS = project.in(file("monix-execution/atomic/js")) - .configure(executionProfile.js) + .configure(executionAtomicProfile.js) .settings(macroDependencies) // -------------------------------------------- @@ -622,7 +622,6 @@ lazy val executionProfile = lazy val executionJVM = project .in(file("monix-execution/jvm")) .configure(executionProfile.jvm) - .settings(macroDependencies) .dependsOn(executionShadedJCTools) .aggregate(executionAtomicJVM) .dependsOn(executionAtomicJVM) @@ -631,7 +630,6 @@ lazy val executionJVM = project lazy val executionJS = project .in(file("monix-execution/js")) .configure(executionProfile.js) - .settings(macroDependencies) .aggregate(executionAtomicJS) .dependsOn(executionAtomicJS) diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/package.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/package.scala index 999c88406..86d8a5813 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/package.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/package.scala @@ -22,10 +22,7 @@ package monix.execution * On top of the JVM, this means dealing with lock-free thread-safe programming. Also works on top of Javascript, * with Scala.js, for API compatibility purposes and because it's a useful way to box a value. * - * The backbone of Atomic references is this method: - * {{{ - * def compareAndSet(expect: T, update: T): Boolean - * }}} + * The backbone of Atomic references is [[Atomic.compareAndSet]]. * * This method atomically sets a variable to the `update` value if it currently holds * the `expect` value, reporting `true` on success or `false` on failure. The classes in this package @@ -35,14 +32,16 @@ package monix.execution * return the most specific type needed (in the following sample, that's an `AtomicDouble`, * inheriting from `AtomicNumber[A]`): * {{{ + * import monix.execution.atomic._ + * * val atomicNumber = Atomic(12.2) - * * atomicNumber.incrementAndGet() * // => 13.2 * }}} * * These also provide useful helpers for atomically mutating of values - * (i.e. `transform`, `transformAndGet`, `getAndTransform`, etc...) or of numbers of any kind - * (`incrementAndGet`, `getAndAdd`, etc...). + * (i.e. [[Atomic.transform]], [[Atomic.transformAndGet]], [[Atomic.transformAndExtract]], + * etc.) or of numbers of any kind ([[AtomicNumber.incrementAndGet]], + * [[AtomicNumber.getAndAdd]], etc.). */ package object atomic diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala index c57f80a67..52799f1dd 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/package.scala @@ -28,10 +28,7 @@ import monix.execution.atomic.internal.BoxPaddingStrategy * for API compatibility purposes and because it's a useful way to * box a value. * - * The backbone of Atomic references is this method: - * {{{ - * def compareAndSet(expect: T, update: T): Boolean - * }}} + * The backbone of Atomic references is this method: [[Atomic.compareAndSet]]. * * This method atomically sets a variable to the `update` value if it * currently holds the `expect` value, reporting `true` on success or @@ -44,16 +41,17 @@ import monix.execution.atomic.internal.BoxPaddingStrategy * `AtomicNumber[A]`): * * {{{ + * import monix.execution.atomic._ + * * val atomicNumber = Atomic(12.2) - * * atomicNumber.incrementAndGet() * // => 13.2 * }}} * - * These also provide useful helpers for atomically mutating of - * values (i.e. `transform`, `transformAndGet`, `getAndTransform`, - * etc...) or of numbers of any kind (`incrementAndGet`, `getAndAdd`, - * etc...). + * These also provide useful helpers for atomically mutating of values + * (i.e. [[Atomic.transform]], [[Atomic.transformAndGet]], [[Atomic.transformAndExtract]], + * etc.) or of numbers of any kind ([[AtomicNumber.incrementAndGet]], + * [[AtomicNumber.getAndAdd]], etc.). */ package object atomic { /** Internal utility for converting between padding strategy representations. */ diff --git a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala index ef5146c41..b31484477 100644 --- a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala +++ b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala @@ -41,7 +41,7 @@ package internal * * def getAndSet[A](ref: Atomic[A], update: A): A = { * val current = ref.get() - * if (!compareAndSet(current, update)) + * if (!ref.compareAndSet(current, update)) * getAndSet(ref, update) // update failed, repeat! * else * current @@ -79,7 +79,7 @@ package internal * import monix.execution.atomic._ * import scala.collection.immutable.Queue * - * class ConcurrentQueue[A] private (ref: Atomic[Queue[A]]) { + * class ConcurrentQueue0[A] private (ref: Atomic[Queue[A]]) { * def enqueue(value: A): Unit = { * val current = ref.get() * val update = current.enqueue(value) @@ -141,7 +141,7 @@ package internal * import monix.execution.atomic._ * import scala.collection.immutable.Queue * - * final class ConcurrentQueue[A] private (state: AtomicRef[Queue[A]]) { + * final class ConcurrentQueue1[A] private (state: AtomicAny[Queue[A]]) { * def enqueue(value: A): Unit = * state.transform(_.enqueue(value)) * @@ -149,8 +149,10 @@ package internal * state.transformAndExtract { queue => * if (queue.isEmpty) * (None, queue) - * else - * (Some(queue.dequeue), queue) + * else { + * val (a, update) = queue.dequeue + * (Some(a), update) + * } * } * } * }}} @@ -190,7 +192,7 @@ package internal * {{{ * import monix.execution.atomic._ * - * final class CountDown private (state: AtomicLong) { + * final class CountDown0 private (state: AtomicLong) { * def next(): Boolean = { * val n = state.transformAndGet(n => math.max(n - 1, 0)) * n > 0 @@ -216,7 +218,7 @@ package internal * {{{ * import monix.execution.atomic._ * - * final class CountDown private (state: AtomicLong, n: Int) { + * final class CountDown1 private (state: AtomicLong, n: Int) { * def next(): Boolean = { * val i = state.getAndTransform(i => math.min(n, i + 1)) * i < n From 6aa0350def3ab53b33e4f97136601b10b74459c3 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 20 May 2022 09:56:24 +0200 Subject: [PATCH 44/69] Update cats-effect, cats-effect-laws to 2.5.5 in series/4.x (#1577) --- build.sbt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 19da9d907..3f9ab5d11 100644 --- a/build.sbt +++ b/build.sbt @@ -39,7 +39,7 @@ addCommandAlias( // Dependencies - Versions val cats_Version = "2.7.0" -val catsEffect_Version = "2.5.4" +val catsEffect_Version = "2.5.5" val fs2_Version = "2.5.11" val jcTools_Version = "3.3.0" val reactiveStreams_Version = "1.0.3" @@ -360,10 +360,10 @@ lazy val unidocSettings = Seq( ScalaUnidoc / unidoc / unidocProjectFilter := inProjects( executionAtomicJVM, - executionJVM, - catnapJVM, - evalJVM, - tailJVM, + executionJVM, + catnapJVM, + evalJVM, + tailJVM, reactiveJVM, ), @@ -592,11 +592,12 @@ lazy val executionShadedJCTools = project lazy val executionAtomicProfile = crossModule( - projectName = "monix-execution-atomic", + projectName = "monix-execution-atomic", withDocTests = true, crossSettings = Seq( description := "Sub-module of Monix, exposing low-level atomic references. See: https://monix.io", - )) + ) + ) lazy val executionAtomicJVM = project.in(file("monix-execution/atomic/jvm")) .configure(executionAtomicProfile.jvm) From e11cfadac8d8eae8e59a40a8b222acd1c5d967d6 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Fri, 20 May 2022 23:30:29 +0300 Subject: [PATCH 45/69] =?UTF-8?q?Backport=20to=204.x=20=E2=80=94=20Switch?= =?UTF-8?q?=20to=20`MacrotaskExecutor`=20on=20JS=20(#1522)=20(#1578)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Arman Bilge --- .github/workflows/build.yml | 8 +-- build.sbt | 30 ++++++----- .../schedulers/SchedulerCompanionImpl.scala | 5 +- .../schedulers/StandardContext.scala | 52 ------------------- .../internal/AsyncSchedulerJSSuite.scala | 22 ++------ project/MimaFilters.scala | 2 +- project/MonixBuildUtils.scala | 9 ++-- 7 files changed, 35 insertions(+), 93 deletions(-) delete mode 100644 monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 303c4e604..df1b938b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -250,12 +250,14 @@ jobs: all_tests: name: All Tests + if: always() needs: [ jvm-tests, js-tests, mima, scalafmt, unidoc ] runs-on: ubuntu-20.04 steps: - - name: Ack - run: | - echo "All done." + - name: Validate required tests + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} publish: name: Publish to Sonatype diff --git a/build.sbt b/build.sbt index 3f9ab5d11..734220e8a 100644 --- a/build.sbt +++ b/build.sbt @@ -38,17 +38,18 @@ addCommandAlias( // ------------------------------------------------------------------------------------------------ // Dependencies - Versions -val cats_Version = "2.7.0" -val catsEffect_Version = "2.5.5" -val fs2_Version = "2.5.11" -val jcTools_Version = "3.3.0" -val reactiveStreams_Version = "1.0.3" -val minitest_Version = "2.9.6" -val implicitBox_Version = "0.3.4" -val kindProjector_Version = "0.13.2" -val betterMonadicFor_Version = "0.3.1" -val silencer_Version = "1.7.8" -val scalaCompat_Version = "2.7.0" +val cats_Version = "2.7.0" +val catsEffect_Version = "2.5.5" +val fs2_Version = "2.5.11" +val jcTools_Version = "3.3.0" +val reactiveStreams_Version = "1.0.3" +val macrotaskExecutor_Version = "1.0.0" +val minitest_Version = "2.9.6" +val implicitBox_Version = "0.3.4" +val kindProjector_Version = "0.13.2" +val betterMonadicFor_Version = "0.3.1" +val silencer_Version = "1.7.8" +val scalaCompat_Version = "2.7.0" // The Monix version with which we must keep binary compatibility. // https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin @@ -91,7 +92,11 @@ lazy val reactiveStreamsLib = lazy val reactiveStreamsTCKLib = "org.reactivestreams" % "reactive-streams-tck" % reactiveStreams_Version -/** [[https://github.com/typelevel/kind-projector]] */ +/** [[https://github.com/scala-js/scala-js-macrotask-executor]] */ +lazy val macrotaskExecutorLib = + Def.setting { "org.scala-js" %%% "scala-js-macrotask-executor" % macrotaskExecutor_Version } + +/** [[https://github.com/typelevel/kind-projector]] */ lazy val kindProjectorCompilerPlugin = "org.typelevel" % "kind-projector" % kindProjector_Version cross CrossVersion.full @@ -631,6 +636,7 @@ lazy val executionJVM = project lazy val executionJS = project .in(file("monix-execution/js")) .configure(executionProfile.js) + .settings(libraryDependencies += macrotaskExecutorLib.value) .aggregate(executionAtomicJS) .dependsOn(executionAtomicJS) diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala index 8d741fdf5..931448b0f 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/SchedulerCompanionImpl.scala @@ -18,6 +18,7 @@ package monix.execution.schedulers import monix.execution.{ ExecutionModel => ExecModel, Scheduler, SchedulerCompanion, UncaughtExceptionReporter } +import org.scalajs.macrotaskexecutor.MacrotaskExecutor import scala.concurrent.ExecutionContext private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { @@ -30,14 +31,14 @@ private[execution] class SchedulerCompanionImpl extends SchedulerCompanion { * [[monix.execution.ExecutionModel ExecutionModel]], * a guideline for run-loops and producers of data. */ - def apply(context: ExecutionContext = StandardContext, executionModel: ExecModel = ExecModel.Default): Scheduler = + def apply(context: ExecutionContext = MacrotaskExecutor, executionModel: ExecModel = ExecModel.Default): Scheduler = AsyncScheduler(context, executionModel) def apply(ec: ExecutionContext, reporter: UncaughtExceptionReporter): Scheduler = AsyncScheduler(ec, ExecModel.Default, reporter) def apply(reporter: UncaughtExceptionReporter, execModel: ExecModel): Scheduler = - AsyncScheduler(StandardContext, execModel, reporter) + AsyncScheduler(MacrotaskExecutor, execModel, reporter) /** Builds a [[monix.execution.schedulers.TrampolineScheduler TrampolineScheduler]]. * * @param underlying is the [[monix.execution.Scheduler Scheduler]] diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala deleted file mode 100644 index cf4e9c9ea..000000000 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/StandardContext.scala +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.schedulers - -import monix.execution.UncaughtExceptionReporter -import scala.concurrent.ExecutionContext -import scala.scalajs.js - -/** Internal API — An `ExecutionContext` implementation for JavaScript - * that executes tasks using either `setImmediate` or `setTimeout`. - */ -private[execution] class StandardContext(reporter: UncaughtExceptionReporter) extends ExecutionContext { - - override def execute(r: Runnable): Unit = { - executeRef(() => - try { - r.run() - } catch { - case e: Throwable => - reporter.reportFailure(e) - } - ) - () - } - - override def reportFailure(cause: Throwable): Unit = - reporter.reportFailure(cause) - - private[this] val executeRef: js.Dynamic = { - if (js.typeOf(js.Dynamic.global.setImmediate) == "function") - js.Dynamic.global.setImmediate - else - js.Dynamic.global.setTimeout - } -} - -private[execution] object StandardContext extends StandardContext(UncaughtExceptionReporter.default) diff --git a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala index 1940fd937..52d7524f1 100644 --- a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala +++ b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala @@ -18,28 +18,16 @@ package monix.execution.internal import minitest.TestSuite -import monix.execution.atomic.Atomic import monix.execution.cancelables.SingleAssignCancelable -import monix.execution.schedulers.{ AsyncScheduler, StandardContext } -import monix.execution.{ ExecutionModel, Scheduler, TestUtils, UncaughtExceptionReporter } - +import monix.execution.schedulers.AsyncScheduler +import monix.execution.{ ExecutionModel, Scheduler, TestUtils } +import org.scalajs.macrotaskexecutor.MacrotaskExecutor import scala.concurrent.Promise import scala.concurrent.duration._ object AsyncSchedulerJSSuite extends TestSuite[Scheduler] with TestUtils { - val lastReported = Atomic(null: Throwable) - val reporter = new StandardContext(new UncaughtExceptionReporter { - def reportFailure(ex: Throwable): Unit = - lastReported.set(ex) - }) - - def setup(): Scheduler = { - lastReported.set(null) - AsyncScheduler(reporter, ExecutionModel.Default) - } - - def tearDown(env: Scheduler): Unit = - lastReported.set(null) + def setup() = AsyncScheduler(MacrotaskExecutor, ExecutionModel.Default) + def tearDown(env: Scheduler): Unit = () testAsync("execute async should work") { implicit s => var effect = 0 diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 4d733cee6..7174420f5 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -104,6 +104,6 @@ object MimaFilters { exclude[MissingClassProblem]("monix.execution.misc.compat"), exclude[MissingClassProblem]("monix.execution.misc.compat$"), // Scala 3 / Dotty support - exclude[MissingClassProblem]("monix.execution.schedulers.AdaptedThreadPoolExecutorMixin"), + exclude[MissingClassProblem]("monix.execution.schedulers.AdaptedThreadPoolExecutorMixin") ) } diff --git a/project/MonixBuildUtils.scala b/project/MonixBuildUtils.scala index 06f920f49..a2eba22db 100644 --- a/project/MonixBuildUtils.scala +++ b/project/MonixBuildUtils.scala @@ -48,16 +48,14 @@ final case class MonixCrossModule( ) object MonixBuildUtils { - /** - * Applies [[filterOutDependencyFromGeneratedPomXml]] to a list of multiple dependencies. + /** Applies [[filterOutDependencyFromGeneratedPomXml]] to a list of multiple dependencies. */ def filterOutMultipleDependenciesFromGeneratedPomXml(list: List[(String, Regex)]*) = list.foldLeft(List.empty[Def.Setting[_]]) { (acc, elem) => acc ++ filterOutDependencyFromGeneratedPomXml(elem: _*) } - /** - * Filter out dependencies from the generated `pom.xml`. + /** Filter out dependencies from the generated `pom.xml`. * * E.g. to exclude Scoverage: * {{{ @@ -95,8 +93,7 @@ object MonixBuildUtils { } } - /** - * Reads the Scala versions from `.github/workflows/build.yml`. + /** Reads the Scala versions from `.github/workflows/build.yml`. */ def scalaVersionsFromBuildYaml(manifest: File): SortedSet[MonixScalaVersion] = { Using.fileInputStream(manifest) { fis => From 0df25b6f0adc7a02233164fae4ba68f796294fbb Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 21 May 2022 11:40:28 +0300 Subject: [PATCH 46/69] Enable more Scala warnings (#1579) --- .github/workflows/build.yml | 7 + build.sbt | 57 +-- .../main/scala/monix/catnap/CancelableF.scala | 5 - .../monix/catnap/ConcurrentChannel.scala | 4 +- .../execution/CallbackInstanceSuite.scala | 2 +- .../eval/internal/TaskRunSyncUnsafe.scala | 8 +- .../src/main/scala/monix/eval/Coeval.scala | 2 +- .../src/main/scala/monix/eval/Task.scala | 7 +- .../monix/eval/internal/TaskMapBoth.scala | 9 +- .../monix/eval/internal/TaskParSequence.scala | 5 +- .../eval/internal/TaskRestartCallback.scala | 3 +- .../test/scala/monix/eval/BaseLawsSuite.scala | 6 +- .../monix/eval/CoevalCatsConversions.scala | 2 +- .../scala/monix/eval/CoevalErrorSuite.scala | 78 +-- .../monix/eval/CoevalEvalAlwaysSuite.scala | 20 +- .../monix/eval/CoevalEvalOnceSuite.scala | 20 +- .../scala/monix/eval/CoevalFlatMapSuite.scala | 16 +- .../scala/monix/eval/CoevalLeftSuite.scala | 2 +- .../eval/CoevalMemoizeOnSuccessSuite.scala | 36 +- .../scala/monix/eval/CoevalMemoizeSuite.scala | 20 +- .../scala/monix/eval/CoevalMiscSuite.scala | 22 +- .../scala/monix/eval/CoevalNowSuite.scala | 22 +- .../scala/monix/eval/CoevalOptionSuite.scala | 4 +- .../scala/monix/eval/CoevalRightSuite.scala | 2 +- .../monix/eval/CoevalSequenceSuite.scala | 6 +- .../scala/monix/eval/CoevalZipSuite.scala | 24 +- .../TaskClockTimerAndContextShiftSuite.scala | 4 +- .../eval/TaskCoevalDoOnFinishSuite.scala | 4 +- .../monix/eval/TaskConnectionSuite.scala | 4 +- .../scala/monix/eval/TaskErrorSuite.scala | 2 +- .../monix/eval/TaskEvalAlwaysSuite.scala | 2 +- .../monix/eval/TaskFromEitherSuite.scala | 8 +- .../eval/TaskMemoizeOnSuccessSuite.scala | 32 +- .../scala/monix/eval/TaskMemoizeSuite.scala | 12 +- .../test/scala/monix/eval/TaskMiscSuite.scala | 2 +- .../test/scala/monix/eval/TaskNowSuite.scala | 2 +- .../scala/monix/eval/TaskOptionsSuite.scala | 6 +- .../scala/monix/eval/TaskToFutureSuite.scala | 10 +- .../monix/execution/atomic/AtomicAny.scala | 12 +- .../execution/atomic/AtomicBoolean.scala | 12 +- .../monix/execution/atomic/AtomicByte.scala | 29 +- .../monix/execution/atomic/AtomicChar.scala | 22 +- .../monix/execution/atomic/AtomicDouble.scala | 22 +- .../monix/execution/atomic/AtomicFloat.scala | 16 +- .../monix/execution/atomic/AtomicInt.scala | 18 +- .../monix/execution/atomic/AtomicLong.scala | 22 +- .../execution/atomic/AtomicNumberAny.scala | 18 +- .../monix/execution/atomic/AtomicShort.scala | 12 +- .../monix/execution/atomic/Atomic.scala | 32 +- .../monix/execution/atomic/Atomic.scala | 25 +- .../atomic/ConcurrentAtomicNumberSuite.scala | 473 +----------------- .../atomic/ConcurrentAtomicSuite.scala | 6 +- .../monix/execution/internal/TestBox.scala | 5 +- .../monix/execution/atomic/BoxedLong.scala | 4 + .../atomic/internal/InlineMacrosTest.scala | 3 +- .../cancelables/ChainedCancelable.scala | 2 - .../monix/execution/internal/Platform.scala | 3 +- .../LowLevelConcurrentQueueBuilders.scala | 7 +- .../monix/execution/schedulers/CanBlock.scala | 2 + .../monix/execution/internal/Platform.scala | 3 +- .../execution/CallbackSafetyJVMSuite.scala | 32 +- .../scala/monix/execution/AsyncQueue.scala | 3 - .../main/scala/monix/execution/Callback.scala | 45 +- .../scala/monix/execution/FutureUtils.scala | 13 +- .../monix/execution/annotations/Unsafe.scala | 2 +- .../monix/execution/misc/CanBindLocals.scala | 3 +- .../test/scala/monix/execution/AckSuite.scala | 24 +- .../scala/monix/execution/BaseLawsSuite.scala | 8 +- .../scala/monix/execution/CallbackSuite.scala | 20 +- .../execution/CancelableFutureSuite.scala | 14 +- .../monix/execution/FutureUtilsSuite.scala | 25 +- .../DropHeadOnOverflowQueueSuite.scala | 2 +- .../schedulers/ExecutionModelSuite.scala | 2 +- ...tractBackPressuredBufferedSubscriber.scala | 2 +- .../observers/buffers/BuildersImpl.scala | 7 +- .../buffers/SyncBufferedSubscriber.scala | 4 +- .../buffers/DropNewBufferedSubscriber.scala | 3 +- .../scala/monix/reactive/Observable.scala | 2 +- .../operators/CollectWhileOperator.scala | 11 - .../operators/DropUntilObservable.scala | 2 +- .../OnCancelTriggerErrorObservable.scala | 2 +- .../operators/SearchByOrderOperator.scala | 26 +- .../operators/ThrottleLatestObservable.scala | 4 +- .../WhileBusyAggregateEventsOperator.scala | 6 +- .../SubscriberAsReactiveSubscriber.scala | 5 +- .../reactive/subjects/ConcurrentSubject.scala | 2 +- .../PaginateEvalObservableSuite.scala | 5 - .../builders/PaginateObservableSuite.scala | 4 - .../scala/monix/tail/IterantBuilders.scala | 8 +- .../monix/tail/internal/IterantZipMap.scala | 6 +- .../IterantToPublisherTest.scala | 2 +- .../ObservableToPublisherTest.scala | 2 +- .../SubscriberWhiteBoxAsyncTest.scala | 2 +- .../SubscriberWhiteBoxSyncTest.scala | 2 +- .../scala/monix/reactiveTests/package.scala | 2 +- .../tracing/CachedStackTracingSuite.scala | 2 +- .../src/test/scala/tracing/TracingSuite.scala | 2 +- 97 files changed, 519 insertions(+), 1012 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df1b938b4..fc65d4d9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,6 +54,13 @@ jobs: PLATFORM: ${{ matrix.java }} SBT_COMMAND: ci-jvm + - name: sbt reactiveTests/test + run: ./.github/scripts/exec-sbt-command + env: + SCALA_VERSION: ${{ matrix.scala }} + PLATFORM: ${{ matrix.java }} + SBT_COMMAND: "reactiveTests/test" + js-tests: name: JS / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} runs-on: ubuntu-20.04 diff --git a/build.sbt b/build.sbt index 734220e8a..ed60d9c8b 100644 --- a/build.sbt +++ b/build.sbt @@ -170,6 +170,11 @@ lazy val isDotty = } } +lazy val isCI = { + sys.env.getOrElse("SBT_PROFILE", "").contains("ci") || + sys.env.get("CI").exists(v => v == "true" || v == "1" || v == "yes") +} + lazy val sharedSettings = pgpSettings ++ Seq( organization := "io.monix", // Value extracted from .github/workflows/build.yml @@ -184,32 +189,33 @@ lazy val sharedSettings = pgpSettings ++ Seq( ver }, - /* // Enable this to debug warnings... Compile / scalacOptions ++= { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 13)) => Seq("-Wconf:any:warning-verbose") + case Some((2, 13) | (3, _)) => Seq("-Wconf:any:warning-verbose") case _ => Seq.empty } }, - */ - - // Disabled from the sbt-tpolecat set - Compile / scalacOptions --= Seq( - "-Wunused:privates", - "-Ywarn-unused:privates", - "-Wunused:implicits", - "-Ywarn-unused:implicits", - "-Wunused:imports", - "-Ywarn-unused:imports", - "-Wunused:explicits", - "-Ywarn-unused:params", - "-Wunused:params", - "-Xlint:infer-any" - ), // Turning off fatal warnings for doc generation Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude, + + // Turn off annoyances in tests + Test / tpolecatExcludeOptions ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, 12)) => + ScalacOptions.defaultConsoleExclude + case _ => + Set( + ScalacOptions.lintInferAny, + ScalacOptions.warnUnusedImplicits, + ScalacOptions.warnUnusedExplicits, + ScalacOptions.warnUnusedParams, + ScalacOptions.warnUnusedNoWarn, + ) + } + }, + // Silence everything in auto-generated files scalacOptions ++= { if (isDotty.value) @@ -217,12 +223,6 @@ lazy val sharedSettings = pgpSettings ++ Seq( else Seq("-P:silencer:pathFilters=.*[/]src_managed[/].*") }, - scalacOptions --= { - if (isDotty.value) - Seq("-Xfatal-warnings") - else - Seq() - }, // Syntax improvements, linting, etc. libraryDependencies ++= { @@ -250,12 +250,11 @@ lazy val sharedSettings = pgpSettings ++ Seq( file(".").getAbsolutePath.replaceAll("[.]$", "") ), - // Without this setting, the outcome of a test-suite will be printed all at - // once, instead of line by line, as tests are being completed - Test / logBuffered := false, // // Tries disabling parallel execution in tests (in the same project / task) + Test / logBuffered := isCI, Test / parallelExecution := false, + Test / testForkedParallel := false, // https://github.com/sbt/sbt/issues/2654 incOptions := incOptions.value.withLogRecompileOnMacro(false), @@ -433,9 +432,6 @@ def baseSettingsAndPlugins(publishArtifacts: Boolean): Project ⇒ Project = case "coverage" => pr case _ => pr.disablePlugins(scoverage.ScoverageSbtPlugin) } - val isCI = sys.env.getOrElse("SBT_PROFILE", "").contains("ci") || - sys.env.get("CI").exists(v => v == "true" || v == "1" || v == "yes") - withCoverage .enablePlugins(AutomateHeaderPlugin) .settings(sharedSettings) @@ -759,7 +755,8 @@ lazy val reactiveTests = project .dependsOn(reactiveJVM, tailJVM) .settings( libraryDependencies ++= Seq( - reactiveStreamsTCKLib % Test + reactiveStreamsTCKLib % Test, + "org.scalatestplus" %% "testng-7-5" % "3.2.12.0" % Test, ) ) diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala index ff5a83131..bacf3bd90 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala @@ -19,7 +19,6 @@ package monix.catnap import cats.Applicative import cats.effect.{ CancelToken, Sync } -import cats.syntax.either._ import monix.catnap.cancelables.BooleanCancelableF import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.exceptions.CompositeException @@ -42,10 +41,6 @@ trait CancelableF[F[_]] { } object CancelableF { - - // ensure import cats.syntax.either._ is used - private val dummy = ().asRight - /** * Given a token that does not guarantee idempotency, wraps it * in a [[CancelableF]] value that guarantees the given token diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala index a9ad06807..3cd9959ec 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala @@ -717,7 +717,7 @@ object ConcurrentChannel { consumersAwait: AtomicAny[CancelablePromise[Unit]], isFinished: () => Option[E], helpers: Helpers[F] - )(implicit F: Concurrent[F], cs: ContextShift[F]) { + )(implicit F: Concurrent[F]) { @tailrec private[this] def notifyConsumers(): Unit = { @@ -798,7 +798,7 @@ object ConcurrentChannel { consumersAwait: AtomicAny[CancelablePromise[Unit]], isFinished: () => Option[E], helpers: Helpers[F] - )(implicit F: Concurrent[F], cs: ContextShift[F]) + )(implicit F: Concurrent[F]) extends ConsumerF[F, E, A] { @tailrec diff --git a/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala b/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala index 33924e5a5..1a67d83c4 100644 --- a/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/execution/CallbackInstanceSuite.scala @@ -26,7 +26,7 @@ object CallbackInstanceSuite extends TestSuite[TestScheduler] { def tearDown(env: TestScheduler): Unit = assert(env.state.tasks.isEmpty, "should not have tasks left to execute") - test("contramap has a cats Contramap instance") { implicit s => + test("contramap has a cats Contramap instance") { _ => val instance = implicitly[Contravariant[Callback[Throwable, *]]] val callback = TestCallback() val stringCallback = instance.contramap(callback)((x: String) => x.toInt) diff --git a/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala b/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala index b4530f99b..2027dafc2 100644 --- a/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala +++ b/monix-eval/js/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala @@ -20,12 +20,18 @@ package monix.eval.internal import monix.eval.Task import monix.execution.Scheduler import scala.concurrent.duration.Duration +import scala.annotation.unused private[eval] object TaskRunSyncUnsafe { /** Implementation of `Task.runSyncUnsafe`, meant to throw an * "unsupported exception", since JavaScript cannot support it. */ - def apply[A](source: Task[A], timeout: Duration, scheduler: Scheduler, opts: Task.Options): A = { + def apply[A]( + @unused source: Task[A], + @unused timeout: Duration, + @unused scheduler: Scheduler, + @unused opts: Task.Options + ): A = { // $COVERAGE-OFF$ throw new UnsupportedOperationException("runSyncUnsafe isn't supported on top of JavaScript") // $COVERAGE-ON$ diff --git a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala index a7e743fea..3ad4450f4 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala @@ -724,7 +724,7 @@ sealed abstract class Coeval[+A] extends (() => A) with Serializable { self => * `fa.materialize.dematerialize <-> fa` */ final def dematerialize[B](implicit ev: A <:< Try[B]): Coeval[B] = - self.asInstanceOf[Coeval[Try[B]]].flatMap(Eager.fromTry) + self.flatMap(x => Eager.fromTry(ev(x))) /** * Converts the source [[Coeval]] into any `F[_]` that implements diff --git a/monix-eval/shared/src/main/scala/monix/eval/Task.scala b/monix-eval/shared/src/main/scala/monix/eval/Task.scala index 3da9f8ba5..db4369a20 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Task.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Task.scala @@ -29,7 +29,7 @@ import monix.execution._ import monix.execution.annotations.{ UnsafeBecauseBlocking, UnsafeBecauseImpure } import monix.execution.internal.{ Newtype1, Platform } import monix.execution.misc.Local -import monix.execution.schedulers.{ CanBlock, TracingScheduler, TrampolinedRunnable } +import monix.execution.schedulers.{ CanBlock, TracingScheduler } import monix.execution.compat.BuildFrom import monix.execution.compat.internal.newBuilder import org.reactivestreams.Publisher @@ -38,6 +38,7 @@ import scala.annotation.unchecked.{ uncheckedVariance => uV } import scala.concurrent.duration.{ Duration, FiniteDuration, NANOSECONDS, TimeUnit } import scala.concurrent.{ ExecutionContext, Future, TimeoutException } import scala.util.{ Failure, Success, Try } +import scala.annotation.unused /** `Task` represents a specification for a possibly lazy or * asynchronous computation, which when executed will produce an `A` @@ -1091,7 +1092,7 @@ sealed abstract class Task[+A] extends Serializable with TaskDeprecated.BinCompa implicit s: Scheduler, opts: Options, - permit: CanBlock + @unused permit: CanBlock ): A = { /*_*/ val opts2 = opts.withSchedulerFeatures @@ -1938,7 +1939,7 @@ sealed abstract class Task[+A] extends Serializable with TaskDeprecated.BinCompa /** Dematerializes the source's result from a `Try`. */ final def dematerialize[B](implicit ev: A <:< Try[B]): Task[B] = - this.asInstanceOf[Task[Try[B]]].flatMap(fromTry) + this.flatMap(x => fromTry(ev(x))) /** Returns a new task that mirrors the source task for normal termination, * but that triggers the given error on cancellation. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala index 3a43f3077..682467273 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala @@ -50,10 +50,7 @@ private[eval] object TaskMapBoth { private final class Register[A1, A2, R](fa1: Task[A1], fa2: Task[A2], f: (A1, A2) => R) extends ForkedRegister[R] { /* For signaling the values after the successful completion of both tasks. */ - def sendSignal(mainConn: TaskConnection, cb: Callback[Throwable, R], a1: A1, a2: A2)( - implicit s: Scheduler - ): Unit = { - + def sendSignal(mainConn: TaskConnection, cb: Callback[Throwable, R], a1: A1, a2: A2): Unit = { var streamErrors = true try { val r = f(a1, a2) @@ -115,7 +112,7 @@ private[eval] object TaskMapBoth { case null => // null means this is the first task to complete if (!state.compareAndSet(null, Left(a1))) onSuccess(a1) case Right(a2) => // the other task completed, so we can send - sendSignal(mainConn, cb, a1, a2.asInstanceOf[A2])(s) + sendSignal(mainConn, cb, a1, a2.asInstanceOf[A2]) case Stop => // the other task triggered an error () // do nothing case s @ Left(_) => @@ -143,7 +140,7 @@ private[eval] object TaskMapBoth { case null => // null means this is the first task to complete if (!state.compareAndSet(null, Right(a2))) onSuccess(a2) case Left(a1) => // the other task completed, so we can send - sendSignal(mainConn, cb, a1.asInstanceOf[A1], a2)(s) + sendSignal(mainConn, cb, a1.asInstanceOf[A1], a2) case Stop => // the other task triggered an error () // do nothing case s @ Right(_) => diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala index 54b522420..f6957e9b6 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala @@ -65,10 +65,7 @@ private[eval] object TaskParSequence { // MUST BE synchronized by `lock`! // MUST NOT BE called if isActive == false! - def maybeSignalFinal(mainConn: TaskConnection, finalCallback: Callback[Throwable, M[A]])( - implicit s: Scheduler - ): Unit = { - + def maybeSignalFinal(mainConn: TaskConnection, finalCallback: Callback[Throwable, M[A]]): Unit = { completed += 1 if (completed >= tasksCount) { isActive = false diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala index ca5140f17..0698475cb 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala @@ -23,6 +23,7 @@ import monix.eval.Task import monix.execution.Callback import monix.execution.misc.Local import monix.execution.schedulers.TrampolinedRunnable +import scala.annotation.unused private[internal] abstract class TaskRestartCallback(contextInit: Context, callback: Callback[Throwable, Any]) extends Callback[Throwable, Any] with TrampolinedRunnable { @@ -89,7 +90,7 @@ private[internal] abstract class TaskRestartCallback(contextInit: Context, callb // $COVERAGE-ON$ } - protected def prepareStart(task: Task.Async[_]): Unit = () + protected def prepareStart(@unused task: Task.Async[_]): Unit = () protected def prepareCallback: Callback[Throwable, Any] = callback private[this] val wrappedCallback = prepareCallback diff --git a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala index cfe41709a..9a7df292c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala @@ -198,17 +198,17 @@ trait ArbitraryInstancesBase extends monix.execution.ArbitraryInstances { for (f <- fun.arbitrary) yield { case (t: Throwable) => f(t.hashCode()) } } - implicit def arbitraryCoevalToLong[A, B](implicit A: Arbitrary[A], B: Arbitrary[B]): Arbitrary[Coeval[A] => B] = + implicit def arbitraryCoevalToLong[A, B](implicit B: Arbitrary[B]): Arbitrary[Coeval[A] => B] = Arbitrary { for (b <- B.arbitrary) yield (_: Coeval[A]) => b } - implicit def arbitraryTaskToLong[A, B](implicit A: Arbitrary[A], B: Arbitrary[B]): Arbitrary[Task[A] => B] = + implicit def arbitraryTaskToLong[A, B](implicit B: Arbitrary[B]): Arbitrary[Task[A] => B] = Arbitrary { for (b <- B.arbitrary) yield (_: Task[A]) => b } - implicit def arbitraryIOToLong[A, B](implicit A: Arbitrary[A], B: Arbitrary[B]): Arbitrary[IO[A] => B] = + implicit def arbitraryIOToLong[A, B](implicit B: Arbitrary[B]): Arbitrary[IO[A] => B] = Arbitrary { for (b <- B.arbitrary) yield (_: IO[A]) => b } diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala index 1f9ad27a2..06b8f7ce3 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala @@ -99,7 +99,7 @@ object CoevalCatsConversions extends BaseTestSuite { assertEquals(eval.value(), 1) } - test("Coeval.from protects against user error") { implicit s => + test("Coeval.from protects against user error") { _ => val dummy = DummyException("dummy") val eval = Coeval.from(Eval.always { throw dummy }) assertEquals(eval.runTry(), Failure(dummy)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala index 80cff49d0..e0fa41da5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala @@ -22,24 +22,24 @@ import scala.concurrent.TimeoutException import scala.util.{ Failure, Success } object CoevalErrorSuite extends BaseTestSuite { - test("Coeval.attempt should expose error") { implicit s => + test("Coeval.attempt should expose error") { _ => val dummy = DummyException("ex") val r = Coeval.raiseError[Int](dummy).attempt.value() assertEquals(r, Left(dummy)) } - test("Coeval.attempt should expose successful value") { implicit s => + test("Coeval.attempt should expose successful value") { _ => val r = Coeval.now(10).attempt.value() assertEquals(r, Right(10)) } - test("Coeval.fail should expose error") { implicit s => + test("Coeval.fail should expose error") { _ => val dummy = DummyException("dummy") val r = Coeval.raiseError[Int](dummy).failed.value() assertEquals(r, dummy) } - test("Coeval.fail should fail for successful values") { implicit s => + test("Coeval.fail should fail for successful values") { _ => intercept[NoSuchElementException] { Coeval.now(10).failed.value() () @@ -47,75 +47,75 @@ object CoevalErrorSuite extends BaseTestSuite { () } - test("Coeval.now.materialize") { implicit s => + test("Coeval.now.materialize") { _ => assertEquals(Coeval.now(10).materialize.value(), Success(10)) } - test("Coeval.error.materialize") { implicit s => + test("Coeval.error.materialize") { _ => val dummy = DummyException("dummy") assertEquals(Coeval.raiseError[Int](dummy).materialize.value(), Failure(dummy)) } - test("Coeval.evalOnce.materialize") { implicit s => + test("Coeval.evalOnce.materialize") { _ => assertEquals(Coeval.evalOnce(10).materialize.value(), Success(10)) } - test("Coeval.eval.materialize") { implicit s => + test("Coeval.eval.materialize") { _ => assertEquals(Coeval.eval(10).materialize.value(), Success(10)) } - test("Coeval.defer.materialize") { implicit s => + test("Coeval.defer.materialize") { _ => assertEquals(Coeval.defer(Coeval.now(10)).materialize.value(), Success(10)) } - test("Coeval.defer.flatMap.materialize") { implicit s => + test("Coeval.defer.flatMap.materialize") { _ => assertEquals(Coeval.defer(Coeval.now(10)).flatMap(Coeval.now).materialize.value(), Success(10)) } - test("Coeval.error.materialize") { implicit s => + test("Coeval.error.materialize") { _ => val dummy = DummyException("dummy") assertEquals(Coeval.raiseError[Int](dummy).materialize.value(), Failure(dummy)) } - test("Coeval.flatMap.materialize") { implicit s => + test("Coeval.flatMap.materialize") { _ => assertEquals(Coeval.eval(10).flatMap(x => Coeval.now(x)).materialize.runTry(), Success(Success(10))) } - test("Coeval.now.flatMap(error).materialize") { implicit s => + test("Coeval.now.flatMap(error).materialize") { _ => val dummy = DummyException("dummy") val r = Coeval.now(10).flatMap[Int](_ => throw dummy).materialize assertEquals(r.runTry(), Success(Failure(dummy))) } - test("Coeval.defer(error).materialize") { implicit s => + test("Coeval.defer(error).materialize") { _ => val dummy = DummyException("dummy") val f = Coeval.defer[Int](throw dummy).materialize assertEquals(f.runTry(), Success(Failure(dummy))) } - test("Coeval.defer(error).flatMap.materialize") { implicit s => + test("Coeval.defer(error).flatMap.materialize") { _ => val dummy = DummyException("dummy") val f = Coeval.defer[Int](throw dummy).flatMap(Coeval.now).materialize assertEquals(f.runTry(), Success(Failure(dummy))) } - test("Coeval.now.dematerialize") { implicit s => + test("Coeval.now.dematerialize") { _ => val result = Coeval.now(10).materialize.dematerialize.runTry() assertEquals(result, Success(10)) } - test("Coeval.error.dematerialize") { implicit s => + test("Coeval.error.dematerialize") { _ => val dummy = DummyException("dummy") val result = Coeval.raiseError[Int](dummy).materialize.dematerialize.runTry() assertEquals(result, Failure(dummy)) } - test("Coeval#onErrorRecover should mirror source on success") { implicit s => + test("Coeval#onErrorRecover should mirror source on success") { _ => val coeval = Coeval(1).onErrorRecover { case _: Throwable => 99 } assertEquals(coeval.runTry(), Success(1)) } - test("Coeval#onErrorRecover should recover") { implicit s => + test("Coeval#onErrorRecover should recover") { _ => val ex = DummyException("dummy") val coeval = Coeval[Int](if (1 == 1) throw ex else 1).onErrorRecover { case _: DummyException => 99 @@ -124,7 +124,7 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(coeval.runTry(), Success(99)) } - test("Coeval#onErrorRecover should protect against user code") { implicit s => + test("Coeval#onErrorRecover should protect against user code") { _ => val ex1 = DummyException("one") val ex2 = DummyException("two") @@ -133,19 +133,19 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(coeval.runTry(), Failure(ex2)) } - test("Coeval#onErrorHandle should mirror source on success") { implicit s => + test("Coeval#onErrorHandle should mirror source on success") { _ => val f = Coeval(1).onErrorHandle { _ => 99 } assertEquals(f.runTry(), Success(1)) } - test("Coeval#onErrorHandle should recover") { implicit s => + test("Coeval#onErrorHandle should recover") { _ => val ex = DummyException("dummy") val f = Coeval[Int](if (1 == 1) throw ex else 1).onErrorHandle { _ => 99 } assertEquals(f.runTry(), Success(99)) } - test("Coeval#onErrorHandle should protect against user code") { implicit s => + test("Coeval#onErrorHandle should protect against user code") { _ => val ex1 = DummyException("one") val ex2 = DummyException("two") val f = Coeval[Int](if (1 == 1) throw ex1 else 1).onErrorHandle { _ => @@ -155,32 +155,32 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(f.runTry(), Failure(ex2)) } - test("Coeval.onErrorFallbackTo should mirror source onSuccess") { implicit s => + test("Coeval.onErrorFallbackTo should mirror source onSuccess") { _ => val f = Coeval(1).onErrorFallbackTo(Coeval(2)) assertEquals(f.runTry(), Success(1)) } - test("Coeval.onErrorFallbackTo should fallback to backup onError") { implicit s => + test("Coeval.onErrorFallbackTo should fallback to backup onError") { _ => val ex = DummyException("dummy") val f = Coeval(throw ex).onErrorFallbackTo(Coeval(2)) assertEquals(f.runTry(), Success(2)) } - test("Coeval.onErrorFallbackTo should protect against user code") { implicit s => + test("Coeval.onErrorFallbackTo should protect against user code") { _ => val ex = DummyException("dummy") val err = DummyException("unexpected") val f = Coeval(throw ex).onErrorFallbackTo(Coeval.defer(throw err)) assertEquals(f.runTry(), Failure(err)) } - test("Coeval.onErrorRestart should mirror the source onSuccess") { implicit s => + test("Coeval.onErrorRestart should mirror the source onSuccess") { _ => var tries = 0 val f = Coeval.eval { tries += 1; 1 }.onErrorRestart(10) assertEquals(f.runTry(), Success(1)) assertEquals(tries, 1) } - test("Coeval.onErrorRestart should retry onError") { implicit s => + test("Coeval.onErrorRestart should retry onError") { _ => val ex = DummyException("dummy") var tries = 0 val f = Coeval.eval { tries += 1; if (tries < 5) throw ex else 1 }.onErrorRestart(10) @@ -189,7 +189,7 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(tries, 5) } - test("Coeval.onErrorRestart should emit onError after max retries") { implicit s => + test("Coeval.onErrorRestart should emit onError after max retries") { _ => val ex = DummyException("dummy") var tries = 0 val f = Coeval.eval { tries += 1; throw ex }.onErrorRestart(10) @@ -198,14 +198,14 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(tries, 11) } - test("Coeval.onErrorRestartIf should mirror the source onSuccess") { implicit s => + test("Coeval.onErrorRestartIf should mirror the source onSuccess") { _ => var tries = 0 val f = Coeval.eval { tries += 1; 1 }.onErrorRestartIf(_ => tries < 10) assertEquals(f.runTry(), Success(1)) assertEquals(tries, 1) } - test("Coeval.onErrorRestartIf should retry onError") { implicit s => + test("Coeval.onErrorRestartIf should retry onError") { _ => val ex = DummyException("dummy") var tries = 0 val f = Coeval.eval { tries += 1; if (tries < 5) throw ex else 1 } @@ -215,7 +215,7 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(tries, 5) } - test("Coeval.onErrorRestartIf should emit onError") { implicit s => + test("Coeval.onErrorRestartIf should emit onError") { _ => val ex = DummyException("dummy") var tries = 0 val f = Coeval.eval { tries += 1; throw ex } @@ -225,12 +225,12 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(tries, 11) } - test("Coeval#onErrorRecoverWith should mirror source on success") { implicit s => + test("Coeval#onErrorRecoverWith should mirror source on success") { _ => val f = Coeval(1).onErrorRecoverWith { case _: Throwable => Coeval(99) } assertEquals(f.runTry(), Success(1)) } - test("Coeval#onErrorRecoverWith should recover") { implicit s => + test("Coeval#onErrorRecoverWith should recover") { _ => val ex = DummyException("dummy") val f = Coeval[Int](throw ex).onErrorRecoverWith { case _: DummyException => Coeval(99) @@ -239,7 +239,7 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(f.runTry(), Success(99)) } - test("Coeval#onErrorRecoverWith should protect against user code") { implicit s => + test("Coeval#onErrorRecoverWith should protect against user code") { _ => val ex1 = DummyException("one") val ex2 = DummyException("two") @@ -248,19 +248,19 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(f.runTry(), Failure(ex2)) } - test("Coeval#onErrorRecover should emit error if not matches") { implicit s => + test("Coeval#onErrorRecover should emit error if not matches") { _ => val dummy = DummyException("dummy") val f = Coeval[Int](throw dummy).onErrorRecover { case _: TimeoutException => 10 } assertEquals(f.runTry(), Failure(dummy)) } - test("Coeval#onErrorRecoverWith should emit error if not matches") { implicit s => + test("Coeval#onErrorRecoverWith should emit error if not matches") { _ => val dummy = DummyException("dummy") val f = Coeval[Int](throw dummy).onErrorRecoverWith { case _: TimeoutException => Coeval.now(10) } assertEquals(f.runTry(), Failure(dummy)) } - test("Coeval.onErrorRestartLoop works for success") { implicit s => + test("Coeval.onErrorRestartLoop works for success") { _ => val dummy = DummyException("dummy") var tries = 0 val source = Coeval.eval { @@ -280,7 +280,7 @@ object CoevalErrorSuite extends BaseTestSuite { assertEquals(tries, 5) } - test("Coeval.onErrorRestartLoop can rethrow") { implicit s => + test("Coeval.onErrorRestartLoop can rethrow") { _ => val dummy = DummyException("dummy") val source = Coeval.eval[Int] { throw dummy } diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala index d536bf532..395ef4a66 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalAlwaysSuite.scala @@ -24,7 +24,7 @@ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } object CoevalEvalAlwaysSuite extends BaseTestSuite { - test("Coeval.eval should work synchronously") { implicit s => + test("Coeval.eval should work synchronously") { _ => var wasTriggered = false def trigger(): String = { wasTriggered = true; "result" } @@ -36,7 +36,7 @@ object CoevalEvalAlwaysSuite extends BaseTestSuite { assertEquals(f, Success("result")) } - test("Coeval.eval should protect against user code errors") { implicit s => + test("Coeval.eval should protect against user code errors") { s => val ex = DummyException("dummy") val f = Coeval.eval[Int](if (1 == 1) throw ex else 1).runTry() @@ -44,19 +44,19 @@ object CoevalEvalAlwaysSuite extends BaseTestSuite { assertEquals(s.state.lastReportedError, null) } - test("Coeval.eval.flatMap should be equivalent with Coeval.eval") { implicit s => + test("Coeval.eval.flatMap should be equivalent with Coeval.eval") { _ => val ex = DummyException("dummy") val t = Coeval.eval[Int](if (1 == 1) throw ex else 1).flatMap(Coeval.now) check(t <-> Coeval.raiseError(ex)) } - test("Coeval.eval.flatMap should protect against user code") { implicit s => + test("Coeval.eval.flatMap should protect against user code") { _ => val ex = DummyException("dummy") val t = Coeval.eval(1).flatMap[Int](_ => throw ex) check(t <-> Coeval.raiseError(ex)) } - test("Coeval.eval.map should work") { implicit s => + test("Coeval.eval.map should work") { _ => check1 { (a: Int) => Coeval.eval(a).map(_ + 1) <-> Coeval.eval(a + 1) } @@ -76,7 +76,7 @@ object CoevalEvalAlwaysSuite extends BaseTestSuite { assertEquals(f, Success(iterations * 2)) } - test("Coeval.eval(error).memoize should work") { implicit s => + test("Coeval.eval(error).memoize should work") { _ => var effect = 0 val dummy = DummyException("dummy") val task = Coeval.eval[Int] { effect += 1; throw dummy }.memoize @@ -88,27 +88,27 @@ object CoevalEvalAlwaysSuite extends BaseTestSuite { assertEquals(effect, 1) } - test("Coeval.eval.materialize should work for success") { implicit s => + test("Coeval.eval.materialize should work for success") { _ => val task = Coeval.eval(1).materialize val f = task.runTry() assertEquals(f, Success(Success(1))) } - test("Coeval.eval.materialize should work for failure") { implicit s => + test("Coeval.eval.materialize should work for failure") { _ => val dummy = DummyException("dummy") val task = Coeval.eval[Int](throw dummy).materialize val f = task.runTry() assertEquals(f, Success(Failure(dummy))) } - test("Coeval.EvalAlways.runTry() override") { implicit s => + test("Coeval.EvalAlways.runTry() override") { _ => val dummy = DummyException("dummy") val task = Coeval.eval { if (1 == 1) throw dummy else 10 } val f = task.runTry() assertEquals(f, Failure(dummy)) } - test("Coeval.eval is equivalent with Coeval.evalOnce on first run") { implicit s => + test("Coeval.eval is equivalent with Coeval.evalOnce on first run") { _ => check1 { (a: Int) => val t1 = { var effect = 100 diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala index baa3bcdc5..91f9458a6 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalEvalOnceSuite.scala @@ -24,7 +24,7 @@ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } object CoevalEvalOnceSuite extends BaseTestSuite { - test("Coeval.evalOnce should work synchronously") { implicit s => + test("Coeval.evalOnce should work synchronously") { _ => var wasTriggered = false def trigger(): String = { wasTriggered = true; "result" } @@ -36,7 +36,7 @@ object CoevalEvalOnceSuite extends BaseTestSuite { assertEquals(f, Success("result")) } - test("Coeval.evalOnce should protect against user code errors") { implicit s => + test("Coeval.evalOnce should protect against user code errors") { s => val ex = DummyException("dummy") val f = Coeval.evalOnce[Int](if (1 == 1) throw ex else 1).runTry() @@ -44,25 +44,25 @@ object CoevalEvalOnceSuite extends BaseTestSuite { assertEquals(s.state.lastReportedError, null) } - test("Coeval.evalOnce.flatMap should be equivalent with Coeval.evalOnce") { implicit s => + test("Coeval.evalOnce.flatMap should be equivalent with Coeval.evalOnce") { _ => val ex = DummyException("dummy") val t = Coeval.evalOnce[Int](if (1 == 1) throw ex else 1).flatMap(Coeval.now) check(t <-> Coeval.raiseError(ex)) } - test("Coeval.evalOnce.flatMap should protect against user code") { implicit s => + test("Coeval.evalOnce.flatMap should protect against user code") { _ => val ex = DummyException("dummy") val t = Coeval.evalOnce(1).flatMap[Int](_ => throw ex) check(t <-> Coeval.raiseError(ex)) } - test("Coeval.evalOnce.map should work") { implicit s => + test("Coeval.evalOnce.map should work") { _ => check1 { (a: Int) => Coeval.evalOnce(a).map(_ + 1) <-> Coeval.evalOnce(a + 1) } } - test("Coeval.evalOnce.flatMap should be tail recursive") { implicit s => + test("Coeval.evalOnce.flatMap should be tail recursive") { s => def loop(n: Int, idx: Int): Coeval[Int] = Coeval.evalOnce(idx).flatMap { _ => if (idx < n) loop(n, idx + 1).map(_ + 1) @@ -76,7 +76,7 @@ object CoevalEvalOnceSuite extends BaseTestSuite { assertEquals(f, Success(iterations * 2)) } - test("Coeval.eval(error).memoize should work") { implicit s => + test("Coeval.eval(error).memoize should work") { _ => var effect = 0 val dummy = DummyException("dummy") val task = Coeval.evalOnce[Int] { effect += 1; throw dummy }.memoize @@ -88,20 +88,20 @@ object CoevalEvalOnceSuite extends BaseTestSuite { assertEquals(effect, 1) } - test("Coeval.evalOnce.materialize should work for success") { implicit s => + test("Coeval.evalOnce.materialize should work for success") { _ => val task = Coeval.evalOnce(1).materialize val f = task.runTry() assertEquals(f, Success(Success(1))) } - test("Coeval.evalOnce.materialize should work for failure") { implicit s => + test("Coeval.evalOnce.materialize should work for failure") { _ => val dummy = DummyException("dummy") val task = Coeval.evalOnce[Int](throw dummy).materialize val f = task.runTry() assertEquals(f, Success(Failure(dummy))) } - test("Coeval.evalOnce.runTry() override") { implicit s => + test("Coeval.evalOnce.runTry() override") { _ => val dummy = DummyException("dummy") val task = Coeval.evalOnce { if (1 == 1) throw dummy else 10 } val f = task.runTry() diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala index 368b4c80e..db2f85d7b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalFlatMapSuite.scala @@ -24,37 +24,37 @@ import monix.execution.exceptions.DummyException import scala.util.{ Random, Success } object CoevalFlatMapSuite extends BaseTestSuite { - test("transformWith equivalence with flatMap") { implicit s => + test("transformWith equivalence with flatMap") { _ => check2 { (fa: Coeval[Int], f: Int => Coeval[Int]) => fa.redeemWith(Coeval.raiseError, f) <-> fa.flatMap(f) } } - test("transform equivalence with map") { implicit s => + test("transform equivalence with map") { _ => check2 { (fa: Coeval[Int], f: Int => Int) => fa.redeem(ex => throw ex, f) <-> fa.map(f) } } - test("transformWith can recover") { implicit s => + test("transformWith can recover") { _ => val dummy = new DummyException("dummy") val coeval = Coeval.raiseError[Int](dummy).redeemWith(_ => Coeval.now(1), Coeval.now) assertEquals(coeval.runTry(), Success(1)) } - test("transform can recover") { implicit s => + test("transform can recover") { _ => val dummy = new DummyException("dummy") val coeval = Coeval.raiseError[Int](dummy).redeem(_ => 1, identity) assertEquals(coeval.runTry(), Success(1)) } - test(">> is stack safe for infinite loops") { implicit s => + test(">> is stack safe for infinite loops") { _ => def looped: Coeval[Unit] = Coeval.unit >> looped val _ = looped assert(true) } - test("flatMapLoop enables loops") { implicit s => + test("flatMapLoop enables loops") { _ => val random = Coeval(Random.nextInt()) val loop = random.flatMapLoop(Vector.empty[Int]) { (a, list, continue) => val newList = list :+ a @@ -66,13 +66,13 @@ object CoevalFlatMapSuite extends BaseTestSuite { assertEquals(loop.apply().size, 5) } - test("fa *> fb <-> fa.flatMap(_ => fb)") { implicit s => + test("fa *> fb <-> fa.flatMap(_ => fb)") { _ => check2 { (fa: Coeval[Int], fb: Coeval[Int]) => fa *> fb <-> fa.flatMap(_ => fb) } } - test("fa <* fb <-> fa.flatMap(a => fb.map(_ => a))") { implicit s => + test("fa <* fb <-> fa.flatMap(a => fb.map(_ => a))") { _ => check2 { (fa: Coeval[Int], fb: Coeval[Int]) => fa <* fb <-> fa.flatMap(a => fb.map(_ => a)) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala index d4f4d4da3..cdb371bdf 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalLeftSuite.scala @@ -18,7 +18,7 @@ package monix.eval object CoevalLeftSuite extends BaseTestSuite { - test("Coeval.left should return a Now with a Left") { implicit s => + test("Coeval.left should return a Now with a Left") { _ => val t = Coeval.left[Int, String](1) t.value() match { diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala index 8b57604d1..636e6b91f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala @@ -23,7 +23,7 @@ import monix.execution.internal.Platform import scala.util.{ Failure, Success } object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { - test("Coeval.eval.memoizeOnSuccess should work for first subscriber") { implicit s => + test("Coeval.eval.memoizeOnSuccess should work for first subscriber") { _ => var effect = 0 val coeval = Coeval.eval { effect += 1; effect }.memoizeOnSuccess @@ -31,7 +31,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(f, Success(1)) } - test("Coeval.eval.memoizeOnSuccess should work for next subscribers") { implicit s => + test("Coeval.eval.memoizeOnSuccess should work for next subscribers") { _ => var effect = 0 val coeval = Coeval.eval { effect += 1; effect }.memoizeOnSuccess coeval.runTry() @@ -42,7 +42,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(f2, Success(1)) } - test("Coeval.evalOnce.memoizeOnSuccess should work for first subscriber") { implicit s => + test("Coeval.evalOnce.memoizeOnSuccess should work for first subscriber") { _ => var effect = 0 val coeval = Coeval.evalOnce { effect += 1; effect }.memoizeOnSuccess @@ -50,7 +50,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(f, Success(1)) } - test("Coeval.evalOnce.memoizeOnSuccess should work for next subscribers") { implicit s => + test("Coeval.evalOnce.memoizeOnSuccess should work for next subscribers") { _ => var effect = 0 val coeval = Coeval.evalOnce { effect += 1; effect }.memoizeOnSuccess coeval.runTry() @@ -61,16 +61,16 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(f2, Success(1)) } - test("Coeval.now.memoizeOnSuccess should return self") { implicit s => + test("Coeval.now.memoizeOnSuccess should return self") { _ => assertEquals(Coeval.now(10), Coeval.now(10).memoizeOnSuccess) } - test("Coeval.error.memoizeOnSuccess should return self") { implicit s => + test("Coeval.error.memoizeOnSuccess should return self") { _ => val dummy = DummyException("dummy") assertEquals(Coeval.raiseError(dummy), Coeval.raiseError(dummy).memoizeOnSuccess) } - test("Coeval.memoizeOnSuccess should be stack safe") { implicit s => + test("Coeval.memoizeOnSuccess should be stack safe") { _ => var effect = 0 var coeval = Coeval { effect += 1; effect } val count = if (Platform.isJVM) 100000 else 5000 @@ -78,7 +78,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(coeval.runTry(), Success(1)) } - test("Coeval.apply.memoizeOnSuccess effects") { implicit s => + test("Coeval.apply.memoizeOnSuccess effects") { _ => var effect = 0 val coeval1 = Coeval { effect += 1; 3 }.memoizeOnSuccess val coeval2 = coeval1.map { x => @@ -94,7 +94,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(result2, Success(4)) } - test("Coeval.suspend.memoizeOnSuccess effects") { implicit s => + test("Coeval.suspend.memoizeOnSuccess effects") { _ => var effect = 0 val coeval1 = Coeval.defer { effect += 1; Coeval.now(3) }.memoizeOnSuccess val coeval2 = coeval1.map { x => @@ -110,7 +110,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(result2, Success(4)) } - test("Coeval.suspend.flatMap.memoizeOnSuccess effects") { implicit s => + test("Coeval.suspend.flatMap.memoizeOnSuccess effects") { _ => var effect = 0 val coeval1 = Coeval.defer { effect += 1; Coeval.now(2) } .flatMap(x => Coeval.now(x + 1)) @@ -128,7 +128,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(result2, Success(4)) } - test("Coeval.eval(throw).memoizeOnSuccess should not cache errors") { implicit s => + test("Coeval.eval(throw).memoizeOnSuccess should not cache errors") { _ => var effect = 0 val dummy = DummyException("dummy") val coeval = Coeval.eval { @@ -145,7 +145,7 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(effect, 3) } - test("Coeval.eval(throw).map.memoizeOnSuccess should not cache errors") { implicit s => + test("Coeval.eval(throw).map.memoizeOnSuccess should not cache errors") { _ => var effect = 0 val dummy = DummyException("dummy") val coeval = @@ -163,32 +163,32 @@ object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(effect, 3) } - test("Coeval.evalOnce eq Coeval.evalOnce.memoizeOnSuccess") { implicit s => + test("Coeval.evalOnce eq Coeval.evalOnce.memoizeOnSuccess") { _ => val coeval = Coeval.evalOnce(1) assertEquals(coeval, coeval.memoizeOnSuccess) } - test("Coeval.eval.memoizeOnSuccess eq Coeval.eval.memoizeOnSuccess.memoizeOnSuccess") { implicit s => + test("Coeval.eval.memoizeOnSuccess eq Coeval.eval.memoizeOnSuccess.memoizeOnSuccess") { _ => val coeval = Coeval.eval(1).memoizeOnSuccess assertEquals(coeval, coeval.memoizeOnSuccess) } - test("Coeval.eval.memoize eq Coeval.eval.memoize.memoizeOnSuccess") { implicit s => + test("Coeval.eval.memoize eq Coeval.eval.memoize.memoizeOnSuccess") { _ => val coeval = Coeval.eval(1).memoize assertEquals(coeval, coeval.memoizeOnSuccess) } - test("Coeval.eval.map.memoize eq Coeval.eval.map.memoize.memoizeOnSuccess") { implicit s => + test("Coeval.eval.map.memoize eq Coeval.eval.map.memoize.memoizeOnSuccess") { _ => val coeval = Coeval.eval(1).map(_ + 1).memoize assertEquals(coeval, coeval.memoizeOnSuccess) } - test("Coeval.now.memoizeOnSuccess eq Coeval.now") { implicit s => + test("Coeval.now.memoizeOnSuccess eq Coeval.now") { _ => val coeval = Coeval.now(1) assertEquals(coeval, coeval.memoizeOnSuccess) } - test("Coeval.raiseError.memoizeOnSuccess eq Coeval.raiseError") { implicit s => + test("Coeval.raiseError.memoizeOnSuccess eq Coeval.raiseError") { _ => val coeval = Coeval.raiseError(DummyException("dummy")) assertEquals(coeval, coeval.memoizeOnSuccess) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala index 48e64397a..6498f1863 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala @@ -23,7 +23,7 @@ import monix.execution.internal.Platform import scala.util.Success object CoevalMemoizeSuite extends BaseTestSuite { - test("Coeval.eval.memoize should work for first subscriber") { implicit s => + test("Coeval.eval.memoize should work for first subscriber") { _ => var effect = 0 val coeval = Coeval.eval { effect += 1; effect }.memoize @@ -31,7 +31,7 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(f, Success(1)) } - test("Coeval.eval.memoize should work for next subscribers") { implicit s => + test("Coeval.eval.memoize should work for next subscribers") { _ => var effect = 0 val coeval = Coeval.eval { effect += 1; effect }.memoize coeval.runTry() @@ -42,7 +42,7 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(f2, Success(1)) } - test("Coeval.evalOnce.memoize should work for first subscriber") { implicit s => + test("Coeval.evalOnce.memoize should work for first subscriber") { _ => var effect = 0 val coeval = Coeval.evalOnce { effect += 1; effect }.memoize @@ -50,7 +50,7 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(f, Success(1)) } - test("Coeval.evalOnce.memoize should work for next subscribers") { implicit s => + test("Coeval.evalOnce.memoize should work for next subscribers") { _ => var effect = 0 val coeval = Coeval.evalOnce { effect += 1; effect }.memoize coeval.runTry() @@ -61,16 +61,16 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(f2, Success(1)) } - test("Coeval.now.memoize should return self") { implicit s => + test("Coeval.now.memoize should return self") { _ => assertEquals(Coeval.now(10), Coeval.now(10).memoize) } - test("Coeval.error.memoize should return self") { implicit s => + test("Coeval.error.memoize should return self") { _ => val dummy = DummyException("dummy") assertEquals(Coeval.raiseError(dummy), Coeval.raiseError(dummy).memoize) } - test("Coeval.memoize should be stack safe") { implicit s => + test("Coeval.memoize should be stack safe") { _ => var effect = 0 var coeval = Coeval { effect += 1; effect } val count = if (Platform.isJVM) 100000 else 5000 @@ -78,7 +78,7 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(coeval.runTry(), Success(1)) } - test("Coeval.apply.memoize effects") { implicit s => + test("Coeval.apply.memoize effects") { _ => var effect = 0 val coeval1 = Coeval { effect += 1; 3 }.memoize val coeval2 = coeval1.map { x => @@ -94,7 +94,7 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(result2, Success(4)) } - test("Coeval.suspend.memoize effects") { implicit s => + test("Coeval.suspend.memoize effects") { _ => var effect = 0 val coeval1 = Coeval.defer { effect += 1; Coeval.now(3) }.memoize val coeval2 = coeval1.map { x => @@ -110,7 +110,7 @@ object CoevalMemoizeSuite extends BaseTestSuite { assertEquals(result2, Success(4)) } - test("Coeval.suspend.flatMap.memoize effects") { implicit s => + test("Coeval.suspend.flatMap.memoize effects") { _ => var effect = 0 val coeval1 = Coeval.defer { effect += 1; Coeval.now(2) } .flatMap(x => Coeval.now(x + 1)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala index db7e7c850..e55e55124 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala @@ -24,18 +24,18 @@ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } object CoevalMiscSuite extends BaseTestSuite { - test("Coeval.now.attempt should succeed") { implicit s => + test("Coeval.now.attempt should succeed") { _ => val result = Coeval.now(1).attempt.value() assertEquals(result, Right(1)) } - test("Coeval.raiseError.attempt should expose error") { implicit s => + test("Coeval.raiseError.attempt should expose error") { _ => val ex = DummyException("dummy") val result = Coeval.raiseError[Int](ex).attempt.value() assertEquals(result, Left(ex)) } - test("Coeval.fail should expose error") { implicit s => + test("Coeval.fail should expose error") { _ => val dummy = DummyException("dummy") check1 { (fa: Coeval[Int]) => val r = fa.map(_ => throw dummy).failed.value() @@ -43,7 +43,7 @@ object CoevalMiscSuite extends BaseTestSuite { } } - test("Coeval.fail should fail for successful values") { implicit s => + test("Coeval.fail should fail for successful values") { _ => intercept[NoSuchElementException] { Coeval.eval(10).failed.value() () @@ -51,24 +51,24 @@ object CoevalMiscSuite extends BaseTestSuite { () } - test("Coeval.map protects against user code") { implicit s => + test("Coeval.map protects against user code") { _ => val ex = DummyException("dummy") val result = Coeval.now(1).map(_ => throw ex).runTry() assertEquals(result, Failure(ex)) } - test("Coeval.now.dematerialize") { implicit s => + test("Coeval.now.dematerialize") { _ => val result = Coeval.now(1).materialize.dematerialize.runTry() assertEquals(result, Success(1)) } - test("Coeval.raiseError.dematerialize") { implicit s => + test("Coeval.raiseError.dematerialize") { _ => val ex = DummyException("dummy") val result = Coeval.raiseError[Int](ex).materialize.dematerialize.runTry() assertEquals(result, Failure(ex)) } - test("Coeval.restartUntil") { implicit s => + test("Coeval.restartUntil") { _ => var i = 0 val r = Coeval { i += 1; i @@ -76,7 +76,7 @@ object CoevalMiscSuite extends BaseTestSuite { assertEquals(r, 11) } - test("Coeval.pure is an alias of now") { implicit s => + test("Coeval.pure is an alias of now") { _ => assertEquals(Coeval.pure(1), Coeval.now(1)) } @@ -89,14 +89,14 @@ object CoevalMiscSuite extends BaseTestSuite { assertEquals(fa.value(), 3) } - test("Coeval.flatten is equivalent with flatMap") { implicit s => + test("Coeval.flatten is equivalent with flatMap") { _ => check1 { (nr: Int) => val ref = Coeval(Coeval(nr)) ref.flatten <-> ref.flatMap(x => x) } } - test("Coeval.error.flatten is equivalent with flatMap") { implicit s => + test("Coeval.error.flatten is equivalent with flatMap") { _ => val ex = DummyException("dummy") val ref = Coeval(Coeval.raiseError[Int](ex)) assertEquals(ref.flatten.runTry(), ref.flatMap(x => x).runTry()) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala index a18d623e9..4b7a86da3 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala @@ -24,7 +24,7 @@ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } object CoevalNowSuite extends BaseTestSuite { - test("Coeval.now should work") { implicit s => + test("Coeval.now should work") { _ => var wasTriggered = false def trigger(): String = { wasTriggered = true; "result" } @@ -34,12 +34,12 @@ object CoevalNowSuite extends BaseTestSuite { assertEquals(r, Success("result")) } - test("Coeval.now.isSuccess") { implicit s => + test("Coeval.now.isSuccess") { _ => assert(Coeval.Now(1).isSuccess, "isSuccess") assert(!Coeval.Now(1).isError, "!isFailure") } - test("Coeval.error should work synchronously") { implicit s => + test("Coeval.error should work synchronously") { _ => var wasTriggered = false val dummy = DummyException("dummy") def trigger(): Throwable = { wasTriggered = true; dummy } @@ -50,28 +50,28 @@ object CoevalNowSuite extends BaseTestSuite { assertEquals(r, Failure(dummy)) } - test("Coeval.now.map should work") { implicit s => + test("Coeval.now.map should work") { _ => Coeval.now(1).map(_ + 1).value() check1 { (a: Int) => Coeval.now(a).map(_ + 1) <-> Coeval.now(a + 1) } } - test("Coeval.error.map should be the same as Coeval.error") { implicit s => + test("Coeval.error.map should be the same as Coeval.error") { _ => check { val dummy = DummyException("dummy") Coeval.raiseError[Int](dummy).map(_ + 1) <-> Coeval.raiseError[Int](dummy) } } - test("Coeval.error.flatMap should be the same as Coeval.flatMap") { implicit s => + test("Coeval.error.flatMap should be the same as Coeval.flatMap") { _ => check { val dummy = DummyException("dummy") Coeval.raiseError[Int](dummy).flatMap(Coeval.now) <-> Coeval.raiseError(dummy) } } - test("Coeval.error.flatMap should be protected") { implicit s => + test("Coeval.error.flatMap should be protected") { _ => check { val dummy = DummyException("dummy") val err = DummyException("err") @@ -79,13 +79,13 @@ object CoevalNowSuite extends BaseTestSuite { } } - test("Coeval.now.flatMap should protect against user code") { implicit s => + test("Coeval.now.flatMap should protect against user code") { _ => val ex = DummyException("dummy") val t = Coeval.now(1).flatMap[Int](_ => throw ex) check(t <-> Coeval.raiseError(ex)) } - test("Coeval.now.flatMap should be tail recursive") { implicit s => + test("Coeval.now.flatMap should be tail recursive") { s => def loop(n: Int, idx: Int): Coeval[Int] = Coeval.now(idx).flatMap { _ => if (idx < n) loop(n, idx + 1).map(_ + 1) @@ -98,12 +98,12 @@ object CoevalNowSuite extends BaseTestSuite { assertEquals(r, Success(iterations * 2)) } - test("Coeval.now.materialize should work") { implicit s => + test("Coeval.now.materialize should work") { _ => val task = Coeval.now(1).materialize assertEquals(task.value(), Success(1)) } - test("Coeval.error.materialize should work") { implicit s => + test("Coeval.error.materialize should work") { _ => val dummy = DummyException("dummy") val task = Coeval.raiseError(dummy).materialize assertEquals(task.value(), Failure(dummy)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala index 28c400dfc..46731e30a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalOptionSuite.scala @@ -18,13 +18,13 @@ package monix.eval object CoevalOptionSuite extends BaseTestSuite { - test("Coeval.none should return a Now with a None") { implicit s => + test("Coeval.none should return a Now with a None") { _ => val c = Coeval.none[Int] assertEquals(c.value(), None) } - test("Coeval.some should return a Now with a Some") { implicit s => + test("Coeval.some should return a Now with a Some") { _ => val c = Coeval.some[Int](1) assertEquals(c.value(), Some(1)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala index a98387ea5..43ec02979 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalRightSuite.scala @@ -18,7 +18,7 @@ package monix.eval object CoevalRightSuite extends BaseTestSuite { - test("Coeval.right should return a Now with a Right") { implicit s => + test("Coeval.right should return a Now with a Right") { _ => val t = Coeval.right[Int, String]("t") t.value() match { case Right(_: String) => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala index 41ca644a5..11437386d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala @@ -21,21 +21,21 @@ import cats.laws._ import cats.laws.discipline._ object CoevalSequenceSuite extends BaseTestSuite { - test("Coeval.sequence") { implicit s => + test("Coeval.sequence") { _ => check1 { (numbers: List[Int]) => val coeval = Coeval.sequence(numbers.map(x => Coeval(x))) coeval <-> Coeval(numbers) } } - test("Coeval.traverse") { implicit s => + test("Coeval.traverse") { _ => check1 { (numbers: List[Int]) => val coeval = Coeval.traverse(numbers)(x => Coeval(x)) coeval <-> Coeval(numbers) } } - test("Coeval.zipList") { implicit s => + test("Coeval.zipList") { _ => check1 { (numbers: List[Int]) => val coeval = Coeval.zipList(numbers.map(x => Coeval(x)): _*) coeval <-> Coeval(numbers) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala index eff6643a7..91e5dfb5f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalZipSuite.scala @@ -20,73 +20,73 @@ package monix.eval import scala.util.Success object CoevalZipSuite extends BaseTestSuite { - test("Coeval#zip works") { implicit s => + test("Coeval#zip works") { _ => def n(n: Int) = Coeval.now(n) val t = n(1).zip(n(2)) assertEquals(t.runTry(), Success((1, 2))) } - test("Coeval#zipMap works") { implicit s => + test("Coeval#zipMap works") { _ => def n(n: Int) = Coeval.now(n) val t = n(1).zipMap(n(2))((_, _)) assertEquals(t.runTry(), Success((1, 2))) } - test("Coeval#zip2 works") { implicit s => + test("Coeval#zip2 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.zip2(n(1), n(2)) assertEquals(t.runTry(), Success((1, 2))) } - test("Coeval#zipWith2 works") { implicit s => + test("Coeval#zipWith2 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.map2(n(1), n(2))((_, _)) assertEquals(t.runTry(), Success((1, 2))) } - test("Coeval#zip3 works") { implicit s => + test("Coeval#zip3 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.zip3(n(1), n(2), n(3)) assertEquals(t.runTry(), Success((1, 2, 3))) } - test("Coeval#zipMap3 works") { implicit s => + test("Coeval#zipMap3 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.map3(n(1), n(2), n(3))((_, _, _)) assertEquals(t.runTry(), Success((1, 2, 3))) } - test("Coeval#zip4 works") { implicit s => + test("Coeval#zip4 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.zip4(n(1), n(2), n(3), n(4)) assertEquals(t.runTry(), Success((1, 2, 3, 4))) } - test("Coeval#zipMap4 works") { implicit s => + test("Coeval#zipMap4 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.map4(n(1), n(2), n(3), n(4))((_, _, _, _)) assertEquals(t.runTry(), Success((1, 2, 3, 4))) } - test("Coeval#zip5 works") { implicit s => + test("Coeval#zip5 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.zip5(n(1), n(2), n(3), n(4), n(5)) assertEquals(t.runTry(), Success((1, 2, 3, 4, 5))) } - test("Coeval#zipMap5 works") { implicit s => + test("Coeval#zipMap5 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.map5(n(1), n(2), n(3), n(4), n(5))((_, _, _, _, _)) assertEquals(t.runTry(), Success((1, 2, 3, 4, 5))) } - test("Coeval#zip6 works") { implicit s => + test("Coeval#zip6 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.zip6(n(1), n(2), n(3), n(4), n(5), n(6)) assertEquals(t.runTry(), Success((1, 2, 3, 4, 5, 6))) } - test("Coeval#zipMap6 works") { implicit s => + test("Coeval#zipMap6 works") { _ => def n(n: Int) = Coeval.now(n) val t = Coeval.map6(n(1), n(2), n(3), n(4), n(5), n(6))((_, _, _, _, _, _)) assertEquals(t.runTry(), Success((1, 2, 3, 4, 5, 6))) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala index 7f740184d..a69119cc8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskClockTimerAndContextShiftSuite.scala @@ -69,7 +69,7 @@ object TaskClockTimerAndContextShiftSuite extends BaseTestSuite { assertEquals(f.value, Some(Success(1))) } - test("Task.timer is implicit") { implicit s => + test("Task.timer is implicit") { _ => assertEquals(Task.timer, implicitly[Timer[Task]]) assertEquals(Task.timer.clock, implicitly[Clock[Task]]) } @@ -104,7 +104,7 @@ object TaskClockTimerAndContextShiftSuite extends BaseTestSuite { assertEquals(f.value, Some(Success(1))) } - test("Task.contextShift is implicit") { implicit s => + test("Task.contextShift is implicit") { _ => assertEquals(Task.contextShift, implicitly[ContextShift[Task]]) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala index 9d78f499b..d9722d3a5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalDoOnFinishSuite.scala @@ -44,7 +44,7 @@ object TaskCoevalDoOnFinishSuite extends BaseTestSuite { assertEquals(p.future.value, Some(Success(Some(ex)))) } - test("Coeval.doOnFinish should work for successful values") { implicit s => + test("Coeval.doOnFinish should work for successful values") { _ => val p = Promise[Option[Throwable]]() val coeval = Coeval(10).doOnFinish(s => Coeval { p.success(s); () }) @@ -54,7 +54,7 @@ object TaskCoevalDoOnFinishSuite extends BaseTestSuite { assertEquals(p.future.value, Some(Success(None))) } - test("Coeval.doOnFinish should work for failures values") { implicit s => + test("Coeval.doOnFinish should work for failures values") { _ => val ex = DummyException("dummy") val p = Promise[Option[Throwable]]() diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala index 891956831..89c46c54b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala @@ -186,7 +186,7 @@ object TaskConnectionSuite extends BaseTestSuite { assert(bc.isCanceled, "bc.isCanceled") } - test("pop when self is empty") { implicit s => + test("pop when self is empty") { _ => val sc = TaskConnection() assertEquals(sc.pop(), Task.unit) } @@ -289,7 +289,7 @@ object TaskConnectionSuite extends BaseTestSuite { assert(c1.isCanceled, "c1.isCanceled") } - test("uncancelable ref is shared") { implicit s => + test("uncancelable ref is shared") { _ => val t = TaskConnection.uncancelable assertEquals(t, TaskConnection.uncancelable) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala index 6dbf7f7a5..0a045e765 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala @@ -282,7 +282,7 @@ object TaskErrorSuite extends BaseTestSuite { test("Task.onErrorRestartIf should mirror the source onSuccess") { implicit s => var tries = 0 - val task = Task.eval { tries += 1; 1 }.onErrorRestartIf(ex => tries < 10) + val task = Task.eval { tries += 1; 1 }.onErrorRestartIf(_ => tries < 10) val f = task.runToFuture assertEquals(f.value, Some(Success(1))) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala index 55eeafb7a..68f9ded16 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskEvalAlwaysSuite.scala @@ -75,7 +75,7 @@ object TaskEvalAlwaysSuite extends BaseTestSuite { test("Task.eval.flatMap should be tail recursive") { implicit s => def loop(n: Int, idx: Int): Task[Int] = - Task.eval(idx).flatMap { a => + Task.eval(idx).flatMap { _ => if (idx < n) loop(n, idx + 1).map(_ + 1) else Task.eval(idx) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala index 69e9a11ee..7217f06e6 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala @@ -24,7 +24,7 @@ import monix.execution.internal.Platform import scala.util.{ Failure, Success } object TaskFromEitherSuite extends BaseTestSuite { - test("Task.fromEither (`E <: Throwable` version) should returns a Now with a Right") { implicit s => + test("Task.fromEither (`E <: Throwable` version) should returns a Now with a Right") { _ => val t = Task.fromEither(Right(10)) assert(t.isInstanceOf[Now[_]]) } @@ -35,7 +35,7 @@ object TaskFromEitherSuite extends BaseTestSuite { assertEquals(f.value, Some(Success(10))) } - test("Task.fromEither (`E <: Throwable` version) should returns an Error with a Left") { implicit s => + test("Task.fromEither (`E <: Throwable` version) should returns an Error with a Left") { _ => val dummy = DummyException("dummy") val t = Task.fromEither(Left(dummy)) assert(t.isInstanceOf[Error[_]]) @@ -62,7 +62,7 @@ object TaskFromEitherSuite extends BaseTestSuite { assertEquals(result.value, Some(Failure(DummyException("dummy")))) } - test("Task.fromEither (free `E` version) should returns a Now with a Right") { implicit s => + test("Task.fromEither (free `E` version) should returns a Now with a Right") { _ => val t = Task.fromEither(DummyException(_))(Right(10)) assert(t.isInstanceOf[Now[_]]) } @@ -73,7 +73,7 @@ object TaskFromEitherSuite extends BaseTestSuite { assertEquals(f.value, Some(Success(10))) } - test("Task.fromEither (free `E` version) should returns an Error with a Left") { implicit s => + test("Task.fromEither (free `E` version) should returns an Error with a Left") { _ => val t = Task.fromEither(DummyException(_))(Left("dummy")) assert(t.isInstanceOf[Error[_]]) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala index c80a0b1f8..89e622146 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala @@ -56,7 +56,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.evalAsync(1) - for (i <- 0 until count) task = task.memoizeOnSuccess + for (_ <- 0 until count) task = task.memoizeOnSuccess val f = task.runToFuture assertEquals(f.value, None) @@ -68,7 +68,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { val count = if (Platform.isJVM) 50000 else 5000 var task = Task.evalAsync(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess.flatMap(x => Task.now(x)) } @@ -81,7 +81,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.flatMap.memoizeOnSuccess should be stack safe, test 2") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.evalAsync(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess.flatMap(x => Task.evalAsync(x)) } @@ -171,7 +171,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.eval.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.eval(1) - for (i <- 0 until count) + for (_ <- 0 until count) task = task.memoizeOnSuccess val f = task.runToFuture; s.tick() @@ -181,7 +181,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.eval.flatMap.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.eval(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess.flatMap(x => Task.eval(x)) } @@ -242,7 +242,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.evalOnce.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.eval(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess } @@ -253,7 +253,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.evalOnce.flatMap.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.eval(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess.flatMap(x => Task.evalOnce(x)) } @@ -297,7 +297,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.now.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.now(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess } @@ -308,7 +308,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.now.flatMap.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.now(1) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess.flatMap(x => Task.now(x)) } @@ -321,7 +321,7 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.suspend.memoizeOnSuccess should be stack safe") { implicit s => val count = if (Platform.isJVM) 50000 else 5000 var task = Task.defer(Task.now(1)) - for (i <- 0 until count) { + for (_ <- 0 until count) { task = task.memoizeOnSuccess.map(x => x) } @@ -616,32 +616,32 @@ object TaskMemoizeOnSuccessSuite extends BaseTestSuite { assertEquals(effect, 2) } - test("Task.evalOnce eq Task.evalOnce.memoizeOnSuccess") { implicit s => + test("Task.evalOnce eq Task.evalOnce.memoizeOnSuccess") { _ => val task = Task.evalOnce(1) assertEquals(task, task.memoizeOnSuccess) } - test("Task.eval.memoizeOnSuccess eq Task.eval.memoizeOnSuccess.memoizeOnSuccess") { implicit s => + test("Task.eval.memoizeOnSuccess eq Task.eval.memoizeOnSuccess.memoizeOnSuccess") { _ => val task = Task.eval(1).memoizeOnSuccess assertEquals(task, task.memoizeOnSuccess) } - test("Task.eval.memoize eq Task.eval.memoize.memoizeOnSuccess") { implicit s => + test("Task.eval.memoize eq Task.eval.memoize.memoizeOnSuccess") { _ => val task = Task.eval(1).memoize assertEquals(task, task.memoizeOnSuccess) } - test("Task.eval.map.memoize eq Task.eval.map.memoize.memoizeOnSuccess") { implicit s => + test("Task.eval.map.memoize eq Task.eval.map.memoize.memoizeOnSuccess") { _ => val task = Task.eval(1).map(_ + 1).memoize assertEquals(task, task.memoizeOnSuccess) } - test("Task.now.memoizeOnSuccess eq Task.now") { implicit s => + test("Task.now.memoizeOnSuccess eq Task.now") { _ => val task = Task.now(1) assertEquals(task, task.memoizeOnSuccess) } - test("Task.raiseError.memoizeOnSuccess eq Task.raiseError") { implicit s => + test("Task.raiseError.memoizeOnSuccess eq Task.raiseError") { _ => val task = Task.raiseError(DummyException("dummy")) assertEquals(task, task.memoizeOnSuccess) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala index 398fb30be..beb158c57 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala @@ -620,32 +620,32 @@ object TaskMemoizeSuite extends BaseTestSuite { assertEquals(effect, 1) } - test("Task.evalOnce eq Task.evalOnce.memoize") { implicit s => + test("Task.evalOnce eq Task.evalOnce.memoize") { _ => val task = Task.evalOnce(1) assertEquals(task, task.memoize) } - test("Task.eval.memoize eq Task.eval.memoize.memoize") { implicit s => + test("Task.eval.memoize eq Task.eval.memoize.memoize") { _ => val task = Task.eval(1).memoize assertEquals(task, task.memoize) } - test("Task.eval.map.memoize eq Task.eval.map.memoize.memoize") { implicit s => + test("Task.eval.map.memoize eq Task.eval.map.memoize.memoize") { _ => val task = Task.eval(1).map(_ + 1).memoize assertEquals(task, task.memoize) } - test("Task.now.memoize eq Task.now") { implicit s => + test("Task.now.memoize eq Task.now") { _ => val task = Task.now(1) assertEquals(task, task.memoize) } - test("Task.raiseError.memoize eq Task.raiseError") { implicit s => + test("Task.raiseError.memoize eq Task.raiseError") { _ => val task = Task.raiseError(DummyException("dummy")) assertEquals(task, task.memoize) } - test("Task.eval.memoizeOnSuccess.memoize !== Task.eval.memoizeOnSuccess") { implicit s => + test("Task.eval.memoizeOnSuccess.memoize !== Task.eval.memoizeOnSuccess") { _ => val task = Task.eval(1).memoizeOnSuccess assert(task != task.memoize, "task != task.memoize") } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala index 692482bff..cedfc85c5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala @@ -158,7 +158,7 @@ object TaskMiscSuite extends BaseTestSuite { assert(s.state.tasks.isEmpty, "should not have tasks left to execute") } - test("Task.pure is an alias of now") { implicit s => + test("Task.pure is an alias of now") { _ => assertEquals(Task.pure(1), Task.now(1)) } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala index eea619a3c..31ec5d25d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala @@ -168,7 +168,7 @@ object TaskNowSuite extends BaseTestSuite { test("Task.now.flatMap should be tail recursive") { implicit s => def loop(n: Int, idx: Int): Task[Int] = - Task.now(idx).flatMap { a => + Task.now(idx).flatMap { _ => if (idx < n) loop(n, idx + 1).map(_ + 1) else Task.now(idx) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala index 10d611d33..f3ced415f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala @@ -26,13 +26,13 @@ import scala.concurrent.Promise object TaskOptionsSuite extends SimpleTestSuite { implicit val opts: Options = Task.defaultOptions.enableLocalContextPropagation - def extractOptions[A](fa: Task[A]): Task[Options] = + def extractOptions: Task[Options] = Task.Async { (ctx, cb) => cb.onSuccess(ctx.options) } testAsync("change options with future") { - val task = extractOptions(Task.now(1)).map { r => + val task = extractOptions.map { r => assertEquals(r, opts) } task.runToFutureOpt @@ -40,7 +40,7 @@ object TaskOptionsSuite extends SimpleTestSuite { testAsync("change options with callback") { val p = Promise[Options]() - extractOptions(Task.now(1)).runAsyncOpt(Callback.fromPromise(p)) + extractOptions.runAsyncOpt(Callback.fromPromise(p)) for (r <- p.future) yield { assertEquals(r, opts) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala index 0011fdf98..222fba782 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskToFutureSuite.scala @@ -46,7 +46,7 @@ object TaskToFutureSuite extends BaseTestSuite { test("Task.deferFutureAction for already completed references") { implicit s => def sum(list: List[Int]): Task[Int] = - Task.deferFutureAction(implicit s => Future.successful(list.sum)) + Task.deferFutureAction(_ => Future.successful(list.sum)) val f = sum((0 until 100).toList).runToFuture @@ -104,10 +104,10 @@ object TaskToFutureSuite extends BaseTestSuite { def loop(n: Int, acc: Int): Task[Int] = if (n > 0) Task - .deferFutureAction(implicit s => Future.successful(acc + 1)) + .deferFutureAction(_ => Future.successful(acc + 1)) .flatMap(loop(n - 1, _)) else - Task.deferFutureAction(implicit s => Future.successful(acc)) + Task.deferFutureAction(_ => Future.successful(acc)) val f = loop(10000, 0).runToFuture; s.tick() assertEquals(f.value, Some(Success(10000))) @@ -222,7 +222,7 @@ object TaskToFutureSuite extends BaseTestSuite { test("Task.deferFutureAction(cancelable)") { implicit s => val f1 = Task.eval(1).delayExecution(1.second).runToFuture - val f2 = Task.deferFutureAction(implicit s => f1).runToFuture + val f2 = Task.deferFutureAction(_ => f1).runToFuture assertEquals(f2.value, None) s.tick(1.second) @@ -231,7 +231,7 @@ object TaskToFutureSuite extends BaseTestSuite { test("Task.deferFutureAction(cancelable) is cancelable") { implicit s => val f1 = Task.eval(1).delayExecution(1.second).runToFuture - val f2 = Task.deferFutureAction(implicit s => f1).runToFuture + val f2 = Task.deferFutureAction(_ => f1).runToFuture assertEquals(f2.value, None) f2.cancel() diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala index 7b2d7fb16..61ef329e1 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `AnyRef` values. * * @tparam A is forced to be an `AnyRef` because the equality test is @@ -71,7 +73,7 @@ object AtomicAny { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def withPadding[A <: AnyRef](initialValue: A, padding: PaddingStrategy): AtomicAny[A] = + def withPadding[A <: AnyRef](initialValue: A, @unused padding: PaddingStrategy): AtomicAny[A] = new AtomicAny(initialValue) /** $createDesc @@ -86,7 +88,11 @@ object AtomicAny { * the instance is allowed to use the Java 8 optimized operations * for `getAndSet` and for `getAndAdd` */ - def create[A <: AnyRef](initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicAny[A] = + def create[A <: AnyRef]( + initialValue: A, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicAny[A] = new AtomicAny(initialValue) /** $createDesc @@ -104,6 +110,6 @@ object AtomicAny { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def safe[A <: AnyRef](initialValue: A, padding: PaddingStrategy): AtomicAny[A] = + def safe[A <: AnyRef](initialValue: A, @unused padding: PaddingStrategy): AtomicAny[A] = new AtomicAny(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index 686cb8666..20d63875b 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Boolean` values. * * Note that the equality test in `compareAndSet` is value based, @@ -69,7 +71,7 @@ object AtomicBoolean { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def withPadding(initialValue: Boolean, padding: PaddingStrategy): AtomicBoolean = + def withPadding(initialValue: Boolean, @unused padding: PaddingStrategy): AtomicBoolean = new AtomicBoolean(initialValue) /** $createDesc @@ -84,7 +86,11 @@ object AtomicBoolean { * the instance is allowed to use the Java 8 optimized operations * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Boolean, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicBoolean = + def create( + initialValue: Boolean, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicBoolean = new AtomicBoolean(initialValue) /** $createDesc @@ -102,6 +108,6 @@ object AtomicBoolean { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def safe(initialValue: Boolean, padding: PaddingStrategy): AtomicBoolean = + def safe(initialValue: Boolean, @unused padding: PaddingStrategy): AtomicBoolean = new AtomicBoolean(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala index a662fca27..afff95095 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Byte` values. * * Note that the equality test in `compareAndSet` is value based, @@ -116,10 +118,11 @@ object AtomicByte { /** $createDesc * - * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param initialValue is the initial value with which to initialize the atomic; + * @param padding is the [[PaddingStrategy]] to apply — NOT USED on top of JavaScript, + * this being provided only for backwards compatibility with the JVM; */ - def withPadding(initialValue: Byte, padding: PaddingStrategy): AtomicByte = + def withPadding(initialValue: Byte, @unused padding: PaddingStrategy): AtomicByte = new AtomicByte(initialValue) /** $createDesc @@ -129,12 +132,16 @@ object AtomicByte { * `getAndSet` and for `getAndAdd`. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` + * @param padding is the [[PaddingStrategy]] to apply — NOT USED on top of JavaScript, + * this being provided only for backwards compatibility with the JVM; + * @param allowPlatformIntrinsics — NOT USED on top of JavaScript, this + * being provided only for backwards compatibility with the JVM; */ - def create(initialValue: Byte, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicByte = + def create( + initialValue: Byte, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicByte = new AtomicByte(initialValue) /** $createDesc @@ -150,8 +157,10 @@ object AtomicByte { * recommended, because the "safe" atomic instances have overhead. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding is the [[PaddingStrategy]] to apply — NOT USED on top + * of JavaScript, this being provided only for backwards compatibility + * with the JVM; */ - def safe(initialValue: Byte, padding: PaddingStrategy): AtomicByte = + def safe(initialValue: Byte, @unused padding: PaddingStrategy): AtomicByte = new AtomicByte(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala index 4fc8db4fe..888072174 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Char` values. * * Note that the equality test in `compareAndSet` is value based, @@ -120,9 +122,9 @@ object AtomicChar { /** $createDesc * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def withPadding(initialValue: Char, padding: PaddingStrategy): AtomicChar = + def withPadding(initialValue: Char, @unused padding: PaddingStrategy): AtomicChar = new AtomicChar(initialValue) /** $createDesc @@ -132,12 +134,14 @@ object AtomicChar { * `getAndSet` and for `getAndAdd`. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` + * @param padding — NOT USED on top of JavaScript; + * @param allowPlatformIntrinsics — NOT USED on top of JavaScript; */ - def create(initialValue: Char, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicChar = + def create( + initialValue: Char, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicChar = new AtomicChar(initialValue) /** $createDesc @@ -153,8 +157,8 @@ object AtomicChar { * recommended, because the "safe" atomic instances have overhead. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def safe(initialValue: Char, padding: PaddingStrategy): AtomicChar = + def safe(initialValue: Char, @unused padding: PaddingStrategy): AtomicChar = new AtomicChar(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala index a0ef22119..2e63d49e8 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Double` values. * * Note that the equality test in `compareAndSet` is value based, @@ -107,9 +109,9 @@ object AtomicDouble { /** $createDesc * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def withPadding(initialValue: Double, padding: PaddingStrategy): AtomicDouble = + def withPadding(initialValue: Double, @unused padding: PaddingStrategy): AtomicDouble = new AtomicDouble(initialValue) /** $createDesc @@ -119,12 +121,14 @@ object AtomicDouble { * `getAndSet` and for `getAndAdd`. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` + * @param padding — NOT USED on top of JavaScript; + * @param allowPlatformIntrinsics — NOT USED on top of JavaScript; */ - def create(initialValue: Double, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicDouble = + def create( + initialValue: Double, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicDouble = new AtomicDouble(initialValue) /** $createDesc @@ -140,8 +144,8 @@ object AtomicDouble { * recommended, because the "safe" atomic instances have overhead. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def safe(initialValue: Double, padding: PaddingStrategy): AtomicDouble = + def safe(initialValue: Double, @unused padding: PaddingStrategy): AtomicDouble = new AtomicDouble(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala index e07749e0c..9d8c3646c 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Float` values. * * Note that the equality test in `compareAndSet` is value based, @@ -121,7 +123,7 @@ object AtomicFloat { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def withPadding(initialValue: Float, padding: PaddingStrategy): AtomicFloat = + def withPadding(initialValue: Float, @unused padding: PaddingStrategy): AtomicFloat = new AtomicFloat(initialValue) /** $createDesc @@ -136,7 +138,11 @@ object AtomicFloat { * the instance is allowed to use the Java 8 optimized operations * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Float, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicFloat = + def create( + initialValue: Float, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicFloat = new AtomicFloat(initialValue) /** $createDesc @@ -151,9 +157,9 @@ object AtomicFloat { * supports `sun.misc.Unsafe` and if it does, then its usage is * recommended, because the "safe" atomic instances have overhead. * - * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param initialValue is the initial value with which to initialize the atomic; + * @param padding — NOT USED on top of JavaScript; */ - def safe(initialValue: Float, padding: PaddingStrategy): AtomicFloat = + def safe(initialValue: Float, @unused padding: PaddingStrategy): AtomicFloat = new AtomicFloat(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala index fc51a256a..850e2b98d 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Int` values. * * Note that the equality test in `compareAndSet` is value based, @@ -119,9 +121,9 @@ object AtomicInt { /** $createDesc * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def withPadding(initialValue: Int, padding: PaddingStrategy): AtomicInt = + def withPadding(initialValue: Int, @unused padding: PaddingStrategy): AtomicInt = new AtomicInt(initialValue) /** $createDesc @@ -131,12 +133,10 @@ object AtomicInt { * `getAndSet` and for `getAndAdd`. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` + * @param padding — NOT USED on top of JavaScript; + * @param allowPlatformIntrinsics — NOT USED on top of JavaScript; */ - def create(initialValue: Int, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicInt = + def create(initialValue: Int, @unused padding: PaddingStrategy, @unused allowPlatformIntrinsics: Boolean): AtomicInt = new AtomicInt(initialValue) /** $createDesc @@ -152,8 +152,8 @@ object AtomicInt { * recommended, because the "safe" atomic instances have overhead. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def safe(initialValue: Int, padding: PaddingStrategy): AtomicInt = + def safe(initialValue: Int, @unused padding: PaddingStrategy): AtomicInt = new AtomicInt(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala index 74c9000bd..887bcc669 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Long` values. * * Note that the equality test in `compareAndSet` is value based, @@ -119,9 +121,9 @@ object AtomicLong { /** $createDesc * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def withPadding(initialValue: Long, padding: PaddingStrategy): AtomicLong = + def withPadding(initialValue: Long, @unused padding: PaddingStrategy): AtomicLong = new AtomicLong(initialValue) /** $createDesc @@ -131,12 +133,14 @@ object AtomicLong { * `getAndSet` and for `getAndAdd`. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` + * @param padding — NOT USED on top of JavaScript; + * @param allowPlatformIntrinsics — NOT USED on top of JavaScript; */ - def create(initialValue: Long, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicLong = + def create( + initialValue: Long, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicLong = new AtomicLong(initialValue) /** $createDesc @@ -152,8 +156,8 @@ object AtomicLong { * recommended, because the "safe" atomic instances have overhead. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def safe(initialValue: Long, padding: PaddingStrategy): AtomicLong = + def safe(initialValue: Long, @unused padding: PaddingStrategy): AtomicLong = new AtomicLong(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index 5098a3fcb..88a7a8d7b 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping any values implementing * Scala's `Numeric` type class. * @@ -126,7 +128,7 @@ object AtomicNumberAny { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def withPadding[A <: AnyRef: Numeric](initialValue: A, padding: PaddingStrategy): AtomicNumberAny[A] = + def withPadding[A <: AnyRef: Numeric](initialValue: A, @unused padding: PaddingStrategy): AtomicNumberAny[A] = new AtomicNumberAny[A](initialValue) /** $createDesc @@ -136,15 +138,13 @@ object AtomicNumberAny { * `getAndSet` and for `getAndAdd`. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` + * @param padding — NOT USED on top of JavaScript; + * @param allowPlatformIntrinsics — NOT USED on top of JavaScript; */ def create[A <: AnyRef: Numeric]( initialValue: A, - padding: PaddingStrategy, - allowPlatformIntrinsics: Boolean + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean ): AtomicNumberAny[A] = new AtomicNumberAny[A](initialValue) @@ -161,8 +161,8 @@ object AtomicNumberAny { * recommended, because the "safe" atomic instances have overhead. * * @param initialValue is the initial value with which to initialize the atomic - * @param padding is the [[PaddingStrategy]] to apply + * @param padding — NOT USED on top of JavaScript; */ - def safe[A <: AnyRef: Numeric](initialValue: A, padding: PaddingStrategy): AtomicNumberAny[A] = + def safe[A <: AnyRef: Numeric](initialValue: A, @unused padding: PaddingStrategy): AtomicNumberAny[A] = new AtomicNumberAny[A](initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala index 788bb7c84..d3666cac6 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.unused + /** Atomic references wrapping `Short` values. * * Note that the equality test in `compareAndSet` is value based, @@ -122,7 +124,7 @@ object AtomicShort { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def withPadding(initialValue: Short, padding: PaddingStrategy): AtomicShort = + def withPadding(initialValue: Short, @unused padding: PaddingStrategy): AtomicShort = new AtomicShort(initialValue) /** $createDesc @@ -137,7 +139,11 @@ object AtomicShort { * the instance is allowed to use the Java 8 optimized operations * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Short, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicShort = + def create( + initialValue: Short, + @unused padding: PaddingStrategy, + @unused allowPlatformIntrinsics: Boolean + ): AtomicShort = new AtomicShort(initialValue) /** $createDesc @@ -155,6 +161,6 @@ object AtomicShort { * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply */ - def safe(initialValue: Short, padding: PaddingStrategy): AtomicShort = + def safe(initialValue: Short, @unused padding: PaddingStrategy): AtomicShort = new AtomicShort(initialValue) } diff --git a/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index afd0fff1f..aed6d6717 100644 --- a/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -20,6 +20,7 @@ package monix.execution.atomic import monix.execution.atomic.internal._ import scala.reflect.macros.whitebox import monix.execution.atomic.PaddingStrategy.NoPadding +import scala.annotation.unused /** * Base trait of all atomic references, no matter the type. @@ -144,7 +145,9 @@ object Atomic { /** Returns the builder that would be chosen to construct Atomic * references for the given `initialValue`. */ - def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = + def builderFor[A, R <: Atomic[A]](@unused initialValue: A)(implicit + builder: AtomicBuilder[A, R] + ): AtomicBuilder[A, R] = builder implicit final class DeprecatedExtensions[A](val self: Atomic[A]) extends AnyVal { @@ -177,7 +180,7 @@ object Atomic { class Macros(override val c: whitebox.Context) extends InlineMacros with HygieneUtilMacros { import c.universe._ - def transformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[Unit] = { + def transformMacro[A](f: c.Expr[A => A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") @@ -198,11 +201,10 @@ object Atomic { $self.set($fn($self.get())) """ } - inlineAndReset[Unit](tree) } - def transformAndGetMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { + def transformAndGetMacro[A](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -235,7 +237,7 @@ object Atomic { inlineAndReset[A](tree) } - def getAndTransformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { + def getAndTransformMacro[A](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -268,8 +270,7 @@ object Atomic { inlineAndReset[A](tree) } - def transformAndExtractMacro[S: c.WeakTypeTag, A: c.WeakTypeTag](f: c.Expr[S => (A, S)]): c.Expr[A] = { - + def transformAndExtractMacro[S, A](f: c.Expr[S => (A, S)]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[S]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -299,52 +300,47 @@ object Atomic { $result """ } - inlineAndReset[A](tree) } - def buildAnyMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag](initialValue: c.Expr[A])( + def buildAnyMacro[A, R <: Atomic[A]](initialValue: c.Expr[A])( builder: c.Expr[AtomicBuilder[A, R]] ): c.Expr[R] = { - val expr = reify { builder.splice.buildInstance(initialValue.splice, NoPadding, allowPlatformIntrinsics = true) } - inlineAndReset[R](expr.tree) } - def buildAnyWithPaddingMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag]( + def buildAnyWithPaddingMacro[A, R <: Atomic[A]]( initialValue: c.Expr[A], padding: c.Expr[PaddingStrategy] )(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { - val expr = reify { builder.splice.buildInstance(initialValue.splice, padding.splice, allowPlatformIntrinsics = true) } - inlineAndReset[R](expr.tree) } - def applyMacro[A: c.WeakTypeTag](): c.Expr[A] = { + def applyMacro[A](): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.get()""" inlineAndReset[A](tree) } - def setMacro[A: c.WeakTypeTag](value: c.Expr[A]): c.Expr[Unit] = { + def setMacro[A](value: c.Expr[A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.set($value)""" inlineAndReset[Unit](tree) } - def addMacro[A: c.WeakTypeTag](value: c.Expr[A]): c.Expr[Unit] = { + def addMacro[A](value: c.Expr[A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.add($value)""" inlineAndReset[Unit](tree) } - def subtractMacro[A: c.WeakTypeTag](value: c.Expr[A]): c.Expr[Unit] = { + def subtractMacro[A](value: c.Expr[A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.subtract($value)""" inlineAndReset[Unit](tree) diff --git a/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index cd0f5f743..b784838fd 100644 --- a/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -20,6 +20,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.atomic.internal._ import scala.reflect.macros.whitebox +import scala.annotation.unused /** * Base trait of all atomic references, no matter the type. @@ -141,7 +142,9 @@ object Atomic { /** Returns the builder that would be chosen to construct Atomic * references for the given `initialValue`. */ - def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = + def builderFor[A, R <: Atomic[A]](@unused initialValue: A)(implicit + builder: AtomicBuilder[A, R] + ): AtomicBuilder[A, R] = builder implicit final class DeprecatedExtensions[A](val self: Atomic[A]) extends AnyVal { @@ -174,7 +177,7 @@ object Atomic { class Macros(override val c: whitebox.Context) extends HygieneUtilMacros with InlineMacros { import c.universe._ - def transformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[Unit] = { + def transformMacro[A](f: c.Expr[A => A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -214,7 +217,7 @@ object Atomic { inlineAndReset[Unit](tree) } - def transformAndGetMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { + def transformAndGetMacro[A](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -257,7 +260,7 @@ object Atomic { inlineAndReset[A](tree) } - def getAndTransformMacro[A: c.WeakTypeTag](f: c.Expr[A => A]): c.Expr[A] = { + def getAndTransformMacro[A](f: c.Expr[A => A]): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val self = util.name("self") val current = util.name("current") @@ -300,7 +303,7 @@ object Atomic { inlineAndReset[A](tree) } - def transformAndExtractMacro[S: c.WeakTypeTag, A: c.WeakTypeTag]( + def transformAndExtractMacro[S, A]( f: c.Expr[S => (A, S)] ): c.Expr[A] = { val selfExpr = c.Expr[Atomic[S]](c.prefix.tree) @@ -353,7 +356,7 @@ object Atomic { inlineAndReset[A](tree) } - def buildAnyMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag](initialValue: c.Expr[A])( + def buildAnyMacro[A, R <: Atomic[A]](initialValue: c.Expr[A])( builder: c.Expr[AtomicBuilder[A, R]] ): c.Expr[R] = { val expr = reify { @@ -366,7 +369,7 @@ object Atomic { inlineAndReset[R](expr.tree) } - def buildAnyWithPaddingMacro[A: c.WeakTypeTag, R <: Atomic[A]: c.WeakTypeTag]( + def buildAnyWithPaddingMacro[A, R <: Atomic[A]]( initialValue: c.Expr[A], padding: c.Expr[PaddingStrategy] )(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { @@ -376,25 +379,25 @@ object Atomic { inlineAndReset[R](expr.tree) } - def applyMacro[A: c.WeakTypeTag](): c.Expr[A] = { + def applyMacro[A](): c.Expr[A] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.get()""" inlineAndReset[A](tree) } - def setMacro[A: c.WeakTypeTag](value: c.Expr[A]): c.Expr[Unit] = { + def setMacro[A](value: c.Expr[A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.set($value)""" inlineAndReset[Unit](tree) } - def addMacro[A: c.WeakTypeTag](value: c.Expr[A]): c.Expr[Unit] = { + def addMacro[A](value: c.Expr[A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.add($value)""" inlineAndReset[Unit](tree) } - def subtractMacro[A: c.WeakTypeTag](value: c.Expr[A]): c.Expr[Unit] = { + def subtractMacro[A](value: c.Expr[A]): c.Expr[Unit] = { val selfExpr = c.Expr[Atomic[A]](c.prefix.tree) val tree = q"""$selfExpr.subtract($value)""" inlineAndReset[Unit](tree) diff --git a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala index 4e1178eda..2195044e1 100644 --- a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala +++ b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala @@ -26,23 +26,18 @@ import scala.concurrent.ExecutionContext.Implicits.global abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( builder: AtomicBuilder[A, R], strategy: PaddingStrategy, - value: A, - nan1: Option[A], - maxValue: A, - minValue: A, - allowPlatformIntrinsics: Boolean + allowPlatformIntrinsics: Boolean, )(implicit ev: Numeric[A]) extends SimpleTestSuite { def Atomic(initial: A): R = builder.buildInstance(initial, strategy, allowPlatformIntrinsics) - val two = ev.plus(ev.one, ev.one) test("should perform concurrent compareAndSet") { val r = Atomic(ev.zero) val futures = - for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) + for (_ <- 0 until 5) yield Future { + for (_ <- 0 until 100) r.increment() } @@ -54,7 +49,7 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent getAndSet") { val r = Atomic(ev.zero) val futures = - for (i <- 0 until 5) yield Future { + for (_ <- 0 until 5) yield Future { for (j <- 0 until 100) r.getAndSet(ev.fromInt(j + 1)) } @@ -67,8 +62,8 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent increment") { val r = Atomic(ev.zero) val futures = - for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) + for (_ <- 0 until 5) yield Future { + for (_ <- 0 until 100) r.increment() } @@ -80,8 +75,8 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent incrementAndGet") { val r = Atomic(ev.zero) val futures = - for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) + for (_ <- 0 until 5) yield Future { + for (_ <- 0 until 100) r.incrementAndGet() } @@ -93,8 +88,8 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent getAndIncrement") { val r = Atomic(ev.zero) val futures = - for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) + for (_ <- 0 until 5) yield Future { + for (_ <- 0 until 100) r.getAndIncrement() } @@ -110,10 +105,6 @@ object ConcurrentAtomicNumberDoubleNoPaddingSuite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), NoPadding, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -121,10 +112,6 @@ object ConcurrentAtomicNumberFloatNoPaddingSuite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), NoPadding, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -132,10 +119,6 @@ object ConcurrentAtomicNumberLongNoPaddingSuite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), NoPadding, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -143,10 +126,6 @@ object ConcurrentAtomicNumberIntNoPaddingSuite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), NoPadding, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -154,10 +133,6 @@ object ConcurrentAtomicNumberShortNoPaddingSuite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), NoPadding, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -165,10 +140,6 @@ object ConcurrentAtomicNumberByteNoPaddingSuite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), NoPadding, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -176,10 +147,6 @@ object ConcurrentAtomicNumberCharNoPaddingSuite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), NoPadding, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -187,10 +154,6 @@ object ConcurrentAtomicNumberNumberAnyNoPaddingSuite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), NoPadding, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -200,10 +163,6 @@ object ConcurrentAtomicNumberDoubleLeft64Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Left64, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -211,10 +170,6 @@ object ConcurrentAtomicNumberFloatLeft64Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Left64, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -222,10 +177,6 @@ object ConcurrentAtomicNumberLongLeft64Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Left64, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -233,10 +184,6 @@ object ConcurrentAtomicNumberIntLeft64Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Left64, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -244,10 +191,6 @@ object ConcurrentAtomicNumberShortLeft64Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Left64, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -255,10 +198,6 @@ object ConcurrentAtomicNumberByteLeft64Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Left64, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -266,10 +205,6 @@ object ConcurrentAtomicNumberCharLeft64Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Left64, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -277,10 +212,6 @@ object ConcurrentAtomicNumberNumberAnyLeft64Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Left64, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -290,10 +221,6 @@ object ConcurrentAtomicNumberDoubleRight64Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Right64, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -301,10 +228,6 @@ object ConcurrentAtomicNumberFloatRight64Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Right64, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -312,10 +235,6 @@ object ConcurrentAtomicNumberLongRight64Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Right64, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -323,10 +242,6 @@ object ConcurrentAtomicNumberIntRight64Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Right64, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -334,10 +249,6 @@ object ConcurrentAtomicNumberShortRight64Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Right64, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -345,10 +256,6 @@ object ConcurrentAtomicNumberByteRight64Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Right64, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -356,10 +263,6 @@ object ConcurrentAtomicNumberCharRight64Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Right64, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -367,10 +270,6 @@ object ConcurrentAtomicNumberNumberAnyRight64Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Right64, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -380,10 +279,6 @@ object ConcurrentAtomicNumberDoubleLeftRight128Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), LeftRight128, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -391,10 +286,6 @@ object ConcurrentAtomicNumberFloatLeftRight128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), LeftRight128, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -402,10 +293,6 @@ object ConcurrentAtomicNumberLongLeftRight128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), LeftRight128, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -413,10 +300,6 @@ object ConcurrentAtomicNumberIntLeftRight128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), LeftRight128, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -424,10 +307,6 @@ object ConcurrentAtomicNumberShortLeftRight128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), LeftRight128, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -435,10 +314,6 @@ object ConcurrentAtomicNumberByteLeftRight128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), LeftRight128, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -446,10 +321,6 @@ object ConcurrentAtomicNumberCharLeftRight128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), LeftRight128, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -457,10 +328,6 @@ object ConcurrentAtomicNumberNumberAnyLeftRight128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), LeftRight128, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -470,10 +337,6 @@ object ConcurrentAtomicNumberDoubleLeft128Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Left128, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -481,10 +344,6 @@ object ConcurrentAtomicNumberFloatLeft128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Left128, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -492,10 +351,6 @@ object ConcurrentAtomicNumberLongLeft128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Left128, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -503,10 +358,6 @@ object ConcurrentAtomicNumberIntLeft128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Left128, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -514,10 +365,6 @@ object ConcurrentAtomicNumberShortLeft128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Left128, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -525,10 +372,6 @@ object ConcurrentAtomicNumberByteLeft128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Left128, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -536,10 +379,6 @@ object ConcurrentAtomicNumberCharLeft128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Left128, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -547,10 +386,6 @@ object ConcurrentAtomicNumberNumberAnyLeft128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Left128, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -560,10 +395,6 @@ object ConcurrentAtomicNumberDoubleRight128Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Right128, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -571,10 +402,6 @@ object ConcurrentAtomicNumberFloatRight128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Right128, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -582,10 +409,6 @@ object ConcurrentAtomicNumberLongRight128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Right128, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -593,10 +416,6 @@ object ConcurrentAtomicNumberIntRight128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Right128, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -604,10 +423,6 @@ object ConcurrentAtomicNumberShortRight128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Right128, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -615,10 +430,6 @@ object ConcurrentAtomicNumberByteRight128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Right128, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -626,10 +437,6 @@ object ConcurrentAtomicNumberCharRight128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Right128, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -637,10 +444,6 @@ object ConcurrentAtomicNumberNumberAnyRight128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Right128, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -650,10 +453,6 @@ object ConcurrentAtomicNumberDoubleLeftRight256Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), LeftRight256, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = true ) @@ -661,10 +460,6 @@ object ConcurrentAtomicNumberFloatLeftRight256Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), LeftRight256, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = true ) @@ -672,10 +467,6 @@ object ConcurrentAtomicNumberLongLeftRight256Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), LeftRight256, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = true ) @@ -683,10 +474,6 @@ object ConcurrentAtomicNumberIntLeftRight256Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), LeftRight256, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = true ) @@ -694,10 +481,6 @@ object ConcurrentAtomicNumberShortLeftRight256Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), LeftRight256, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = true ) @@ -705,10 +488,6 @@ object ConcurrentAtomicNumberByteLeftRight256Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), LeftRight256, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = true ) @@ -716,10 +495,6 @@ object ConcurrentAtomicNumberCharLeftRight256Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), LeftRight256, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = true ) @@ -727,10 +502,6 @@ object ConcurrentAtomicNumberNumberAnyLeftRight256Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), LeftRight256, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = true ) @@ -742,10 +513,6 @@ object ConcurrentAtomicNumberDoubleNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), NoPadding, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -753,10 +520,6 @@ object ConcurrentAtomicNumberFloatNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), NoPadding, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -764,10 +527,6 @@ object ConcurrentAtomicNumberLongNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), NoPadding, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -775,10 +534,6 @@ object ConcurrentAtomicNumberIntNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), NoPadding, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -786,10 +541,6 @@ object ConcurrentAtomicNumberShortNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), NoPadding, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -797,10 +548,6 @@ object ConcurrentAtomicNumberByteNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), NoPadding, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -808,10 +555,6 @@ object ConcurrentAtomicNumberCharNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), NoPadding, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -819,10 +562,6 @@ object ConcurrentAtomicNumberNumberAnyNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), NoPadding, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) @@ -832,10 +571,6 @@ object ConcurrentAtomicNumberDoubleLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Left64, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -843,10 +578,6 @@ object ConcurrentAtomicNumberFloatLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Left64, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -854,10 +585,6 @@ object ConcurrentAtomicNumberLongLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Left64, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -865,10 +592,6 @@ object ConcurrentAtomicNumberIntLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Left64, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -876,10 +599,6 @@ object ConcurrentAtomicNumberShortLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Left64, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -887,10 +606,6 @@ object ConcurrentAtomicNumberByteLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Left64, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -898,10 +613,6 @@ object ConcurrentAtomicNumberCharLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Left64, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -909,10 +620,6 @@ object ConcurrentAtomicNumberNumberAnyLeft64Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Left64, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) @@ -922,10 +629,6 @@ object ConcurrentAtomicNumberDoubleRight64Java7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Right64, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -933,10 +636,6 @@ object ConcurrentAtomicNumberFloatRight64Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Right64, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -944,10 +643,6 @@ object ConcurrentAtomicNumberLongRight64Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Right64, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -955,10 +650,6 @@ object ConcurrentAtomicNumberIntRight64Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Right64, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -966,10 +657,6 @@ object ConcurrentAtomicNumberShortRight64Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Right64, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -977,10 +664,6 @@ object ConcurrentAtomicNumberByteRight64Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Right64, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -988,10 +671,6 @@ object ConcurrentAtomicNumberCharRight64Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Right64, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -999,10 +678,6 @@ object ConcurrentAtomicNumberNumberAnyRight64Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Right64, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) @@ -1012,10 +687,6 @@ object ConcurrentAtomicNumberDoubleLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), LeftRight128, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -1023,10 +694,6 @@ object ConcurrentAtomicNumberFloatLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), LeftRight128, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -1034,10 +701,6 @@ object ConcurrentAtomicNumberLongLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), LeftRight128, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -1045,10 +708,6 @@ object ConcurrentAtomicNumberIntLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), LeftRight128, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -1056,10 +715,6 @@ object ConcurrentAtomicNumberShortLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), LeftRight128, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -1067,10 +722,6 @@ object ConcurrentAtomicNumberByteLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), LeftRight128, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -1078,10 +729,6 @@ object ConcurrentAtomicNumberCharLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), LeftRight128, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -1089,10 +736,6 @@ object ConcurrentAtomicNumberNumberAnyLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), LeftRight128, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) @@ -1102,10 +745,6 @@ object ConcurrentAtomicNumberDoubleLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Left128, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -1113,10 +752,6 @@ object ConcurrentAtomicNumberFloatLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Left128, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -1124,10 +759,6 @@ object ConcurrentAtomicNumberLongLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Left128, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -1135,10 +766,6 @@ object ConcurrentAtomicNumberIntLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Left128, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -1146,10 +773,6 @@ object ConcurrentAtomicNumberShortLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Left128, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -1157,10 +780,6 @@ object ConcurrentAtomicNumberByteLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Left128, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -1168,10 +787,6 @@ object ConcurrentAtomicNumberCharLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Left128, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -1179,10 +794,6 @@ object ConcurrentAtomicNumberNumberAnyLeft128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Left128, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) @@ -1192,10 +803,6 @@ object ConcurrentAtomicNumberDoubleRight128Java7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), Right128, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -1203,10 +810,6 @@ object ConcurrentAtomicNumberFloatRight128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), Right128, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -1214,10 +817,6 @@ object ConcurrentAtomicNumberLongRight128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), Right128, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -1225,10 +824,6 @@ object ConcurrentAtomicNumberIntRight128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), Right128, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -1236,10 +831,6 @@ object ConcurrentAtomicNumberShortRight128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), Right128, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -1247,10 +838,6 @@ object ConcurrentAtomicNumberByteRight128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), Right128, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -1258,10 +845,6 @@ object ConcurrentAtomicNumberCharRight128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), Right128, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -1269,10 +852,6 @@ object ConcurrentAtomicNumberNumberAnyRight128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), Right128, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) @@ -1282,10 +861,6 @@ object ConcurrentAtomicNumberDoubleLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), LeftRight256, - 17.23, - Some(Double.NaN), - Double.MaxValue, - Double.MinValue, allowPlatformIntrinsics = false ) @@ -1293,10 +868,6 @@ object ConcurrentAtomicNumberFloatLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), LeftRight256, - 17.23f, - Some(Float.NaN), - Float.MaxValue, - Float.MinValue, allowPlatformIntrinsics = false ) @@ -1304,10 +875,6 @@ object ConcurrentAtomicNumberLongLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( Atomic.builderFor(0L), LeftRight256, - -782L, - None, - Long.MaxValue, - Long.MinValue, allowPlatformIntrinsics = false ) @@ -1315,10 +882,6 @@ object ConcurrentAtomicNumberIntLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( Atomic.builderFor(0), LeftRight256, - 782, - None, - Int.MaxValue, - Int.MinValue, allowPlatformIntrinsics = false ) @@ -1326,10 +889,6 @@ object ConcurrentAtomicNumberShortLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( Atomic.builderFor(0.toShort), LeftRight256, - 782.toShort, - None, - Short.MaxValue, - Short.MinValue, allowPlatformIntrinsics = false ) @@ -1337,10 +896,6 @@ object ConcurrentAtomicNumberByteLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( Atomic.builderFor(0.toByte), LeftRight256, - 782.toByte, - None, - Byte.MaxValue, - Byte.MinValue, allowPlatformIntrinsics = false ) @@ -1348,10 +903,6 @@ object ConcurrentAtomicNumberCharLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( Atomic.builderFor(0.toChar), LeftRight256, - 782.toChar, - None, - Char.MaxValue, - Char.MinValue, allowPlatformIntrinsics = false ) @@ -1359,9 +910,5 @@ object ConcurrentAtomicNumberNumberAnyLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( Atomic.builderFor(BigInt(0)), LeftRight256, - BigInt(Int.MaxValue), - None, - BigInt(Long.MaxValue), - BigInt(Long.MinValue), allowPlatformIntrinsics = false ) diff --git a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala index a539be5aa..a4f66b84c 100644 --- a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala +++ b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala @@ -39,8 +39,8 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( test("should perform concurrent compareAndSet") { val r = Atomic(zero) val futures = - for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) + for (_ <- 0 until 5) yield Future { + for (_ <- 0 until 100) r.transform(x => valueFromInt(valueToInt(x) + 1)) } @@ -52,7 +52,7 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( test("should perform concurrent getAndSet") { val r = Atomic(zero) val futures = - for (i <- 0 until 5) yield Future { + for (_ <- 0 until 5) yield Future { for (j <- 0 until 100) r.getAndSet(valueFromInt(j)) } diff --git a/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala index db1a5029c..21f96a9ab 100644 --- a/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala +++ b/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala @@ -35,10 +35,8 @@ private[atomic] object TestBox { class Macros(override val c: whitebox.Context) extends InlineMacros with HygieneUtilMacros { import c.universe._ - def mapMacroImpl[A: c.WeakTypeTag, B: c.WeakTypeTag](f: c.Expr[A => B]): c.Expr[TestBox[B]] = { - + def mapMacroImpl[A, B](f: c.Expr[A => B]): c.Expr[TestBox[B]] = { val selfExpr = c.Expr[TestBox[A]](c.prefix.tree) - val tree = if (util.isClean(f)) { q""" @@ -51,7 +49,6 @@ private[atomic] object TestBox { TestBox($fn($selfExpr.value)) """ } - inlineAndReset[TestBox[B]](tree) } } diff --git a/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala b/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala index c86a99a72..2f615b151 100644 --- a/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala +++ b/monix-execution/atomic/shared/src/test/scala/monix/execution/atomic/BoxedLong.scala @@ -17,6 +17,8 @@ package monix.execution.atomic +import scala.annotation.nowarn + case class BoxedLong(value: Long) object BoxedLong { @@ -44,6 +46,8 @@ object BoxedLong { BoxedLong(x.value - y.value) def compare(x: BoxedLong, y: BoxedLong): Int = x.value.compareTo(y.value) + + @nowarn def parseString(str: String): Option[BoxedLong] = try Some(BoxedLong(str.toLong)) catch { case _: NumberFormatException => None } diff --git a/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala b/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala index 29dac623e..3b2779dfd 100644 --- a/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala +++ b/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala @@ -19,6 +19,7 @@ package monix.execution.atomic.internal import minitest.SimpleTestSuite import scala.util.control.NonFatal +import scala.annotation.unused object InlineMacrosTest extends SimpleTestSuite { class DummyException(msg: String) extends RuntimeException(msg) @@ -115,7 +116,7 @@ object InlineMacrosTest extends SimpleTestSuite { test("Inline NonFatal clause") { val box = TestBox(1) val dummy = new DummyException("dummy") - def increment(x: Int): Int = throw dummy + def increment(@unused x: Int): Int = throw dummy val mapped = box.map { x => try increment(x) diff --git a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index c36ddb147..d5acb3d61 100644 --- a/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/js/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -83,9 +83,7 @@ import monix.execution.internal.exceptions.matchError * [[SingleAssignCancelable]] for most purposes. */ final class ChainedCancelable private (private var stateRef: AnyRef) extends AssignableCancelable { - import ChainedCancelable.{ Canceled, WeakRef } - private type CC = ChainedCancelable // States of `state`: // diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala index 20e6520a3..608c79a79 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala @@ -24,6 +24,7 @@ import scala.concurrent.Awaitable import scala.concurrent.duration.Duration import scala.scalajs.js import scala.util.control.NonFatal +import scala.annotation.unused private[monix] object Platform { /** @@ -99,7 +100,7 @@ private[monix] object Platform { * This operation is only supported on top of the JVM, whereas for * JavaScript a dummy is provided. */ - def await[A](fa: Awaitable[A], timeout: Duration)(implicit permit: CanBlock): A = + def await[A](@unused fa: Awaitable[A], @unused timeout: Duration)(implicit @unused permit: CanBlock): A = throw new UnsupportedOperationException( "Blocking operations are not supported on top of JavaScript" ) diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index 369ca9e43..eb90aa30a 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -19,12 +19,17 @@ package monix.execution.internal.collection.queues import monix.execution.{ BufferCapacity, ChannelType } import monix.execution.internal.collection.{ JSArrayQueue, LowLevelConcurrentQueue } +import scala.annotation.unused private[internal] trait LowLevelConcurrentQueueBuilders { /** * Builds a `ConcurrentQueue` reference. */ - def apply[A](capacity: BufferCapacity, channelType: ChannelType, fenced: Boolean): LowLevelConcurrentQueue[A] = + def apply[A]( + capacity: BufferCapacity, + @unused channelType: ChannelType, + @unused fenced: Boolean + ): LowLevelConcurrentQueue[A] = capacity match { case BufferCapacity.Bounded(c) => JSArrayQueue.bounded[A](c) case BufferCapacity.Unbounded(_) => JSArrayQueue.unbounded[A] diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala index 05940e5a7..7f10f7961 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/CanBlock.scala @@ -18,6 +18,7 @@ package monix.execution.schedulers import scala.annotation.implicitNotFound +import scala.annotation.nowarn /** Marker for blocking operations that need to be disallowed on top of * JavaScript engines, or other platforms that don't support the blocking @@ -76,4 +77,5 @@ import scala.annotation.implicitNotFound "on top of JavaScript, because it cannot block threads! \n" + "Please use asynchronous API calls." ) +@nowarn final class CanBlock private () diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala index 6dcf6e8f1..9f0e98633 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala @@ -18,6 +18,7 @@ package monix.execution.internal import monix.execution.schedulers.CanBlock +import scala.annotation.unused import scala.concurrent.{ Await, Awaitable } import scala.concurrent.duration.Duration import scala.util.Try @@ -141,7 +142,7 @@ private[monix] object Platform { * This operation is only supported on top of the JVM, whereas for * JavaScript a dummy is provided. */ - def await[A](fa: Awaitable[A], timeout: Duration)(implicit permit: CanBlock): A = + def await[A](fa: Awaitable[A], timeout: Duration)(implicit @unused permit: CanBlock): A = Await.result(fa, timeout) /** Composes multiple errors together, meant for those cases in which diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala index f3e27d3ff..c3bf17b9b 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala @@ -43,34 +43,34 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils } test("Callback.safe is thread-safe onSuccess") { implicit sc => - executeOnSuccessTest(Callback[Throwable].safe) + executeOnSuccessTest(Callback.safe) } test("Callback.safe is thread-safe onError") { implicit sc => - executeOnErrorTest(Callback[Throwable].safe) + executeOnErrorTest(Callback.safe) } test("Callback.trampolined is thread-safe onSuccess") { implicit sc => - executeOnSuccessTest(Callback[Throwable].trampolined) + executeOnSuccessTest(Callback.trampolined) } test("Callback.trampolined is thread-safe onError") { implicit sc => - executeOnErrorTest(Callback[Throwable].trampolined) + executeOnErrorTest(Callback.trampolined) } test("Callback.forked is thread-safe onSuccess") { implicit sc => - executeOnSuccessTest(Callback[Throwable].forked, isForked = true) + executeOnSuccessTest(Callback.forked, isForked = true) } test("Callback.forked is thread-safe onError") { implicit sc => - executeOnErrorTest(Callback[Throwable].forked, isForked = true) + executeOnErrorTest(Callback.forked, isForked = true) } test("Callback.fromPromise is thread-safe onSuccess") { implicit sc => val wrap = { (cb: Callback[Throwable, Int]) => val p = Promise[Int]() p.future.onComplete(cb.apply) - Callback[Throwable].fromPromise(p) + Callback.fromPromise(p) } executeOnSuccessTest(wrap, isForked = true) } @@ -79,7 +79,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val wrap = { (cb: Callback[Throwable, String]) => val p = Promise[String]() p.future.onComplete(cb.apply) - Callback[Throwable].fromPromise(p) + Callback.fromPromise(p) } executeOnErrorTest(wrap, isForked = true) } @@ -121,7 +121,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val wrap = { (cb: Callback[Throwable, Int]) => val f = (r: Try[Int]) => cb(r) - Callback[Throwable].fromTry(f) + Callback.fromTry(f) } intercept[AssertionException] { executeOnSuccessTest(wrap, retries = RETRIES * 100) } () @@ -132,48 +132,48 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val wrap = { (cb: Callback[Throwable, String]) => val f = (r: Try[String]) => cb(r) - Callback[Throwable].fromTry(f) + Callback.fromTry(f) } intercept[AssertionException] { executeOnErrorTest(wrap, retries = RETRIES * 100) } () } - test("Callback.fromAttempt is quasi-safe via onSuccess") { implicit sc => + test("Callback.fromAttempt is quasi-safe via onSuccess") { _ => executeQuasiSafeOnSuccessTest { cb => val f = (r: Either[Throwable, Int]) => cb(r) Callback.fromAttempt(f) } } - test("Callback.fromAttempt is quasi-safe via onError") { implicit sc => + test("Callback.fromAttempt is quasi-safe via onError") { _ => executeQuasiSafeOnFailureTest { cb => val f = (r: Either[Throwable, Int]) => cb(r) Callback.fromAttempt(f) } } - test("Callback.fromTry is quasi-safe via onSuccess") { implicit sc => + test("Callback.fromTry is quasi-safe via onSuccess") { _ => executeQuasiSafeOnSuccessTest { cb => val f = (r: Try[Int]) => cb(r) Callback.fromTry(f) } } - test("Callback.fromTry is quasi-safe via onError") { implicit sc => + test("Callback.fromTry is quasi-safe via onError") { _ => executeQuasiSafeOnFailureTest { cb => val f = (r: Try[Int]) => cb(r) Callback.fromTry(f) } } - test("Normal callback is not quasi-safe via onSuccess") { implicit sc => + test("Normal callback is not quasi-safe via onSuccess") { _ => intercept[MiniTestException] { executeQuasiSafeOnSuccessTest(x => x) } () } - test("Normal callback is not quasi-safe via onError") { implicit sc => + test("Normal callback is not quasi-safe via onError") { _ => intercept[MiniTestException] { executeQuasiSafeOnFailureTest(x => x) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala index 577a88d68..0cb20796f 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala @@ -28,7 +28,6 @@ import monix.execution.internal.collection.LowLevelConcurrentQueue import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer import scala.concurrent.Promise -import scala.concurrent.duration._ /** * A high-performance, back-pressured, asynchronous queue implementation. @@ -112,9 +111,7 @@ import scala.concurrent.duration._ final class AsyncQueue[A] private[monix] ( capacity: BufferCapacity, channelType: ChannelType, - retryDelay: FiniteDuration = 10.millis )(implicit scheduler: Scheduler) { - /** Try pushing a value to the queue. * * The protocol is unsafe because usage of the "try*" methods imply an diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index a4543604c..2a15c2822 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -182,17 +182,6 @@ abstract class Callback[-E, -A] extends (Either[E, A] => Unit) { * [[monix.execution.exceptions.CallbackCalledMultipleTimesException CallbackCalledMultipleTimesException]]. */ object Callback { - /** - * For building [[Callback]] objects using the - * [[https://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially-Applied Type]] - * technique. - * - * For example these are Equivalent: - * - * `Callback[Throwable, Throwable].empty[String] <-> Callback.empty[Throwable, String]` - */ - def apply[E]: Builders[E] = new Builders[E] - /** Wraps any [[Callback]] into a safer implementation that * protects against protocol violations (e.g. `onSuccess` or `onError` * must be called at most once). @@ -345,38 +334,8 @@ object Callback { private[monix] def signalErrorTrampolined[E, A](cb: Callback[E, A], e: E): Unit = TrampolineExecutionContext.immediate.execute(() => cb.onError(e)) - /** Functions exposed via [[apply]]. */ - final class Builders[E](val ev: Boolean = true) extends AnyVal { - /** See [[Callback.safe]]. */ - def safe[A](cb: Callback[E, A])(implicit r: UncaughtExceptionReporter): Callback[E, A] = - Callback.safe(cb) - - /** See [[Callback.empty]]. */ - def empty[A](implicit r: UncaughtExceptionReporter): Callback[E, A] = - Callback.empty - - /** See [[Callback.fromPromise]]. */ - def fromPromise[A](p: Promise[A])(implicit ev: Throwable <:< E): Callback[Throwable, A] = - Callback.fromPromise(p) - - /** See [[Callback.forked]]. */ - def forked[A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A] = - Callback.forked(cb) - - /** See [[Callback.trampolined]]. */ - def trampolined[A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A] = - Callback.trampolined(cb) - - /** See [[Callback.fromAttempt]]. */ - def fromAttempt[A](cb: Either[E, A] => Unit): Callback[E, A] = - Callback.fromAttempt(cb) - - /** See [[Callback.fromTry]]. */ - def fromTry[A](cb: Try[A] => Unit)(implicit ev: Throwable <:< E): Callback[Throwable, A] = - Callback.fromTry(cb) - } - - private final class AsyncFork[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) + private final class AsyncFork[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) + extends Base[E, A](cb)(ec) private final class TrampolinedCallback[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) with TrampolinedRunnable diff --git a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala index c284f1716..0836368b6 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala @@ -18,7 +18,6 @@ package monix.execution import java.util.concurrent.TimeoutException -import monix.execution.schedulers.TrampolineExecutionContext.immediate import scala.concurrent.duration._ import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.util.{ Success, Try } @@ -100,9 +99,8 @@ object FutureUtils extends internal.FutureUtilsForPlatform { /** Utility that lifts a `Future[A]` into a `Future[Try[A]]`, exposing * error explicitly. */ - def materialize[A](source: Future[A])(implicit ec: ExecutionContext): Future[Try[A]] = { - source.transform(t => Success(t))(immediate) - } + def materialize[A](source: Future[A])(implicit ec: ExecutionContext): Future[Try[A]] = + source.transform(t => Success(t)) /** Given a mapping functions that operates on successful results as well as * errors, transforms the source by applying it. @@ -123,9 +121,8 @@ object FutureUtils extends internal.FutureUtilsForPlatform { /** Utility that transforms a `Future[Try[A]]` into a `Future[A]`, * hiding errors, being the opposite of [[materialize]]. */ - def dematerialize[A](source: Future[Try[A]])(implicit ec: ExecutionContext): Future[A] = { - source.map(_.get)(immediate) - } + def dematerialize[A](source: Future[Try[A]])(implicit ec: ExecutionContext): Future[A] = + source.map(_.get) /** Creates a future that completes with the specified `result`, but only * after the specified `delay`. @@ -154,7 +151,7 @@ object FutureUtils extends internal.FutureUtilsForPlatform { /** [[FutureUtils.dematerialize]] exposed as an extension method. */ def dematerialize[U](implicit ev: A <:< Try[U], ec: ExecutionContext): Future[U] = - FutureUtils.dematerialize(source.asInstanceOf[Future[Try[U]]]) + FutureUtils.dematerialize(source.map(ev.apply)) } /** Provides utility methods for Scala's `concurrent.Future` companion object. */ diff --git a/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala b/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala index 43e9d83e6..483a0d14d 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/annotations/Unsafe.scala @@ -30,7 +30,7 @@ import scala.annotation.StaticAnnotation * as specified or otherwise the behavior can be undefined, * see [[UnsafeProtocol]] */ -class Unsafe(reason: String) extends StaticAnnotation +class Unsafe(val reason: String) extends StaticAnnotation /** An annotation meant to warn users on functions that are * breaking referential transparency. diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala index a23c6ecbb..e83a059c6 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala @@ -23,6 +23,7 @@ import monix.execution.schedulers.TrampolineExecutionContext import scala.annotation.implicitNotFound import scala.concurrent.Future +import scala.annotation.unused /** * Type class describing how [[Local]] binding works for specific data types. @@ -72,7 +73,7 @@ private[misc] abstract class CanIsolateInstancesLevel1 extends CanIsolateInstanc * Needs to be imported explicitly in scope. Will NOT override * other `CanBindLocals` implicits that are already visible. */ - @inline implicit def synchronousAsDefault[R](implicit ev: Not[CanBindLocals[R]]): CanBindLocals[R] = + @inline implicit def synchronousAsDefault[R](implicit @unused ev: Not[CanBindLocals[R]]): CanBindLocals[R] = CanBindLocals.synchronous[R] } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala index 510bb612d..74e80bdc2 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala @@ -531,52 +531,52 @@ object AckSuite extends TestSuite[TestScheduler] { s.tick() } - test("isSynchronous(Future(Continue)) == false") { implicit s => + test("isSynchronous(Future(Continue)) == false") { _ => val f: Future[Ack] = Future.successful(Continue) assert(!f.isSynchronous) } - test("isSynchronous(Continue) == true") { implicit s => + test("isSynchronous(Continue) == true") { _ => val f: Future[Ack] = Continue assert(f.isSynchronous) } - test("isSynchronous(Future(Stop)) == false") { implicit s => + test("isSynchronous(Future(Stop)) == false") { _ => val f: Future[Ack] = Future.successful(Stop) assert(!f.isSynchronous) } - test("isSynchronous(Stop) == true") { implicit s => + test("isSynchronous(Stop) == true") { _ => val f: Future[Ack] = Stop assert(f.isSynchronous) } - test("isSynchronous(failure) == false") { implicit s => + test("isSynchronous(failure) == false") { _ => val f: Future[Ack] = Future.failed(new RuntimeException) assert(!f.isSynchronous) } - test("isSynchronous(impure Future(Continue)) == false") { implicit s => + test("isSynchronous(impure Future(Continue)) == false") { _ => def f: Future[Ack] = Future.successful(Continue) assert(!f.isSynchronous) } - test("isSynchronous(impure Continue) == true") { implicit s => + test("isSynchronous(impure Continue) == true") { _ => def f: Future[Ack] = Continue assert(f.isSynchronous) } - test("isSynchronous(impure Future(Stop)) == false") { implicit s => + test("isSynchronous(impure Future(Stop)) == false") { _ => def f: Future[Ack] = Future.successful(Stop) assert(!f.isSynchronous) } - test("isSynchronous(impure Stop) == true") { implicit s => + test("isSynchronous(impure Stop) == true") { _ => def f: Future[Ack] = Stop assert(f.isSynchronous) } - test("isSynchronous(impure failure) == false") { implicit s => + test("isSynchronous(impure failure) == false") { _ => def f: Future[Ack] = Future.failed(new RuntimeException) assert(!f.isSynchronous) } @@ -712,7 +712,7 @@ object AckSuite extends TestSuite[TestScheduler] { assertEquals(s.state.lastReportedError, dummy) } - test("Continue.syncOnContinueFollow") { implicit s => + test("Continue.syncOnContinueFollow") { _ => val ack: Future[Ack] = Continue val p = Promise[Int]() @@ -760,7 +760,7 @@ object AckSuite extends TestSuite[TestScheduler] { assertEquals(p.future.value, None) } - test("Stop.syncOnStopFollow") { implicit s => + test("Stop.syncOnStopFollow") { _ => val ack: Future[Ack] = Stop val p = Promise[Int]() diff --git a/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala index 7e71377bd..e634cedfa 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/BaseLawsSuite.scala @@ -34,8 +34,6 @@ import scala.concurrent.duration._ import scala.concurrent.{ ExecutionException, Future } import scala.util.{ Failure, Success, Try } -import scala.language.implicitConversions - trait BaseLawsSuite extends SimpleTestSuite with Checkers with ArbitraryInstances { override lazy val checkConfig: Parameters = Parameters.default @@ -48,15 +46,14 @@ trait BaseLawsSuite extends SimpleTestSuite with Checkers with ArbitraryInstance .withMaxDiscardRatio(50.0f) .withMaxSize(6) - def checkAll(name: String, ruleSet: Laws#RuleSet, config: Parameters = checkConfig): Unit = { + def checkAll(name: String, ruleSet: Laws#RuleSet): Unit = { for ((id, prop: Prop) <- ruleSet.all.properties) test(name + "." + id) { check(prop) } } - def checkAllAsync(name: String, config: Parameters = checkConfig)(f: TestScheduler => Laws#RuleSet): Unit = { - + def checkAllAsync(name: String)(f: TestScheduler => Laws#RuleSet): Unit = { val s = TestScheduler() val ruleSet = f(s) @@ -157,7 +154,6 @@ trait ArbitraryInstancesBase extends cats.instances.AllInstances with TestUtils implicit def equalityTry[A: Eq]: Eq[Try[A]] = new Eq[Try[A]] { val optA = implicitly[Eq[Option[A]]] - val optT = implicitly[Eq[Option[Throwable]]] def eqv(x: Try[A], y: Try[A]): Boolean = if (x.isSuccess) optA.eqv(x.toOption, y.toOption) diff --git a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala index ff997995e..6511ec00d 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala @@ -46,25 +46,25 @@ object CallbackSuite extends TestSuite[TestScheduler] { } } - test("onValue should invoke onSuccess") { implicit s => + test("onValue should invoke onSuccess") { _ => val callback = TestCallback() callback.onSuccess(1) assert(callback.successCalled) } - test("apply Success(value) should invoke onSuccess") { implicit s => + test("apply Success(value) should invoke onSuccess") { _ => val callback = TestCallback() callback(Success(1)) assert(callback.successCalled) } - test("apply Failure(ex) should invoke onError") { implicit s => + test("apply Failure(ex) should invoke onError") { _ => val callback = TestCallback() callback(Failure(new IllegalStateException())) assert(callback.errorCalled) } - test("contramap should pipe onError") { implicit s => + test("contramap should pipe onError") { _ => var result = Option.empty[Try[Int]] val callback = TestCallback( { v => @@ -82,7 +82,7 @@ object CallbackSuite extends TestSuite[TestScheduler] { assertEquals(result, Some(Failure(dummy))) } - test("contramap should invoke function before invoking callback") { implicit s => + test("contramap should invoke function before invoking callback") { _ => val callback = TestCallback() val stringCallback = callback.contramap[String](_.toInt) stringCallback.onSuccess("1") @@ -114,7 +114,7 @@ object CallbackSuite extends TestSuite[TestScheduler] { } test("Callback.empty reports errors") { implicit s => - val empty = Callback[Throwable].empty[Int] + val empty = Callback.empty[Throwable, Int] val dummy = DummyException("dummy") empty.onError(dummy) @@ -134,7 +134,7 @@ object CallbackSuite extends TestSuite[TestScheduler] { throw new IllegalStateException("onError") } - val safe = Callback[Throwable].safe(cb) + val safe = Callback.safe(cb) assert(safe.tryOnSuccess(1), "safe.tryOnSuccess(1)") assertEquals(effect, 1) @@ -159,7 +159,7 @@ object CallbackSuite extends TestSuite[TestScheduler] { } } - val safe = Callback[Throwable].safe(cb) + val safe = Callback.safe(cb) assert(safe.tryOnError(dummy2), "safe.onError(dummy2)") assertEquals(effect, 1) @@ -188,7 +188,7 @@ object CallbackSuite extends TestSuite[TestScheduler] { test("fromAttempt success") { _ => val p = Promise[Int]() - val cb = Callback[Throwable].fromAttempt[Int] { + val cb = Callback.fromAttempt[Throwable, Int] { case Right(a) => p.success(a); () case Left(e) => p.failure(e); () } @@ -199,7 +199,7 @@ object CallbackSuite extends TestSuite[TestScheduler] { test("fromAttempt error") { _ => val p = Promise[Int]() - val cb = Callback[Throwable].fromAttempt[Int] { + val cb = Callback.fromAttempt[Throwable, Int] { case Right(a) => p.success(a); () case Left(e) => p.failure(e); () } diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala index d7a0cdbb8..c289f927c 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableFutureSuite.scala @@ -31,18 +31,18 @@ object CancelableFutureSuite extends TestSuite[TestScheduler] { def tearDown(env: TestScheduler): Unit = assert(env.state.tasks.isEmpty, "should not have tasks left to execute") - test("CancelableFuture.fromTry(success)") { implicit s => + test("CancelableFuture.fromTry(success)") { _ => val f = CancelableFuture.fromTry(Success(1)) assertEquals(f.value, Some(Success(1))) } - test("CancelableFuture.fromTry(failure)") { implicit s => + test("CancelableFuture.fromTry(failure)") { _ => val ex = new RuntimeException("dummy") val f = CancelableFuture.fromTry(Failure(ex)) assertEquals(f.value, Some(Failure(ex))) } - test("CancelableFuture.successful is already completed") { implicit s => + test("CancelableFuture.successful is already completed") { _ => val f = CancelableFuture.successful(1) assertEquals(f.isCompleted, true) assertEquals(f.value, Some(Success(1))) @@ -73,7 +73,7 @@ object CancelableFutureSuite extends TestSuite[TestScheduler] { assertEquals(result, Some(Success(1))) } - test("now.failed") { implicit s => + test("now.failed") { _ => val dummy = new RuntimeException("dummy") val f = CancelableFuture.failed(dummy).failed assertEquals(f.value, Some(Success(dummy))) @@ -351,7 +351,7 @@ object CancelableFutureSuite extends TestSuite[TestScheduler] { assertEquals(f.value, Some(Success(4))) } - test("now.fallbackTo") { implicit s => + test("now.fallbackTo") { _ => val ex = new RuntimeException("dummy") val f = CancelableFuture .failed(ex) @@ -382,12 +382,12 @@ object CancelableFutureSuite extends TestSuite[TestScheduler] { assertEquals(f.value, Some(Success(1))) } - test("now.mapTo") { implicit s => + test("now.mapTo") { _ => val f = CancelableFuture.successful(1).mapTo[Int] assertEquals(f.value, Some(Success(1))) } - test("never.mapTo") { implicit s => + test("never.mapTo") { _ => val f = CancelableFuture.never[Int].mapTo[Int] assertEquals(f, CancelableFuture.never) } diff --git a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala index 50137d10c..7d14d7ce3 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala @@ -94,16 +94,7 @@ object FutureUtilsSuite extends TestSuite[TestScheduler] { assertEquals(called, false) } - test("materialize synchronous") { implicit s => - val f1 = Future.successful(1).materialize - assertEquals(f1.value, Some(Success(Success(1)))) - - val dummy = new RuntimeException("dummy") - val f2 = (Future.failed(dummy): Future[Int]).materialize - assertEquals(f2.value, Some(Success(Failure(dummy)))) - } - - test("materialize asynchronous") { implicit s => + test("materialize") { implicit s => val f1 = Future(1).materialize; s.tick() assertEquals(f1.value, Some(Success(Success(1)))) @@ -112,19 +103,7 @@ object FutureUtilsSuite extends TestSuite[TestScheduler] { assertEquals(f2.value, Some(Success(Failure(dummy)))) } - test("dematerialize synchronous") { implicit s => - val f1 = Future.successful(Success(1)).dematerialize - assertEquals(f1.value, Some(Success(1))) - - val dummy = new RuntimeException("dummy") - val f2 = Future.successful(Failure(dummy)).dematerialize - assertEquals(f2.value, Some(Failure(dummy))) - - val f3 = (Future.failed(dummy): Future[Try[Int]]).dematerialize - assertEquals(f3.value, Some(Failure(dummy))) - } - - test("dematerialize asynchronous") { implicit s => + test("dematerialize") { implicit s => val f1 = Future(Success(1)).dematerialize; s.tick() assertEquals(f1.value, Some(Success(1))) diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala index 7955b6c2f..ed4a8f7f0 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala @@ -86,7 +86,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { val q = DropHeadOnOverflowQueue[Int](7) assertEquals(q.capacity, 7) - assertEquals(q.poll(), null) + assertEquals(q.poll(): Any, null) assertEquals(q.offer(0), 0) assertEquals(q.poll(), 0) diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala index 125c5cf87..44ab88110 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ExecutionModelSuite.scala @@ -59,7 +59,7 @@ object ExecutionModelSuite extends SimpleTestSuite { assert(em.recommendedBatchSize >= i) var index = 1 - for (j <- 1 until em.recommendedBatchSize * 3) { + for (_ <- 1 until em.recommendedBatchSize * 3) { index = em.nextFrameIndex(index) assert(index >= 0 && index < em.recommendedBatchSize) } diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index 1caf3c372..7c10b9709 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -122,7 +122,7 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( Stop } - private def downstreamSignalComplete(ex: Throwable = null): Unit = { + private def downstreamSignalComplete(ex: Throwable /* | Null*/ ): Unit = { downstreamIsComplete = true try { if (ex != null) out.onError(ex) diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala index 05bf5fa0a..991e12360 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BuildersImpl.scala @@ -22,12 +22,13 @@ import monix.execution.ChannelType.MultiProducer import monix.reactive.OverflowStrategy import monix.reactive.OverflowStrategy._ import monix.reactive.observers.{ BufferedSubscriber, Subscriber } +import scala.annotation.unused private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def apply[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy[A], - producerType: ChannelType.ProducerSide = MultiProducer + @unused producerType: ChannelType.ProducerSide = MultiProducer ): Subscriber[A] = { bufferPolicy match { case Unbounded => @@ -57,7 +58,7 @@ private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def synchronous[A]( subscriber: Subscriber[A], bufferPolicy: OverflowStrategy.Synchronous[A], - producerType: ChannelType.ProducerSide = MultiProducer + @unused producerType: ChannelType.ProducerSide = MultiProducer ): Subscriber.Sync[A] = { bufferPolicy match { case Unbounded => @@ -85,7 +86,7 @@ private[observers] trait BuildersImpl { self: BufferedSubscriber.type => def batched[A]( underlying: Subscriber[List[A]], bufferSize: Int, - producerType: ChannelType.ProducerSide = MultiProducer + @unused producerType: ChannelType.ProducerSide = MultiProducer ): Subscriber[A] = BatchedBufferedSubscriber(underlying, bufferSize) } diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala index 40adf10e3..d798c86f4 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala @@ -35,7 +35,7 @@ import scala.util.{ Failure, Success } private[observers] final class SyncBufferedSubscriber[-A] private ( out: Subscriber[A], queue: EvictingQueue[A], - onOverflow: Long => Coeval[Option[A]] = null + onOverflow: Long => Coeval[Option[A]] /*| Null*/, ) extends BufferedSubscriber[A] with Subscriber.Sync[A] { implicit val scheduler = out.scheduler @@ -122,7 +122,7 @@ private[observers] final class SyncBufferedSubscriber[-A] private ( Stop } - private def downstreamSignalComplete(ex: Throwable = null): Unit = { + private def downstreamSignalComplete(ex: Throwable /* | Null*/ ): Unit = { downstreamIsComplete = true try { if (ex != null) out.onError(ex) diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala index 9318a33f0..5a585ceed 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala @@ -28,6 +28,7 @@ import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future import scala.util.{ Failure, Success } +import scala.annotation.nowarn /** A high-performance and non-blocking [[BufferedSubscriber]] * implementation for the [[monix.reactive.OverflowStrategy.DropNew DropNew]] @@ -37,7 +38,7 @@ import scala.util.{ Failure, Success } private[observers] final class DropNewBufferedSubscriber[A] private ( out: Subscriber[A], bufferSize: Int, - onOverflow: Long => Coeval[Option[A]] = null + @nowarn onOverflow: Long => Coeval[Option[A]] = null, ) extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { require(bufferSize > 0, "bufferSize must be a strictly positive number") diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index 7b9d78e1b..e5417054c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -1169,7 +1169,7 @@ abstract class Observable[+A] extends Serializable { self => * result of [[materialize]]) back to an Observable that emits `A`. */ final def dematerialize[B](implicit ev: A <:< Notification[B]): Observable[B] = - self.asInstanceOf[Observable[Notification[B]]].liftByOperator(new DematerializeOperator[B]) + self.map(ev).liftByOperator(new DematerializeOperator[B]) /** Suppress duplicate consecutive items emitted by the source. * diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala index 5568b19a7..101f437dc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala @@ -70,14 +70,3 @@ private[reactive] final class CollectWhileOperator[-A, +B](pf: PartialFunction[A } } } - -private object CollectWhileOperator extends (Any => Any) { - /** In the case a partial function is not defined, return a magic fallback value. */ - def checkFallback[B]: Any => B = this.asInstanceOf[Any => B] - - /** Indicates whether the result is the magic fallback value. */ - def isDefined(result: Any): Boolean = result.asInstanceOf[AnyRef] ne this - - /** Always returns `this`, used as the magic fallback value. */ - override def apply(elem: Any): Any = this -} diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala index 3f7c68d20..1dd876f1e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala @@ -38,7 +38,7 @@ private[reactive] final class DropUntilObservable[A](source: Observable[A], trig private[this] var errorThrown: Throwable = null @volatile private[this] var shouldDrop = true - private[this] def interruptDropMode(ex: Throwable = null): Ack = { + private[this] def interruptDropMode(ex: Throwable /*| Null*/ ): Ack = { // must happen before changing shouldDrop errorThrown = ex shouldDrop = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala index 04ea7f637..30bc157dd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala @@ -69,7 +69,7 @@ private[reactive] final class OnCancelTriggerErrorObservable[A](source: Observab Stop } } else { - ack.onComplete(result => self.synchronized(stopStreamOnCancel(ack))) + ack.onComplete(_ => self.synchronized(stopStreamOnCancel(ack))) ack } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala index 68167850f..e8509db07 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala @@ -28,7 +28,8 @@ import monix.reactive.observers.Subscriber /** * Common implementation for `minF`, `minByF`, `maxF`, `maxByF`. */ -private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K)(implicit B: Order[K]) extends Operator[A, A] { +private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K) + extends Operator[A, A] { def shouldCollect(key: K, current: K): Boolean @@ -54,7 +55,6 @@ private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K)(implic minValueU = m } } - Continue } catch { case ex if NonFatal(ex) => @@ -82,28 +82,30 @@ private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K)(implic } } -private[reactive] final class MinOperator[A](implicit A: Order[A]) extends SearchByOrderOperator[A, A](identity)(A) { +private[reactive] final class MinOperator[A](implicit ord: Order[A]) + extends SearchByOrderOperator[A, A](identity) { def shouldCollect(key: A, current: A): Boolean = - A.compare(key, current) < 0 + ord.compare(key, current) < 0 } -private[reactive] final class MinByOperator[A, K](f: A => K)(implicit K: Order[K]) - extends SearchByOrderOperator[A, K](f)(K) { +private[reactive] final class MinByOperator[A, K](f: A => K)(implicit ord: Order[K]) + extends SearchByOrderOperator[A, K](f) { def shouldCollect(key: K, current: K): Boolean = - K.compare(key, current) < 0 + ord.compare(key, current) < 0 } -private[reactive] final class MaxOperator[A](implicit A: Order[A]) extends SearchByOrderOperator[A, A](identity)(A) { +private[reactive] final class MaxOperator[A](implicit ord: Order[A]) + extends SearchByOrderOperator[A, A](identity) { def shouldCollect(key: A, current: A): Boolean = - A.compare(key, current) > 0 + ord.compare(key, current) > 0 } -private[reactive] final class MaxByOperator[A, K](f: A => K)(implicit K: Order[K]) - extends SearchByOrderOperator[A, K](f)(K) { +private[reactive] final class MaxByOperator[A, K](f: A => K)(implicit ord: Order[K]) + extends SearchByOrderOperator[A, K](f) { def shouldCollect(key: K, current: K): Boolean = - K.compare(key, current) > 0 + ord.compare(key, current) > 0 } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala index dc90871fe..a34446a9e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala @@ -24,8 +24,8 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import java.util.concurrent.TimeUnit -import scala.concurrent.{ Future, Promise } -import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } +import scala.concurrent.Future +import scala.concurrent.duration.FiniteDuration private[reactive] final class ThrottleLatestObservable[A]( source: Observable[A], diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala index f9b530723..ed38f4eed 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala @@ -116,8 +116,8 @@ private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => } } - private def emitAggregatedOnAckContinue(ack: Future[Ack]): Unit = { - lastAck.onComplete { + private def emitAggregatedOnAckContinue(ack: Future[Ack]): Unit = + ack.onComplete { case Failure(ex) => onError(ex) case Success(Stop) => @@ -125,8 +125,6 @@ private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => case Success(Continue) => upstreamSubscriber.synchronized { emitAggregated() } } - } - } } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala index e67d0caaa..776c855fb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.rstreams -import monix.execution.{ Ack, Scheduler } +import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.SingleProducer import monix.execution.rstreams.SingleAssignSubscription @@ -25,7 +25,6 @@ import monix.execution.schedulers.TrampolineExecutionContext.immediate import monix.reactive.OverflowStrategy.Unbounded import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import org.reactivestreams.{ Subscriber => RSubscriber, Subscription => RSubscription } - import scala.concurrent.Future private[reactive] object SubscriberAsReactiveSubscriber { @@ -214,8 +213,6 @@ private[reactive] final class SyncSubscriberAsReactiveSubscriber[A](target: Subs require(requestCount > 0, "requestCount must be strictly positive, according to the Reactive Streams contract") - private[this] implicit val s: Scheduler = target.scheduler - private[this] var subscription = null: RSubscription private[this] var expectingCount = 0L @volatile private[this] var isCanceled = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala index 6ab232ff1..b0edc7ac4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala @@ -120,7 +120,7 @@ object ConcurrentSubject { from(BehaviorSubject[A](initial), strategy) /** Subject recipe for building [[AsyncSubject async]] subjects. */ - def async[A](implicit s: Scheduler): ConcurrentSubject[A, A] = + def async[A]: ConcurrentSubject[A, A] = new ConcurrentAsyncSubject(AsyncSubject[A]()) /** Subject recipe for building [[ReplaySubject replay]] subjects. */ diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala index d1c48eb61..242aebf67 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala @@ -17,16 +17,11 @@ package monix.reactive.internal.builders -import cats.effect.IO -import cats.laws._ -import cats.laws.discipline._ import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.exceptions.DummyException -import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable } - import scala.concurrent.duration.MILLISECONDS object PaginateEvalObservableSuite extends BaseTestSuite { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala index bb58f5933..3e6c1625c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala @@ -17,13 +17,9 @@ package monix.reactive.internal.builders -import cats.laws._ -import cats.laws.discipline._ import monix.execution.Ack.Continue -import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable } - import scala.concurrent.duration.MILLISECONDS object PaginateObservableSuite extends BaseTestSuite { diff --git a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala index 95b9f95ca..1801b9937 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala @@ -111,6 +111,10 @@ object IterantBuilders { def raiseError[A](ex: Throwable): Iterant[F, A] = Iterant.raiseError(ex) + /** Aliased builder, see documentation for [[Iterant.suspend[F[_],A](rest* Iterant.suspend]]. */ + def suspend[A](rest: F[Iterant[F, A]]): Iterant[F, A] = + Iterant.suspend(rest) + // ----------------------------------------------------------------- // -- Requiring Applicative @@ -122,10 +126,6 @@ object IterantBuilders { def liftF[A](a: F[A])(implicit F: Applicative[F]): Iterant[F, A] = Iterant.liftF(a) - /** Aliased builder, see documentation for [[Iterant.suspend[F[_],A](rest* Iterant.suspend]]. */ - def suspend[A](rest: F[Iterant[F, A]])(implicit F: Applicative[F]): Iterant[F, A] = - Iterant.suspend(rest) - /** Aliased builder, see documentation for [[Iterant.fromArray]]. */ def fromArray[A](xs: Array[A])(implicit F: Applicative[F]): Iterant[F, A] = Iterant.fromArray(xs) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala index da54e9312..223d61f87 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala @@ -188,10 +188,10 @@ private[tail] object IterantZipMap { processPair(lhRef.item, lhRef.rest, ref.item, ref.rest) def visit(ref: NextBatch[F, B]): Iterant[F, C] = - processOneASeqB(lhRef, lhRef.item, lhRef.rest, ref.toNextCursor(), this) + processOneASeqB(lhRef.item, lhRef.rest, ref.toNextCursor(), this) def visit(ref: NextCursor[F, B]): Iterant[F, C] = - processOneASeqB(lhRef, lhRef.item, lhRef.rest, ref, this) + processOneASeqB(lhRef.item, lhRef.rest, ref, this) def visit(ref: Suspend[F, B]): Iterant[F, C] = Suspend(ref.rest.map(this)) @@ -359,13 +359,11 @@ private[tail] object IterantZipMap { } def processOneASeqB( - lh: Iterant[F, A], a: A, restA: F[Iterant[F, A]], refB: NextCursor[F, B], loop: Iterant.Visitor[F, B, Iterant[F, C]] ): Iterant[F, C] = { - val NextCursor(itemsB, restB) = refB if (!itemsB.hasNext()) Suspend(restB.map(loop)) diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala index c167cb912..5f545dbbc 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/IterantToPublisherTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala index e33563643..17bf461ac 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/ObservableToPublisherTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala index 6d9f1cb8b..a0b4beb2f 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxAsyncTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala index 551665224..b2c4a4293 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/SubscriberWhiteBoxSyncTest.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/reactiveTests/src/test/scala/monix/reactiveTests/package.scala b/reactiveTests/src/test/scala/monix/reactiveTests/package.scala index 335b5424e..a697f1c05 100644 --- a/reactiveTests/src/test/scala/monix/reactiveTests/package.scala +++ b/reactiveTests/src/test/scala/monix/reactiveTests/package.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala b/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala index 408826b86..842c350ca 100644 --- a/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala +++ b/tracingTests/src/test/scala/tracing/CachedStackTracingSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tracingTests/src/test/scala/tracing/TracingSuite.scala b/tracingTests/src/test/scala/tracing/TracingSuite.scala index e19a94405..64eb5170c 100644 --- a/tracingTests/src/test/scala/tracing/TracingSuite.scala +++ b/tracingTests/src/test/scala/tracing/TracingSuite.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2021 by The Monix Project Developers. + * Copyright (c) 2014-2022 Monix Contributors. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); From 5393572c15d85a33bf6c016a20ea4e8e8e0bcafd Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Sat, 21 May 2022 13:21:47 +0300 Subject: [PATCH 47/69] =?UTF-8?q?Build.sbt=20=E2=80=94=20align=20source=20?= =?UTF-8?q?directories=20to=20standard=20(#1581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .scalafmt.conf | 2 +- build.sbt | 43 +++++++++++-------- .../monix/execution/atomic/Atomic.scala | 0 .../monix/execution/atomic/AtomicNumber.scala | 0 .../monix/execution/atomic/Atomic.scala | 0 .../monix/execution/atomic/AtomicNumber.scala | 0 .../monix/execution/atomic/Atomic.scala | 0 .../monix/execution/atomic/AtomicNumber.scala | 0 .../monix/execution/atomic/Atomic.scala | 0 .../monix/execution/atomic/AtomicNumber.scala | 0 .../internal/HygieneUtilMacros.scala | 0 .../execution/internal/InlineMacros.scala | 0 .../monix/execution/internal/TestBox.scala | 0 .../execution/internal/TestInlineMacros.scala | 0 .../atomic/internal/InlineMacrosTest.scala | 0 .../monix/execution/compat.scala | 0 .../monix/execution/compat.scala | 0 .../monix/execution/misc/Local.scala | 0 .../monix/execution/compat.scala | 0 .../monix/execution/misc/Local.scala | 0 20 files changed, 26 insertions(+), 19 deletions(-) rename monix-execution/atomic/js/src/main/{scala_3.0- => scala-2}/monix/execution/atomic/Atomic.scala (100%) rename monix-execution/atomic/js/src/main/{scala_3.0- => scala-2}/monix/execution/atomic/AtomicNumber.scala (100%) rename monix-execution/atomic/js/src/main/{scala_3.0 => scala-3}/monix/execution/atomic/Atomic.scala (100%) rename monix-execution/atomic/js/src/main/{scala_3.0 => scala-3}/monix/execution/atomic/AtomicNumber.scala (100%) rename monix-execution/atomic/jvm/src/main/{scala_3.0- => scala-2}/monix/execution/atomic/Atomic.scala (100%) rename monix-execution/atomic/jvm/src/main/{scala_3.0- => scala-2}/monix/execution/atomic/AtomicNumber.scala (100%) rename monix-execution/atomic/jvm/src/main/{scala_3.0 => scala-3}/monix/execution/atomic/Atomic.scala (100%) rename monix-execution/atomic/jvm/src/main/{scala_3.0 => scala-3}/monix/execution/atomic/AtomicNumber.scala (100%) rename monix-execution/atomic/shared/src/main/{scala_3.0- => scala-2}/monix/execution/internal/HygieneUtilMacros.scala (100%) rename monix-execution/atomic/shared/src/main/{scala_3.0- => scala-2}/monix/execution/internal/InlineMacros.scala (100%) rename monix-execution/atomic/shared/src/main/{scala_3.0- => scala-2}/monix/execution/internal/TestBox.scala (100%) rename monix-execution/atomic/shared/src/main/{scala_3.0- => scala-2}/monix/execution/internal/TestInlineMacros.scala (100%) rename monix-execution/atomic/shared/src/test/{scala_3.0- => scala-2}/monix/execution/atomic/internal/InlineMacrosTest.scala (100%) rename monix-execution/shared/src/main/{scala_2.13- => scala-2.12}/monix/execution/compat.scala (100%) rename monix-execution/shared/src/main/{scala_2.13+ => scala-2.13}/monix/execution/compat.scala (100%) rename monix-execution/shared/src/main/{scala_3.0- => scala-2}/monix/execution/misc/Local.scala (100%) rename monix-execution/shared/src/main/{scala_3.0 => scala-3}/monix/execution/compat.scala (100%) rename monix-execution/shared/src/main/{scala_3.0 => scala-3}/monix/execution/misc/Local.scala (100%) diff --git a/.scalafmt.conf b/.scalafmt.conf index e40e7acdc..12c9ed666 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -10,7 +10,7 @@ align.tokens = [ ] fileOverride { - "glob:**/src/main/scala_3.0/**" { + "glob:**/src/main/scala-3*/**" { runner.dialect = scala3 }, "glob:**/*.sbt" { diff --git a/build.sbt b/build.sbt index ed60d9c8b..ba7ac3121 100644 --- a/build.sbt +++ b/build.sbt @@ -311,28 +311,36 @@ lazy val sharedSettings = pgpSettings ++ Seq( ) ) -lazy val sharedSourcesSettings = Seq( - Compile / unmanagedSourceDirectories += { - baseDirectory.value.getParentFile / "shared" / "src" / "main" / "scala" - }, - Test / unmanagedSourceDirectories += { - baseDirectory.value.getParentFile / "shared" / "src" / "test" / "scala" - } -) - def scalaPartV = Def.setting(CrossVersion.partialVersion(scalaVersion.value)) -lazy val crossVersionSourcesSettings: Seq[Setting[_]] = - Seq(Compile, Test).map { sc => +lazy val extraSourceSettings = { + val shared = Seq( + Compile / unmanagedSourceDirectories += { + baseDirectory.value.getParentFile / "shared" / "src" / "main" / "scala" + }, + Test / unmanagedSourceDirectories += { + baseDirectory.value.getParentFile / "shared" / "src" / "test" / "scala" + } + ) + + val perVersion = Seq(Compile, Test).map { sc => (sc / unmanagedSourceDirectories) ++= { (sc / unmanagedSourceDirectories).value.flatMap { dir => - scalaPartV.value match { - case Some((2, 12)) => Seq(new File(dir.getPath + "_2.13-"), new File(dir.getPath + "_3.0-")) - case Some((3, _)) => Seq(new File(dir.getPath + "_3.0")) - case _ => Seq(new File(dir.getPath + "_2.13+"), new File(dir.getPath + "_3.0-")) - } + if (dir.getPath().endsWith("scala")) + scalaPartV.value.toList.flatMap { + case (major, minor) => + Seq( + new File(s"${dir.getPath}-$major"), + new File(s"${dir.getPath}-$major.$minor"), + ) + } + else + Seq.empty } } } + + shared ++ perVersion +} lazy val doNotPublishArtifactSettings = Seq( publishArtifact := false, @@ -451,8 +459,7 @@ def monixSubModule( ): Project => Project = pr => { pr.configure(baseSettingsAndPlugins(publishArtifacts = publishArtifacts)) .enablePlugins(ReproducibleBuildsPlugin) - .settings(sharedSourcesSettings) - .settings(crossVersionSourcesSettings) + .settings(extraSourceSettings) .settings(name := projectName) } diff --git a/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/js/src/main/scala-2/monix/execution/atomic/Atomic.scala similarity index 100% rename from monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala rename to monix-execution/atomic/js/src/main/scala-2/monix/execution/atomic/Atomic.scala diff --git a/monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/js/src/main/scala-2/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/atomic/js/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/js/src/main/scala-2/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/Atomic.scala similarity index 100% rename from monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala rename to monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/Atomic.scala diff --git a/monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/atomic/js/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/jvm/src/main/scala-2/monix/execution/atomic/Atomic.scala similarity index 100% rename from monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala rename to monix-execution/atomic/jvm/src/main/scala-2/monix/execution/atomic/Atomic.scala diff --git a/monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/jvm/src/main/scala-2/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/atomic/jvm/src/main/scala_3.0-/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/jvm/src/main/scala-2/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/Atomic.scala similarity index 100% rename from monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala rename to monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/Atomic.scala diff --git a/monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala b/monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/AtomicNumber.scala similarity index 100% rename from monix-execution/atomic/jvm/src/main/scala_3.0/monix/execution/atomic/AtomicNumber.scala rename to monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/AtomicNumber.scala diff --git a/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/HygieneUtilMacros.scala b/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/HygieneUtilMacros.scala similarity index 100% rename from monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/HygieneUtilMacros.scala rename to monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/HygieneUtilMacros.scala diff --git a/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/InlineMacros.scala b/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/InlineMacros.scala similarity index 100% rename from monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/InlineMacros.scala rename to monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/InlineMacros.scala diff --git a/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala b/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/TestBox.scala similarity index 100% rename from monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestBox.scala rename to monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/TestBox.scala diff --git a/monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestInlineMacros.scala b/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/TestInlineMacros.scala similarity index 100% rename from monix-execution/atomic/shared/src/main/scala_3.0-/monix/execution/internal/TestInlineMacros.scala rename to monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/TestInlineMacros.scala diff --git a/monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala b/monix-execution/atomic/shared/src/test/scala-2/monix/execution/atomic/internal/InlineMacrosTest.scala similarity index 100% rename from monix-execution/atomic/shared/src/test/scala_3.0-/monix/execution/atomic/internal/InlineMacrosTest.scala rename to monix-execution/atomic/shared/src/test/scala-2/monix/execution/atomic/internal/InlineMacrosTest.scala diff --git a/monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala b/monix-execution/shared/src/main/scala-2.12/monix/execution/compat.scala similarity index 100% rename from monix-execution/shared/src/main/scala_2.13-/monix/execution/compat.scala rename to monix-execution/shared/src/main/scala-2.12/monix/execution/compat.scala diff --git a/monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala b/monix-execution/shared/src/main/scala-2.13/monix/execution/compat.scala similarity index 100% rename from monix-execution/shared/src/main/scala_2.13+/monix/execution/compat.scala rename to monix-execution/shared/src/main/scala-2.13/monix/execution/compat.scala diff --git a/monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala similarity index 100% rename from monix-execution/shared/src/main/scala_3.0-/monix/execution/misc/Local.scala rename to monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala diff --git a/monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala b/monix-execution/shared/src/main/scala-3/monix/execution/compat.scala similarity index 100% rename from monix-execution/shared/src/main/scala_3.0/monix/execution/compat.scala rename to monix-execution/shared/src/main/scala-3/monix/execution/compat.scala diff --git a/monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala-3/monix/execution/misc/Local.scala similarity index 100% rename from monix-execution/shared/src/main/scala_3.0/monix/execution/misc/Local.scala rename to monix-execution/shared/src/main/scala-3/monix/execution/misc/Local.scala From de879841d9352f7d5bfbbde623c80af675d97388 Mon Sep 17 00:00:00 2001 From: Radu Gancea Date: Mon, 25 Jul 2022 15:20:16 +0100 Subject: [PATCH 48/69] Add `DigitalGenius` to the list of adopters (#1618) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 722771b83..0fdc6a9d7 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ Submit a PR ❤️ - [AVSystem](https://www.avsystem.com) - [commercetools](https://commercetools.com) - [Coya](https://www.coya.com/) +- [DigitalGenius](https://digitalgenius.com/) - [E.ON Connecting Energies](https://www.eon.com/) - [eBay Inc.](https://www.ebay.com) - [Eloquentix](http://eloquentix.com/) From f2cca0d895d26831ba8c4b90746eab648ad3bb12 Mon Sep 17 00:00:00 2001 From: pheianox <77569421+pheianox@users.noreply.github.com> Date: Wed, 3 May 2023 11:29:20 +0400 Subject: [PATCH 49/69] New Adopter: PITS Global Data Recovery Services (#1716) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fdc6a9d7..415120769 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ If you'd like to donate in order to help with ongoing maintenance: Here's a (non-exhaustive) list of companies that use Monix in production. Don't see yours? Submit a PR ❤️ - +- [PITS Global Data Recovery Services](https://www.pitsdatarecovery.net/) - [Abacus](https://abacusfi.com) - [Agoda](https://www.agoda.com) - [AVSystem](https://www.avsystem.com) From cf4f1e5ab2b06ab5d721d0dcaf6e677cf8087b42 Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Sun, 15 Oct 2023 19:48:34 +0900 Subject: [PATCH 50/69] use setup-java instead of deprecated olafurpg/setup-scala (#1778) --- .github/workflows/build.yml | 30 +++++++++++++++++----------- .github/workflows/manual-publish.yml | 5 +++-- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc65d4d9a..20c6a70d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,9 +24,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.${{ matrix.java }}" + java-version: "${{ matrix.java }}" + distribution: adopt - name: Cache ivy2 uses: actions/cache@v1 @@ -79,9 +80,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.${{ matrix.java }}" + java-version: "${{ matrix.java }}" + distribution: adopt - name: Cache ivy2 uses: actions/cache@v1 @@ -132,9 +134,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.${{ matrix.java }}" + java-version: "${{ matrix.java }}" + distribution: adopt - name: Cache ivy2 uses: actions/cache@v1 @@ -179,9 +182,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.${{ matrix.java }}" + java-version: "${{ matrix.java }}" + distribution: adopt - name: Cache ivy2 uses: actions/cache@v1 @@ -225,9 +229,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.${{ matrix.java }}" + java-version: "${{ matrix.java }}" + distribution: adopt - name: Cache ivy2 uses: actions/cache@v1 @@ -280,9 +285,10 @@ jobs: with: fetch-depth: 100 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.8" + java-version: 8 + distribution: adopt - name: Install GnuPG2 run: | diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index d5da0c1f9..7788a1b51 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -26,9 +26,10 @@ jobs: fetch-depth: 100 ref: ${{ github.event.inputs.ref_to_publish }} - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: - java-version: "adopt@1.8" + java-version: 8 + distribution: adopt - name: Install GnuPG2 run: | From 41511b317e32870f5baa453a99e2c2e9cc371ccc Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Sun, 15 Oct 2023 22:06:20 +0900 Subject: [PATCH 51/69] add dependabot.yml (#1779) --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5ace4600a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From 629cf79d2fd02804effe485878fb1c3945bfa37a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Oct 2023 13:21:48 +0000 Subject: [PATCH 52/69] Bump actions/checkout from 2 to 4 (#1780) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 12 ++++++------ .github/workflows/manual-publish.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20c6a70d1..1d15dea72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: CI: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: "${{ matrix.java }}" @@ -79,7 +79,7 @@ jobs: CI: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: "${{ matrix.java }}" @@ -133,7 +133,7 @@ jobs: - { java: 8, scala: 3.1.2 } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: "${{ matrix.java }}" @@ -181,7 +181,7 @@ jobs: - { java: 11, scala: 3.1.2 } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: "${{ matrix.java }}" @@ -228,7 +228,7 @@ jobs: - { java: 8, scala: 3.1.2 } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: "${{ matrix.java }}" @@ -281,7 +281,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 100 diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index 7788a1b51..c49537d14 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 100 ref: ${{ github.event.inputs.ref_to_publish }} From c1cbf43387f0a4d4cfa45ec8b2d5bddae2532df5 Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Mon, 16 Oct 2023 13:31:16 +0900 Subject: [PATCH 53/69] add explicit type (#1783) --- .../TypeClassLawsForTaskWithCallbackSuite.scala | 2 +- .../AbstractBackPressuredBufferedSubscriber.scala | 3 ++- .../buffers/SyncBufferedSubscriber.scala | 3 ++- .../internal/operators/DeflateOperator.scala | 3 ++- .../internal/operators/GunzipOperator.scala | 3 ++- .../internal/operators/GzipOperator.scala | 3 ++- .../internal/operators/InflateOperator.scala | 3 ++- .../AbstractBackPressuredBufferedSubscriber.scala | 3 ++- .../buffers/DropNewBufferedSubscriber.scala | 3 ++- .../buffers/EvictingBufferedSubscriber.scala | 3 ++- .../buffers/SimpleBufferedSubscriber.scala | 3 ++- .../main/scala/monix/reactive/Observable.scala | 2 +- .../builders/CombineLatest2Observable.scala | 5 +++-- .../builders/CombineLatest3Observable.scala | 7 ++++--- .../builders/CombineLatest4Observable.scala | 9 +++++---- .../builders/CombineLatest5Observable.scala | 11 ++++++----- .../builders/CombineLatest6Observable.scala | 13 +++++++------ .../builders/ExecuteWithModelObservable.scala | 3 ++- .../internal/builders/Interleave2Observable.scala | 5 +++-- .../builders/PipeThroughSelectorObservable.scala | 3 ++- .../internal/builders/Zip2Observable.scala | 6 +++--- .../internal/builders/Zip3Observable.scala | 8 ++++---- .../internal/builders/Zip4Observable.scala | 10 +++++----- .../internal/builders/Zip5Observable.scala | 12 ++++++------ .../internal/builders/Zip6Observable.scala | 14 +++++++------- .../internal/consumers/CancelledConsumer.scala | 2 +- .../internal/consumers/CompleteConsumer.scala | 2 +- .../internal/consumers/ContraMapConsumer.scala | 2 +- .../consumers/FirstNotificationConsumer.scala | 2 +- .../internal/consumers/FoldLeftConsumer.scala | 2 +- .../internal/consumers/FoldLeftTaskConsumer.scala | 2 +- .../internal/consumers/ForeachAsyncConsumer.scala | 2 +- .../internal/consumers/ForeachConsumer.scala | 2 +- .../internal/consumers/FromObserverConsumer.scala | 2 +- .../internal/consumers/HeadConsumer.scala | 2 +- .../internal/consumers/HeadOptionConsumer.scala | 2 +- .../internal/consumers/LoadBalanceConsumer.scala | 2 +- .../internal/consumers/RaiseErrorConsumer.scala | 2 +- .../operators/BufferSlidingOperator.scala | 3 ++- .../operators/BufferTimedObservable.scala | 4 ++-- .../internal/operators/BufferWhileOperator.scala | 3 ++- .../operators/BufferWithSelectorObservable.scala | 5 +++-- .../internal/operators/CollectOperator.scala | 3 ++- .../internal/operators/CollectWhileOperator.scala | 4 ++-- .../internal/operators/CompletedOperator.scala | 3 ++- .../operators/ConcatMapIterableOperator.scala | 3 ++- .../internal/operators/ConcatMapObservable.scala | 5 +++-- .../internal/operators/ConcatObservable.scala | 3 ++- .../internal/operators/CountOperator.scala | 3 ++- .../internal/operators/DebounceObservable.scala | 3 ++- .../operators/DefaultIfEmptyOperator.scala | 3 ++- .../operators/DelayBySelectorObservable.scala | 5 +++-- .../operators/DelayByTimespanObservable.scala | 3 ++- .../DelayExecutionWithTriggerObservable.scala | 3 ++- .../operators/DematerializeOperator.scala | 3 ++- .../DistinctUntilChangedByKeyOperator.scala | 3 ++- .../operators/DistinctUntilChangedOperator.scala | 3 ++- .../internal/operators/DoOnCompleteOperator.scala | 3 ++- .../operators/DoOnEarlyStopOperator.scala | 3 ++- .../internal/operators/DoOnErrorOperator.scala | 3 ++- .../internal/operators/DoOnNextAckOperator.scala | 3 ++- .../internal/operators/DoOnStartOperator.scala | 3 ++- .../operators/DoOnSubscribeObservable.scala | 3 ++- .../operators/DoOnTerminateOperator.scala | 3 ++- .../operators/DropByPredicateOperator.scala | 3 ++- .../DropByPredicateWithIndexOperator.scala | 3 ++- .../operators/DropByTimespanObservable.scala | 3 ++- .../internal/operators/DropFirstOperator.scala | 3 ++- .../internal/operators/DropLastOperator.scala | 3 ++- .../internal/operators/DropUntilObservable.scala | 5 +++-- .../internal/operators/DumpObservable.scala | 4 ++-- .../internal/operators/EchoObservable.scala | 4 ++-- .../internal/operators/EndWithErrorOperator.scala | 3 ++- .../internal/operators/FailedOperator.scala | 3 ++- .../internal/operators/FilterOperator.scala | 3 ++- .../internal/operators/FlatScanObservable.scala | 6 +++--- .../internal/operators/FoldLeftObservable.scala | 4 ++-- .../operators/FoldWhileLeftObservable.scala | 4 ++-- .../operators/IntersperseObservable.scala | 4 ++-- .../internal/operators/IsEmptyOperator.scala | 3 ++- .../reactive/internal/operators/MapOperator.scala | 3 ++- .../operators/MapParallelOrderedObservable.scala | 4 ++-- .../MapParallelUnorderedObservable.scala | 4 ++-- .../internal/operators/MapTaskObservable.scala | 4 ++-- .../internal/operators/MaterializeOperator.scala | 3 ++- .../internal/operators/MergeMapObservable.scala | 6 +++--- .../internal/operators/ObserveOnObservable.scala | 4 ++-- .../OnCancelTriggerErrorObservable.scala | 3 ++- .../operators/OnErrorRecoverWithObservable.scala | 3 ++- .../operators/PipeThroughObservable.scala | 3 ++- .../internal/operators/ReduceOperator.scala | 3 ++- .../operators/RepeatSourceObservable.scala | 3 ++- .../internal/operators/ScanObservable.scala | 3 ++- .../internal/operators/ScanTaskObservable.scala | 3 ++- .../operators/SearchByOrderOperator.scala | 3 ++- .../operators/SwitchIfEmptyObservable.scala | 3 ++- .../internal/operators/SwitchMapObservable.scala | 3 ++- .../operators/TakeByPredicateOperator.scala | 3 ++- .../internal/operators/TakeEveryNthOperator.scala | 3 ++- .../internal/operators/TakeLastObservable.scala | 3 ++- .../operators/TakeLeftByTimespanObservable.scala | 3 ++- .../internal/operators/TakeLeftOperator.scala | 3 ++- .../internal/operators/TakeUntilObservable.scala | 5 +++-- .../operators/TakeWhileNotCanceledOperator.scala | 3 ++- .../operators/ThrottleFirstOperator.scala | 3 ++- .../operators/ThrottleLastObservable.scala | 5 +++-- .../operators/ThrottleLatestObservable.scala | 3 ++- .../WhileBusyAggregateEventsOperator.scala | 3 ++- .../WhileBusyDropEventsAndSignalOperator.scala | 3 ++- .../operators/WhileBusyDropEventsOperator.scala | 3 ++- .../operators/WithLatestFromObservable.scala | 5 +++-- .../internal/operators/ZipWithIndexOperator.scala | 3 ++- .../rstreams/SubscriberAsReactiveSubscriber.scala | 3 ++- .../reactive/observables/GroupedObservable.scala | 2 +- .../reactive/observables/RefCountObservable.scala | 3 ++- .../observers/CacheUntilConnectSubscriber.scala | 5 +++-- .../observers/ConnectableSubscriber.scala | 2 +- .../monix/reactive/observers/SafeSubscriber.scala | 3 ++- .../monix/reactive/observers/Subscriber.scala | 2 +- .../monix/reactive/subjects/ReplaySubject.scala | 3 ++- .../consumers/LoadBalanceConsumerSuite.scala | 4 ++-- .../AsyncStateActionObservableSuite.scala | 3 ++- .../builders/BracketObservableSuite.scala | 3 ++- .../BufferedIteratorAsObservableSuite.scala | 2 +- .../builders/CharsReaderObservableSuite.scala | 5 +++-- .../builders/InputStreamObservableSuite.scala | 5 +++-- .../builders/IterableAsObservableSuite.scala | 3 ++- .../builders/IteratorAsObservableSuite.scala | 2 +- .../builders/LinesReaderObservableSuite.scala | 5 +++-- .../builders/PaginateEvalObservableSuite.scala | 3 ++- .../builders/PaginateObservableSuite.scala | 3 ++- .../internal/builders/RangeObservableSuite.scala | 3 ++- .../builders/RepeatEvalObservableSuite.scala | 3 ++- .../builders/RepeatOneObservableSuite.scala | 3 ++- .../builders/ResourceCaseObservableSuite.scala | 3 ++- .../builders/StateActionObservableSuite.scala | 3 ++- .../builders/UnfoldEvalObservableSuite.scala | 5 +++-- .../internal/builders/UnfoldObservableSuite.scala | 3 ++- .../internal/operators/BaseOperatorSuite.scala | 3 ++- .../operators/BufferIntrospectiveSuite.scala | 3 ++- .../internal/operators/BufferTimedSuite.scala | 3 ++- .../reactive/observers/SubscriberFeedSuite.scala | 15 ++++++++------- 142 files changed, 315 insertions(+), 212 deletions(-) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala index 100e360b0..43d2aab0b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala @@ -52,7 +52,7 @@ class BaseTypeClassLawsForTaskWithCallbackSuite(implicit opts: Task.Options) ext A: Eq[A], ec: TestScheduler, opts: Options - ) = { + ): Eq[Task[A]] = { Eq.by { task => val p = Promise[A]() diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index 7c10b9709..b9ba48d9e 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -19,6 +19,7 @@ package monix.reactive.observers.buffers import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.internal.collection.JSArrayQueue import monix.execution.internal.math.nextPowerOf2 import scala.util.control.NonFatal @@ -37,7 +38,7 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( private[this] val bufferSize = nextPowerOf2(_size) private[this] val em = out.scheduler.executionModel - implicit final val scheduler = out.scheduler + implicit final val scheduler: Scheduler = out.scheduler private[this] var upstreamIsComplete = false private[this] var downstreamIsComplete = false diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala index d798c86f4..69e63c5f3 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala @@ -20,6 +20,7 @@ package monix.reactive.observers.buffers import monix.eval.Coeval import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.internal.collection.{ JSArrayQueue, _ } import scala.util.control.NonFatal @@ -38,7 +39,7 @@ private[observers] final class SyncBufferedSubscriber[-A] private ( onOverflow: Long => Coeval[Option[A]] /*| Null*/, ) extends BufferedSubscriber[A] with Subscriber.Sync[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // to be modified only in onError, before upstreamIsComplete private[this] var errorThrown: Throwable = _ // to be modified only in onError / onComplete diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala index d2e34b88b..54a4cdb6b 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala @@ -21,6 +21,7 @@ import java.util.zip.Deflater import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.compression.{ CompressionLevel, CompressionParameters, CompressionStrategy, FlushMode } import monix.reactive.observers.Subscriber @@ -36,7 +37,7 @@ private[compression] final class DeflateOperator( ) extends Operator[Array[Byte], Array[Byte]] { override def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] = { new Subscriber[Array[Byte]] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack: Future[Ack] = Continue private[this] val deflate = diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala index 9cbdf2942..2c07525df 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala @@ -22,6 +22,7 @@ import java.{ util => ju } import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.compression.internal.operators.Gunzipper._ import monix.reactive.compression.{ @@ -42,7 +43,7 @@ private[compression] final class GunzipOperator(bufferSize: Int) extends Operato def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] = new Subscriber[Array[Byte]] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = _ diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala index bcedd6b1c..7f50d066d 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala @@ -23,6 +23,7 @@ import java.util.zip.{ CRC32, Deflater } import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.compression.internal.operators.Gzipper.gzipOperatingSystem import monix.reactive.compression.{ @@ -52,7 +53,7 @@ private[compression] final class GzipOperator( ) extends Operator[Array[Byte], Array[Byte]] { override def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] = { new Subscriber[Array[Byte]] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack: Future[Ack] = _ private[this] val gzipper = diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala index d2df96730..e823715a4 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala @@ -22,6 +22,7 @@ import java.{ util => ju } import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.compression.CompressionException import monix.reactive.observers.Subscriber @@ -36,7 +37,7 @@ private[compression] final class InflateOperator(bufferSize: Int, noWrap: Boolea def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] = new Subscriber[Array[Byte]] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = _ diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index b56fcc212..8cfce3dd7 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -21,6 +21,7 @@ import monix.execution.{ Ack, ChannelType } import monix.execution.Ack.{ Continue, Stop } import monix.execution.BufferCapacity.Unbounded import monix.execution.ChannelType._ +import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight256 import monix.execution.internal.collection.LowLevelConcurrentQueue @@ -46,7 +47,7 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( private[this] val bufferSize = math.nextPowerOf2(_bufferSize) private[this] val em = out.scheduler.executionModel - implicit final val scheduler = out.scheduler + implicit final val scheduler: Scheduler = out.scheduler protected final val queue: LowLevelConcurrentQueue[A] = LowLevelConcurrentQueue( diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala index 5a585ceed..c55d8e243 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala @@ -20,6 +20,7 @@ package monix.reactive.observers.buffers import monix.eval.Coeval import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.atomic.PaddingStrategy.{ LeftRight128, LeftRight256 } import monix.execution.atomic.{ Atomic, AtomicInt } @@ -43,7 +44,7 @@ private[observers] final class DropNewBufferedSubscriber[A] private ( require(bufferSize > 0, "bufferSize must be a strictly positive number") - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val em = out.scheduler.executionModel private[this] val itemsToPush = diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala index 21ec23881..facebed94 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala @@ -20,6 +20,7 @@ package monix.reactive.observers.buffers import monix.eval.Coeval import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.atomic.PaddingStrategy.{ LeftRight128, LeftRight256 } import monix.execution.atomic.{ Atomic, AtomicAny, AtomicInt } import monix.execution.internal.math @@ -114,7 +115,7 @@ private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( require(strategy.bufferSize > 0, "bufferSize must be a strictly positive number") - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val em = out.scheduler.executionModel private[this] val droppedCount: AtomicInt = diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala index 8821fba15..1ef07ba05 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala @@ -21,6 +21,7 @@ import monix.execution.{ Ack, ChannelType } import monix.execution.Ack.{ Continue, Stop } import monix.execution.BufferCapacity.{ Bounded, Unbounded } import monix.execution.ChannelType.SingleConsumer +import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight256 import monix.execution.exceptions.BufferOverflowException @@ -62,7 +63,7 @@ private[observers] abstract class AbstractSimpleBufferedSubscriber[A] protected private[this] val queue = _qRef private[this] val em = out.scheduler.executionModel - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val itemsToPush = Atomic.withPadding(0, LeftRight256) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index e5417054c..3a37ea1b4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -379,7 +379,7 @@ abstract class Observable[+A] extends Serializable { self => ): Cancelable = { subscribe(new Subscriber[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: A) = nextFn(elem) def onComplete() = completedFn() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala index 78dad91a9..8f2e223f8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest2Observable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -121,7 +122,7 @@ private[reactive] final class CombineLatest2Observable[A1, A2, +R](obsA1: Observ val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -143,7 +144,7 @@ private[reactive] final class CombineLatest2Observable[A1, A2, +R](obsA1: Observ }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala index 2db986748..a31f18808 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest3Observable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -128,7 +129,7 @@ private[reactive] final class CombineLatest3Observable[A1, A2, A3, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -150,7 +151,7 @@ private[reactive] final class CombineLatest3Observable[A1, A2, A3, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -172,7 +173,7 @@ private[reactive] final class CombineLatest3Observable[A1, A2, A3, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala index 03aca8f92..10517e87e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest4Observable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -133,7 +134,7 @@ private[reactive] final class CombineLatest4Observable[A1, A2, A3, A4, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -155,7 +156,7 @@ private[reactive] final class CombineLatest4Observable[A1, A2, A3, A4, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -177,7 +178,7 @@ private[reactive] final class CombineLatest4Observable[A1, A2, A3, A4, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -199,7 +200,7 @@ private[reactive] final class CombineLatest4Observable[A1, A2, A3, A4, +R]( }) composite += obsA4.unsafeSubscribeFn(new Subscriber[A4] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A4): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala index aff043418..ea78242f2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest5Observable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -138,7 +139,7 @@ private[reactive] final class CombineLatest5Observable[A1, A2, A3, A4, A5, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -160,7 +161,7 @@ private[reactive] final class CombineLatest5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -182,7 +183,7 @@ private[reactive] final class CombineLatest5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -204,7 +205,7 @@ private[reactive] final class CombineLatest5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA4.unsafeSubscribeFn(new Subscriber[A4] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A4): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -226,7 +227,7 @@ private[reactive] final class CombineLatest5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA5.unsafeSubscribeFn(new Subscriber[A5] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A5): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala index cb4168479..ad3df51a6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CombineLatest6Observable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -143,7 +144,7 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -165,7 +166,7 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -187,7 +188,7 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -209,7 +210,7 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + }) composite += obsA4.unsafeSubscribeFn(new Subscriber[A4] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A4): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -231,7 +232,7 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + }) composite += obsA5.unsafeSubscribeFn(new Subscriber[A5] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A5): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -253,7 +254,7 @@ private[reactive] final class CombineLatest6Observable[A1, A2, A3, A4, A5, A6, + }) composite += obsA6.unsafeSubscribeFn(new Subscriber[A6] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A6): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala index 322fd5df1..c724f40f0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ExecuteWithModelObservable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable, ExecutionModel } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -34,7 +35,7 @@ private[reactive] final class ExecuteWithModelObservable[A](source: Observable[A streamErrors = false source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = newS + implicit val scheduler: Scheduler = newS def onError(ex: Throwable): Unit = out.onError(ex) def onComplete(): Unit = out.onComplete() def onNext(elem: A): Future[Ack] = out.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala index 58794d0b3..58dd09458 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.builders import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } @@ -78,7 +79,7 @@ private[reactive] final class Interleave2Observable[+A](obsA1: Observable[A], ob val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = lock.synchronized { def sendSignal(elem: A): Future[Ack] = lock.synchronized { @@ -112,7 +113,7 @@ private[reactive] final class Interleave2Observable[+A](obsA1: Observable[A], ob }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = lock.synchronized { def sendSignal(elem: A): Future[Ack] = lock.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala index 64cdf185b..fd552ede3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PipeThroughSelectorObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.builders import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.execution.cancelables.SingleAssignCancelable import scala.util.control.NonFatal import monix.reactive.observers.Subscriber @@ -42,7 +43,7 @@ private[reactive] final class PipeThroughSelectorObservable[A, B, C]( streamErrors = false val downstream = observable.unsafeSubscribeFn(new Subscriber[C] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onError(ex: Throwable) = out.onError(ex) def onComplete() = out.onComplete() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala index 28017c863..1a8ae3d51 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable @@ -136,7 +136,7 @@ private[reactive] final class Zip2Observable[A1, A2, +R](obsA1: Observable[A1], val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -158,7 +158,7 @@ private[reactive] final class Zip2Observable[A1, A2, +R](obsA1: Observable[A1], }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala index bd1a0b5a0..23df814bb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.builders -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal @@ -145,7 +145,7 @@ private[reactive] final class Zip3Observable[A1, A2, A3, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -168,7 +168,7 @@ private[reactive] final class Zip3Observable[A1, A2, A3, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -191,7 +191,7 @@ private[reactive] final class Zip3Observable[A1, A2, A3, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala index 2eafa9f30..b936c3ce9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.builders -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal @@ -151,7 +151,7 @@ private[reactive] final class Zip4Observable[A1, A2, A3, A4, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -174,7 +174,7 @@ private[reactive] final class Zip4Observable[A1, A2, A3, A4, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -197,7 +197,7 @@ private[reactive] final class Zip4Observable[A1, A2, A3, A4, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -220,7 +220,7 @@ private[reactive] final class Zip4Observable[A1, A2, A3, A4, +R]( }) composite += obsA4.unsafeSubscribeFn(new Subscriber[A4] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A4): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala index 7ea6a1946..3dd738005 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable @@ -157,7 +157,7 @@ private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -180,7 +180,7 @@ private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -203,7 +203,7 @@ private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -226,7 +226,7 @@ private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA4.unsafeSubscribeFn(new Subscriber[A4] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A4): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -249,7 +249,7 @@ private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( }) composite += obsA5.unsafeSubscribeFn(new Subscriber[A5] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A5): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala index ba4ebacea..98a1d973f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.builders import monix.execution.cancelables.CompositeCancelable -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.reactive.Observable @@ -163,7 +163,7 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( val composite = CompositeCancelable() composite += obsA1.unsafeSubscribeFn(new Subscriber[A1] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A1): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -186,7 +186,7 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( }) composite += obsA2.unsafeSubscribeFn(new Subscriber[A2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A2): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -209,7 +209,7 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( }) composite += obsA3.unsafeSubscribeFn(new Subscriber[A3] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A3): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -232,7 +232,7 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( }) composite += obsA4.unsafeSubscribeFn(new Subscriber[A4] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A4): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -255,7 +255,7 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( }) composite += obsA5.unsafeSubscribeFn(new Subscriber[A5] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A5): Future[Ack] = lock.synchronized { if (isDone) Stop @@ -278,7 +278,7 @@ private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( }) composite += obsA6.unsafeSubscribeFn(new Subscriber[A6] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A6): Future[Ack] = lock.synchronized { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala index 349f15b58..d77ae33db 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CancelledConsumer.scala @@ -28,7 +28,7 @@ import monix.reactive.observers.Subscriber private[reactive] object CancelledConsumer extends Consumer.Sync[Any, Unit] { def createSubscriber(cb: Callback[Throwable, Unit], s: Scheduler): (Subscriber.Sync[Any], AssignableCancelable) = { val out = new Subscriber.Sync[Any] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Any): Ack = Stop def onComplete(): Unit = () def onError(ex: Throwable): Unit = scheduler.reportFailure(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala index 0ad9e20f6..b4fdf2fb4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/CompleteConsumer.scala @@ -31,7 +31,7 @@ private[reactive] object CompleteConsumer extends Consumer.Sync[Any, Unit] { s: Scheduler ): (Subscriber.Sync[Any], AssignableCancelable) = { val out = new Subscriber.Sync[Any] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Any): Ack = Continue def onComplete(): Unit = cb.onSuccess(()) def onError(ex: Throwable): Unit = cb.onError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala index 4366c2e28..4c4870fa6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala @@ -35,7 +35,7 @@ private[reactive] final class ContraMapConsumer[In2, -In, +R](source: Consumer[I val (out, c) = source.createSubscriber(cb, s) val out2 = new Subscriber[In2] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // For protecting the contract private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala index ffb2dd7f7..249eb6def 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala @@ -31,7 +31,7 @@ private[reactive] final class FirstNotificationConsumer[A] extends Consumer.Sync s: Scheduler ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] var isDone = false def onNext(elem: A): Ack = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala index 472734ebc..1d8b3052c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala @@ -30,7 +30,7 @@ private[reactive] final class FoldLeftConsumer[A, R](initial: () => R, f: (R, A) def createSubscriber(cb: Callback[Throwable, R], s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] var isDone = false private[this] var state = initial() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala index 47575e8d6..5ba80cb99 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala @@ -36,7 +36,7 @@ private[reactive] final class FoldLeftTaskConsumer[A, R](initial: () => R, f: (R var lastCancelable = Cancelable.empty val out = new Subscriber[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] var state = initial() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala index d01940059..0992a7854 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachAsyncConsumer.scala @@ -35,7 +35,7 @@ private[reactive] final class ForeachAsyncConsumer[A](f: A => Task[Unit]) extend var lastCancelable = Cancelable.empty val out = new Subscriber[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: A): Future[Ack] = { try { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala index 5fb0a5927..6b2148c95 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala @@ -30,7 +30,7 @@ private[reactive] final class ForeachConsumer[A](f: A => Unit) extends Consumer. def createSubscriber(cb: Callback[Throwable, Unit], s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] var isDone = false def onNext(elem: A): Ack = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala index aa0117ba0..5047bbe42 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala @@ -39,7 +39,7 @@ private[reactive] final class FromObserverConsumer[In](f: Scheduler => Observer[ case Success(out) => val sub = new Subscriber[In] { self => - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] val isDone = Atomic(false) private def signal(ex: Throwable): Unit = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala index ee643947e..6415c2a7c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala @@ -31,7 +31,7 @@ private[reactive] final class HeadConsumer[A] extends Consumer.Sync[A, A] { s: Scheduler ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] var isDone = false def onNext(elem: A): Ack = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala index e8207dc14..6141924b6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala @@ -31,7 +31,7 @@ private[reactive] final class HeadOptionConsumer[A] extends Consumer.Sync[A, Opt s: Scheduler ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s private[this] var isDone = false def onNext(elem: A): Ack = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala index 799990b37..eb31f69f2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala @@ -48,7 +48,7 @@ private[reactive] final class LoadBalanceConsumer[-In, R](parallelism: Int, cons val mainCancelable = SingleAssignCancelable() val balanced = new Subscriber[In] { self => - implicit val scheduler = s + implicit val scheduler: Scheduler = s // Trying to prevent contract violations, once this turns // true, then no final events are allowed to happen. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala index 0e8b4f02a..7ddff9aef 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/RaiseErrorConsumer.scala @@ -29,7 +29,7 @@ private[reactive] final class RaiseErrorConsumer(ex: Throwable) extends Consumer def createSubscriber(cb: Callback[Throwable, Nothing], s: Scheduler): (Subscriber.Sync[Any], AssignableCancelable) = { val out = new Subscriber.Sync[Any] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Any): Ack = Stop def onComplete(): Unit = () def onError(ex: Throwable): Unit = scheduler.reportFailure(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala index 0f95bc53a..5aad055f3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -31,7 +32,7 @@ private[reactive] final class BufferSlidingOperator[A](count: Int, skip: Int) ex def apply(out: Subscriber[Seq[A]]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = _ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala index ae3780ead..f3523b1ef 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -39,7 +39,7 @@ private[reactive] final class BufferTimedObservable[+A](source: Observable[A], t val periodicTask = MultiAssignCancelable() val connection = source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val timespanMillis = timespan.toMillis // MUST BE synchronized by `self` diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala index b4860c903..9ea405419 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -29,7 +30,7 @@ import scala.util.control.NonFatal private[reactive] final class BufferWhileOperator[A](p: A => Boolean, inclusive: Boolean) extends Operator[A, Seq[A]] { def apply(out: Subscriber[Seq[A]]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala index cb1c20baa..c01ba37e7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -38,7 +39,7 @@ private[reactive] final class BufferWithSelectorObservable[+A, S]( val composite = CompositeCancelable(upstreamSubscription, samplerSubscription) upstreamSubscription := source.unsafeSubscribeFn(new Subscriber[A] { upstreamSubscriber => - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler // MUST BE synchronized by `self` private[this] var buffer = ListBuffer.empty[A] @@ -82,7 +83,7 @@ private[reactive] final class BufferWithSelectorObservable[+A, S]( } samplerSubscription := sampler.unsafeSubscribeFn(new Subscriber[S] { - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler def onNext(elem: S): Future[Ack] = upstreamSubscriber.synchronized(signalNext()) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala index 2cd0f0f6b..b638fa135 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -30,7 +31,7 @@ private[reactive] final class CollectOperator[-A, +B](pf: PartialFunction[A, B]) def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala index 101f437dc..0b4d3234d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop - +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.internal.operators.CollectOperator.{ checkFallback, isDefined } @@ -31,7 +31,7 @@ private[reactive] final class CollectWhileOperator[-A, +B](pf: PartialFunction[A def apply(out: Subscriber[B]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isActive = true def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala index 195ad2bc8..d8c395478 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CompletedOperator.scala @@ -18,13 +18,14 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber private[reactive] object CompletedOperator extends Operator[Any, Nothing] { def apply(out: Subscriber[Nothing]): Subscriber[Any] = new Subscriber.Sync[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: Any) = Continue def onError(ex: Throwable): Unit = out.onError(ex) def onComplete(): Unit = out.onComplete() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala index 782c0ddd1..5f3cfefea 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -30,7 +31,7 @@ private[reactive] final class ConcatMapIterableOperator[-A, +B](f: A => immutabl def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala index a338ee5b0..f5e306e88 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import cats.effect.ExitCase import monix.eval.Task import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 @@ -86,7 +87,7 @@ private[reactive] final class ConcatMapObservable[A, B]( import ConcatMapObservable.FlatMapState import ConcatMapObservable.FlatMapState._ - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // For gathering errors private[this] val errors = @@ -340,7 +341,7 @@ private[reactive] final class ConcatMapObservable[A, B]( private final class ChildSubscriber(out: Subscriber[B], asyncUpstreamAck: Promise[Ack]) extends Subscriber[B] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack: Future[Ack] = Continue // Reusable reference to stop creating function references for each `onNext` diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala index 28bf4690a..11dc321a6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.cancelables.AssignableCancelable import monix.reactive.Observable import monix.reactive.observables.ChainedObservable @@ -36,7 +37,7 @@ private[reactive] final class ConcatObservable[A](lh: Observable[A], rh: Observa conn, new Subscriber[A] { private[this] var ack: Future[Ack] = Continue - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = { ack = out.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala index 65914a563..0e49ffad6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -26,7 +27,7 @@ import scala.concurrent.Future private[reactive] object CountOperator extends Operator[Any, Long] { def apply(out: Subscriber[Long]): Subscriber[Any] = new Subscriber[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var count = 0L def onNext(elem: Any): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala index 30fa26cea..e31bf0164 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -36,7 +37,7 @@ private[reactive] final class DebounceObservable[A](source: Observable[A], timeo val composite = CompositeCancelable(mainTask, task) mainTask := source.unsafeSubscribeFn(new Subscriber.Sync[A] with Runnable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val timeoutMillis = timeout.toMillis private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala index 4248a3da2..42542678f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -28,7 +29,7 @@ private[reactive] final class DefaultIfEmptyOperator[A](default: () => A) extend def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isEmpty = true def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala index 53c87295e..6bc531f95 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable } @@ -34,7 +35,7 @@ private[reactive] final class DelayBySelectorObservable[A, S](source: Observable val composite = CompositeCancelable(task) composite += source.unsafeSubscribeFn(new Subscriber[A] { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var completeTriggered = false private[this] var isDone = false @@ -42,7 +43,7 @@ private[reactive] final class DelayBySelectorObservable[A, S](source: Observable private[this] var ack: Promise[Ack] = _ private[this] val trigger = new Subscriber.Sync[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: Any): Ack = throw new IllegalStateException def onError(ex: Throwable): Unit = self.onError(ex) def onComplete(): Unit = self.sendOnNext() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala index fa1dc5dc8..3ef1f23ef 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -36,7 +37,7 @@ private[reactive] final class DelayByTimespanObservable[A](source: Observable[A] val composite = CompositeCancelable(task) composite += source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var hasError = false private[this] val isDone = Atomic(false) private[this] var completeTriggered = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala index 7c559589d..95903dd41 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.cancelables.OrderedCancelable import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -33,7 +34,7 @@ private[reactive] final class DelayExecutionWithTriggerObservable[A](source: Obs val main = trigger .asInstanceOf[Observable[Any]] .unsafeSubscribeFn(new Subscriber[Any] { - implicit val scheduler = subscriber.scheduler + implicit val scheduler: Scheduler = subscriber.scheduler private[this] var isDone = false def onNext(elem: Any): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala index 9afaab74b..edafb1801 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.reactive.Notification import monix.reactive.Notification.{ OnComplete, OnError, OnNext } import monix.reactive.Observable.Operator @@ -29,7 +30,7 @@ private[reactive] final class DematerializeOperator[A] extends Operator[Notifica def apply(out: Subscriber[A]): Subscriber[Notification[A]] = new Subscriber[Notification[A]] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false def onNext(elem: Notification[A]): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala index 3a9d9ee2f..0c2bf8812 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import cats.Eq import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import scala.util.control.NonFatal @@ -32,7 +33,7 @@ private[reactive] final class DistinctUntilChangedByKeyOperator[A, K](key: A => def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var isFirst = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala index 7c6456565..faf8668ba 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import cats.Eq import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator @@ -29,7 +30,7 @@ private[reactive] final class DistinctUntilChangedOperator[A](implicit A: Eq[A]) /** Implementation for `Observable.distinctUntilChanged`. */ def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isFirst = true private[this] var lastElem: A = _ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala index f93b5dc1e..d296c4f26 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnCompleteOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -27,7 +28,7 @@ private[reactive] final class DoOnCompleteOperator[A](task: Task[Unit]) extends def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = out.onNext(elem) def onError(ex: Throwable): Unit = out.onError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala index 5d7082d6c..673990e7e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.atomic.Atomic import scala.util.control.NonFatal import monix.reactive.Observable.Operator @@ -33,7 +34,7 @@ private[reactive] final class DoOnEarlyStopOperator[A](onStop: Task[Unit]) exten def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val isActive = Atomic(true) def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala index 22b7cc00d..c832ad8d4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnErrorOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -28,7 +29,7 @@ private[reactive] final class DoOnErrorOperator[A](cb: Throwable => Task[Unit]) def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = out.onNext(elem) def onComplete(): Unit = out.onComplete() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala index 81fc9727f..60505931a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -31,7 +32,7 @@ private[reactive] final class DoOnNextAckOperator[A](cb: (A, Ack) => Task[Unit]) def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val isActive = Atomic(true) def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala index bdb688cfd..3d20aff14 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -30,7 +31,7 @@ private[reactive] final class DoOnStartOperator[A](cb: A => Task[Unit]) extends def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var isStart = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala index 3be686f09..8bc1339d6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.cancelables.{ OrderedCancelable, SingleAssignCancelable, StackedCancelable } import monix.execution.schedulers.TrampolineExecutionContext.immediate @@ -61,7 +62,7 @@ private[reactive] object DoOnSubscribeObservable { val cancelable = source.unsafeSubscribeFn( new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val completeGuard = Atomic(true) private[this] var isActive = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala index 70fa8112a..7445f674e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala @@ -21,6 +21,7 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.atomic.Atomic import scala.util.control.NonFatal import monix.reactive.internal.util.Instances._ @@ -39,7 +40,7 @@ private[reactive] final class DoOnTerminateOperator[A]( // Wrapping in a cancelable in order to protect it from // being called multiple times private[this] val active = Atomic(true) - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = { val result = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala index 1ac197d89..4a8008f53 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -28,7 +29,7 @@ private[reactive] final class DropByPredicateOperator[A](p: A => Boolean, inclus def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var continueDropping = true private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala index 07034268f..8c43b0107 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -26,7 +27,7 @@ private[reactive] final class DropByPredicateWithIndexOperator[A](p: (A, Int) => def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var continueDropping = true private[this] var index = 0 private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala index d4f629ec3..703590b65 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -33,7 +34,7 @@ private[reactive] final class DropByTimespanObservable[A](source: Observable[A], val composite = CompositeCancelable(trigger) composite += source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler @volatile private[this] var shouldDrop = true locally { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala index 7400afd5d..6ef0de3e6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -25,7 +26,7 @@ private[reactive] final class DropFirstOperator[A](nr: Long) extends Operator[A, def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var count = 0L def onNext(elem: A) = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala index cf1b925f0..e09d7858f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.collection.mutable @@ -30,7 +31,7 @@ private[reactive] final class DropLastOperator[A](n: Int) extends Operator[A, A] def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var queue = mutable.Queue.empty[A] private[this] var length = 0 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala index 1dd876f1e..e2238c424 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -32,7 +33,7 @@ private[reactive] final class DropUntilObservable[A](source: Observable[A], trig val composite = CompositeCancelable(task) composite += source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isActive = true private[this] var errorThrown: Throwable = null @@ -47,7 +48,7 @@ private[reactive] final class DropUntilObservable[A](source: Observable[A], trig locally { task := trigger.unsafeSubscribeFn(new Subscriber.Sync[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: Any) = interruptDropMode(null) def onComplete(): Unit = { interruptDropMode(null); () } def onError(ex: Throwable): Unit = { interruptDropMode(ex); () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala index ace92bf15..597c1a62f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala @@ -20,7 +20,7 @@ package monix.reactive.internal.operators import java.io.PrintStream import scala.util.control.NonFatal -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -33,7 +33,7 @@ private[reactive] final class DumpObservable[A](source: Observable[A], prefix: S var pos = 0 val upstream = source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = subscriber.scheduler + implicit val scheduler: Scheduler = subscriber.scheduler private[this] val downstreamActive = Cancelable { () => pos += 1 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala index 60a5aee60..e048f7230 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala @@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -40,7 +40,7 @@ private[reactive] final class EchoObservable[+A](source: Observable[A], timeout: val composite = CompositeCancelable(mainTask, task) mainTask := source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack: Future[Ack] = Continue private[this] var lastEvent: A = _ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala index afde4a5e2..493128ef3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EndWithErrorOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -26,7 +27,7 @@ private[reactive] final class EndWithErrorOperator[A](error: Throwable) extends def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = out.onNext(elem) def onError(ex: Throwable): Unit = out.onError(ex) def onComplete(): Unit = out.onError(error) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala index fe57b516c..63cdbb598 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala @@ -18,13 +18,14 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber private[reactive] object FailedOperator extends Operator[Any, Throwable] { def apply(out: Subscriber[Throwable]): Subscriber[Any] = new Subscriber.Sync[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: Any) = Continue def onComplete(): Unit = out.onComplete() def onError(ex: Throwable): Unit = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala index 512f36a58..58906b801 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -26,7 +27,7 @@ private[reactive] final class FilterOperator[A](p: A => Boolean) extends Operato def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false def onNext(elem: A) = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala index 5f7b97efa..ef45dadaa 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala @@ -21,7 +21,7 @@ import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import scala.util.control.NonFatal -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.exceptions.CompositeException import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -71,7 +71,7 @@ private[reactive] final class FlatScanObservable[A, R]( import ConcatMapObservable.FlatMapState import ConcatMapObservable.FlatMapState._ - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // For gathering errors private[this] val errors = @@ -314,7 +314,7 @@ private[reactive] final class FlatScanObservable[A, R]( private final class ChildSubscriber(out: Subscriber[R], asyncUpstreamAck: Promise[Ack]) extends Subscriber[R] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack: Future[Ack] = Continue // Reusable reference to stop creating function references for each `onNext` diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala index 6329b8bf6..c58e1395d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -33,7 +33,7 @@ private[reactive] final class FoldLeftObservable[A, R](source: Observable[A], in streamErrors = false source.unsafeSubscribeFn(new Subscriber.Sync[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var state: R = initialState diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala index 9e3573407..afbfa9802 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -38,7 +38,7 @@ private[reactive] final class FoldWhileLeftObservable[A, S]( streamErrors = false source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var state = initialState diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala index df293fd01..1cc3d8930 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala @@ -18,7 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -33,7 +33,7 @@ private[reactive] final class IntersperseObservable[+A]( override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val upstream = source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var atLeastOne = false private[this] var downstreamAck = Continue: Future[Ack] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala index 540441df2..2256fe80b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala @@ -19,13 +19,14 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber private[reactive] object IsEmptyOperator extends Operator[Any, Boolean] { def apply(out: Subscriber[Boolean]): Subscriber[Any] = new Subscriber[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var isEmpty = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala index e36c01865..d36d0b6bb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -28,7 +29,7 @@ private[reactive] final class MapOperator[-A, +B](f: A => B) extends Operator[A, def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala index 9916d8654..8a29f0742 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala @@ -24,7 +24,7 @@ import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import monix.execution.AsyncSemaphore import monix.execution.ChannelType.MultiProducer -import monix.execution.{ Ack, Cancelable, CancelableFuture } +import monix.execution.{ Ack, Cancelable, CancelableFuture, Scheduler } import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import monix.reactive.{ Observable, OverflowStrategy } @@ -57,7 +57,7 @@ private[reactive] final class MapParallelOrderedObservable[A, B]( private final class MapAsyncParallelSubscription(out: Subscriber[B], composite: CompositeCancelable) extends Subscriber[A] with Cancelable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // Ensures we don't execute more than a maximum number of tasks in parallel private[this] val semaphore = AsyncSemaphore(parallelism.toLong) // Buffer with the supplied overflow strategy. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala index ba5827cf2..defd63a2a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala @@ -17,7 +17,7 @@ package monix.reactive.internal.operators -import monix.execution.{ Ack, AsyncSemaphore, Callback, Cancelable } +import monix.execution.{ Ack, AsyncSemaphore, Callback, Cancelable, Scheduler } import monix.eval.Task import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer @@ -66,7 +66,7 @@ private[reactive] final class MapParallelUnorderedObservable[A, B]( private final class MapAsyncParallelSubscription(out: Subscriber[B], composite: CompositeCancelable) extends Subscriber[A] with Cancelable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // Ensures we don't execute more than a maximum number of tasks in parallel private[this] val semaphore = AsyncSemaphore(parallelism.toLong) // Buffer with the supplied overflow strategy. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala index 7905f5f86..034152910 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala @@ -22,7 +22,7 @@ import monix.execution.Ack.Stop import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import scala.util.control.NonFatal -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber @@ -79,7 +79,7 @@ private[reactive] final class MapTaskObservable[A, B](source: Observable[A], f: import MapTaskObservable.MapTaskState import MapTaskObservable.MapTaskState._ - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // For synchronizing our internal state machine, padded // in order to avoid the false sharing problem diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala index 46534e99e..baf60294d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Notification import monix.reactive.Notification.{ OnComplete, OnError, OnNext } import monix.reactive.Observable.Operator @@ -29,7 +30,7 @@ private[reactive] final class MaterializeOperator[A] extends Operator[A, Notific def apply(out: Subscriber[Notification[A]]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala index ce43cfa7c..5dd7c31da 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala @@ -19,7 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer -import monix.execution.{ Ack, Cancelable } +import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.cancelables._ import monix.execution.exceptions.CompositeException import monix.reactive.observers.{ BufferedSubscriber, Subscriber } @@ -39,7 +39,7 @@ private[reactive] final class MergeMapObservable[A, B]( val composite = CompositeCancelable() composite += source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler private[this] val subscriberB: Subscriber[B] = BufferedSubscriber(downstream, overflowStrategy, MultiProducer) @@ -84,7 +84,7 @@ private[reactive] final class MergeMapObservable[A, B]( composite += childTask childTask := fb.unsafeSubscribeFn(new Subscriber[B] { - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler def onNext(elem: B) = { subscriberB.onNext(elem).syncOnStopOrFailure { _ => cancelUpstream(); () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala index 0fd4744fc..1b6dca71f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ObserveOnObservable.scala @@ -33,7 +33,7 @@ private[reactive] final class ObserveOnObservable[+A](source: Observable[A], alt // will be listened on that specified `Scheduler` val buffer = { val ref: Subscriber[A] = new Subscriber[A] { - implicit val scheduler = altS + implicit val scheduler: Scheduler = altS def onNext(a: A) = out.onNext(a) def onError(ex: Throwable) = out.onError(ex) def onComplete() = out.onComplete() @@ -46,7 +46,7 @@ private[reactive] final class ObserveOnObservable[+A](source: Observable[A], alt // because we only want to listen to events on the specified Scheduler, // but we don't want to override the Observable's default Scheduler source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = buffer.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala index 30bc157dd..763f7b5e8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -28,7 +29,7 @@ private[reactive] final class OnCancelTriggerErrorObservable[A](source: Observab def unsafeSubscribeFn(downstream: Subscriber[A]): Cancelable = { val out: Subscriber[A] = new Subscriber[A] { self => - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler private[this] var isDone = false def onNext(elem: A): Future[Ack] = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala index 4fff4a242..f57dfeea2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.cancelables.OrderedCancelable import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable } @@ -33,7 +34,7 @@ private[reactive] final class OnErrorRecoverWithObservable[A](source: Observable val cancelable = OrderedCancelable() val main = source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack: Future[Ack] = Continue def onNext(elem: A) = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala index 849769e07..db93c71a1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/PipeThroughObservable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.cancelables.SingleAssignCancelable import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.observers.Subscriber import monix.reactive.{ Observable, Pipe } import scala.concurrent.Future @@ -32,7 +33,7 @@ private[reactive] final class PipeThroughObservable[A, B](source: Observable[A], val upstream = SingleAssignCancelable() val downstream = output.unsafeSubscribeFn(new Subscriber[B] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onError(ex: Throwable) = out.onError(ex) def onComplete() = out.onComplete() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala index ceddfbdaa..cbe18a3a0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -28,7 +29,7 @@ private[reactive] final class ReduceOperator[A](op: (A, A) => A) extends Operato def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var state: A = _ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala index 5999ee06b..7efb28f5e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Continue import monix.execution.cancelables.{ CompositeCancelable, OrderedCancelable } import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber import monix.reactive.subjects.{ ReplaySubject, Subject } @@ -33,7 +34,7 @@ private[reactive] final class RepeatSourceObservable[A](source: Observable[A]) e def loop(subject: Subject[A, A], out: Subscriber[A], task: OrderedCancelable, index: Long): Unit = { val cancelable = subject.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isEmpty = true private[this] var isDone = false private[this] var ack: Future[Ack] = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala index cc64a81f0..0709f8722 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -36,7 +37,7 @@ private[reactive] final class ScanObservable[A, R](source: Observable[A], initia // Initial state was evaluated, subscribing to source source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var state = initialState diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala index f07ded03b..8f2d38845 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.cancelables.OrderedCancelable @@ -66,7 +67,7 @@ private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], se import MapTaskObservable.MapTaskState import MapTaskObservable.MapTaskState._ - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // For synchronizing our internal state machine, padded // in order to avoid the false sharing problem diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala index e8509db07..135220d6a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import cats.Order import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator @@ -35,7 +36,7 @@ private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K) final def apply(out: Subscriber[A]): Subscriber.Sync[A] = new Subscriber.Sync[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var minValue: A = _ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala index abba57d70..c0e7b99f2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.cancelables.OrderedCancelable import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -30,7 +31,7 @@ private[reactive] final class SwitchIfEmptyObservable[+A](source: Observable[A], val cancelable = OrderedCancelable() val mainSub = source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isEmpty = true def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala index e7cff9a66..b47005ff1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SerialCancelable, SingleAssignCancelable } import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable } @@ -35,7 +36,7 @@ private[reactive] final class SwitchMapObservable[A, B](source: Observable[A], f val composite = CompositeCancelable(activeChild, mainTask) mainTask := source.unsafeSubscribeFn(new Subscriber.Sync[A] { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler // MUST BE synchronized by `self` private[this] var ack: Future[Ack] = Continue // MUST BE synchronized by `self` diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala index eab9a758c..66a65c886 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -28,7 +29,7 @@ private[reactive] final class TakeByPredicateOperator[A](p: A => Boolean, inclus def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isActive = true def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala index ddd0da6eb..f634051c6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -29,7 +30,7 @@ private[reactive] final class TakeEveryNthOperator[A](n: Int) extends Operator[A def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var index = n def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala index 97ea5632c..51f065f8b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.cancelables.AssignableCancelable import monix.reactive.Observable import monix.reactive.observables.ChainedObservable @@ -33,7 +34,7 @@ private[reactive] final class TakeLastObservable[A](source: Observable[A], n: In source, conn, new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val queue = mutable.Queue.empty[A] private[this] var queued = 0 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala index 21464abeb..e7afb4c64 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -32,7 +33,7 @@ private[reactive] final class TakeLeftByTimespanObservable[A](source: Observable val composite = CompositeCancelable() composite += source.unsafeSubscribeFn(new Subscriber[A] with Runnable { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isActive = true // triggers completion diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala index 80705b882..6996e3712 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -26,7 +27,7 @@ private[reactive] final class TakeLeftOperator[A](n: Long) extends Operator[A, A def apply(out: Subscriber[A]): Subscriber[A] = { require(n > 0, "n should be strictly positive") new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var counter = 0L private[this] var isActive = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala index 3e5371263..ccb583f5d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeUntilObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -33,7 +34,7 @@ private[reactive] final class TakeUntilObservable[+A](source: Observable[A], tri var isComplete = false val selectorConn = trigger.unsafeSubscribeFn(new Subscriber.Sync[Any] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: Any): Ack = { signalComplete(null) @@ -57,7 +58,7 @@ private[reactive] final class TakeUntilObservable[+A](source: Observable[A], tri }) mainConn := source.unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = mainConn.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala index a0922a313..941f24926 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Stop +import monix.execution.Scheduler import monix.execution.cancelables.BooleanCancelable import scala.util.control.NonFatal import monix.reactive.Observable.Operator @@ -29,7 +30,7 @@ private[reactive] final class TakeWhileNotCanceledOperator[A](c: BooleanCancelab def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isActive = true def onNext(elem: A): Future[Ack] = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala index 6585c8229..b85d6a9b1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -29,7 +30,7 @@ private[reactive] final class ThrottleFirstOperator[A](interval: FiniteDuration) def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val intervalMs = interval.toMillis private[this] var nextChange = 0L diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala index 589f47ad6..55384cbae 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -36,7 +37,7 @@ private[reactive] final class ThrottleLastObservable[+A, S]( val composite = CompositeCancelable(upstreamSubscription, samplerSubscription) upstreamSubscription := source.unsafeSubscribeFn(new Subscriber.Sync[A] { upstreamSubscriber => - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler // Value is volatile to keep write to lastValue visible // after this one is seen as being true @@ -71,7 +72,7 @@ private[reactive] final class ThrottleLastObservable[+A, S]( } samplerSubscription := sampler.unsafeSubscribeFn(new Subscriber[S] { self => - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler def onNext(elem: S): Future[Ack] = upstreamSubscriber.synchronized(signalNext()) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala index a34446a9e..c84f452dd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -40,7 +41,7 @@ private[reactive] final class ThrottleLatestObservable[A]( mainTask := source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] val durationMilis = duration.toMillis private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala index ed38f4eed..653761df1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -32,7 +33,7 @@ private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => def apply(downstream: Subscriber[S]): Subscriber.Sync[A] = { new Subscriber.Sync[A] { upstreamSubscriber => - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler private[this] var aggregated: Option[S] = None private[this] var lastAck: Future[Ack] = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala index abd6467b6..e1e67017e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber @@ -29,7 +30,7 @@ private[reactive] final class WhileBusyDropEventsAndSignalOperator[A](onOverflow def apply(out: Subscriber[A]): Subscriber.Sync[A] = new Subscriber.Sync[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack = Continue: Future[Ack] private[this] var eventsDropped = 0L diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala index 83a12aa29..b97089832 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -27,7 +28,7 @@ private[reactive] final class WhileBusyDropEventsOperator[A] extends Operator[A, def apply(out: Subscriber[A]): Subscriber.Sync[A] = new Subscriber.Sync[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var ack = Continue: Future[Ack] private[this] var isDone = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala index 455bca62b..8b3447060 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.CompositeCancelable import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable } @@ -36,7 +37,7 @@ private[reactive] final class WithLatestFromObservable[A, B, +R]( val connection = CompositeCancelable() connection += source.unsafeSubscribeFn(new Subscriber[A] { self => - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var isDone = false private[this] var otherStarted = false @@ -44,7 +45,7 @@ private[reactive] final class WithLatestFromObservable[A, B, +R]( private[this] val otherConnection = { val ref = other.unsafeSubscribeFn(new Subscriber.Sync[B] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler def onNext(elem: B): Ack = self.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala index 57345e50b..bf43f217b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.operators import monix.execution.Ack +import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future @@ -26,7 +27,7 @@ private[reactive] final class ZipWithIndexOperator[A] extends Operator[A, (A, Lo def apply(out: Subscriber[(A, Long)]): Subscriber[A] = new Subscriber[A] { - implicit val scheduler = out.scheduler + implicit val scheduler: Scheduler = out.scheduler private[this] var index = 0L def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala index 776c855fb..fe2d1b47f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.rstreams import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.SingleProducer +import monix.execution.Scheduler import monix.execution.rstreams.SingleAssignSubscription import monix.execution.schedulers.TrampolineExecutionContext.immediate import monix.reactive.OverflowStrategy.Unbounded @@ -93,7 +94,7 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub private[this] val subscription = SingleAssignSubscription() private[this] val downstream: Subscriber[A] = new Subscriber[A] { - implicit val scheduler = target.scheduler + implicit val scheduler: Scheduler = target.scheduler private[this] val isFinite = requestCount < Int.MaxValue private[this] var isActive = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala index b9fb4e0c2..8fdf2af3a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala @@ -56,7 +56,7 @@ object GroupedObservable { private[this] var ref: Subscriber[V] = _ private[this] val underlying = { val o = new Subscriber[V] { - implicit val scheduler = self.scheduler + implicit val scheduler: Scheduler = self.scheduler private[this] var isDone = false def onNext(elem: V) = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala index ece7b42a4..a91bcf10f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala @@ -18,6 +18,7 @@ package monix.reactive.observables import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.observers.Subscriber import monix.execution.atomic.Atomic @@ -68,7 +69,7 @@ final class RefCountObservable[+A] private (source: ConnectableObservable[A]) ex private def wrap[U >: A](downstream: Subscriber[U], subscription: Cancelable): Subscriber[U] = new Subscriber[U] { - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler def onNext(elem: U): Future[Ack] = { downstream diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala index dbb50cd0d..6712ee0e3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala @@ -19,6 +19,7 @@ package monix.reactive.observers import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, CancelableFuture } +import monix.execution.Scheduler import monix.reactive.Observable import scala.collection.mutable import scala.concurrent.{ Future, Promise } @@ -30,7 +31,7 @@ import scala.util.{ Failure, Success } * subsequent events are pushed directly. */ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) extends Subscriber[A] { self => - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler // MUST BE synchronized by `self`, only available if isConnected == false private[this] var queue = mutable.ArrayBuffer.empty[A] // MUST BE synchronized by `self` @@ -72,7 +73,7 @@ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) val cancelable = Observable .fromIterable(queue) .unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = downstream.scheduler + implicit val scheduler: Scheduler = downstream.scheduler private[this] var ack: Future[Ack] = Continue bufferWasDrained.future.onComplete { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala index 894dc048c..935f8b492 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala @@ -125,7 +125,7 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend val cancelable = Observable .fromIterable(queue) .unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = underlying.scheduler + implicit val scheduler: Scheduler = underlying.scheduler private[this] var ack: Future[Ack] = Continue bufferWasDrained.future.onComplete { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala index 0f9a620f4..f09f8230b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala @@ -19,6 +19,7 @@ package monix.reactive.observers import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import scala.util.control.NonFatal import scala.concurrent.{ Future, Promise } @@ -36,7 +37,7 @@ import scala.util.Try */ final class SafeSubscriber[-A] private (subscriber: Subscriber[A]) extends Subscriber[A] { - implicit val scheduler = subscriber.scheduler + implicit val scheduler: Scheduler = subscriber.scheduler private[this] var isDone = false private[this] var ack: Future[Ack] = Continue diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala index aaf8aad1b..de2986cf5 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala @@ -71,7 +71,7 @@ object Subscriber { */ def empty[A](implicit s: Scheduler): Subscriber.Sync[A] = new Subscriber.Sync[A] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: A): Ack = Continue def onError(ex: Throwable): Unit = s.reportFailure(ex) def onComplete(): Unit = () diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala index 716e81cab..8f65cabb7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala @@ -19,6 +19,7 @@ package monix.reactive.subjects import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, Cancelable } +import monix.execution.Scheduler import monix.reactive.Observable import monix.reactive.internal.util.PromiseCounter import monix.reactive.observers.{ ConnectableSubscriber, Subscriber } @@ -44,7 +45,7 @@ final class ReplaySubject[A] private (initialState: ReplaySubject.State[A]) exte Observable .fromIterable(buffer) .unsafeSubscribeFn(new Subscriber[A] { - implicit val scheduler = subscriber.scheduler + implicit val scheduler: Scheduler = subscriber.scheduler def onNext(elem: A) = subscriber.onNext(elem) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala index d3e5e68b7..10bc3e0c0 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala @@ -257,7 +257,7 @@ object LoadBalanceConsumerSuite extends BaseTestSuite { } val sub = new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum.increment(elem + 1) Continue @@ -318,7 +318,7 @@ object LoadBalanceConsumerSuite extends BaseTestSuite { new Consumer[Int, Unit] { def createSubscriber(cb: Callback[Throwable, Unit], s: Scheduler): (Subscriber[Int], AssignableCancelable) = { val sub = new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = ack.future.map { _ => diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala index 06b26bef0..b42b962a3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/AsyncStateActionObservableSuite.scala @@ -23,6 +23,7 @@ import monix.eval.Task import monix.execution.Ack.Continue import monix.execution.internal.Platform import monix.execution.ExecutionModel.AlwaysAsyncExecution +import monix.execution.Scheduler import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler import monix.reactive.Observable @@ -84,7 +85,7 @@ object AsyncStateActionObservableSuite extends TestSuite[TestScheduler] { val cancelable = Observable .fromAsyncStateAction(intNow)(s.clockMonotonic(MILLISECONDS)) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 Continue diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala index cf87aba41..88df3d890 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BracketObservableSuite.scala @@ -22,6 +22,7 @@ import cats.effect.ExitCase import cats.effect.concurrent.Deferred import monix.eval.Task import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable } @@ -86,7 +87,7 @@ object BracketObservableSuite extends BaseTestSuite { val cancelable = obs .flatMap(_ => Observable.never) .unsafeSubscribeFn(new Subscriber[Handle] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Handle) = Continue def onComplete() = diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala index 36f073c67..b1b3da83d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/BufferedIteratorAsObservableSuite.scala @@ -43,7 +43,7 @@ object BufferedIteratorAsObservableSuite extends TestSuite[TestScheduler] { obs.unsafeSubscribeFn(Subscriber.empty(s)) obs.unsafeSubscribeFn(new Subscriber[Seq[Int]] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Seq[Int]): Ack = throw new IllegalStateException("onNext") diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala index 0cbe7ab78..9984118c5 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala @@ -26,6 +26,7 @@ import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } +import monix.execution.Scheduler import monix.execution.exceptions.APIContractViolationException import monix.execution.schedulers.TestScheduler import monix.reactive.Observable @@ -45,7 +46,7 @@ object CharsReaderObservableSuite extends SimpleTestSuite with Checkers { s.tick() obs.unsafeSubscribeFn(new Subscriber[Array[Char]] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Array[Char]): Ack = throw new IllegalStateException("onNext") @@ -126,7 +127,7 @@ object CharsReaderObservableSuite extends SimpleTestSuite with Checkers { .foldLeft(Array.empty[Char])(_ ++ _) obs.unsafeSubscribeFn(new Subscriber[Array[Char]] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = throw new IllegalStateException("onError") diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala index 1c59a879e..3bb2934f4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala @@ -25,6 +25,7 @@ import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } +import monix.execution.Scheduler import monix.execution.exceptions.{ APIContractViolationException, DummyException } import monix.execution.schedulers.TestScheduler import monix.reactive.Observable @@ -43,7 +44,7 @@ object InputStreamObservableSuite extends SimpleTestSuite with Checkers { s.tick() obs.unsafeSubscribeFn(new Subscriber[Array[Byte]] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Array[Byte]): Ack = throw new IllegalStateException("onNext") @@ -122,7 +123,7 @@ object InputStreamObservableSuite extends SimpleTestSuite with Checkers { .foldLeft(Array.empty[Byte])(_ ++ _) obs.unsafeSubscribeFn(new Subscriber[Array[Byte]] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = throw new IllegalStateException("onError") diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala index 2776ec431..8a0fe9ace 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IterableAsObservableSuite.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.Ack.{ Continue, Stop } import monix.execution.FutureUtils.extensions._ +import monix.execution.Scheduler import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.execution.exceptions.DummyException @@ -317,7 +318,7 @@ object IterableAsObservableSuite extends TestSuite[TestScheduler] { val cancelable = Observable .fromIterable(seq) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 Continue diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala index cb7d3a5b8..18455126f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/IteratorAsObservableSuite.scala @@ -42,7 +42,7 @@ object IteratorAsObservableSuite extends TestSuite[TestScheduler] { obs.unsafeSubscribeFn(Subscriber.empty(s)) obs.unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int): Ack = throw new IllegalStateException("onNext") diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala index 7a09bfa16..ca5c909ad 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala @@ -23,6 +23,7 @@ import minitest.SimpleTestSuite import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } import monix.execution.exceptions.APIContractViolationException import monix.execution.schedulers.TestScheduler @@ -41,7 +42,7 @@ object LinesReaderObservableSuite extends SimpleTestSuite { s.tick() obs.unsafeSubscribeFn(new Subscriber[String] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: String): Ack = throw new IllegalStateException("onNext") @@ -101,7 +102,7 @@ object LinesReaderObservableSuite extends SimpleTestSuite { .map(_.trim) obs.unsafeSubscribeFn(new Subscriber[String] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = throw new IllegalStateException("onError") diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala index 242aebf67..f80dbd832 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateEvalObservableSuite.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import monix.eval.Task import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable } @@ -58,7 +59,7 @@ object PaginateEvalObservableSuite extends BaseTestSuite { val cancelable = Observable .paginateEval(s.clockMonotonic(MILLISECONDS))(intNowOption) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala index 3e6c1625c..3ae207099 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/PaginateObservableSuite.scala @@ -18,6 +18,7 @@ package monix.reactive.internal.builders import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable } import scala.concurrent.duration.MILLISECONDS @@ -55,7 +56,7 @@ object PaginateObservableSuite extends BaseTestSuite { val cancelable = Observable .paginate(s.clockMonotonic(MILLISECONDS))(intOption) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala index 5e56d6131..524e4ec8f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RangeObservableSuite.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.FutureUtils.extensions._ import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler @@ -129,7 +130,7 @@ object RangeObservableSuite extends TestSuite[TestScheduler] { val source = Observable.range(0L, Platform.recommendedBatchSize.toLong * 10) val cancelable = source.unsafeSubscribeFn(new Subscriber[Long] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Long) = { received += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala index c0a6702e0..bec293ea3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatEvalObservableSuite.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.reactive.Observable @@ -59,7 +60,7 @@ object RepeatEvalObservableSuite extends TestSuite[TestScheduler] { val cancelable = Observable .repeatEval(1) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += elem Continue diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala index 640a14e21..f566cf23c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/RepeatOneObservableSuite.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.reactive.Observable @@ -58,7 +59,7 @@ object RepeatOneObservableSuite extends TestSuite[TestScheduler] { val cancelable = Observable .repeat(1) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += elem Continue diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala index ba17515eb..2ed84169a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/ResourceCaseObservableSuite.scala @@ -23,6 +23,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.eval.Task import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Consumer, Observable } @@ -138,7 +139,7 @@ object ResourceCaseObservableSuite extends BaseTestSuite { val cancelable = obs .flatMap(_ => Observable.never) .unsafeSubscribeFn(new Subscriber[Handle] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Handle) = Continue def onComplete() = diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala index 266245dc8..d07f49d84 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/StateActionObservableSuite.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.builders import minitest.TestSuite import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.internal.Platform import monix.execution.schedulers.TestScheduler import monix.reactive.Observable @@ -66,7 +67,7 @@ object StateActionObservableSuite extends TestSuite[TestScheduler] { val cancelable = Observable .fromStateAction(int)(s.clockMonotonic(MILLISECONDS)) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 Continue diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala index a3b6a36d1..d5ce4cedc 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldEvalObservableSuite.scala @@ -22,6 +22,7 @@ import cats.laws._ import cats.laws.discipline._ import monix.eval.Task import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.exceptions.DummyException import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber @@ -63,7 +64,7 @@ object UnfoldEvalObservableSuite extends BaseTestSuite { val cancelable = Observable .unfoldEval(s.clockMonotonic(MILLISECONDS))(intNowOption) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 @@ -115,7 +116,7 @@ object UnfoldEvalObservableSuite extends BaseTestSuite { val cancelable = Observable .unfoldEvalF(s.clockMonotonic(MILLISECONDS))(intOptionIO) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala index 534128bb7..1977263ee 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/UnfoldObservableSuite.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.builders import cats.laws._ import cats.laws.discipline._ import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.internal.Platform.recommendedBatchSize import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable } @@ -59,7 +60,7 @@ object UnfoldObservableSuite extends BaseTestSuite { val cancelable = Observable .unfold(s.clockMonotonic(MILLISECONDS))(intOption) .unsafeSubscribeFn(new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Int) = { sum += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala index 3859db353..ad449d9fb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala @@ -20,6 +20,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.FutureUtils.extensions._ +import monix.execution.Scheduler import monix.execution.exceptions.DummyException import monix.reactive.observers.Subscriber import monix.reactive.{ BaseTestSuite, Observable, Observer } @@ -361,7 +362,7 @@ abstract class BaseOperatorSuite extends BaseTestSuite { var received = 0L val cancelable = obs.unsafeSubscribeFn(new Subscriber[Long] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable) = wasCompleted += 1 def onComplete() = wasCompleted += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala index aebcfc80e..926daf30b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala @@ -21,6 +21,7 @@ import minitest.TestSuite import monix.eval.Task import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.schedulers.TestScheduler import monix.reactive.observers.Subscriber import monix.reactive.subjects.PublishSubject @@ -46,7 +47,7 @@ object BufferIntrospectiveSuite extends TestSuite[TestScheduler] { subject .bufferIntrospective(maxSize = 10) .unsafeSubscribeFn(new Subscriber[List[Long]] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: List[Long]): Future[Ack] = { sum += elem.sum diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala index 236ba0010..a28067e32 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferTimedSuite.scala @@ -19,6 +19,7 @@ package monix.reactive.internal.operators import monix.execution.Ack import monix.execution.Ack.Continue +import monix.execution.Scheduler import monix.execution.internal.Platform import monix.reactive.observers.Subscriber import monix.reactive.{ Observable, Observer } @@ -168,7 +169,7 @@ object BufferTimedSuite extends BaseOperatorSuite { .map(_.sum) obs.unsafeSubscribeFn(new Subscriber[Long] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onNext(elem: Long): Future[Ack] = { received += elem diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala index 31c589807..5c5370c72 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/observers/SubscriberFeedSuite.scala @@ -18,6 +18,7 @@ package monix.reactive.observers import monix.execution.Ack.{ Continue, Stop } +import monix.execution.Scheduler import monix.execution.cancelables.BooleanCancelable import monix.execution.compat.internal.toIterator import monix.reactive.BaseTestSuite @@ -28,7 +29,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber.Sync[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = { @@ -48,7 +49,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = Future { @@ -68,7 +69,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber.Sync[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = { @@ -88,7 +89,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = Future { @@ -108,7 +109,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber.Sync[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = { @@ -126,7 +127,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = Future { @@ -144,7 +145,7 @@ object SubscriberFeedSuite extends BaseTestSuite { check1 { (xs: List[Int]) => var sum = 0 val downstream = new Subscriber[Int] { - implicit val scheduler = s + implicit val scheduler: Scheduler = s def onError(ex: Throwable): Unit = () def onComplete(): Unit = sum += 100 def onNext(elem: Int) = Future { From 88aa30d0ceaa8f9f179b894bc10efc10beca7b2c Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Mon, 16 Oct 2023 14:42:09 +0900 Subject: [PATCH 54/69] Update mima url (#1784) --- CHANGES.md | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1a82057d4..dd7e9b1d8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1531,7 +1531,7 @@ Bug fixes: Build: - enabled the Scala - [Migration Manager](https://github.com/typesafehub/migration-manager) + [Migration Manager](https://github.com/lightbend/mima) (MiMa) in `build.sbt` to check for backwards compatibility problems - [Issue #322](https://github.com/monix/monix/issues/322): Switch projects which use `CrossVersion.full/"org.scala-lang"` diff --git a/build.sbt b/build.sbt index ba7ac3121..a596e363e 100644 --- a/build.sbt +++ b/build.sbt @@ -52,7 +52,7 @@ val silencer_Version = "1.7.8" val scalaCompat_Version = "2.7.0" // The Monix version with which we must keep binary compatibility. -// https://github.com/typesafehub/migration-manager/wiki/Sbt-plugin +// https://github.com/lightbend/mima#sbt val monixSeries = "3.4.0" // ------------------------------------------------------------------------------------------------ From dfab0dc13ec447d14795119822386c3361d88591 Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Tue, 17 Oct 2023 15:42:18 +0900 Subject: [PATCH 55/69] add JDK 17 test instead of 11 (#1787) --- .github/workflows/build.yml | 2 +- .jvmopts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d15dea72..1015336b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - java: [ 8, 11 ] + java: [ 8, 17 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it scala: [ 2.12.15, 2.13.8, 3.1.2 ] diff --git a/.jvmopts b/.jvmopts index 69394b39e..b205e5036 100644 --- a/.jvmopts +++ b/.jvmopts @@ -4,5 +4,4 @@ -XX:ReservedCodeCacheSize=250M -XX:+TieredCompilation -XX:-UseGCOverheadLimit --XX:+CMSClassUnloadingEnabled From 8447616e6d5353cccb4b9b0ade55f1a9e08cf9b0 Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Tue, 17 Oct 2023 15:58:41 +0900 Subject: [PATCH 56/69] format build files (#1785) --- .github/workflows/build.yml | 2 +- build.sbt | 16 ++++++++-------- project/MonixBuildUtils.scala | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1015336b3..eb80e1c75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -211,7 +211,7 @@ jobs: ./.github/scripts/exec-sbt-command env: SCALA_VERSION: ${{ matrix.scala }} - SBT_COMMAND: scalafmtCheckAll + SBT_COMMAND: "scalafmtCheckAll scalafmtSbtCheck" unidoc: name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} diff --git a/build.sbt b/build.sbt index a596e363e..372855287 100644 --- a/build.sbt +++ b/build.sbt @@ -199,13 +199,13 @@ lazy val sharedSettings = pgpSettings ++ Seq( // Turning off fatal warnings for doc generation Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude, - + // Turn off annoyances in tests Test / tpolecatExcludeOptions ++= { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 12)) => + case Some((2, 12)) => ScalacOptions.defaultConsoleExclude - case _ => + case _ => Set( ScalacOptions.lintInferAny, ScalacOptions.warnUnusedImplicits, @@ -215,7 +215,7 @@ lazy val sharedSettings = pgpSettings ++ Seq( ) } }, - + // Silence everything in auto-generated files scalacOptions ++= { if (isDotty.value) @@ -321,13 +321,13 @@ lazy val extraSourceSettings = { baseDirectory.value.getParentFile / "shared" / "src" / "test" / "scala" } ) - + val perVersion = Seq(Compile, Test).map { sc => (sc / unmanagedSourceDirectories) ++= { (sc / unmanagedSourceDirectories).value.flatMap { dir => if (dir.getPath().endsWith("scala")) scalaPartV.value.toList.flatMap { - case (major, minor) => + case (major, minor) => Seq( new File(s"${dir.getPath}-$major"), new File(s"${dir.getPath}-$major.$minor"), @@ -338,7 +338,7 @@ lazy val extraSourceSettings = { } } } - + shared ++ perVersion } @@ -763,7 +763,7 @@ lazy val reactiveTests = project .settings( libraryDependencies ++= Seq( reactiveStreamsTCKLib % Test, - "org.scalatestplus" %% "testng-7-5" % "3.2.12.0" % Test, + "org.scalatestplus" %% "testng-7-5" % "3.2.12.0" % Test, ) ) diff --git a/project/MonixBuildUtils.scala b/project/MonixBuildUtils.scala index a2eba22db..0b96be4ad 100644 --- a/project/MonixBuildUtils.scala +++ b/project/MonixBuildUtils.scala @@ -11,9 +11,9 @@ import scala.xml.Elem import scala.xml.transform.{ RewriteRule, RuleTransformer } final case class MonixScalaVersion(value: String) { - lazy val parts = + lazy val parts = value.split("[.]").filter(_.nonEmpty).toList - + def filterPrefix(prefix: String): Option[MonixScalaVersion] = if (value.startsWith(prefix)) Some(this) else None } From 2faa2cf7425ab0b88ea57b1ea193bce16613f42a Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Wed, 18 Oct 2023 02:17:02 +0900 Subject: [PATCH 57/69] Update scala-js and Scala 3 (#1786) --- .github/workflows/build.yml | 10 +++++----- build.sbt | 12 +++++++++++- .../monix/tail/IterantToReactivePublisherSuite.scala | 10 +++++++--- project/plugins.sbt | 2 +- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb80e1c75..5b780db28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: java: [ 8, 17 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.12.15, 2.13.8, 3.1.2 ] + scala: [ 2.12.15, 2.13.8, 3.3.1 ] env: CI: true @@ -73,7 +73,7 @@ jobs: include: - { java: 8, scala: 2.12.15 } - { java: 8, scala: 2.13.8 } - - { java: 8, scala: 3.1.2 } + - { java: 8, scala: 3.3.1 } env: CI: true @@ -130,7 +130,7 @@ jobs: include: - { java: 8, scala: 2.12.15 } - { java: 8, scala: 2.13.8 } - - { java: 8, scala: 3.1.2 } + - { java: 8, scala: 3.3.1 } steps: - uses: actions/checkout@v4 @@ -178,7 +178,7 @@ jobs: include: - { java: 11, scala: 2.12.15 } - { java: 11, scala: 2.13.8 } - - { java: 11, scala: 3.1.2 } + - { java: 11, scala: 3.3.1 } steps: - uses: actions/checkout@v4 @@ -225,7 +225,7 @@ jobs: matrix: include: - { java: 8, scala: 2.13.8 } - - { java: 8, scala: 3.1.2 } + - { java: 8, scala: 3.3.1 } steps: - uses: actions/checkout@v4 diff --git a/build.sbt b/build.sbt index 372855287..e01834e6e 100644 --- a/build.sbt +++ b/build.sbt @@ -175,7 +175,7 @@ lazy val isCI = { sys.env.get("CI").exists(v => v == "true" || v == "1" || v == "yes") } -lazy val sharedSettings = pgpSettings ++ Seq( +lazy val sharedSettings = pgpSettings ++ Def.settings( organization := "io.monix", // Value extracted from .github/workflows/build.yml scalaVersion := crossScalaVersionsFromBuildYaml.value.flatMap(_.filterPrefix("2.13.")).head.value, @@ -196,6 +196,16 @@ lazy val sharedSettings = pgpSettings ++ Seq( case _ => Seq.empty } }, + Seq(Compile, Test).map { x => + x / compile / scalacOptions --= { + scalaBinaryVersion.value match { + case "3" => + Seq("-Xfatal-warnings") + case _ => + Seq.empty + } + } + }, // Turning off fatal warnings for doc generation Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude, diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala index 6cbb956b4..3cf736fbf 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala @@ -227,9 +227,13 @@ object IterantToReactivePublisherSuite extends BaseTestSuite { } test("protects against invalid subscriber") { implicit s => - intercept[NullPointerException] { - Iterant[Task].of(1).toReactivePublisher.subscribe(null) - () + if (Platform.isJVM) { + intercept[NullPointerException] { + Iterant[Task].of(1).toReactivePublisher.subscribe(null) + () + } + } else { + // TODO } () } diff --git a/project/plugins.sbt b/project/plugins.sbt index 2980d6d9e..9c4b2379b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") From 9b8d48b33b5dd50cfeaeec495c002804e4159c2e Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:23:27 +0200 Subject: [PATCH 58/69] Upgrade build infrastructure: sbt 1.10.9, Scala 2.13.18/3.3.7, plugins, and GitHub Actions (drop Scala 2.12) (#1994) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial plan * Upgrade sbt to 1.10.9, Scala versions, and most plugins Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Fix compiler plugin versions and sbt-assembly compatibility Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Add -Wconf to silence other-pure-statement warnings from sbt-tpolecat 0.4.4 Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Update to latest plugin and Scala versions per feedback - Update plugins: sbt-scalajs 1.20.2, sbt-unidoc 0.6.1, sbt-jmh 0.4.8, sbt-scalafmt 2.5.6, sbt-scoverage 2.4.4, sbt-dynver 5.1.1, sbt-pgp 2.3.1 - Update snakeyaml 2.5 - Update Scala versions: 2.12.21, 2.13.18, 3.3.7 - Make silencer plugin conditional (not available for 2.12.21) - Disable -Xfatal-warnings for Scala 2.12.21 and 2.13.18 due to many new warnings - Add comprehensive -Wconf filters for Scala 2.13 warnings Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Drop Scala 2.12 support - remove from build and delete scala-2.12 specific code - Remove Scala 2.12.21 from all CI workflows - Remove scala-2.12 specific source directory (monix-execution/shared/src/main/scala-2.12) - Remove Scala 2.12 specific build configuration from build.sbt - Keep scala-2 directories (needed for Scala 2.13 vs Scala 3 compatibility) - Simplify tpolecatExcludeOptions (no longer need 2.12 special case) - Update silencer plugin configuration (remove 2.12.21 references) Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Update GitHub Actions workflow dependencies to latest versions - Update runner: ubuntu-20.04 → ubuntu-22.04 (20.04 is deprecated) - Update actions/cache: v1 → v4 (v1 is deprecated and causes workflow failures) - Update actions/setup-java: v3 → v4 - Update actions/setup-node: v2.1.2 → v4 - Update Node.js version: 14 → 20 - Update Java distribution: adopt → temurin (adopt is deprecated) These updates fix the GitHub Actions workflow not starting issue. Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * fix(build): make sbt-git use native git for worktree support * Update build.sbt --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> Co-authored-by: Alexandru Nedelcu --- .github/workflows/build.yml | 93 +++++++++---------- build.sbt | 65 +++++++++---- .../scala-2.12/monix/execution/compat.scala | 43 --------- project/build.properties | 2 +- project/build.sbt | 7 +- project/plugins.sbt | 28 +++--- 6 files changed, 112 insertions(+), 126 deletions(-) delete mode 100644 monix-execution/shared/src/main/scala-2.12/monix/execution/compat.scala diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b780db28..41f5f554a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,40 +10,40 @@ on: jobs: jvm-tests: name: JVM / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: java: [ 8, 17 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.12.15, 2.13.8, 3.3.1 ] + scala: [ 2.13.18, 3.3.7 ] env: CI: true steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: "${{ matrix.java }}" - distribution: adopt + distribution: temurin - name: Cache ivy2 - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.ivy2/cache key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache coursier (linux) if: contains(runner.os, 'linux') - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/coursier/v1 key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache sbt - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.sbt key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} @@ -64,50 +64,49 @@ jobs: js-tests: name: JS / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it include: - - { java: 8, scala: 2.12.15 } - - { java: 8, scala: 2.13.8 } - - { java: 8, scala: 3.3.1 } + - { java: 8, scala: 2.13.18 } + - { java: 8, scala: 3.3.7 } env: CI: true steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: "${{ matrix.java }}" - distribution: adopt + distribution: temurin - name: Cache ivy2 - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.ivy2/cache key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache coursier (linux) if: contains(runner.os, 'linux') - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/coursier/v1 key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache sbt - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.sbt key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Setup NodeJS - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 20 - name: sbt ci-js run: | @@ -119,7 +118,7 @@ jobs: mima: name: Mima / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: CI: true @@ -128,32 +127,31 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.12.15 } - - { java: 8, scala: 2.13.8 } - - { java: 8, scala: 3.3.1 } + - { java: 8, scala: 2.13.18 } + - { java: 8, scala: 3.3.7 } steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: "${{ matrix.java }}" - distribution: adopt + distribution: temurin - name: Cache ivy2 - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.ivy2/cache key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache coursier (linux) if: contains(runner.os, 'linux') - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/coursier/v1 key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache sbt - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.sbt key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} @@ -167,7 +165,7 @@ jobs: scalafmt: name: Scalafmt / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: CI: true @@ -176,32 +174,31 @@ jobs: fail-fast: false matrix: include: - - { java: 11, scala: 2.12.15 } - - { java: 11, scala: 2.13.8 } - - { java: 11, scala: 3.3.1 } + - { java: 11, scala: 2.13.18 } + - { java: 11, scala: 3.3.7 } steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: "${{ matrix.java }}" - distribution: adopt + distribution: temurin - name: Cache ivy2 - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.ivy2/cache key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache coursier (linux) if: contains(runner.os, 'linux') - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/coursier/v1 key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache sbt - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.sbt key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} @@ -215,7 +212,7 @@ jobs: unidoc: name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: CI: true @@ -224,31 +221,31 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.13.8 } - - { java: 8, scala: 3.3.1 } + - { java: 8, scala: 2.13.18 } + - { java: 8, scala: 3.3.7 } steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: "${{ matrix.java }}" - distribution: adopt + distribution: temurin - name: Cache ivy2 - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.ivy2/cache key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache coursier (linux) if: contains(runner.os, 'linux') - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/coursier/v1 key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Cache sbt - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.sbt key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} @@ -264,7 +261,7 @@ jobs: name: All Tests if: always() needs: [ jvm-tests, js-tests, mima, scalafmt, unidoc ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Validate required tests uses: re-actors/alls-green@release/v1 @@ -279,16 +276,16 @@ jobs: env: CI: true - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 100 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: 8 - distribution: adopt + distribution: temurin - name: Install GnuPG2 run: | diff --git a/build.sbt b/build.sbt index e01834e6e..981aa11bc 100644 --- a/build.sbt +++ b/build.sbt @@ -1,9 +1,12 @@ import sbt.Keys.version import sbt.{ Def, Global, Tags } +import com.github.sbt.git.SbtGit.GitKeys.useConsoleForROGit import scala.collection.immutable.SortedSet import MonixBuildUtils._ +ThisBuild / useConsoleForROGit := true + val benchmarkProjects = List( "benchmarksPrev", "benchmarksNext" @@ -46,9 +49,9 @@ val reactiveStreams_Version = "1.0.3" val macrotaskExecutor_Version = "1.0.0" val minitest_Version = "2.9.6" val implicitBox_Version = "0.3.4" -val kindProjector_Version = "0.13.2" +val kindProjector_Version = "0.13.4" val betterMonadicFor_Version = "0.3.1" -val silencer_Version = "1.7.8" +val silencer_Version = "1.7.19" val scalaCompat_Version = "2.7.0" // The Monix version with which we must keep binary compatibility. @@ -192,15 +195,31 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // Enable this to debug warnings... Compile / scalacOptions ++= { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 13) | (3, _)) => Seq("-Wconf:any:warning-verbose") + case Some((2, 13)) => Seq( + // Silence various warnings that are false positives or intentional patterns + "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent,any:warning-verbose" + ) + case _ => Seq.empty + } + }, + Test / scalacOptions ++= { + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, 13)) => Seq( + // Silence various warnings in tests + "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent" + ) case _ => Seq.empty } }, Seq(Compile, Test).map { x => x / compile / scalacOptions --= { + val scalaV = scalaVersion.value scalaBinaryVersion.value match { case "3" => Seq("-Xfatal-warnings") + case "2.13" if scalaV.startsWith("2.13.18") => + // Scala 2.13.18 has many new warnings, disable fatal warnings temporarily + Seq("-Xfatal-warnings") case _ => Seq.empty } @@ -212,38 +231,43 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // Turn off annoyances in tests Test / tpolecatExcludeOptions ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 12)) => - ScalacOptions.defaultConsoleExclude - case _ => - Set( - ScalacOptions.lintInferAny, - ScalacOptions.warnUnusedImplicits, - ScalacOptions.warnUnusedExplicits, - ScalacOptions.warnUnusedParams, - ScalacOptions.warnUnusedNoWarn, - ) - } + Set( + ScalacOptions.lintInferAny, + ScalacOptions.warnUnusedImplicits, + ScalacOptions.warnUnusedExplicits, + ScalacOptions.warnUnusedParams, + ScalacOptions.warnUnusedNoWarn, + ) }, // Silence everything in auto-generated files scalacOptions ++= { + val scalaV = scalaVersion.value if (isDotty.value) Seq.empty + else if (scalaV.startsWith("2.13.18")) + // For newer patch versions, silencer plugin may not be available, use @nowarn instead + Seq.empty else Seq("-P:silencer:pathFilters=.*[/]src_managed[/].*") }, // Syntax improvements, linting, etc. libraryDependencies ++= { + val scalaV = scalaVersion.value if (isDotty.value) Seq() - else - Seq( + else { + val basePlugins = Seq( compilerPlugin(kindProjectorCompilerPlugin), - compilerPlugin(betterMonadicForCompilerPlugin), - compilerPlugin(silencerCompilerPlugin) + compilerPlugin(betterMonadicForCompilerPlugin) ) + // silencer plugin is not available for all Scala patch versions + if (scalaV.startsWith("2.13.18")) + basePlugins + else + basePlugins :+ compilerPlugin(silencerCompilerPlugin) + } }, libraryDependencies ++= Seq( scalaCollectionCompatLib.value % "provided;optional" @@ -369,6 +393,9 @@ lazy val assemblyShadeSettings = Seq( // otherwise, there's a cyclic dependency between packageBin and assembly assembly / fullClasspath := (Runtime / managedClasspath).value, // in dependent projects, use assembled and shaded jar + // Note: exportJars must be false during assembly, but true for dependent projects + // With sbt-assembly 2.x we need to ensure exportJars is false during the assembly task + assembly / exportJars := false, exportJars := true, // do not include scala dependency in pom autoScalaLibrary := false, diff --git a/monix-execution/shared/src/main/scala-2.12/monix/execution/compat.scala b/monix-execution/shared/src/main/scala-2.12/monix/execution/compat.scala deleted file mode 100644 index ff00eb59c..000000000 --- a/monix-execution/shared/src/main/scala-2.12/monix/execution/compat.scala +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution - -import scala.collection.generic.CanBuildFrom -import scala.collection.mutable - -object compat { - type BuildFrom[-From, -A, +C] = CanBuildFrom[From, A, C] - - private[monix] object internal { - type IterableOnce[+X] = scala.collection.GenTraversableOnce[X] - def toIterator[X](i: IterableOnce[X]): Iterator[X] = i.toIterator - def hasDefiniteSize[X](i: IterableOnce[X]): Boolean = i.hasDefiniteSize - - def newBuilder[From, A, C](bf: BuildFrom[From, A, C], from: From): mutable.Builder[A, C] = - bf.apply(from) - - def toSeq[A](array: Array[AnyRef]): Seq[A] = - new scala.collection.mutable.WrappedArray.ofRef(array).toSeq.asInstanceOf[Seq[A]] - } - - private[monix] object Features { - type Flag <: Long with monix.execution.Features.FlagTag - - type Flags <: Long with monix.execution.Features.FlagsTag - } -} diff --git a/project/build.properties b/project/build.properties index d5499e90d..0b0b66b29 100644 --- a/project/build.properties +++ b/project/build.properties @@ -15,4 +15,4 @@ # limitations under the License. # -sbt.version=1.6.2 +sbt.version=1.10.9 diff --git a/project/build.sbt b/project/build.sbt index d2f41845d..28364867e 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1 +1,6 @@ -libraryDependencies += "org.yaml" % "snakeyaml" % "1.30" +libraryDependencies += "org.yaml" % "snakeyaml" % "2.5" + +// Resolve version conflicts in build plugins +ThisBuild / libraryDependencySchemes ++= Seq( + "com.lihaoyi" %% "geny" % VersionScheme.Always +) diff --git a/project/plugins.sbt b/project/plugins.sbt index 9c4b2379b..16a2599ef 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,15 +1,15 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") -addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") -addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.30") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1") -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") -addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.12") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") +addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.32") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") +addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") From 4d76ff9ff15ce46e88118814d0a2ef8099fe586a Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Mon, 26 Jan 2026 10:51:08 +0200 Subject: [PATCH 59/69] Update sbt --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 0b0b66b29..e8bca9979 100644 --- a/project/build.properties +++ b/project/build.properties @@ -15,4 +15,4 @@ # limitations under the License. # -sbt.version=1.10.9 +sbt.version=1.12.0 From 4358e23067ea4cac05a1d94d9a3346bc56c13fa0 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Mar 2026 09:55:53 +0100 Subject: [PATCH 60/69] Update library dependencies and migrate sbt-tpolecat to org.typelevel (#1996) * Initial plan * Update library dependencies and sbt-tpolecat plugin Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> * Formatting --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexandru <11753+alexandru@users.noreply.github.com> Co-authored-by: Alexandru Nedelcu Co-authored-by: Alexandru Nedelcu --- build.sbt | 11 ++++++----- project/plugins.sbt | 30 +++++++++++++++--------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/build.sbt b/build.sbt index 981aa11bc..c87b8c11d 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,7 @@ import sbt.Keys.version import sbt.{ Def, Global, Tags } import com.github.sbt.git.SbtGit.GitKeys.useConsoleForROGit +import org.typelevel.scalacoptions.ScalacOptions import scala.collection.immutable.SortedSet import MonixBuildUtils._ @@ -41,18 +42,18 @@ addCommandAlias( // ------------------------------------------------------------------------------------------------ // Dependencies - Versions -val cats_Version = "2.7.0" +val cats_Version = "2.13.0" val catsEffect_Version = "2.5.5" val fs2_Version = "2.5.11" -val jcTools_Version = "3.3.0" -val reactiveStreams_Version = "1.0.3" -val macrotaskExecutor_Version = "1.0.0" +val jcTools_Version = "4.0.5" +val reactiveStreams_Version = "1.0.4" +val macrotaskExecutor_Version = "1.1.1" val minitest_Version = "2.9.6" val implicitBox_Version = "0.3.4" val kindProjector_Version = "0.13.4" val betterMonadicFor_Version = "0.3.1" val silencer_Version = "1.7.19" -val scalaCompat_Version = "2.7.0" +val scalaCompat_Version = "2.14.0" // The Monix version with which we must keep binary compatibility. // https://github.com/lightbend/mima#sbt diff --git a/project/plugins.sbt b/project/plugins.sbt index 16a2599ef..db339d207 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,15 +1,15 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2") -addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") -addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") -addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.32") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") -addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") -addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") +addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") +addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.32") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") +addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") From 8c008511d0679d3682afe51414581ede74a716aa Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 1 Apr 2026 09:51:41 +0300 Subject: [PATCH 61/69] VarHandle, Scala 3.8.2, drop Scala 2.12, set minimum JDK to 17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Raise minimum supported JDK version to 17 - Get rid of our usage of `sun.misc.Unsafe`, replacing it with `VarHandle` - Update Scala 3.x to Scala 3.8.2 — this generates a lot of warnings unfortunately, that need to be fixed (hence the big PR with superficial changes) - Drop support for Scala 2.12 --- .github/workflows/build.yml | 22 +- .gitignore | 1 + CHANGES.md | 16 + README.md | 7 +- build.sbt | 48 ++- .../internal/FutureLiftForPlatform.scala | 9 +- .../main/scala/monix/catnap/CancelableF.scala | 13 +- .../scala/monix/catnap/CircuitBreaker.scala | 10 +- .../monix/catnap/ConcurrentChannel.scala | 20 +- .../scala/monix/catnap/ConcurrentQueue.scala | 48 ++- .../main/scala/monix/catnap/FutureLift.scala | 9 +- .../src/main/scala/monix/catnap/MVar.scala | 19 +- .../src/main/scala/monix/catnap/OrElse.scala | 4 +- .../main/scala/monix/catnap/Semaphore.scala | 22 +- .../cancelables/AssignableCancelableF.scala | 4 +- .../cancelables/BooleanCancelableF.scala | 8 +- .../cancelables/SingleAssignCancelableF.scala | 2 +- .../monix/catnap/internal/QueueHelpers.scala | 2 +- .../main/scala/monix/execution/package.scala | 9 +- .../scala/monix/catnap/CancelableFSuite.scala | 2 + .../monix/catnap/CircuitBreakerSuite.scala | 2 + .../monix/catnap/ConcurrentChannelSuite.scala | 2 + .../monix/catnap/ConcurrentQueueSuite.scala | 2 + .../scala/monix/catnap/FutureLiftSuite.scala | 2 + .../monix/catnap/MVarConcurrentSuite.scala | 2 + .../scala/monix/catnap/SemaphoreSuite.scala | 2 + .../catnap/TestSchedulerEffectSuite.scala | 2 + .../SingleAssignCancelableFSuite.scala | 2 + .../eval/internal/TaskRunSyncUnsafe.scala | 4 +- .../src/main/scala/monix/eval/Coeval.scala | 5 +- .../src/main/scala/monix/eval/Task.scala | 45 ++- .../src/main/scala/monix/eval/TaskApp.scala | 1 + .../src/main/scala/monix/eval/TaskLift.scala | 4 + .../src/main/scala/monix/eval/TaskLocal.scala | 17 +- .../eval/instances/CatsEffectForTask.scala | 4 +- .../monix/eval/internal/CoevalBracket.scala | 9 +- .../monix/eval/internal/CoevalRunLoop.scala | 11 +- .../internal/CoevalStackTracedContext.scala | 6 +- .../monix/eval/internal/CoevalTracing.scala | 11 +- .../monix/eval/internal/ForkedRegister.scala | 7 +- .../eval/internal/ForwardCancelable.scala | 28 +- .../monix/eval/internal/FrameIndexRef.scala | 7 +- .../scala/monix/eval/internal/LazyVal.scala | 5 +- .../monix/eval/internal/StackFrame.scala | 5 +- .../eval/internal/StackTracedContext.scala | 6 +- .../monix/eval/internal/TaskBracket.scala | 52 ++-- .../eval/internal/TaskCancellation.scala | 31 +- .../monix/eval/internal/TaskConnection.scala | 16 +- .../internal/TaskConnectionComposite.scala | 5 +- .../eval/internal/TaskConnectionRef.scala | 7 +- .../monix/eval/internal/TaskConversions.scala | 31 +- .../monix/eval/internal/TaskCreate.scala | 47 +-- .../monix/eval/internal/TaskDeferAction.scala | 1 + .../monix/eval/internal/TaskDeprecated.scala | 291 +++++++++--------- .../monix/eval/internal/TaskDoOnCancel.scala | 11 +- .../monix/eval/internal/TaskEffect.scala | 9 +- .../monix/eval/internal/TaskEvalAsync.scala | 9 +- .../monix/eval/internal/TaskExecuteOn.scala | 13 +- .../eval/internal/TaskExecuteWithModel.scala | 5 +- .../internal/TaskExecuteWithOptions.scala | 18 +- .../monix/eval/internal/TaskFromFuture.scala | 3 +- .../monix/eval/internal/TaskMapBoth.scala | 15 +- .../monix/eval/internal/TaskMemoize.scala | 21 +- .../monix/eval/internal/TaskParSequence.scala | 15 +- .../eval/internal/TaskParSequenceN.scala | 5 +- .../internal/TaskParSequenceUnordered.scala | 15 +- .../scala/monix/eval/internal/TaskRace.scala | 15 +- .../monix/eval/internal/TaskRaceList.scala | 15 +- .../monix/eval/internal/TaskRacePair.scala | 18 +- .../eval/internal/TaskRestartCallback.scala | 55 ++-- .../monix/eval/internal/TaskRunLoop.scala | 54 ++-- .../internal/TaskRunToFutureWithLocal.scala | 11 +- .../monix/eval/internal/TaskSequence.scala | 1 + .../scala/monix/eval/internal/TaskShift.scala | 15 +- .../scala/monix/eval/internal/TaskSleep.scala | 21 +- .../scala/monix/eval/internal/TaskStart.scala | 5 +- .../eval/internal/TaskStartAndForget.scala | 5 +- .../internal/TaskToReactivePublisher.scala | 14 +- .../monix/eval/internal/TaskTracing.scala | 11 +- .../monix/eval/internal/TracedAsync.scala | 8 +- .../eval/internal/UnsafeCancelUtils.scala | 25 +- .../monix/eval/tracing/CoevalTrace.scala | 4 +- .../scala/monix/eval/tracing/TaskTrace.scala | 4 +- .../test/scala/monix/eval/BaseLawsSuite.scala | 2 + .../scala/monix/eval/CoevalBracketSuite.scala | 2 + .../monix/eval/CoevalCatsConversions.scala | 2 + .../scala/monix/eval/CoevalErrorSuite.scala | 2 + .../eval/CoevalMemoizeOnSuccessSuite.scala | 2 + .../scala/monix/eval/CoevalMemoizeSuite.scala | 2 + .../scala/monix/eval/CoevalMiscSuite.scala | 2 + .../scala/monix/eval/CoevalNowSuite.scala | 2 + .../scala/monix/eval/CoevalRunSuite.scala | 2 + .../monix/eval/CoevalSequenceSuite.scala | 2 + .../scala/monix/eval/TaskBracketSuite.scala | 2 + .../monix/eval/TaskCallbackSafetySuite.scala | 2 + .../monix/eval/TaskCancelableSuite.scala | 2 + .../monix/eval/TaskCancellationSuite.scala | 2 + .../monix/eval/TaskCoevalForeachSuite.scala | 2 + .../monix/eval/TaskConnectionRefSuite.scala | 2 + .../monix/eval/TaskConnectionSuite.scala | 2 + .../monix/eval/TaskConversionsKSuite.scala | 2 + .../monix/eval/TaskConversionsSuite.scala | 2 + .../scala/monix/eval/TaskCreateSuite.scala | 2 + .../scala/monix/eval/TaskErrorSuite.scala | 2 + .../eval/TaskExecuteWithOptionsSuite.scala | 2 + .../scala/monix/eval/TaskFlatMapSuite.scala | 2 + .../monix/eval/TaskFromEitherSuite.scala | 2 + .../monix/eval/TaskFromFutureSuite.scala | 2 + .../scala/monix/eval/TaskGuaranteeSuite.scala | 2 + .../test/scala/monix/eval/TaskLiftSuite.scala | 3 + .../monix/eval/TaskLikeConversionsSuite.scala | 2 + .../scala/monix/eval/TaskLocalSuite.scala | 13 +- .../eval/TaskMemoizeOnSuccessSuite.scala | 2 + .../scala/monix/eval/TaskMemoizeSuite.scala | 2 + .../test/scala/monix/eval/TaskMiscSuite.scala | 2 + .../test/scala/monix/eval/TaskNowSuite.scala | 2 + .../scala/monix/eval/TaskOptionsSuite.scala | 2 + .../eval/TaskOrCoevalTransformWithSuite.scala | 2 + .../scala/monix/eval/TaskOverloadsSuite.scala | 2 + .../monix/eval/TaskParSequenceNSuite.scala | 2 + .../eval/TaskParSequenceUnorderedSuite.scala | 2 + .../eval/TaskParTraverseUnorderedSuite.scala | 2 + .../scala/monix/eval/TaskParZipSuite.scala | 2 + .../test/scala/monix/eval/TaskRaceSuite.scala | 2 + .../scala/monix/eval/TaskRunAsyncSuite.scala | 2 + ...ClassLawsForParallelApplicativeSuite.scala | 2 + .../eval/TypeClassLawsForTaskSuite.scala | 2 + ...ypeClassLawsForTaskWithCallbackSuite.scala | 2 + .../monix/execution/atomic/Atomic.scala | 4 +- .../monix/execution/atomic/AtomicAny.scala | 2 +- .../execution/atomic/AtomicBoolean.scala | 2 +- .../monix/execution/atomic/AtomicByte.scala | 4 +- .../monix/execution/atomic/AtomicChar.scala | 4 +- .../monix/execution/atomic/AtomicDouble.scala | 2 +- .../monix/execution/atomic/AtomicFloat.scala | 2 +- .../monix/execution/atomic/AtomicInt.scala | 2 +- .../monix/execution/atomic/AtomicLong.scala | 2 +- .../execution/atomic/AtomicNumberAny.scala | 4 +- .../monix/execution/atomic/AtomicShort.scala | 4 +- .../execution/atomic/internal/Factory.java | 156 ++-------- .../atomic/internal/Left128Java7BoxedInt.java | 80 ----- .../internal/Left128Java7BoxedLong.java | 80 ----- .../internal/Left128Java7BoxedObject.java | 72 ----- .../atomic/internal/Left128Java8BoxedInt.java | 73 ----- .../internal/Left128Java8BoxedLong.java | 73 ----- .../internal/Left128Java8BoxedObject.java | 69 ----- .../atomic/internal/Left128JavaXBoxedInt.java | 55 +--- .../internal/Left128JavaXBoxedLong.java | 55 +--- .../internal/Left128JavaXBoxedObject.java | 51 +-- .../atomic/internal/Left64Java7BoxedInt.java | 80 ----- .../atomic/internal/Left64Java7BoxedLong.java | 80 ----- .../internal/Left64Java7BoxedObject.java | 72 ----- .../atomic/internal/Left64Java8BoxedInt.java | 75 ----- .../atomic/internal/Left64Java8BoxedLong.java | 74 ----- .../internal/Left64Java8BoxedObject.java | 69 ----- .../atomic/internal/Left64JavaXBoxedInt.java | 55 +--- .../atomic/internal/Left64JavaXBoxedLong.java | 56 +--- .../internal/Left64JavaXBoxedObject.java | 52 +--- .../internal/LeftRight128Java7BoxedInt.java | 101 ------ .../internal/LeftRight128Java7BoxedLong.java | 101 ------ .../LeftRight128Java7BoxedObject.java | 93 ------ .../internal/LeftRight128Java8BoxedInt.java | 94 ------ .../internal/LeftRight128Java8BoxedLong.java | 94 ------ .../LeftRight128Java8BoxedObject.java | 93 ------ .../internal/LeftRight128JavaXBoxedInt.java | 62 +--- .../internal/LeftRight128JavaXBoxedLong.java | 62 +--- .../LeftRight128JavaXBoxedObject.java | 58 +--- .../internal/LeftRight256Java7BoxedInt.java | 104 ------- .../internal/LeftRight256Java7BoxedLong.java | 105 ------- .../LeftRight256Java7BoxedObject.java | 97 ------ .../internal/LeftRight256Java8BoxedInt.java | 98 ------ .../internal/LeftRight256Java8BoxedLong.java | 98 ------ .../LeftRight256Java8BoxedObject.java | 95 ------ .../internal/LeftRight256JavaXBoxedInt.java | 62 +--- .../internal/LeftRight256JavaXBoxedLong.java | 62 +--- .../LeftRight256JavaXBoxedObject.java | 58 +--- .../atomic/internal/NormalJava7BoxedInt.java | 80 ----- .../atomic/internal/NormalJava7BoxedLong.java | 80 ----- .../internal/NormalJava7BoxedObject.java | 72 ----- .../atomic/internal/NormalJava8BoxedInt.java | 73 ----- .../atomic/internal/NormalJava8BoxedLong.java | 73 ----- .../internal/NormalJava8BoxedObject.java | 69 ----- .../atomic/internal/NormalJavaXBoxedInt.java | 55 +--- .../atomic/internal/NormalJavaXBoxedLong.java | 56 +--- .../internal/NormalJavaXBoxedObject.java | 51 +-- .../internal/Right128Java7BoxedInt.java | 102 ------ .../internal/Right128Java7BoxedLong.java | 102 ------ .../internal/Right128Java7BoxedObject.java | 94 ------ .../internal/Right128Java8BoxedInt.java | 95 ------ .../internal/Right128Java8BoxedLong.java | 95 ------ .../internal/Right128Java8BoxedObject.java | 91 ------ .../internal/Right128JavaXBoxedInt.java | 62 +--- .../internal/Right128JavaXBoxedLong.java | 62 +--- .../internal/Right128JavaXBoxedObject.java | 58 +--- .../atomic/internal/Right64Java7BoxedInt.java | 98 ------ .../internal/Right64Java7BoxedLong.java | 98 ------ .../internal/Right64Java7BoxedObject.java | 90 ------ .../atomic/internal/Right64Java8BoxedInt.java | 91 ------ .../internal/Right64Java8BoxedLong.java | 91 ------ .../internal/Right64Java8BoxedObject.java | 87 ------ .../atomic/internal/Right64JavaXBoxedInt.java | 62 +--- .../internal/Right64JavaXBoxedLong.java | 62 +--- .../internal/Right64JavaXBoxedObject.java | 58 +--- .../atomic/internal/UnsafeAccess.java | 159 +--------- .../atomic/internal/VarHandleBoxedInt.java | 54 ++++ .../atomic/internal/VarHandleBoxedLong.java | 54 ++++ .../atomic/internal/VarHandleBoxedObject.java | 49 +++ .../monix/execution/atomic/Atomic.scala | 4 +- .../monix/execution/atomic/AtomicAny.scala | 2 +- .../execution/atomic/AtomicBoolean.scala | 2 +- .../execution/atomic/AtomicBuilder.scala | 4 +- .../monix/execution/atomic/AtomicByte.scala | 4 +- .../monix/execution/atomic/AtomicChar.scala | 4 +- .../monix/execution/atomic/AtomicDouble.scala | 8 +- .../monix/execution/atomic/AtomicFloat.scala | 8 +- .../monix/execution/atomic/AtomicInt.scala | 2 +- .../monix/execution/atomic/AtomicLong.scala | 2 +- .../execution/atomic/AtomicNumberAny.scala | 4 +- .../monix/execution/atomic/AtomicShort.scala | 4 +- .../atomic/ConcurrentAtomicNumberSuite.scala | 10 +- .../atomic/ConcurrentAtomicSuite.scala | 4 +- .../execution/atomic/PaddingStrategy.scala | 5 +- .../atomic/internal/AtomicDocs.scala | 89 ++++-- .../DefaultUncaughtExceptionReporter.scala | 3 +- .../monix/execution/internal/Platform.scala | 2 +- .../internal/collection/JSArrayQueue.scala | 9 +- .../monix/execution/misc/ThreadLocal.scala | 2 +- .../monix/execution/schedulers/JSTimer.scala | 2 +- .../TrampolineExecutionContext.scala | 2 +- .../scala/org/reactivestreams/Publisher.scala | 3 + .../internal/AsyncSchedulerJSSuite.scala | 2 +- .../monix/execution/internal/Platform.scala | 4 +- .../collection/queues/FromCircularQueue.scala | 48 +-- .../queues/FromMessagePassingQueue.scala | 48 +-- .../LowLevelConcurrentQueueBuilders.scala | 60 +--- .../collection/queues/QueueDrain.scala | 2 +- .../forkJoin/AdaptedForkJoinPool.scala | 7 +- .../forkJoin/DynamicWorkerThreadFactory.scala | 11 +- .../StandardWorkerThreadFactory.scala | 3 + .../monix/execution/misc/ThreadLocal.scala | 2 +- .../AdaptedThreadPoolExecutor.scala | 8 +- .../schedulers/ThreadFactoryBuilder.scala | 3 + .../TrampolineExecutionContext.scala | 2 +- .../execution/CallbackSafetyJVMSuite.scala | 24 +- .../execution/CancelableFutureJVMSuite.scala | 4 +- .../CompletableFutureConversionsSuite.scala | 4 +- .../monix/execution/FutureUtilsJVMSuite.scala | 4 +- .../schedulers/AsyncSchedulerJVMSuite.scala | 24 +- .../schedulers/ExecutorSchedulerSuite.scala | 10 +- .../schedulers/ScheduleOnceJVMSuite.scala | 2 +- .../ScheduledExecutorToSchedulerSuite.scala | 10 +- .../TestSchedulerCompanionSuite.scala | 20 +- .../TrampolineExecutionContextSuite.scala | 2 +- .../scala-2/monix/execution/misc/Local.scala | 53 ++-- .../scala-3/monix/execution/misc/Local.scala | 57 ++-- .../src/main/scala/monix/execution/Ack.scala | 17 +- .../scala/monix/execution/AsyncQueue.scala | 24 +- .../main/scala/monix/execution/Callback.scala | 16 +- .../scala/monix/execution/Cancelable.scala | 13 +- .../monix/execution/CancelableFuture.scala | 11 +- .../monix/execution/CancelablePromise.scala | 16 +- .../scala/monix/execution/FutureUtils.scala | 8 +- .../cancelables/AssignableCancelable.scala | 2 +- .../cancelables/BooleanCancelable.scala | 6 +- .../cancelables/CompositeCancelable.scala | 2 +- .../cancelables/MultiAssignCancelable.scala | 2 +- .../cancelables/OrderedCancelable.scala | 2 +- .../cancelables/RefCountCancelable.scala | 4 +- .../cancelables/SerialCancelable.scala | 2 +- .../cancelables/SingleAssignCancelable.scala | 2 +- .../cancelables/StackedCancelable.scala | 5 +- .../APIContractViolationException.scala | 4 +- .../execution/internal/GenericSemaphore.scala | 7 +- .../monix/execution/internal/GenericVar.scala | 4 +- .../monix/execution/internal/Newtype1.scala | 2 +- .../monix/execution/internal/RingBuffer.scala | 8 +- .../monix/execution/internal/Trampoline.scala | 4 +- .../collection/ChunkedArrayQueue.scala | 18 +- .../collection/ChunkedArrayStack.scala | 10 +- .../collection/DropAllOnOverflowQueue.scala | 22 +- .../collection/DropHeadOnOverflowQueue.scala | 22 +- .../internal/collection/LinkedMap.scala | 4 +- .../monix/execution/misc/CanBindLocals.scala | 3 + .../execution/misc/LocalDeprecated.scala | 2 + .../rstreams/SingleAssignSubscription.scala | 2 +- .../schedulers/BatchingScheduler.scala | 13 +- .../schedulers/ReferenceScheduler.scala | 2 +- .../schedulers/SchedulerService.scala | 2 + .../execution/schedulers/TestScheduler.scala | 4 +- .../schedulers/TrampolineScheduler.scala | 3 +- .../test/scala/monix/execution/AckSuite.scala | 64 ++-- .../monix/execution/AsyncQueueSuite.scala | 2 +- .../scala/monix/execution/CallbackSuite.scala | 8 +- .../execution/CancelablePromiseSuite.scala | 14 +- .../monix/execution/CancelableSuite.scala | 14 +- .../monix/execution/FutureUtilsSuite.scala | 2 +- .../CompositeCancelableSuite.scala | 2 + .../MultiAssignCancelableSuite.scala | 4 +- .../SingleAssignCancelableSuite.scala | 4 +- .../cancelables/StackedCancelableSuite.scala | 6 +- .../execution/internal/RingBufferSuite.scala | 2 +- .../DropAllOnOverflowQueueSuite.scala | 34 +- .../DropHeadOnOverflowQueueSuite.scala | 34 +- .../schedulers/ReferenceSchedulerSuite.scala | 2 +- .../schedulers/TestSchedulerSuite.scala | 22 +- .../schedulers/TrampolineSchedulerSuite.scala | 4 +- .../UncaughtExceptionReporterSuite.scala | 6 +- ...tractBackPressuredBufferedSubscriber.scala | 24 +- .../buffers/BatchedBufferedSubscriber.scala | 2 +- .../buffers/SyncBufferedSubscriber.scala | 16 +- .../internal/operators/DeflateOperator.scala | 6 +- .../internal/operators/GunzipOperator.scala | 8 +- .../internal/operators/GzipOperator.scala | 6 +- .../internal/operators/InflateOperator.scala | 8 +- ...tractBackPressuredBufferedSubscriber.scala | 12 +- .../buffers/BatchedBufferedSubscriber.scala | 2 + .../buffers/DropNewBufferedSubscriber.scala | 15 +- .../buffers/EvictingBufferedSubscriber.scala | 15 +- .../buffers/SimpleBufferedSubscriber.scala | 10 +- .../scala/monix/reactive/Observable.scala | 27 +- .../main/scala/monix/reactive/Observer.scala | 13 +- .../monix/reactive/OverflowStrategy.scala | 2 +- .../src/main/scala/monix/reactive/Pipe.scala | 4 + .../BufferedIteratorAsObservable.scala | 4 +- .../builders/CharsReaderObservable.scala | 4 +- .../internal/builders/ConsObservable.scala | 6 +- .../internal/builders/DeferObservable.scala | 4 +- .../builders/EvalAlwaysObservable.scala | 2 + .../builders/EvalOnceObservable.scala | 8 +- .../builders/FirstStartedObservable.scala | 2 +- .../builders/FutureAsObservable.scala | 2 + .../builders/InputStreamObservable.scala | 4 +- .../builders/Interleave2Observable.scala | 2 + .../IntervalFixedDelayObservable.scala | 5 +- .../IntervalFixedRateObservable.scala | 6 +- .../builders/IteratorAsObservable.scala | 4 +- .../builders/LinesReaderObservable.scala | 6 +- .../MergePrioritizedListObservable.scala | 3 + .../internal/builders/NowObservable.scala | 2 + .../builders/PaginateEvalObservable.scala | 2 + .../builders/PaginateObservable.scala | 10 +- .../internal/builders/RangeObservable.scala | 2 + .../builders/RepeatEvalObservable.scala | 2 + .../internal/builders/RepeatObservable.scala | 2 +- .../builders/RepeatOneObservable.scala | 2 + .../builders/RepeatedValueObservable.scala | 8 +- .../builders/ResourceCaseObservable.scala | 3 + .../builders/RunnableObservable.scala | 2 + .../builders/StateActionObservable.scala | 8 +- .../builders/TailRecMObservable.scala | 8 +- .../internal/builders/TaskAsObservable.scala | 2 + .../internal/builders/UnfoldObservable.scala | 8 +- .../builders/UnsafeCreateObservable.scala | 2 +- .../internal/builders/Zip2Observable.scala | 2 + .../internal/builders/Zip3Observable.scala | 2 + .../internal/builders/Zip4Observable.scala | 2 + .../internal/builders/Zip5Observable.scala | 2 + .../internal/builders/Zip6Observable.scala | 2 + .../consumers/ContraMapConsumer.scala | 2 +- .../consumers/FirstNotificationConsumer.scala | 2 +- .../internal/consumers/FoldLeftConsumer.scala | 4 +- .../consumers/FoldLeftTaskConsumer.scala | 2 +- .../internal/consumers/ForeachConsumer.scala | 2 +- .../consumers/FromObserverConsumer.scala | 2 +- .../internal/consumers/HeadConsumer.scala | 2 +- .../consumers/HeadOptionConsumer.scala | 2 +- .../consumers/LoadBalanceConsumer.scala | 14 +- .../consumers/TransformInputConsumer.scala | 2 + .../ObservableDeprecatedBuilders.scala | 2 + .../ObservableDeprecatedMethods.scala | 2 + .../operators/BufferSlidingOperator.scala | 16 +- .../operators/BufferTimedObservable.scala | 11 +- .../operators/BufferWhileOperator.scala | 8 +- .../BufferWithSelectorObservable.scala | 12 +- .../internal/operators/CollectOperator.scala | 2 +- .../operators/CollectWhileOperator.scala | 2 +- .../operators/ConcatMapIterableOperator.scala | 4 +- .../operators/ConcatMapObservable.scala | 12 +- .../internal/operators/ConcatObservable.scala | 4 +- .../internal/operators/CountOperator.scala | 4 +- .../operators/DebounceObservable.scala | 12 +- .../operators/DefaultIfEmptyOperator.scala | 4 +- .../operators/DelayBySelectorObservable.scala | 12 +- .../operators/DelayByTimespanObservable.scala | 15 +- .../DelayExecutionWithTriggerObservable.scala | 6 +- .../operators/DelayOnCompleteObservable.scala | 4 +- .../operators/DematerializeOperator.scala | 2 +- .../DistinctUntilChangedByKeyOperator.scala | 6 +- .../DistinctUntilChangedOperator.scala | 4 +- .../operators/DoOnEarlyStopOperator.scala | 2 +- .../operators/DoOnNextAckOperator.scala | 2 +- .../operators/DoOnStartOperator.scala | 4 +- .../operators/DoOnSubscribeObservable.scala | 7 +- .../DoOnSubscriptionCancelObservable.scala | 2 + .../operators/DoOnTerminateOperator.scala | 4 +- .../DownstreamTimeoutObservable.scala | 10 +- .../operators/DropByPredicateOperator.scala | 4 +- .../DropByPredicateWithIndexOperator.scala | 6 +- .../operators/DropByTimespanObservable.scala | 4 +- .../operators/DropFirstOperator.scala | 2 +- .../internal/operators/DropLastOperator.scala | 4 +- .../operators/DropUntilObservable.scala | 10 +- .../internal/operators/DumpObservable.scala | 2 +- .../internal/operators/EchoObservable.scala | 12 +- .../internal/operators/FailedOperator.scala | 2 + .../internal/operators/FilterOperator.scala | 2 +- .../operators/FlatScanObservable.scala | 14 +- .../operators/FoldLeftObservable.scala | 6 +- .../operators/FoldWhileLeftObservable.scala | 4 +- .../internal/operators/GroupByOperator.scala | 10 +- .../operators/GuaranteeCaseObservable.scala | 6 +- .../operators/IntersperseObservable.scala | 7 +- .../internal/operators/IsEmptyOperator.scala | 6 +- .../operators/MapAccumulateObservable.scala | 4 +- .../internal/operators/MapOperator.scala | 2 +- .../MapParallelOrderedObservable.scala | 12 +- .../MapParallelUnorderedObservable.scala | 8 +- .../operators/MapTaskObservable.scala | 8 +- .../operators/MaterializeOperator.scala | 6 +- .../operators/MergeMapObservable.scala | 10 +- .../OnCancelTriggerErrorObservable.scala | 2 +- .../OnErrorRecoverWithObservable.scala | 2 +- .../OnErrorRetryCountedObservable.scala | 4 +- .../operators/OnErrorRetryIfObservable.scala | 4 +- .../internal/operators/ReduceOperator.scala | 8 +- .../operators/RepeatSourceObservable.scala | 6 +- .../operators/RestartUntilObservable.scala | 4 +- .../internal/operators/ScanObservable.scala | 4 +- .../operators/ScanTaskObservable.scala | 12 +- .../operators/SearchByOrderOperator.scala | 10 +- .../operators/SwitchIfEmptyObservable.scala | 2 +- .../operators/SwitchMapObservable.scala | 10 +- .../operators/TakeByPredicateOperator.scala | 4 +- .../operators/TakeEveryNthOperator.scala | 2 +- .../operators/TakeLastObservable.scala | 6 +- .../TakeLeftByTimespanObservable.scala | 4 +- .../internal/operators/TakeLeftOperator.scala | 6 +- .../TakeWhileNotCanceledOperator.scala | 2 +- .../operators/ThrottleFirstOperator.scala | 4 +- .../operators/ThrottleLastObservable.scala | 10 +- .../operators/ThrottleLatestObservable.scala | 15 +- .../operators/UncancelableObservable.scala | 2 + .../operators/UpstreamTimeoutObservable.scala | 10 +- .../WhileBusyAggregateEventsOperator.scala | 10 +- ...WhileBusyDropEventsAndSignalOperator.scala | 8 +- .../WhileBusyDropEventsOperator.scala | 4 +- .../operators/WithLatestFromObservable.scala | 8 +- .../operators/ZipWithIndexOperator.scala | 2 +- .../ReactiveSubscriberAsMonixSubscriber.scala | 14 +- .../SubscriberAsReactiveSubscriber.scala | 30 +- .../subscribers/ForeachSubscriber.scala | 2 +- .../internal/util/PromiseCounter.scala | 4 +- .../observables/CachedObservable.scala | 5 +- .../observables/ConnectableObservable.scala | 13 +- .../observables/GroupedObservable.scala | 6 +- .../observables/RefCountObservable.scala | 8 +- .../CacheUntilConnectSubscriber.scala | 17 +- .../observers/ConnectableSubscriber.scala | 23 +- .../reactive/observers/SafeSubscriber.scala | 6 +- .../monix/reactive/observers/Subscriber.scala | 11 +- .../reactive/subjects/AsyncSubject.scala | 8 +- .../reactive/subjects/BehaviorSubject.scala | 4 +- .../reactive/subjects/ConcurrentSubject.scala | 15 +- .../reactive/subjects/PublishSubject.scala | 5 +- .../subjects/PublishToOneSubject.scala | 6 +- .../reactive/subjects/ReplaySubject.scala | 6 +- .../monix/reactive/subjects/Subject.scala | 7 +- .../scala/monix/reactive/subjects/Var.scala | 4 +- .../src/main/scala/monix/tail/Iterant.scala | 7 + .../scala/monix/tail/IterantBuilders.scala | 3 + .../monix/tail/batches/ArrayCursor.scala | 4 +- .../main/scala/monix/tail/batches/Batch.scala | 3 +- .../monix/tail/batches/BatchCursor.scala | 5 +- .../monix/tail/batches/GenericCursor.scala | 14 +- .../monix/tail/internal/IterantAttempt.scala | 6 +- .../monix/tail/internal/IterantBuffer.scala | 16 +- .../tail/internal/IterantCompleteL.scala | 8 +- .../IterantDistinctUntilChanged.scala | 2 +- .../monix/tail/internal/IterantDrop.scala | 4 +- .../monix/tail/internal/IterantDropLast.scala | 4 +- .../tail/internal/IterantDropWhile.scala | 2 +- .../internal/IterantDropWhileWithIndex.scala | 4 +- .../monix/tail/internal/IterantDump.scala | 4 +- .../tail/internal/IterantFoldLeftL.scala | 6 +- .../tail/internal/IterantFoldRightL.scala | 6 +- .../tail/internal/IterantFoldWhileLeftL.scala | 12 +- .../IterantFromReactivePublisher.scala | 12 +- .../tail/internal/IterantHeadOptionL.scala | 4 +- .../tail/internal/IterantInterleave.scala | 12 +- .../tail/internal/IterantIntersperse.scala | 4 +- .../monix/tail/internal/IterantMapEval.scala | 4 +- .../internal/IterantOnErrorHandleWith.scala | 4 +- .../tail/internal/IterantPushToChannel.scala | 8 +- .../monix/tail/internal/IterantReduce.scala | 8 +- .../monix/tail/internal/IterantRepeat.scala | 4 +- .../tail/internal/IterantRetryIfEmpty.scala | 6 +- .../monix/tail/internal/IterantScan.scala | 6 +- .../monix/tail/internal/IterantScanEval.scala | 4 +- .../tail/internal/IterantSwitchIfEmpty.scala | 6 +- .../monix/tail/internal/IterantTake.scala | 2 +- .../tail/internal/IterantTakeEveryNth.scala | 4 +- .../monix/tail/internal/IterantTakeLast.scala | 14 +- .../tail/internal/IterantTakeWhile.scala | 2 +- .../internal/IterantTakeWhileWithIndex.scala | 4 +- .../internal/IterantToReactivePublisher.scala | 23 +- .../monix/tail/internal/IterantZipMap.scala | 20 +- .../tail/internal/IterantZipWithIndex.scala | 4 +- project/MimaFilters.scala | 11 + project/plugins.sbt | 2 + 509 files changed, 2685 insertions(+), 6540 deletions(-) delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java delete mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java create mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedInt.java create mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedLong.java create mode 100644 monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedObject.java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41f5f554a..de7754ffc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,10 +14,10 @@ jobs: strategy: fail-fast: false matrix: - java: [ 8, 17 ] + java: [ 17, 21 ] # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it - scala: [ 2.13.18, 3.3.7 ] + scala: [ 2.13.18, 3.8.2 ] env: CI: true @@ -71,8 +71,8 @@ jobs: # WARN: build.sbt depends on this key path, as scalaVersion and # crossScalaVersions is determined from it include: - - { java: 8, scala: 2.13.18 } - - { java: 8, scala: 3.3.7 } + - { java: 17, scala: 2.13.18 } + - { java: 17, scala: 3.8.2 } env: CI: true @@ -127,8 +127,8 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.13.18 } - - { java: 8, scala: 3.3.7 } + - { java: 17, scala: 2.13.18 } + - { java: 17, scala: 3.8.2 } steps: - uses: actions/checkout@v4 @@ -174,8 +174,8 @@ jobs: fail-fast: false matrix: include: - - { java: 11, scala: 2.13.18 } - - { java: 11, scala: 3.3.7 } + - { java: 17, scala: 2.13.18 } + - { java: 17, scala: 3.8.2 } steps: - uses: actions/checkout@v4 @@ -221,8 +221,8 @@ jobs: fail-fast: false matrix: include: - - { java: 8, scala: 2.13.18 } - - { java: 8, scala: 3.3.7 } + - { java: 17, scala: 2.13.18 } + - { java: 17, scala: 3.8.2 } steps: - uses: actions/checkout@v4 @@ -284,7 +284,7 @@ jobs: - uses: actions/setup-java@v4 with: - java-version: 8 + java-version: 17 distribution: temurin - name: Install GnuPG2 diff --git a/.gitignore b/.gitignore index 94aa24606..3ed8919c3 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ metals.sbt .vscode .bsp *.sublime* +.sisyphus/ diff --git a/CHANGES.md b/CHANGES.md index dd7e9b1d8..57125f9b8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,19 @@ +## Version 3.5.0 (Mar 31, 2026) + +This release updates Monix 3.x support baselines for modern JVM and Scala toolchains. + +Breaking changes: + +- JDK `17` is now the minimum supported runtime and build target. +- JDK `21` is now part of the validated support matrix. +- Scala `2.12` support is dropped. +- Scala `3` is upgraded to `3.8.2`. +- Legacy `sun.misc.Unsafe`-based internals were removed in favor of JDK `VarHandle`-based implementations. + +This release was made possible by the work and feedback of: + +- Alexandru Nedelcu (@alexandru) + ## Version 3.4.1 (May 7, 2022) This is a minor bug-fixing release for the 3.x series. diff --git a/README.md b/README.md index 415120769..d97931e45 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,15 @@ a project exemplifying Monix used both on the server and on the client. ### Library dependency (sbt) +Compatibility baseline for Monix `3.5.x`: + +- JDK `17` minimum (`21` validated) +- Scala `2.13.18` and Scala `3.8.2` + For the stable release (compatible with Cats, and Cats-Effect 2.x): ```scala -libraryDependencies += "io.monix" %% "monix" % "3.4.1" +libraryDependencies += "io.monix" %% "monix" % "3.5.0" ``` ### Sub-projects diff --git a/build.sbt b/build.sbt index c87b8c11d..71a15a57e 100644 --- a/build.sbt +++ b/build.sbt @@ -52,7 +52,6 @@ val minitest_Version = "2.9.6" val implicitBox_Version = "0.3.4" val kindProjector_Version = "0.13.4" val betterMonadicFor_Version = "0.3.1" -val silencer_Version = "1.7.19" val scalaCompat_Version = "2.14.0" // The Monix version with which we must keep binary compatibility. @@ -116,10 +115,6 @@ lazy val scalaCollectionCompatLib = lazy val betterMonadicForCompilerPlugin = "com.olegpy" %% "better-monadic-for" % betterMonadicFor_Version -/** [[https://github.com/ghik/silencer]] */ -lazy val silencerCompilerPlugin = - "com.github.ghik" % "silencer-plugin" % silencer_Version cross CrossVersion.full - lazy val macroDependencies = Seq( libraryDependencies ++= ( @@ -209,22 +204,25 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // Silence various warnings in tests "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent" ) + case Some((3, _)) => Seq( + // Scala 3.8.x surfaces a very large warning volume in legacy tests and doctests. + // Keep -Werror for main sources, but silence test warnings to preserve CI signal. + "-Wconf:any:silent" + ) case _ => Seq.empty } }, - Seq(Compile, Test).map { x => - x / compile / scalacOptions --= { - val scalaV = scalaVersion.value - scalaBinaryVersion.value match { - case "3" => - Seq("-Xfatal-warnings") - case "2.13" if scalaV.startsWith("2.13.18") => - // Scala 2.13.18 has many new warnings, disable fatal warnings temporarily - Seq("-Xfatal-warnings") - case _ => - Seq.empty - } - } + // sbt-tpolecat 0.5.x in CI mode adds only ScalacOptions.fatalWarnings (-Xfatal-warnings), + // which is deprecated in Scala 3.6+ and itself causes a fatal error in 3.8+. + // Override tpolecatCiModeOptions to use the version-aware fatalWarningOptions from + // scalac-options 0.1.9, which emits -Werror for Scala 3.x and -Xfatal-warnings for older. + // Scala 2.13.18 introduced many new warnings; keep fatal warnings disabled there. + tpolecatCiModeOptions := { + val opts = tpolecatDevModeOptions.value ++ ScalacOptions.fatalWarningOptions + if (scalaBinaryVersion.value == "2.13" && scalaVersion.value.startsWith("2.13.18")) + opts -- ScalacOptions.fatalWarningOptions + else + opts }, // Turning off fatal warnings for doc generation @@ -243,31 +241,21 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // Silence everything in auto-generated files scalacOptions ++= { - val scalaV = scalaVersion.value if (isDotty.value) Seq.empty - else if (scalaV.startsWith("2.13.18")) - // For newer patch versions, silencer plugin may not be available, use @nowarn instead - Seq.empty else - Seq("-P:silencer:pathFilters=.*[/]src_managed[/].*") + Seq.empty }, // Syntax improvements, linting, etc. libraryDependencies ++= { - val scalaV = scalaVersion.value if (isDotty.value) Seq() else { - val basePlugins = Seq( + Seq( compilerPlugin(kindProjectorCompilerPlugin), compilerPlugin(betterMonadicForCompilerPlugin) ) - // silencer plugin is not available for all Scala patch versions - if (scalaV.startsWith("2.13.18")) - basePlugins - else - basePlugins :+ compilerPlugin(silencerCompilerPlugin) } }, libraryDependencies ++= Seq( diff --git a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala index f9804b54c..d61ffd4e2 100644 --- a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala +++ b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala @@ -21,6 +21,7 @@ package internal import java.util.concurrent.{ CancellationException, CompletableFuture, CompletionException } import java.util.function.BiFunction import cats.effect.{ Async, Concurrent } +import scala.annotation.nowarn private[catnap] abstract class FutureLiftForPlatform { /** @@ -50,8 +51,10 @@ private[catnap] abstract class FutureLiftForPlatform { * A generic function that subsumes both [[javaCompletableToConcurrent]] * and [[javaCompletableToAsync]]. */ + @nowarn("cat=deprecation") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def javaCompletableToConcurrentOrAsync[F[_], A](fa: F[CompletableFuture[A]])( - implicit F: Concurrent[F] OrElse Async[F] + implicit F: OrElse[Concurrent[F], Async[F]] ): F[A] = { F.unify match { @@ -65,8 +68,10 @@ private[catnap] abstract class FutureLiftForPlatform { * `java.util.concurrent.CompletableFuture` to any `Concurrent` * or `Async` data type. */ + @nowarn("cat=deprecation") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") implicit def javaCompletableLiftForConcurrentOrAsync[F[_]]( - implicit F: Concurrent[F] OrElse Async[F] + implicit F: OrElse[Concurrent[F], Async[F]] ): FutureLift[F, CompletableFuture] = { F.unify match { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala index bacf3bd90..50489a088 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala @@ -22,6 +22,7 @@ import cats.effect.{ CancelToken, Sync } import monix.catnap.cancelables.BooleanCancelableF import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.exceptions.CompositeException +import scala.annotation.nowarn import scala.collection.mutable.ListBuffer /** Represents a pure data structure that describes an effectful, @@ -84,8 +85,14 @@ object CancelableF { /** Builds a [[CancelableF]] reference from a sequence, * cancelling everything when `cancel` gets evaluated. */ + @nowarn("cat=deprecation") def collection[F[_]](refs: CancelableF[F]*)(implicit F: Sync[F]): CancelableF[F] = - wrap[F](cancelAll(refs: _*)) + wrap[F](cancelAllSeq(refs)) + + @nowarn("msg=Implicit parameters should be provided with a `using` clause") + private def cancelAllSeq[F[_]](seq: Seq[CancelableF[F]])(implicit F: Sync[F]): CancelToken[F] = + if (seq.isEmpty) F.unit + else F.defer(new CancelAllFrame[F](seq.iterator.map(_.cancel))(F).loop) /** Given a collection of cancelables, creates a token that * on evaluation will cancel them all. @@ -96,6 +103,7 @@ object CancelableF { * - for the JVM "Suppressed Exceptions" are used * - for JS they are wrapped in a `CompositeException` */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def cancelAll[F[_]](seq: CancelableF[F]*)(implicit F: Sync[F]): CancelToken[F] = { if (seq.isEmpty) F.unit @@ -114,6 +122,7 @@ object CancelableF { * - for the JVM "Suppressed Exceptions" are used * - for JS they are wrapped in a `CompositeException` */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def cancelAllTokens[F[_]](seq: CancelToken[F]*)(implicit F: Sync[F]): CancelToken[F] = { if (seq.isEmpty) F.unit @@ -133,7 +142,7 @@ object CancelableF { private final class CancelAllFrame[F[_]](cursor: Iterator[CancelToken[F]])(implicit F: Sync[F]) extends (Either[Throwable, Unit] => F[Unit]) { - private[this] val errors = ListBuffer.empty[Throwable] + private val errors = ListBuffer.empty[Throwable] def loop: CancelToken[F] = { if (cursor.hasNext) { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala index bc545dcfe..c848ac806 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala @@ -25,6 +25,7 @@ import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.atomic.{ Atomic, AtomicAny, PaddingStrategy } import monix.execution.exceptions.ExecutionRejectedException import monix.execution.internal.Constants +import scala.annotation.nowarn import scala.annotation.tailrec import scala.concurrent.duration._ @@ -212,7 +213,7 @@ final class CircuitBreaker[F[_]] private ( require(_maxResetTimeout > Duration.Zero, "maxResetTimeout > 0") import monix.catnap.CircuitBreaker._ - private[this] val stateRef = _stateRef + private val stateRef = _stateRef /** * The maximum count for allowed failures before opening the circuit breaker. @@ -269,7 +270,9 @@ final class CircuitBreaker[F[_]] private ( * be cancelable, to properly dispose of the registered * listener in case of cancellation. */ - def awaitClose(implicit F: Concurrent[F] OrElse Async[F]): F[Unit] = { + @nowarn("cat=deprecation") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") + def awaitClose(implicit F: OrElse[Concurrent[F], Async[F]]): F[Unit] = { val F0 = F.unify F0.defer { stateRef.get() match { @@ -286,7 +289,7 @@ final class CircuitBreaker[F[_]] private ( /** Function for counting failures in the `Closed` state, * triggering the `Open` state if necessary. */ - private[this] val maybeMarkOrResetFailures: (Either[Throwable, Any] => F[Any]) = { + private val maybeMarkOrResetFailures: (Either[Throwable, Any] => F[Any]) = { // Reschedule logic, for retries that come after a `Clock` query // and that can no longer be tail-recursive def reschedule[A](exit: Either[Throwable, A]): F[A] = @@ -734,6 +737,7 @@ object CircuitBreaker extends CircuitBreakerDocs { * @param padding $paddingParam */ @UnsafeBecauseImpure + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def unsafe( maxFailures: Int, resetTimeout: FiniteDuration, diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala index 3cd9959ec..c3477856a 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala @@ -29,6 +29,7 @@ import monix.execution.internal.collection.{ LowLevelConcurrentQueue => LowLevel import monix.execution.internal.{ Constants, Platform } import monix.execution.{ CancelablePromise, ChannelType } +import scala.annotation.nowarn import scala.annotation.{ switch, tailrec } import scala.collection.mutable.ArrayBuffer @@ -401,7 +402,7 @@ final class ConcurrentChannel[F[_], E, A] private ( * created consumer */ def consume: Resource[F, ConsumerF[F, E, A]] = consumeRef - private[this] val consumeRef = consumeWithConfig(defaultConsumerConfig) + private val consumeRef = consumeWithConfig(defaultConsumerConfig) /** Version of [[consume]] that allows for fine tuning the underlying * buffer used. @@ -497,8 +498,8 @@ final class ConcurrentChannel[F[_], E, A] private ( helpers.stopF } - private[this] val helpers = new Helpers[F] - private[this] val isFinished = () => + private val helpers = new Helpers[F] + private val isFinished = () => state.get() match { case Halt(e) => Some(e) case _ => None @@ -585,6 +586,7 @@ object ConcurrentChannel { * @param cs $csParam * @param F $concurrentParam */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") @UnsafeProtocol @UnsafeBecauseImpure def unsafe[F[_], E, A]( @@ -597,6 +599,7 @@ object ConcurrentChannel { /** * Returned by the [[apply]] builder. */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") final class ApplyBuilders[F[_]](val F: Concurrent[F]) extends AnyVal { /** * @see documentation for [[ConcurrentChannel.of]] @@ -640,8 +643,7 @@ object ConcurrentChannel { private object State { def empty[F[_], E, A]: State[F, E, A] = emptyRef.asInstanceOf[State[F, E, A]] - private[this] val emptyRef = - Connected[cats.Id, Any, Any](Set.empty, null) + private val emptyRef = Connected[cats.Id, Any, Any](Set.empty, null) } private type Ack = Int @@ -677,7 +679,7 @@ object ConcurrentChannel { triggerBroadcastR(refs, f, helpers.unitTest, F.unit, F.unit) } - private[this] def triggerBroadcastR[F[_], E, A, R]( + private def triggerBroadcastR[F[_], E, A, R]( refs: Array[ChanProducer[F, E, A]], f: ChanProducer[F, E, A] => F[R], canContinue: R => Boolean, @@ -720,7 +722,7 @@ object ConcurrentChannel { )(implicit F: Concurrent[F]) { @tailrec - private[this] def notifyConsumers(): Unit = { + private def notifyConsumers(): Unit = { // N.B. in case the queue is single-producer, this is a full memory fence // meant to prevent the re-ordering of `queue.offer` with `consumersAwait.get` queue.fenceOffer() @@ -802,7 +804,7 @@ object ConcurrentChannel { extends ConsumerF[F, E, A] { @tailrec - private[this] def notifyProducers(): Unit = + private def notifyProducers(): Unit = if (producersAwait ne null) { // N.B. in case this isn't a multi-consumer queue, this generates a // full memory fence in order to prevent the re-ordering of queue.poll() @@ -821,7 +823,7 @@ object ConcurrentChannel { } def pull: F[Either[E, A]] = pullRef - private[this] val pullRef: F[Either[E, A]] = { + private val pullRef: F[Either[E, A]] = { def end(e: E): Either[E, A] = { // Ensures a memory barrier (if needed for the queue's type) that prevents // the reordering of queue.poll with the previous state.get, from the diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala index 888e68512..ac10f8573 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala @@ -28,6 +28,7 @@ import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.internal.Constants import monix.execution.internal.collection.{ LowLevelConcurrentQueue => LowLevelQueue } import monix.execution.{ BufferCapacity, CancelablePromise, ChannelType } +import scala.annotation.nowarn import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer @@ -197,17 +198,16 @@ final class ConcurrentQueue[F[_], A] private ( */ @UnsafeProtocol def tryPoll: F[Option[A]] = tryPollRef - private[this] val tryPollRef = - F.delay(Option(tryPollUnsafe())) + private val tryPollRef = F.delay(Option(tryPollUnsafe())) /** Fetches a value from the queue, or if the queue is empty it awaits - * asynchronously until a value is made available. - * - * @return a task that when evaluated, will eventually complete - * after the value has been successfully pushed in the queue - */ + * asynchronously until a value is made available. + * + * @return a task that when evaluated, will eventually complete + * after the value has been successfully pushed in the queue + */ def poll: F[A] = pollRef - private[this] val pollRef = F.defer[A] { + private val pollRef = F.defer[A] { val happy = tryPollUnsafe() // noinspection ForwardReference if (happy != null) @@ -272,7 +272,7 @@ final class ConcurrentQueue[F[_], A] private ( */ def clear: F[Unit] = clearRef // noinspection ForwardReference - private[this] val clearRef = F.delay { + private val clearRef = F.delay { queue.clear() notifyProducers() } @@ -355,25 +355,21 @@ final class ConcurrentQueue[F[_], A] private ( ) } - private[this] val queue: LowLevelQueue[A] = - LowLevelQueue(capacity, channelType, fenced = true) - private[this] val helpers: QueueHelpers[F] = - new QueueHelpers[F] + private val queue: LowLevelQueue[A] = LowLevelQueue(capacity, channelType, fenced = true) + private val helpers: QueueHelpers[F] = new QueueHelpers[F] - private[this] val consumersAwaiting = - AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) + private val consumersAwaiting = AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) - private[this] val producersAwaiting = - if (capacity.isBounded) - AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) - else - null + private val producersAwaiting = if (capacity.isBounded) + AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) + else + null - private[this] val pollQueue: () => A = () => tryPollUnsafe() - private[this] val pollTest: A => Boolean = _ != null - private[this] val pollMap: A => A = a => a - private[this] val offerTest: Boolean => Boolean = x => x - private[this] val offerMap: Boolean => Unit = _ => () + private val pollQueue: () => A = () => tryPollUnsafe() + private val pollTest: A => Boolean = _ != null + private val pollMap: A => A = a => a + private val offerTest: Boolean => Boolean = x => x + private val offerMap: Boolean => Unit = _ => () private def toSeq(buffer: ArrayBuffer[A]): Seq[A] = buffer.toArray[Any].toSeq.asInstanceOf[Seq[A]] @@ -485,6 +481,7 @@ object ConcurrentQueue { * @param cs $csParam * @param F $concurrentParam */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") @UnsafeProtocol @UnsafeBecauseImpure def unsafe[F[_], A](capacity: BufferCapacity, channelType: ChannelType = MPMC)( @@ -499,6 +496,7 @@ object ConcurrentQueue { /** * Returned by the [[apply]] builder. */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") final class ApplyBuilders[F[_]](val F: Concurrent[F]) extends AnyVal { /** * @see documentation for [[ConcurrentQueue.bounded]] diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala index 9743c65fe..064ec2a70 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala @@ -22,6 +22,7 @@ import cats.effect.{ Async, Concurrent } import monix.execution.CancelableFuture import monix.execution.internal.AttemptCallback import monix.execution.schedulers.TrampolineExecutionContext.immediate +import scala.annotation.nowarn import scala.concurrent.{ Future => ScalaFuture } /** @@ -144,8 +145,10 @@ object FutureLift extends internal.FutureLiftForPlatform { * N.B. this works with [[monix.execution.CancelableFuture]] * if the given `Future` is such an instance. */ + @nowarn("cat=deprecation") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def scalaToConcurrentOrAsync[F[_], MF[T] <: ScalaFuture[T], A](fa: F[MF[A]])( - implicit F: Concurrent[F] OrElse Async[F] + implicit F: OrElse[Concurrent[F], Async[F]] ): F[A] = { F.unify match { @@ -161,8 +164,10 @@ object FutureLift extends internal.FutureLiftForPlatform { * [[scala.concurrent.Future]] or [[monix.execution.CancelableFuture]] to * any `Concurrent` or `Async` data type. */ + @nowarn("cat=deprecation") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") implicit def scalaFutureLiftForConcurrentOrAsync[F[_], MF[T] <: ScalaFuture[T]]( - implicit F: Concurrent[F] OrElse Async[F] + implicit F: OrElse[Concurrent[F], Async[F]] ): FutureLift[F, MF] = { F.unify match { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala index aaf362317..084163856 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala @@ -24,6 +24,7 @@ import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericVar import monix.execution.internal.GenericVar.Id +import scala.annotation.nowarn /** A mutable location, that is either empty or contains * a value of type `A`. @@ -200,15 +201,17 @@ object MVar { * * @see [[of]] and [[empty]] */ - def apply[F[_]](implicit F: Concurrent[F] OrElse Async[F]): ApplyBuilders[F] = + @nowarn("cat=deprecation") + def apply[F[_]](implicit F: OrElse[Concurrent[F], Async[F]]): ApplyBuilders[F] = new ApplyBuilders[F](F) /** * Builds an [[MVar]] instance with an `initial` value. */ + @nowarn("cat=deprecation") def of[F[_], A](initial: A, ps: PaddingStrategy = NoPadding)( implicit - F: Concurrent[F] OrElse Async[F], + F: OrElse[Concurrent[F], Async[F]], cs: ContextShift[F] ): F[MVar[F, A]] = { @@ -221,9 +224,10 @@ object MVar { /** * Builds an empty [[MVar]] instance. */ + @nowarn("cat=deprecation") def empty[F[_], A]( ps: PaddingStrategy = NoPadding - )(implicit F: Concurrent[F] OrElse Async[F], cs: ContextShift[F]): F[MVar[F, A]] = { + )(implicit F: OrElse[Concurrent[F], Async[F]], cs: ContextShift[F]): F[MVar[F, A]] = { F.fold( implicit F => F.delay(new MVar(new ConcurrentImpl(None, ps))), @@ -234,12 +238,14 @@ object MVar { /** * Returned by the [[apply]] builder. */ - final class ApplyBuilders[F[_]](val F: Concurrent[F] OrElse Async[F]) extends AnyVal { + @nowarn("cat=deprecation") + final class ApplyBuilders[F[_]](val F: OrElse[Concurrent[F], Async[F]]) extends AnyVal { /** * Builds an `MVar` with an initial value. * * @see documentation for [[MVar.of]] */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def of[A](a: A, ps: PaddingStrategy = NoPadding)(implicit cs: ContextShift[F]): F[MVar[F, A]] = MVar.of(a, ps)(F, cs) @@ -248,6 +254,7 @@ object MVar { * * @see documentation for [[MVar.empty]] */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def empty[A](ps: PaddingStrategy = NoPadding)(implicit cs: ContextShift[F]): F[MVar[F, A]] = MVar.empty(ps)(F, cs) } @@ -308,12 +315,12 @@ object MVar { unsafeRead(cb) } - private[this] val bindFork: (Unit => F[Unit]) = { + private val bindFork: (Unit => F[Unit]) = { val shift = cs.shift _ => shift } - private[this] val bindForkA: (Any => F[Any]) = { + private val bindForkA: (Any => F[Any]) = { val shift = cs.shift x => F.map(shift)(_ => x) } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala b/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala index 26148f125..44e1256c4 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/OrElse.scala @@ -33,12 +33,12 @@ sealed trait OrElse[+A, +B] { } object OrElse extends OrElse0 { - implicit def primary[A, B](implicit a: A): A OrElse B = + implicit def primary[A, B](implicit a: A): OrElse[A, B] = new Primary(a) } private[catnap] abstract class OrElse0 { - implicit def secondary[A, B](implicit b: B): A OrElse B = + implicit def secondary[A, B](implicit b: B): OrElse[A, B] = new Secondary(b) final class Primary[+A](value: A) extends OrElse[A, Nothing] { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala index 7881f14f9..489d037ac 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala @@ -25,6 +25,7 @@ import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericSemaphore import monix.execution.internal.GenericSemaphore.Listener +import scala.annotation.nowarn import scala.concurrent.Promise /** The `Semaphore` is an asynchronous semaphore implementation that @@ -66,13 +67,15 @@ import scala.concurrent.Promise * inspired by the implementation in Cats-Effect, which was ported * from FS2. */ +@nowarn("cat=deprecation") +@nowarn("msg=Implicit parameters should be provided with a `using` clause") final class Semaphore[F[_]] private (provisioned: Long, ps: PaddingStrategy)( implicit - F: Concurrent[F] OrElse Async[F], + F: OrElse[Concurrent[F], Async[F]], cs: ContextShift[F] ) extends cats.effect.concurrent.Semaphore[F] { - private[this] implicit val F0: Async[F] = F.unify + private val F0: Async[F] = F.unify /** Returns the number of permits currently available. Always non-negative. * @@ -212,8 +215,7 @@ final class Semaphore[F[_]] private (provisioned: Long, ps: PaddingStrategy)( def awaitAvailable(n: Long): F[Unit] = underlying.awaitAvailable(n) - private[this] val underlying = - new Semaphore.Impl[F](provisioned, ps) + private val underlying = new Semaphore.Impl[F](provisioned, ps)(F, F0, cs) } object Semaphore { @@ -232,9 +234,10 @@ object Semaphore { * @param cs is a `ContextShift` instance required in order to introduce * async boundaries after successful `acquire` operations, for safety */ + @nowarn("cat=deprecation") def apply[F[_]](provisioned: Long, ps: PaddingStrategy = NoPadding)( implicit - F: Concurrent[F] OrElse Async[F], + F: OrElse[Concurrent[F], Async[F]], cs: ContextShift[F] ): F[Semaphore[F]] = { @@ -259,9 +262,10 @@ object Semaphore { * async boundaries after successful `acquire` operations, for safety */ @UnsafeBecauseImpure + @nowarn("cat=deprecation") def unsafe[F[_]](provisioned: Long, ps: PaddingStrategy = NoPadding)( implicit - F: Concurrent[F] OrElse Async[F], + F: OrElse[Concurrent[F], Async[F]], cs: ContextShift[F] ): Semaphore[F] = new Semaphore[F](provisioned, ps) @@ -280,7 +284,7 @@ object Semaphore { private final class Impl[F[_]](provisioned: Long, ps: PaddingStrategy)( implicit - F: Concurrent[F] OrElse Async[F], + F: OrElse[Concurrent[F], Async[F]], F0: Async[F], cs: ContextShift[F] ) extends GenericSemaphore[F[Unit]](provisioned, ps) { @@ -325,13 +329,13 @@ object Semaphore { protected def makeCancelable(f: (Listener[Unit]) => Unit, p: Listener[Unit]): F[Unit] = F0.delay(f(p)) + @nowarn("msg=Implicit parameters should be provided with a `using` clause") private def make[A](k: (Either[Throwable, A] => Unit) => F[Unit]): F[A] = F.fold( F => F.cancelable(k), F => AsyncUtils.cancelable(k)(F) ) - private[this] val bindFork: (Unit => F[Unit]) = - _ => cs.shift + private val bindFork: (Unit => F[Unit]) = _ => cs.shift } } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala index a608baba4..b2a246d0e 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala @@ -22,6 +22,7 @@ import cats.Applicative import cats.effect.CancelToken import monix.catnap.CancelableF import monix.catnap.CancelableF.Empty +import scala.annotation.nowarn /** Represents a class of cancelable references that can hold * an internal reference to another cancelable (and thus has to @@ -62,7 +63,8 @@ object AssignableCancelableF { /** * Builds an [[AssignableCancelableF]] instance that's already canceled. */ - def alreadyCanceled[F[_]](implicit F: Applicative[F]): Bool[F] with Empty[F] = + @nowarn("msg=.*") + def alreadyCanceled[F[_]](implicit F: Applicative[F]): Bool[F] = new Bool[F] with Empty[F] { def set(ref: CancelableF[F]): F[Unit] = ref.cancel def isCanceled: F[Boolean] = F.pure(true) diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala index 06770a818..72063a687 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala @@ -24,6 +24,7 @@ import monix.catnap.CancelableF import monix.catnap.CancelableF.Empty import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.atomic.Atomic +import scala.annotation.nowarn /** * Represents a [[CancelableF]] that can be queried for the @@ -71,7 +72,8 @@ object BooleanCancelableF { * Returns an instance of a [[BooleanCancelableF]] that's * already canceled. */ - def alreadyCanceled[F[_]](implicit F: Applicative[F]): BooleanCancelableF[F] with Empty[F] = + @nowarn("msg=.*") + def alreadyCanceled[F[_]](implicit F: Applicative[F]): BooleanCancelableF[F] = new BooleanCancelableF[F] with Empty[F] { val isCanceled = F.pure(true) def cancel = F.unit @@ -91,8 +93,8 @@ object BooleanCancelableF { private final class Impl[F[_]](token: CancelToken[F])(implicit F: Sync[F]) extends BooleanCancelableF[F] { - private[this] val canceled = Atomic(false) - private[this] var ref = token + private val canceled = Atomic(false) + private var ref = token def isCanceled = F.delay(canceled.get()) diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala index b73075599..727e971a9 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/SingleAssignCancelableF.scala @@ -36,7 +36,7 @@ final class SingleAssignCancelableF[F[_]] private (extra: CancelableF[F])(implic extends AssignableCancelableF.Bool[F] { import SingleAssignCancelableF._ - private[this] val state = Atomic(Empty: State[F]) + private val state = Atomic(Empty: State[F]) val isCanceled: F[Boolean] = F.delay(state.get() match { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala b/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala index ec8f4da1a..ced0de153 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/internal/QueueHelpers.scala @@ -26,7 +26,7 @@ import scala.annotation.tailrec private[catnap] class QueueHelpers[F[_]](implicit F: Concurrent[F], cs: ContextShift[F]) { - private[this] val asyncBoundary: F[Unit] = cs.shift + private val asyncBoundary: F[Unit] = cs.shift @tailrec final def sleepThenRepeat[T, U]( diff --git a/monix-catnap/shared/src/main/scala/monix/execution/package.scala b/monix-catnap/shared/src/main/scala/monix/execution/package.scala index 5b5a529bb..c6fb86073 100644 --- a/monix-catnap/shared/src/main/scala/monix/execution/package.scala +++ b/monix-catnap/shared/src/main/scala/monix/execution/package.scala @@ -40,9 +40,8 @@ package object execution { implicit def contravariantCallback[E]: Contravariant[Callback[E, *]] = contravariantRef.asInstanceOf[Contravariant[Callback[E, *]]] - private[this] val contravariantRef: Contravariant[Callback[Any, *]] = - new Contravariant[Callback[Any, *]] { - override def contramap[A, B](cb: Callback[Any, A])(f: B => A): Callback[Any, B] = - cb.contramap(f) - } + private val contravariantRef: Contravariant[Callback[Any, *]] = new Contravariant[Callback[Any, *]] { + override def contramap[A, B](cb: Callback[Any, A])(f: B => A): Callback[Any, B] = + cb.contramap(f) + } } diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala index b89fe523d..df827abae 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala @@ -16,10 +16,12 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect.IO import minitest.SimpleTestSuite +@nowarn object CancelableFSuite extends SimpleTestSuite { test("apply") { var effect = 0 diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala index 3948cf178..64dff22b6 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CircuitBreakerSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect._ import cats.implicits._ @@ -27,6 +28,7 @@ import monix.execution.schedulers.TestScheduler import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object CircuitBreakerSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() def tearDown(env: TestScheduler): Unit = diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala index 15e39a676..d86347b28 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect.{ ContextShift, IO, Timer } import cats.implicits._ @@ -30,6 +31,7 @@ import monix.execution.{ BufferCapacity, Scheduler, TestUtils } import scala.concurrent.TimeoutException import scala.concurrent.duration._ +@nowarn object ConcurrentChannelFakeSuite extends BaseConcurrentChannelSuite[TestScheduler] { def setup() = TestScheduler() def tearDown(env: TestScheduler): Unit = diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala index e542b46e5..941a53dd6 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentQueueSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import java.util.concurrent.atomic.AtomicLong @@ -32,6 +33,7 @@ import scala.collection.immutable.Queue import scala.concurrent.TimeoutException import scala.concurrent.duration._ +@nowarn object ConcurrentQueueFakeSuite extends BaseConcurrentQueueSuite[TestScheduler] { def setup() = TestScheduler() diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala index 4d3d611bc..46d1cffbe 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/FutureLiftSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect.{ Async, ContextShift, IO } import minitest.TestSuite @@ -26,6 +27,7 @@ import monix.execution.{ Cancelable, CancelableFuture } import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success } +@nowarn object FutureLiftSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() def tearDown(env: TestScheduler): Unit = diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala index ec672ebf6..77f25edee 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/MVarConcurrentSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect.concurrent.{ Deferred, Ref } import cats.effect.{ ContextShift, IO, Timer } @@ -26,6 +27,7 @@ import monix.execution.internal.Platform import scala.concurrent.duration._ +@nowarn object MVarConcurrentSuite extends BaseMVarSuite { def init[A](a: A): IO[MVar[IO, A]] = MVar[IO](OrElse.primary(IO.ioConcurrentEffect)).of(a)(cs) diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala index 88f2c4af9..850d66397 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect.{ ContextShift, IO } import cats.implicits._ @@ -25,6 +26,7 @@ import monix.execution.schedulers.TestScheduler import scala.concurrent.{ ExecutionContext, Promise } import scala.util.{ Random, Success } +@nowarn object SemaphoreSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() def tearDown(env: TestScheduler): Unit = diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala index d4f13bc6f..b040e1b80 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/TestSchedulerEffectSuite.scala @@ -16,6 +16,7 @@ */ package monix.catnap +import scala.annotation.nowarn import cats.effect.{ ContextShift, IO } import minitest.TestSuite @@ -24,6 +25,7 @@ import monix.execution.schedulers.TestScheduler import scala.concurrent.duration._ import scala.util.Success +@nowarn object TestSchedulerEffectSuite extends TestSuite[TestScheduler] { def setup() = TestScheduler() def tearDown(env: TestScheduler): Unit = { diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala index f20bcad7d..0155fff5a 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala @@ -17,11 +17,13 @@ package monix.catnap package cancelables +import scala.annotation.nowarn import cats.effect.IO import minitest.SimpleTestSuite import monix.execution.exceptions.{ CompositeException, DummyException } +@nowarn object SingleAssignCancelableFSuite extends SimpleTestSuite { test("cancel") { var effect = 0 diff --git a/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala b/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala index 4a5e4bacb..a61085fe3 100644 --- a/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala +++ b/monix-eval/jvm/src/main/scala/monix/eval/internal/TaskRunSyncUnsafe.scala @@ -188,8 +188,8 @@ private[eval] object TaskRunSyncUnsafe { private final class BlockingCallback[A](latch: OneShotLatch) extends Callback[Throwable, A] { - private[this] var success: A = _ - private[this] var error: Throwable = _ + private var success: A = null.asInstanceOf[A] + private var error: Throwable = null.asInstanceOf[Throwable] def value: A = error match { diff --git a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala index 3ad4450f4..ecc7c8852 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala @@ -181,6 +181,7 @@ import scala.util.{ Failure, Success, Try } * it might be better to pass such a reference around as * a parameter. */ +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") sealed abstract class Coeval[+A] extends (() => A) with Serializable { self => import monix.eval.Coeval._ @@ -1646,7 +1647,7 @@ object Coeval extends CoevalInstancesLevel0 { * a `Monoid[Coeval[A]]` implementation. */ implicit def catsMonoid[A](implicit A: Monoid[A]): Monoid[Coeval[A]] = - new CatsMonadToMonoid[Coeval, A]()(CatsSyncForCoeval, A) + new CatsMonadToMonoid[Coeval, A]() } private[eval] abstract class CoevalInstancesLevel0 extends CoevalDeprecatedCompanion { @@ -1658,5 +1659,5 @@ private[eval] abstract class CoevalInstancesLevel0 extends CoevalDeprecatedCompa * in order to avoid conflicts. */ implicit def catsSemigroup[A](implicit A: Semigroup[A]): Semigroup[Coeval[A]] = - new CatsMonadToSemigroup[Coeval, A]()(Coeval.catsSync, A) + new CatsMonadToSemigroup[Coeval, A]() } diff --git a/monix-eval/shared/src/main/scala/monix/eval/Task.scala b/monix-eval/shared/src/main/scala/monix/eval/Task.scala index db4369a20..c2d761935 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Task.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Task.scala @@ -471,6 +471,8 @@ import scala.annotation.unused * it might be better to pass such a reference around as * a parameter. */ +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=unused value of type") sealed abstract class Task[+A] extends Serializable with TaskDeprecated.BinCompat[A] { import cats.effect.Async import monix.eval.Task._ @@ -2868,7 +2870,7 @@ object Task extends TaskInstancesLevel1 { * `Task` value is cancelable if the source is */ def fromConcurrentEffect[F[_], A](fa: F[A])(implicit F: ConcurrentEffect[F]): Task[A] = - TaskConversions.fromConcurrentEffect(fa)(F) + TaskConversions.fromConcurrentEffect(fa) /** Builds a [[Task]] instance out of any data type that implements * [[https://typelevel.org/cats-effect/typeclasses/async.html Async]] and @@ -3613,7 +3615,7 @@ object Task extends TaskInstancesLevel1 { * It's a simple version of [[traverse]]. */ def sequence[A, M[X] <: Iterable[X]](in: M[Task[A]])(implicit bf: BuildFrom[M[Task[A]], A, M[A]]): Task[M[A]] = - TaskSequence.list(in)(bf) + TaskSequence.list(in) /** Given a `Iterable[A]` and a function `A => Task[B]`, sequentially * apply the function to each element of the collection and gather their @@ -3624,7 +3626,7 @@ object Task extends TaskInstancesLevel1 { def traverse[A, B, M[X] <: Iterable[X]](in: M[A])(f: A => Task[B])( implicit bf: BuildFrom[M[A], B, M[B]] ): Task[M[B]] = - TaskSequence.traverse(in, f)(bf) + TaskSequence.traverse(in, f) /** * Returns the given argument if `cond` is true, otherwise `Task.Unit` @@ -4564,11 +4566,10 @@ object Task extends TaskInstancesLevel1 { implicit def forCancelableDummy[T <: Cancelable.Empty]: AsyncBuilder[T] = forCancelableDummyRef.asInstanceOf[AsyncBuilder[T]] - private[this] val forCancelableDummyRef: AsyncBuilder[Cancelable.Empty] = - new AsyncBuilder[Cancelable.Empty] { - def create[A](register: (Scheduler, Callback[Throwable, A]) => Cancelable.Empty): Task[A] = - TaskCreate.async0(register) - } + private val forCancelableDummyRef: AsyncBuilder[Cancelable.Empty] = new AsyncBuilder[Cancelable.Empty] { + def create[A](register: (Scheduler, Callback[Throwable, A]) => Cancelable.Empty): Task[A] = + TaskCreate.async0(register) + } } private[Task] abstract class AsyncBuilder0 { @@ -4580,11 +4581,10 @@ object Task extends TaskInstancesLevel1 { implicit def forCancelable[T <: Cancelable]: AsyncBuilder[T] = forCancelableRef.asInstanceOf[AsyncBuilder[T]] - private[this] val forCancelableRef = - new AsyncBuilder[Cancelable] { - def create[A](register: (Scheduler, Callback[Throwable, A]) => Cancelable): Task[A] = - TaskCreate.cancelableCancelable(register) - } + private val forCancelableRef = new AsyncBuilder[Cancelable] { + def create[A](register: (Scheduler, Callback[Throwable, A]) => Cancelable): Task[A] = + TaskCreate.cancelableCancelable(register) + } } /** Internal API — The `Context` under which [[Task]] is supposed to be executed. @@ -4653,7 +4653,7 @@ object Task extends TaskInstancesLevel1 { Callback.callSuccess(cb, value) Task.unit } else { - super.runAsyncOptF(cb)(s, opts) + super.runAsyncOptF(cb) } } @@ -4668,7 +4668,7 @@ object Task extends TaskInstancesLevel1 { Callback.callSuccess(cb, value) Cancelable.empty } else { - super.runAsyncOpt(cb)(s, opts) + super.runAsyncOpt(cb) } } @@ -4681,7 +4681,7 @@ object Task extends TaskInstancesLevel1 { if (s.executionModel != AlwaysAsyncExecution) Callback.callSuccess(cb, value) else - super.runAsyncUncancelableOpt(cb)(s, opts) + super.runAsyncUncancelableOpt(cb) } // Optimization to avoid the run-loop @@ -4699,7 +4699,7 @@ object Task extends TaskInstancesLevel1 { Callback.callError(cb, e) Task.unit } else { - super.runAsyncOptF(cb)(s, opts) + super.runAsyncOptF(cb) } } @@ -4714,7 +4714,7 @@ object Task extends TaskInstancesLevel1 { Callback.callError(cb, e) Cancelable.empty } else { - super.runAsyncOpt(cb)(s, opts) + super.runAsyncOpt(cb) } } @@ -4731,7 +4731,7 @@ object Task extends TaskInstancesLevel1 { if (s.executionModel != AlwaysAsyncExecution) Callback.callError(cb, e) else - super.runAsyncUncancelableOpt(cb)(s, opts) + super.runAsyncUncancelableOpt(cb) } } @@ -4822,8 +4822,7 @@ object Task extends TaskInstancesLevel1 { TaskRunLoop.startFull(source, context, cb, null, null, null, context.frameRef()) /** Internal, reusable reference. */ - private[this] val neverRef: Async[Nothing] = - Async((_, _) => (), trampolineBefore = false, trampolineAfter = false) + private val neverRef: Async[Nothing] = Async((_, _) => (), trampolineBefore = false, trampolineAfter = false) /** Internal, reusable reference. */ private val nowConstructor: Any => Task[Nothing] = @@ -4924,7 +4923,7 @@ private[eval] abstract class TaskInstancesLevel1 extends TaskInstancesLevel0 { * a `Monoid[ Task[A] ]` implementation. */ implicit def catsMonoid[A](implicit A: Monoid[A]): Monoid[Task[A]] = - new CatsMonadToMonoid[Task, A]()(CatsConcurrentForTask, A) + new CatsMonadToMonoid[Task, A]() } private[eval] abstract class TaskInstancesLevel0 extends TaskParallelNewtype { @@ -4973,7 +4972,7 @@ private[eval] abstract class TaskInstancesLevel0 extends TaskParallelNewtype { * in order to avoid conflicts. */ implicit def catsSemigroup[A](implicit A: Semigroup[A]): Semigroup[Task[A]] = - new CatsMonadToSemigroup[Task, A]()(CatsConcurrentForTask, A) + new CatsMonadToSemigroup[Task, A]() } private[eval] abstract class TaskParallelNewtype extends TaskContextShift { diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala index 647e72c1f..7ae9abb05 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala @@ -60,6 +60,7 @@ import monix.execution.Scheduler * * Works on top of JavaScript as well ;-) */ +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") trait TaskApp { // To implement ... def run(args: List[String]): Task[ExitCode] diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala index adf824248..f5ecf4667 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala @@ -43,6 +43,7 @@ trait TaskLift[F[_]] extends (Task ~> F) { def apply[A](task: Task[A]): F[A] } +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") object TaskLift extends TaskLiftImplicits0 { /** * Returns the available [[TaskLift]] instance for `F`. @@ -81,6 +82,7 @@ object TaskLift extends TaskLiftImplicits0 { } } +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") private[eval] abstract class TaskLiftImplicits0 extends TaskLiftImplicits1 { /** * Instance for converting to any type implementing @@ -93,6 +95,7 @@ private[eval] abstract class TaskLiftImplicits0 extends TaskLiftImplicits1 { } } +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") private[eval] abstract class TaskLiftImplicits1 extends TaskLiftImplicits2 { /** * Instance for converting to any type implementing @@ -105,6 +108,7 @@ private[eval] abstract class TaskLiftImplicits1 extends TaskLiftImplicits2 { } } +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") private[eval] abstract class TaskLiftImplicits2 { /** * Instance for converting to any type implementing diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala index 50385ea3d..a09b7b024 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLocal.scala @@ -278,14 +278,13 @@ object TaskLocal { private def checkPropagation[A](fa: Task[A]): Task[A] = ContextSwitch(fa, checkPropagationRef, null) - private[this] val checkPropagationRef: Task.Context => Task.Context = - ctx => { - if (!ctx.options.localContextPropagation) { - throw new APIContractViolationException( - "Support for TaskLocal usage isn't active! " + - "See documentation at: https://monix.io/api/current/monix/eval/TaskLocal.html" - ) - } - ctx + private val checkPropagationRef: Task.Context => Task.Context = ctx => { + if (!ctx.options.localContextPropagation) { + throw new APIContractViolationException( + "Support for TaskLocal usage isn't active! " + + "See documentation at: https://monix.io/api/current/monix/eval/TaskLocal.html" + ) } + ctx + } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala index cb8ab6989..5b388720d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/instances/CatsEffectForTask.scala @@ -44,7 +44,7 @@ class CatsEffectForTask(implicit s: Scheduler, opts: Task.Options) extends CatsB * inherit directly from it, the implicits priorities don't * work, triggering conflicts. */ - private[this] val F = CatsConcurrentForTask + private val F = CatsConcurrentForTask override def runAsync[A](fa: Task[A])(cb: Either[Throwable, A] => IO[Unit]): SyncIO[Unit] = TaskEffect.runAsync(fa)(cb) @@ -86,7 +86,7 @@ class CatsConcurrentEffectForTask(implicit s: Scheduler, opts: Task.Options) * inherit directly from it, the implicits priorities don't * work, triggering conflicts. */ - private[this] val F = CatsConcurrentForTask + private val F = CatsConcurrentForTask override def runCancelable[A](fa: Task[A])(cb: Either[Throwable, A] => IO[Unit]): SyncIO[CancelToken[Task]] = TaskEffect.runCancelable(fa)(cb) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala index 00caa73d9..c085691fa 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala @@ -22,10 +22,11 @@ import cats.effect.ExitCase import monix.execution.internal.Platform import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object CoevalBracket { /** - * Implementation for `Coeval.bracketE`. - */ +* Implementation for `Coeval.bracketE`. +*/ def either[A, B]( acquire: Coeval[A], use: A => Coeval[B], @@ -41,8 +42,8 @@ private[eval] object CoevalBracket { } /** - * Implementation for `Coeval.bracketCase`. - */ +* Implementation for `Coeval.bracketCase`. +*/ def exitCase[A, B]( acquire: Coeval[A], use: A => Coeval[B], diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala index e658a4af7..b95f19b55 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala @@ -26,6 +26,7 @@ import monix.eval.internal.TracingPlatform.{ enhancedExceptions, isStackTracing import scala.reflect.NameTransformer import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object CoevalRunLoop { private type Current = Coeval[Any] private type Bind = Any => Coeval[Any] @@ -178,10 +179,10 @@ private[eval] object CoevalRunLoop { } /** - * If stack tracing and contextual exceptions are enabled, this - * function will rewrite the stack trace of a captured exception - * to include the async stack trace. - */ +* If stack tracing and contextual exceptions are enabled, this +* function will rewrite the stack trace of a captured exception +* to include the async stack trace. +*/ private[internal] def augmentException(ex: Throwable, ctx: CoevalStackTracedContext): Unit = { val stackTrace = ex.getStackTrace if (stackTrace.nonEmpty) { @@ -211,7 +212,7 @@ private[eval] object CoevalRunLoop { private def dropRunLoopFrames(frames: Array[StackTraceElement]): Array[StackTraceElement] = frames.takeWhile(ste => !runLoopFilter.exists(ste.getClassName.startsWith(_))) - private[this] val runLoopFilter = List( + private val runLoopFilter = List( "monix.eval.", "scala.runtime." ) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala index f6bc92c54..f1b7e8415 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalStackTracedContext.scala @@ -22,9 +22,9 @@ import monix.eval.internal.TracingPlatform.traceBufferLogSize import monix.execution.internal.RingBuffer private[eval] final class CoevalStackTracedContext { - private[this] val events: RingBuffer[CoevalEvent] = new RingBuffer(traceBufferLogSize) - private[this] var captured: Int = 0 - private[this] var omitted: Int = 0 + private val events: RingBuffer[CoevalEvent] = new RingBuffer(traceBufferLogSize) + private var captured: Int = 0 + private var omitted: Int = 0 def pushEvent(fr: CoevalEvent): Unit = { captured += 1 diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala index d1bfe5e84..b3517d033 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala @@ -26,8 +26,8 @@ import monix.eval.tracing.CoevalEvent /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ +@scala.annotation.nowarn private[eval] object CoevalTracing { - def decorated[A](source: Coeval[A]): Coeval[A] = Trace(source, buildFrame()) @@ -52,9 +52,8 @@ private[eval] object CoevalTracing { CoevalEvent.StackTrace(new Throwable().getStackTrace.toList) /** - * Global cache for trace frames. Keys are references to lambda classes. - * Should converge to the working set of traces very quickly for hot code paths. - */ - private[this] val frameCache: ConcurrentHashMap[Class[_], CoevalEvent] = new ConcurrentHashMap() - +* Global cache for trace frames. Keys are references to lambda classes. +* Should converge to the working set of traces very quickly for hot code paths. +*/ + private val frameCache: ConcurrentHashMap[Class[_], CoevalEvent] = new ConcurrentHashMap() } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala index 0ac4e2a8e..cb70d0e99 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala @@ -37,11 +37,12 @@ private[eval] abstract class ForkedRegister[A] extends AbstractFunction2[Context def apply(context: Context, cb: Callback[Throwable, A]): Unit } +@scala.annotation.nowarn private[eval] object ForkedRegister { /** - * Returns `true` if the given task is known to fork execution, - * or `false` otherwise. - */ +* Returns `true` if the given task is known to fork execution, +* or `false` otherwise. +*/ @tailrec def detect(task: Task[_], limit: Int = 8): Boolean = { if (limit > 0) task match { case Async(_: ForkedRegister[_], _, _, _, _) => true diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala index 69fd504da..91ba9eb75 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala @@ -37,7 +37,7 @@ import scala.util.control.NonFatal final private[internal] class ForwardCancelable private () { import ForwardCancelable._ - private[this] val state = new AtomicReference[State](init) + private val state = new AtomicReference[State](init) val cancel: CancelToken[Task] = { @tailrec def loop(ctx: Task.Context, cb: Callback[Throwable, Unit]): Unit = @@ -75,24 +75,26 @@ final private[internal] class ForwardCancelable private () { } } +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=unused value of type") private[internal] object ForwardCancelable { /** - * Builds reference. - */ + * Builds reference. + */ def apply(): ForwardCancelable = new ForwardCancelable /** - * Models the internal state of [[ForwardCancelable]]: - * - * - on start, the state is [[Empty]] of `Nil`, aka [[init]] - * - on `cancel`, if no token was assigned yet, then the state will - * remain [[Empty]] with a non-nil `List[Callback]` - * - if a `CancelToken` is provided without `cancel` happening, - * then the state transitions to [[Active]] mode - * - on `cancel`, if the state was [[Active]], or if it was [[Empty]], - * regardless, the state transitions to `Active(IO.unit)`, aka [[finished]] - */ + * Models the internal state of [[ForwardCancelable]]: + * + * - on start, the state is [[Empty]] of `Nil`, aka [[init]] + * - on `cancel`, if no token was assigned yet, then the state will + * remain [[Empty]] with a non-nil `List[Callback]` + * - if a `CancelToken` is provided without `cancel` happening, + * then the state transitions to [[Active]] mode + * - on `cancel`, if the state was [[Active]], or if it was [[Empty]], + * regardless, the state transitions to `Active(IO.unit)`, aka [[finished]] + */ sealed abstract private class State final private case class Empty(stack: List[Callback[Throwable, Unit]]) extends State diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala index ddbdfd264..c5615a114 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala @@ -68,6 +68,7 @@ private[eval] sealed abstract class FrameIndexRef { def reset(): Unit } +@scala.annotation.nowarn private[eval] object FrameIndexRef { /** Builds a [[FrameIndexRef]]. */ def apply(em: ExecutionModel): FrameIndexRef = @@ -76,15 +77,15 @@ private[eval] object FrameIndexRef { case BatchedExecution(_) => new Local } - // Keeps our frame index in a thread-local +// Keeps our frame index in a thread-local private final class Local extends FrameIndexRef { - private[this] val local = ThreadLocal(1) + private val local = ThreadLocal(1) def apply(): FrameIndex = local.get() def `:=`(update: FrameIndex): Unit = local.set(update) def reset(): Unit = local.reset() } - // Dummy implementation that doesn't do anything +// Dummy implementation that doesn't do anything private object Dummy extends FrameIndexRef { def apply(): FrameIndex = 1 def `:=`(update: FrameIndex): Unit = () diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala index c5319c85b..b85013710 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala @@ -37,8 +37,8 @@ import scala.util.control.NonFatal */ private[eval] final class LazyVal[A] private (f: () => A, val cacheErrors: Boolean) extends (() => Coeval.Eager[A]) { - private[this] var thunk = f - private[this] var cache: Coeval.Eager[A] = _ + private var thunk = f + private var cache: Coeval.Eager[A] = null.asInstanceOf[Coeval.Eager[A]] override def apply(): Coeval.Eager[A] = cache match { @@ -69,6 +69,7 @@ private[eval] final class LazyVal[A] private (f: () => A, val cacheErrors: Boole } } +@scala.annotation.nowarn private[eval] object LazyVal { /** Builder. */ def apply[A](f: () => A, cacheErrors: Boolean): (() => Coeval.Eager[A]) = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala index 1d6395dad..1ba1b3137 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala @@ -28,6 +28,7 @@ private[eval] abstract class StackFrame[-A, +R] extends (A => R) { self => def recover(e: Throwable): R } +@scala.annotation.nowarn private[eval] object StackFrame { /** [[StackFrame]] used in the implementation of `redeemWith`. */ final class RedeemWith[-A, +R](fe: Throwable => R, fa: A => R) extends StackFrame[A, R] { @@ -37,8 +38,8 @@ private[eval] object StackFrame { } /** [[StackFrame]] reference that only handles errors, - * useful for quick filtering of `onErrorHandleWith` frames. - */ +* useful for quick filtering of `onErrorHandleWith` frames. +*/ final class ErrorHandler[-A, +R](fe: Throwable => R, fa: A => R) extends StackFrame[A, R] { def apply(a: A): R = fa(a) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala index 28a466c4c..c898a69cd 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/StackTracedContext.scala @@ -25,9 +25,9 @@ import monix.execution.internal.RingBuffer * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ private[eval] final class StackTracedContext { - private[this] val events: RingBuffer[TaskEvent] = new RingBuffer(traceBufferLogSize) - private[this] var captured: Int = 0 - private[this] var omitted: Int = 0 + private val events: RingBuffer[TaskEvent] = new RingBuffer(traceBufferLogSize) + private var captured: Int = 0 + private var omitted: Int = 0 def pushEvent(fr: TaskEvent): Unit = { captured += 1 diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala index 5ed8e002c..8d8eb4931 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala @@ -27,11 +27,11 @@ import monix.execution.internal.Platform import scala.concurrent.Promise import scala.util.control.NonFatal -private[monix] object TaskBracket { - - // ----------------------------------------------------------------- - // Task.guaranteeCase - // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=unused value of type") +private[monix] object TaskBracket { // ----------------------------------------------------------------- +// Task.guaranteeCase +// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= def guaranteeCase[A](task: Task[A], finalizer: ExitCase[Throwable] => Task[Unit]): Task[A] = TracedAsync( @@ -78,13 +78,13 @@ private[monix] object TaskBracket { releaseFn(ExitCase.Canceled) } - // ----------------------------------------------------------------- - // Task.bracketE - // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// ----------------------------------------------------------------- +// Task.bracketE +// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= /** - * [[monix.eval.Task.bracket]] and [[monix.eval.Task.bracketCase]] - */ + * [[monix.eval.Task.bracket]] and [[monix.eval.Task.bracketCase]] + */ def either[A, B]( acquire: Task[A], use: A => Task[B], @@ -123,13 +123,13 @@ private[monix] object TaskBracket { release(a, leftNone) } - // ----------------------------------------------------------------- - // Task.bracketCase - // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// ----------------------------------------------------------------- +// Task.bracketCase +// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= /** - * [[monix.eval.Task.bracketE]] - */ + * [[monix.eval.Task.bracketE]] + */ def exitCase[A, B](acquire: Task[A], use: A => Task[B], release: (A, ExitCase[Throwable]) => Task[Unit]): Task[B] = TracedAsync( new StartCase(acquire, use, release), @@ -162,9 +162,9 @@ private[monix] object TaskBracket { release(a, Canceled) } - // ----------------------------------------------------------------- - // Base Implementation - // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// ----------------------------------------------------------------- +// Base Implementation +// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private abstract class BaseStart[A, B](acquire: Task[A], use: A => Task[B]) extends ((Context, Callback[Throwable, B]) => Unit) { @@ -210,8 +210,8 @@ private[monix] object TaskBracket { } private abstract class BaseReleaseFrame[A, B](ctx: Context, a: A) extends StackFrame[B, Task[B]] { - private[this] val waitsForResult = Atomic(true) - private[this] val p: Promise[Unit] = Promise() + private val waitsForResult = Atomic(true) + private val p: Promise[Unit] = Promise() protected def releaseOnSuccess(a: A, b: B): Task[Unit] protected def releaseOnError(a: A, e: Throwable): Task[Unit] protected def releaseOnCancel(a: A): Task[Unit] @@ -292,12 +292,10 @@ private[monix] object TaskBracket { private val leftNone = Left(None) - private[this] val withConnectionUncancelable: Context => Context = - _.withConnection(TaskConnection.uncancelable) + private val withConnectionUncancelable: Context => Context = _.withConnection(TaskConnection.uncancelable) - private[this] val disableUncancelableAndPop: (Any, Throwable, Context, Context) => Context = - (_, _, old, _) => { - old.connection.pop() - old - } + private val disableUncancelableAndPop: (Any, Throwable, Context, Context) => Context = (_, _, old, _) => { + old.connection.pop() + old + } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala index 70882091a..9fc74060d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala @@ -24,16 +24,17 @@ import monix.execution.{ Callback, Scheduler } import monix.execution.atomic.{ Atomic, AtomicBoolean } import monix.execution.schedulers.TrampolinedRunnable +@scala.annotation.nowarn private[eval] object TaskCancellation { /** - * Implementation for `Task.uncancelable`. - */ +* Implementation for `Task.uncancelable`. +*/ def uncancelable[A](fa: Task[A]): Task[A] = Task.ContextSwitch(fa, withConnectionUncancelable, restoreConnection) /** - * Implementation for `Task.onCancelRaiseError`. - */ +* Implementation for `Task.onCancelRaiseError`. +*/ def raiseError[A](fa: Task[A], e: Throwable): Task[A] = { val start = (ctx: Context, cb: Callback[Throwable, A]) => { implicit val sc = ctx.scheduler @@ -60,8 +61,8 @@ private[eval] object TaskCancellation { )(implicit s: Scheduler) extends Callback[Throwable, A] with TrampolinedRunnable { - private[this] var value: A = _ - private[this] var error: Throwable = _ + private var value: A = null.asInstanceOf[A] + private var error: Throwable = null.asInstanceOf[Throwable] def run(): Unit = { val e = error @@ -105,15 +106,13 @@ private[eval] object TaskCancellation { } } - private[this] val withConnectionUncancelable: Context => Context = - ct => { - ct.withConnection(TaskConnection.uncancelable) - .withOptions(ct.options.disableAutoCancelableRunLoops) - } + private val withConnectionUncancelable: Context => Context = ct => { + ct.withConnection(TaskConnection.uncancelable) + .withOptions(ct.options.disableAutoCancelableRunLoops) + } - private[this] val restoreConnection: (Any, Throwable, Context, Context) => Context = - (_, _, old, ct) => { - ct.withConnection(old.connection) - .withOptions(old.options) - } + private val restoreConnection: (Any, Throwable, Context, Context) => Context = (_, _, old, ct) => { + ct.withConnection(old.connection) + .withOptions(old.options) + } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala index 4e78f3e09..36f809620 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala @@ -117,15 +117,16 @@ private[eval] sealed abstract class TaskConnection extends CancelableF[Task] { def toCancelable(implicit s: Scheduler): Cancelable } +@scala.annotation.nowarn private[eval] object TaskConnection { /** Builder for [[TaskConnection]]. */ def apply(): TaskConnection = new Impl /** - * Reusable [[TaskConnection]] reference that cannot - * be canceled. - */ +* Reusable [[TaskConnection]] reference that cannot +* be canceled. +*/ val uncancelable: TaskConnection = new Uncancelable @@ -143,11 +144,10 @@ private[eval] object TaskConnection { } private final class Impl extends TaskConnection { self => - private[this] val state = - Atomic.withPadding( - (List.empty[AnyRef], Promise[Unit]()), - PaddingStrategy.LeftRight128 - ) + private val state = Atomic.withPadding( + (List.empty[AnyRef], Promise[Unit]()), + PaddingStrategy.LeftRight128 + ) val cancel = Task.suspend { state.transformAndExtract { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala index 76b249192..d493cd028 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala @@ -143,10 +143,11 @@ private[eval] final class TaskConnectionComposite private (stateRef: AtomicAny[S } } +@scala.annotation.nowarn private[eval] object TaskConnectionComposite { /** - * Builder for [[TaskConnectionComposite]]. - */ +* Builder for [[TaskConnectionComposite]]. +*/ def apply(initial: CancelToken[Task]*): TaskConnectionComposite = new TaskConnectionComposite(Atomic.withPadding(Active(Set(initial: _*)): State, LeftRight128)) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala index 8a58d0f22..a5367345c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala @@ -92,13 +92,14 @@ private[eval] final class TaskConnectionRef extends CancelableF[Task] { ) } - private[this] val state = Atomic(Empty: State) + private val state = Atomic(Empty: State) } +@scala.annotation.nowarn private[eval] object TaskConnectionRef { /** - * Returns a new `TaskForwardConnection` reference. - */ +* Returns a new `TaskForwardConnection` reference. +*/ def apply(): TaskConnectionRef = new TaskConnectionRef() private sealed trait State diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala index 99154e880..a1746f152 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala @@ -28,10 +28,11 @@ import monix.execution.rstreams.SingleAssignSubscription import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object TaskConversions { /** - * Implementation for `Task#toIO`. - */ +* Implementation for `Task#toIO`. +*/ def toIO[A](source: Task[A])(implicit eff: ConcurrentEffect[Task]): IO[A] = source match { case Task.Now(value) => IO.pure(value) @@ -44,8 +45,8 @@ private[eval] object TaskConversions { } /** - * Implementation for `Task#toConcurrent`. - */ +* Implementation for `Task#toConcurrent`. +*/ def toConcurrent[F[_], A](source: Task[A])(implicit F: Concurrent[F], eff: ConcurrentEffect[Task]): F[A] = source match { case Task.Now(value) => F.pure(value) @@ -59,8 +60,8 @@ private[eval] object TaskConversions { } /** - * Implementation for `Task#toAsync`. - */ +* Implementation for `Task#toAsync`. +*/ def toAsync[F[_], A](source: Task[A])(implicit F: Async[F], eff: Effect[Task]): F[A] = source match { case Task.Now(value) => F.pure(value) @@ -73,8 +74,8 @@ private[eval] object TaskConversions { } /** - * Implementation for `Task.from`. - */ +* Implementation for `Task.from`. +*/ def fromEffect[F[_], A](fa: F[A])(implicit F: Effect[F]): Task[A] = fa.asInstanceOf[AnyRef] match { case ref: Task[A] @unchecked => ref @@ -101,8 +102,8 @@ private[eval] object TaskConversions { } /** - * Implementation for `Task.fromConcurrent`. - */ +* Implementation for `Task.fromConcurrent`. +*/ def fromConcurrentEffect[F[_], A](fa: F[A])(implicit F: ConcurrentEffect[F]): Task[A] = fa.asInstanceOf[AnyRef] match { case ref: Task[A] @unchecked => ref @@ -111,14 +112,14 @@ private[eval] object TaskConversions { } /** - * Implementation for `Task.fromReactivePublisher`. - */ +* Implementation for `Task.fromReactivePublisher`. +*/ def fromReactivePublisher[A](source: Publisher[A]): Task[Option[A]] = Task.cancelable0 { (scheduler, cb) => val sub = SingleAssignSubscription() source.subscribe(new Subscriber[A] { - private[this] var isActive = true + private var isActive = true def onSubscribe(s: org.reactivestreams.Subscription): Unit = { sub := s @@ -178,8 +179,8 @@ private[eval] object TaskConversions { private final class CreateCallback[A](conn: TaskConnection, cb: Callback[Throwable, A])(implicit s: Scheduler) extends (Either[Throwable, A] => IO[Unit]) with TrampolinedRunnable { - private[this] var canCall = true - private[this] var value: Either[Throwable, A] = _ + private var canCall = true + private var value: Either[Throwable, A] = null.asInstanceOf[Either[Throwable, A]] def run(): Unit = { if (canCall) { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala index 654b5654a..d9cccd236 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala @@ -30,16 +30,17 @@ import monix.execution.{ Callback, Cancelable, Scheduler, UncaughtExceptionRepor import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object TaskCreate { /** - * Implementation for `cats.effect.Concurrent#cancelable`. - */ +* Implementation for `cats.effect.Concurrent#cancelable`. +*/ def cancelableEffect[A](k: (Either[Throwable, A] => Unit) => CancelToken[Task]): Task[A] = cancelable0((_, cb) => k(cb)) /** - * Implementation for `Task.cancelable` - */ +* Implementation for `Task.cancelable` +*/ def cancelable0[A](fn: (Scheduler, Callback[Throwable, A]) => CancelToken[Task]): Task[A] = { val start = new Cancelable0Start[A, CancelToken[Task]](fn) { def setConnection(ref: TaskConnectionRef, token: CancelToken[Task])(implicit s: Scheduler): Unit = @@ -49,14 +50,14 @@ private[eval] object TaskCreate { } /** - * Implementation for `Task.create`, used via `TaskBuilder`. - */ +* Implementation for `Task.create`, used via `TaskBuilder`. +*/ def cancelableIO[A](start: (Scheduler, Callback[Throwable, A]) => CancelToken[IO]): Task[A] = cancelable0((sc, cb) => Task.from(start(sc, cb))) /** - * Implementation for `Task.create`, used via `TaskBuilder`. - */ +* Implementation for `Task.create`, used via `TaskBuilder`. +*/ def cancelableCancelable[A](fn: (Scheduler, Callback[Throwable, A]) => Cancelable): Task[A] = { val start = new Cancelable0Start[A, Cancelable](fn) { def setConnection(ref: TaskConnectionRef, token: Cancelable)(implicit s: Scheduler): Unit = @@ -66,14 +67,14 @@ private[eval] object TaskCreate { } /** - * Implementation for `Task.create`, used via `TaskBuilder`. - */ +* Implementation for `Task.create`, used via `TaskBuilder`. +*/ def cancelableCoeval[A](start: (Scheduler, Callback[Throwable, A]) => Coeval[Unit]): Task[A] = cancelable0((sc, cb) => Task.from(start(sc, cb))) /** - * Implementation for `Task.async0` - */ +* Implementation for `Task.async0` +*/ def async0[A](fn: (Scheduler, Callback[Throwable, A]) => Any): Task[A] = { val start = (ctx: Context, cb: Callback[Throwable, A]) => { implicit val s = ctx.scheduler @@ -92,11 +93,11 @@ private[eval] object TaskCreate { } /** - * Implementation for `cats.effect.Async#async`. - * - * It duplicates the implementation of `Task.async0` with the purpose - * of avoiding extraneous callback allocations. - */ +* Implementation for `cats.effect.Async#async`. +* +* It duplicates the implementation of `Task.async0` with the purpose +* of avoiding extraneous callback allocations. +*/ def async[A](k: Callback[Throwable, A] => Unit): Task[A] = { val start = (ctx: Context, cb: Callback[Throwable, A]) => { implicit val s = ctx.scheduler @@ -114,8 +115,8 @@ private[eval] object TaskCreate { } /** - * Implementation for `Task.asyncF`. - */ +* Implementation for `Task.asyncF`. +*/ def asyncF[A](k: Callback[Throwable, A] => Task[Unit]): Task[A] = { val start = (ctx: Context, cb: Callback[Throwable, A]) => { implicit val s = ctx.scheduler @@ -179,10 +180,10 @@ private[eval] object TaskCreate { private final class CallbackForCreate[A](ctx: Context, threadId: Long, shouldPop: Boolean, cb: Callback[Throwable, A]) extends Callback[Throwable, A] with TrampolinedRunnable { - private[this] val state = AtomicInt(0) - private[this] var value: A = _ - private[this] var error: Throwable = _ - private[this] var isSameThread = false + private val state = AtomicInt(0) + private var value: A = null.asInstanceOf[A] + private var error: Throwable = null.asInstanceOf[Throwable] + private var isSameThread = false def this(ctx: Context, shouldPop: Boolean, cb: Callback[Throwable, A]) = this(ctx, Platform.currentThreadId(), shouldPop, cb) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala index 1b9650299..a70bb01a8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala @@ -23,6 +23,7 @@ import monix.eval.Task.Context import monix.execution.Scheduler import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object TaskDeferAction { /** Implementation for `Task.deferAction`. */ def apply[A](f: Scheduler => Task[A]): Task[A] = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala index 4c98ebf89..3c7e419a1 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala @@ -27,17 +27,18 @@ import monix.execution.{ Callback, Cancelable, CancelableFuture, Scheduler } import scala.annotation.unchecked.uncheckedVariance import scala.util.{ Failure, Success, Try } +@scala.annotation.nowarn private[eval] object TaskDeprecated { /** - * BinCompat trait describing deprecated `Task` operations. - */ +* BinCompat trait describing deprecated `Task` operations. +*/ private[eval] trait BinCompat[+A] { self: Task[A] => /** - * DEPRECATED — subsumed by [[Task.startAndForget startAndForget]]. - * - * Renamed to `startAndForget` to be consistent with `start` which - * also enforces an asynchronous boundary - */ +* DEPRECATED — subsumed by [[Task.startAndForget startAndForget]]. +* +* Renamed to `startAndForget` to be consistent with `start` which +* also enforces an asynchronous boundary +*/ @deprecated("Replaced with startAndForget", since = "3.0.0") def forkAndForget: Task[Unit] = { // $COVERAGE-OFF$ @@ -47,18 +48,18 @@ private[eval] object TaskDeprecated { } /** - * Extension methods describing deprecated `Task` operations. - */ +* Extension methods describing deprecated `Task` operations. +*/ private[eval] trait Extensions[+A] extends Any { def self: Task[A] /** - * DEPRECATED — renamed to [[Task.runToFuture runToFuture]], otherwise - * due to overloading we can get a pretty bad conflict with the - * callback-driven [[Task.runAsync]]. - * - * The naming is also nice for discovery. - */ +* DEPRECATED — renamed to [[Task.runToFuture runToFuture]], otherwise +* due to overloading we can get a pretty bad conflict with the +* callback-driven [[Task.runAsync]]. +* +* The naming is also nice for discovery. +*/ @UnsafeBecauseImpure @deprecated("Renamed to Task.runToFuture", since = "3.0.0") def runAsync(implicit s: Scheduler): CancelableFuture[A] = { @@ -68,12 +69,12 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — renamed to [[Task.runToFutureOpt runAsyncOpt]], - * otherwise due to overloading we can get a pretty bad conflict with the - * callback-driven [[Task.runToFutureOpt]]. - * - * The naming is also nice for discovery. - */ +* DEPRECATED — renamed to [[Task.runToFutureOpt runAsyncOpt]], +* otherwise due to overloading we can get a pretty bad conflict with the +* callback-driven [[Task.runToFutureOpt]]. +* +* The naming is also nice for discovery. +*/ @UnsafeBecauseImpure @deprecated("Renamed to Task.runAsyncOpt", since = "3.0.0") def runAsyncOpt(implicit s: Scheduler, opts: Task.Options): CancelableFuture[A] = { @@ -83,17 +84,17 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — switch to [[Task.runSyncStep]] or to [[Task.runToFuture]]. - * - * The [[Task.runToFuture runToFuture]] operation that returns - * [[monix.execution.CancelableFuture CancelableFuture]] will - * return already completed future values, useful for low level - * optimizations. All this `runSyncMaybe` did was to piggyback - * on it. - * - * The reason for the deprecation is to reduce the unneeded - * "run" overloads. - */ +* DEPRECATED — switch to [[Task.runSyncStep]] or to [[Task.runToFuture]]. +* +* The [[Task.runToFuture runToFuture]] operation that returns +* [[monix.execution.CancelableFuture CancelableFuture]] will +* return already completed future values, useful for low level +* optimizations. All this `runSyncMaybe` did was to piggyback +* on it. +* +* The reason for the deprecation is to reduce the unneeded +* "run" overloads. +*/ @UnsafeBecauseImpure @deprecated("Please use `Task.runSyncStep`", since = "3.0.0") def runSyncMaybe(implicit s: Scheduler): Either[CancelableFuture[A], A] = { @@ -103,18 +104,18 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — switch to [[Task.runSyncStepOpt]] or to - * [[Task.runToFutureOpt(implicit* runAsync]]. - * - * The [[Task.runToFutureOpt(implicit* runAsyncOpt]] variant that returns - * [[monix.execution.CancelableFuture CancelableFuture]] will - * return already completed future values, useful for low level - * optimizations. All this `runSyncMaybeOpt` did was to piggyback - * on it. - * - * The reason for the deprecation is to reduce the unneeded - * "run" overloads. - */ +* DEPRECATED — switch to [[Task.runSyncStepOpt]] or to +* [[Task.runToFutureOpt(implicit* runAsync]]. +* +* The [[Task.runToFutureOpt(implicit* runAsyncOpt]] variant that returns +* [[monix.execution.CancelableFuture CancelableFuture]] will +* return already completed future values, useful for low level +* optimizations. All this `runSyncMaybeOpt` did was to piggyback +* on it. +* +* The reason for the deprecation is to reduce the unneeded +* "run" overloads. +*/ @UnsafeBecauseImpure @deprecated("Please use `Task.runAsyncOpt`", since = "3.0.0") def runSyncMaybeOpt(implicit s: Scheduler, opts: Options): Either[CancelableFuture[A], A] = { @@ -123,7 +124,7 @@ private[eval] object TaskDeprecated { // $COVERAGE-ON$ } - private[this] def runSyncMaybeOptPrv(implicit s: Scheduler, opts: Options): Either[CancelableFuture[A], A] = { + private def runSyncMaybeOptPrv(implicit s: Scheduler, opts: Options): Either[CancelableFuture[A], A] = { // $COVERAGE-OFF$ val future = self.runToFutureOpt(s, opts) future.value match { @@ -139,21 +140,21 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — switch to [[Task.runToFuture]] in combination - * with [[monix.execution.Callback.fromTry Callback.fromTry]] - * instead. - * - * If for example you have a `Try[A] => Unit` function, you can - * replace usage of `runOnComplete` with: - * - * `task.runAsync(Callback.fromTry(f))` - * - * A more common usage is via Scala's `Promise`, but with - * a `Promise` reference this construct would be even more - * efficient: - * - * `task.runAsync(Callback.fromPromise(p))` - */ +* DEPRECATED — switch to [[Task.runToFuture]] in combination +* with [[monix.execution.Callback.fromTry Callback.fromTry]] +* instead. +* +* If for example you have a `Try[A] => Unit` function, you can +* replace usage of `runOnComplete` with: +* +* `task.runAsync(Callback.fromTry(f))` +* +* A more common usage is via Scala's `Promise`, but with +* a `Promise` reference this construct would be even more +* efficient: +* +* `task.runAsync(Callback.fromPromise(p))` +*/ @UnsafeBecauseImpure @deprecated("Please use `Task.runAsync`", since = "3.0.0") def runOnComplete(f: Try[A] => Unit)(implicit s: Scheduler): Cancelable = { @@ -163,11 +164,11 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — use [[Task.redeem redeem]] instead. - * - * [[Task.redeem]] is the same operation, but with a different name and the - * function parameters in an inverted order, to make it consistent with `fold` - * on `Either` and others (i.e. the function for error recovery is at the left). - */ +* +* [[Task.redeem]] is the same operation, but with a different name and the +* function parameters in an inverted order, to make it consistent with `fold` +* on `Either` and others (i.e. the function for error recovery is at the left). +*/ @deprecated("Please use `Task.redeem`", since = "3.0.0-RC2") def transform[R](fa: A => R, fe: Throwable => R): Task[R] = { // $COVERAGE-OFF$ @@ -176,11 +177,11 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — use [[Task.redeemWith redeemWith]] instead. - * - * [[Task.redeemWith]] is the same operation, but with a different name and the - * function parameters in an inverted order, to make it consistent with `fold` - * on `Either` and others (i.e. the function for error recovery is at the left). - */ +* +* [[Task.redeemWith]] is the same operation, but with a different name and the +* function parameters in an inverted order, to make it consistent with `fold` +* on `Either` and others (i.e. the function for error recovery is at the left). +*/ @deprecated("Please use `Task.redeemWith`", since = "3.0.0-RC2") def transformWith[R](fa: A => Task[R], fe: Throwable => Task[R]): Task[R] = { // $COVERAGE-OFF$ @@ -189,8 +190,8 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — switch to [[Task.parZip2]], which has the same behavior. - */ +* DEPRECATED — switch to [[Task.parZip2]], which has the same behavior. +*/ @deprecated("Switch to Task.parZip2", since = "3.0.0-RC2") def zip[B](that: Task[B]): Task[(A, B)] = { // $COVERAGE-OFF$ @@ -199,16 +200,16 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — switch to [[Task.parMap2]], which has the same behavior. - */ +* DEPRECATED — switch to [[Task.parMap2]], which has the same behavior. +*/ @deprecated("Use Task.parMap2", since = "3.0.0-RC2") def zipMap[B, C](that: Task[B])(f: (A, B) => C): Task[C] = Task.mapBoth(self, that)(f) /** DEPRECATED — renamed to [[Task.executeAsync executeAsync]]. - * - * The reason for the deprecation is the repurposing of the word "fork". - */ +* +* The reason for the deprecation is the repurposing of the word "fork". +*/ @deprecated("Renamed to Task!.executeAsync", "3.0.0") def executeWithFork: Task[A] = { // $COVERAGE-OFF$ @@ -217,25 +218,25 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — please use [[Task.flatMap flatMap]]. - * - * The reason for the deprecation is that this operation is - * redundant, as it can be expressed with `flatMap`, with the - * same effect: - * {{{ - * import monix.eval.Task - * - * val trigger = Task(println("do it")) - * val task = Task(println("must be done now")) - * trigger.flatMap(_ => task) - * }}} - * - * The syntax provided by Cats can also help: - * {{{ - * import cats.syntax.all._ - * - * trigger *> task - * }}} - */ +* +* The reason for the deprecation is that this operation is +* redundant, as it can be expressed with `flatMap`, with the +* same effect: +* {{{ +* import monix.eval.Task +* +* val trigger = Task(println("do it")) +* val task = Task(println("must be done now")) +* trigger.flatMap(_ => task) +* }}} +* +* The syntax provided by Cats can also help: +* {{{ +* import cats.syntax.all._ +* +* trigger *> task +* }}} +*/ @deprecated("Please use flatMap", "3.0.0") def delayExecutionWith(trigger: Task[Any]): Task[A] = { // $COVERAGE-OFF$ @@ -244,19 +245,19 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — please use [[Task.flatMap flatMap]]. - * - * The reason for the deprecation is that this operation is - * redundant, as it can be expressed with `flatMap` and `map`, - * with the same effect: - * - * {{{ - * import monix.eval.Task - * - * val task = Task(5) - * val selector = (n: Int) => Task(n.toString) - * task.flatMap(a => selector(a).map(_ => a)) - * }}} - */ +* +* The reason for the deprecation is that this operation is +* redundant, as it can be expressed with `flatMap` and `map`, +* with the same effect: +* +* {{{ +* import monix.eval.Task +* +* val task = Task(5) +* val selector = (n: Int) => Task(n.toString) +* task.flatMap(a => selector(a).map(_ => a)) +* }}} +*/ @deprecated("Please rewrite in terms of flatMap", "3.0.0") def delayResultBySelector[B](selector: A => Task[B]): Task[A] = { // $COVERAGE-OFF$ @@ -265,13 +266,13 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — since Monix 3.0 the `Task` implementation has switched - * to auto-cancelable run-loops by default (which can still be turned off - * in its configuration). - * - * For ensuring the old behavior, you can use - * [[Task.executeWithOptions executeWithOptions]]. - */ +* DEPRECATED — since Monix 3.0 the `Task` implementation has switched +* to auto-cancelable run-loops by default (which can still be turned off +* in its configuration). +* +* For ensuring the old behavior, you can use +* [[Task.executeWithOptions executeWithOptions]]. +*/ @deprecated("Switch to executeWithOptions(_.enableAutoCancelableRunLoops)", "3.0.0") def cancelable: Task[A] = { // $COVERAGE-OFF$ @@ -280,12 +281,12 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — subsumed by [[Task.start start]]. - * - * To be consistent with cats-effect 1.1.0, `start` now - * enforces an asynchronous boundary, being exactly the same - * as `fork` from 3.0.0-RC1 - */ +* DEPRECATED — subsumed by [[Task.start start]]. +* +* To be consistent with cats-effect 1.1.0, `start` now +* enforces an asynchronous boundary, being exactly the same +* as `fork` from 3.0.0-RC1 +*/ @deprecated("Replaced with start", since = "3.0.0-RC2") def fork: Task[Fiber[A @uncheckedVariance]] = { // $COVERAGE-OFF$ @@ -294,9 +295,9 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — replace with usage of [[Task.runSyncStep]]: - * - * `task.coeval <-> Coeval(task.runSyncStep)` - */ +* +* `task.coeval <-> Coeval(task.runSyncStep)` +*/ @deprecated("Replaced with Coeval(task.runSyncStep)", since = "3.0.0-RC2") def coeval(implicit s: Scheduler): Coeval[Either[CancelableFuture[A], A]] = { // $COVERAGE-OFF$ @@ -305,16 +306,16 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — replace with usage of [[Task.to]]: - * - * {{{ - * import cats.effect.IO - * import monix.execution.Scheduler.Implicits.global - * import monix.eval.Task - * - * Task(1 + 1).to[IO] - * }}} - */ +* DEPRECATED — replace with usage of [[Task.to]]: +* +* {{{ +* import cats.effect.IO +* import monix.execution.Scheduler.Implicits.global +* import monix.eval.Task +* +* Task(1 + 1).to[IO] +* }}} +*/ @deprecated("Switch to task.to[IO]", since = "3.0.0-RC3") def toIO(implicit eff: ConcurrentEffect[Task]): IO[A] = { // $COVERAGE-OFF$ @@ -378,9 +379,9 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — please use [[Task!.executeAsync .executeAsync]]. - * - * The reason for the deprecation is the repurposing of the word "fork". - */ +* +* The reason for the deprecation is the repurposing of the word "fork". +*/ @deprecated("Please use Task!.executeAsync", "3.0.0") def fork[A](fa: Task[A]): Task[A] = { // $COVERAGE-OFF$ @@ -389,9 +390,9 @@ private[eval] object TaskDeprecated { } /** DEPRECATED — please use [[Task.executeOn .executeOn]]. - * - * The reason for the deprecation is the repurposing of the word "fork". - */ +* +* The reason for the deprecation is the repurposing of the word "fork". +*/ @deprecated("Please use Task!.executeOn", "3.0.0") def fork[A](fa: Task[A], s: Scheduler): Task[A] = { // $COVERAGE-OFF$ @@ -400,8 +401,8 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — please use [[Task.from]]. - */ +* DEPRECATED — please use [[Task.from]]. +*/ @deprecated("Please use Task.from", "3.0.0") def fromEval[A](a: cats.Eval[A]): Task[A] = { // $COVERAGE-OFF$ @@ -410,8 +411,8 @@ private[eval] object TaskDeprecated { } /** - * DEPRECATED — please use [[Task.from]]. - */ +* DEPRECATED — please use [[Task.from]]. +*/ @deprecated("Please use Task.from", "3.0.0") def fromIO[A](ioa: IO[A]): Task[A] = { // $COVERAGE-OFF$ diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala index 9c69a8417..60fca9b25 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala @@ -23,10 +23,11 @@ import monix.eval.Task import monix.execution.exceptions.CallbackCalledMultipleTimesException import monix.execution.schedulers.TrampolinedRunnable +@scala.annotation.nowarn private[eval] object TaskDoOnCancel { /** - * Implementation for `Task.doOnCancel` - */ +* Implementation for `Task.doOnCancel` +*/ def apply[A](self: Task[A], callback: Task[Unit]): Task[A] = { if (callback eq Task.unit) { self @@ -43,9 +44,9 @@ private[eval] object TaskDoOnCancel { private final class CallbackThatPops[A](ctx: Task.Context, cb: Callback[Throwable, A]) extends Callback[Throwable, A] with TrampolinedRunnable { - private[this] var isActive = true - private[this] var value: A = _ - private[this] var error: Throwable = _ + private var isActive = true + private var value: A = null.asInstanceOf[A] + private var error: Throwable = null.asInstanceOf[Throwable] override def onSuccess(value: A): Unit = if (!tryOnSuccess(value)) { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala index 171bcf7cc..4432bcf13 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala @@ -29,10 +29,11 @@ import scala.util.control.NonFatal * `Task` integration utilities for the `cats.effect.ConcurrentEffect` * instance, provided in `monix.eval.instances`. */ +@scala.annotation.nowarn private[eval] object TaskEffect { /** - * `cats.effect.Effect#runAsync` - */ +* `cats.effect.Effect#runAsync` +*/ def runAsync[A](fa: Task[A])(cb: Either[Throwable, A] => IO[Unit])( implicit s: Scheduler, @@ -43,8 +44,8 @@ private[eval] object TaskEffect { } /** - * `cats.effect.ConcurrentEffect#runCancelable` - */ +* `cats.effect.ConcurrentEffect#runCancelable` +*/ def runCancelable[A](fa: Task[A])(cb: Either[Throwable, A] => IO[Unit])( implicit s: Scheduler, diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala index 85441fbf9..0cec68d31 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala @@ -21,10 +21,11 @@ import monix.execution.Callback import monix.eval.Task import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object TaskEvalAsync { /** - * Implementation for `Task.evalAsync`. - */ +* Implementation for `Task.evalAsync`. +*/ def apply[A](a: () => A): Task[A] = Task.Async( new EvalAsyncRegister[A](a), @@ -33,8 +34,8 @@ private[eval] object TaskEvalAsync { restoreLocals = false ) - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation private final class EvalAsyncRegister[A](a: () => A) extends ForkedRegister[A] { def apply(ctx: Task.Context, cb: Callback[Throwable, A]): Unit = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala index 5c55944fb..0989c4afc 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala @@ -23,10 +23,11 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.Scheduler +@scala.annotation.nowarn private[eval] object TaskExecuteOn { /** - * Implementation for `Task.executeOn`. - */ +* Implementation for `Task.executeOn`. +*/ def apply[A](source: Task[A], s: Scheduler, forceAsync: Boolean): Task[A] = { val withTrampoline = !forceAsync val start = @@ -41,8 +42,8 @@ private[eval] object TaskExecuteOn { ) } - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is task that forks on evaluation +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is task that forks on evaluation private final class AsyncRegister[A](source: Task[A], s: Scheduler) extends ForkedRegister[A] { def apply(ctx: Context, cb: Callback[Throwable, A]): Unit = { val oldS = ctx.scheduler @@ -53,8 +54,8 @@ private[eval] object TaskExecuteOn { source, ctx2, new Callback[Throwable, A] with Runnable { - private[this] var value: A = _ - private[this] var error: Throwable = _ + private var value: A = null.asInstanceOf[A] + private var error: Throwable = null.asInstanceOf[Throwable] def onSuccess(value: A): Unit = { this.value = value diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala index c1be60435..b4622b57e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala @@ -23,10 +23,11 @@ import monix.eval.Task.{ Async, Context } import monix.execution.ExecutionModel import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } +@scala.annotation.nowarn private[eval] object TaskExecuteWithModel { /** - * Implementation for `Task.executeWithModel` - */ +* Implementation for `Task.executeWithModel` +*/ def apply[A](self: Task[A], em: ExecutionModel): Task[A] = { val start = (context: Context, cb: Callback[Throwable, A]) => { val context2 = context.withExecutionModel(em) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala index e61b7a328..4e6d3d37a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala @@ -20,20 +20,20 @@ package monix.eval.internal import monix.eval.Task import monix.eval.Task.{ Context, ContextSwitch, Options } +@scala.annotation.nowarn private[eval] object TaskExecuteWithOptions { /** - * Implementation for `Task.executeWithOptions` - */ +* Implementation for `Task.executeWithOptions` +*/ def apply[A](self: Task[A], f: Options => Options): Task[A] = ContextSwitch(self, enable(f), disable) - private[this] def enable(f: Options => Options): Context => Context = - ctx => { - val opts2 = f(ctx.options) - if (opts2 != ctx.options) ctx.withOptions(opts2) - else ctx - } + private def enable(f: Options => Options): Context => Context = ctx => { + val opts2 = f(ctx.options) + if (opts2 != ctx.options) ctx.withOptions(opts2) + else ctx + } - private[this] val disable: (Any, Throwable, Context, Context) => Context = + private val disable: (Any, Throwable, Context, Context) => Context = (_, _, old, current) => current.withOptions(old.options) } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala index 6465fc7d1..7644576f5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala @@ -26,6 +26,7 @@ import monix.execution.schedulers.TrampolinedRunnable import scala.concurrent.{ ExecutionContext, Future } import scala.util.Try +@scala.annotation.nowarn private[eval] object TaskFromFuture { /** Implementation for `Task.fromFuture`. */ def strict[A](f: Future[A]): Task[A] = { @@ -138,7 +139,7 @@ private[eval] object TaskFromFuture { ): Try[A] => Unit = { new (Try[A] => Unit) with TrampolinedRunnable { - private[this] var value: Try[A] = _ + private var value: Try[A] = null.asInstanceOf[Try[A]] def apply(value: Try[A]): Unit = { this.value = value diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala index 682467273..5d17838bd 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala @@ -28,10 +28,11 @@ import monix.execution.internal.exceptions.matchError import scala.annotation.tailrec import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object TaskMapBoth { /** - * Implementation for `Task.mapBoth`. - */ +* Implementation for `Task.mapBoth`. +*/ def apply[A1, A2, R](fa1: Task[A1], fa2: Task[A2])(f: (A1, A2) => R): Task[R] = { TracedAsync( new Register(fa1, fa2, f), @@ -42,11 +43,11 @@ private[eval] object TaskMapBoth { ) } - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register[A1, A2, R](fa1: Task[A1], fa2: Task[A2], f: (A1, A2) => R) extends ForkedRegister[R] { /* For signaling the values after the successful completion of both tasks. */ diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala index 9b0def2ac..a3a5d014e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala @@ -28,10 +28,11 @@ import scala.annotation.tailrec import scala.concurrent.{ ExecutionContext, Promise } import scala.util.{ Failure, Success, Try } +@scala.annotation.nowarn private[eval] object TaskMemoize { /** - * Implementation for `.memoize` and `.memoizeOnSuccess`. - */ +* Implementation for `.memoize` and `.memoizeOnSuccess`. +*/ def apply[A](source: Task[A], cacheErrors: Boolean): Task[A] = source match { case Now(_) | Error(_) => @@ -54,8 +55,8 @@ private[eval] object TaskMemoize { extends ((Task.Context, Callback[Throwable, A]) => Unit) { self => // N.B. keeps state! - private[this] var thunk = source - private[this] val state = Atomic(null: AnyRef) + private var thunk = source + private val state = Atomic(null: AnyRef) def apply(ctx: Context, cb: Callback[Throwable, A]): Unit = state.get() match { @@ -66,8 +67,8 @@ private[eval] object TaskMemoize { } /** Saves the final result on completion and triggers the registered - * listeners. - */ +* listeners. +*/ @tailrec def cacheValue(value: Try[A])(implicit s: Scheduler): Unit = { // Should we cache everything, error results as well, // or only successful results? @@ -118,8 +119,8 @@ private[eval] object TaskMemoize { } /** While the task is pending completion, registers a new listener - * that will receive the result once the task is complete. - */ +* that will receive the result once the task is complete. +*/ private def registerListener(p: Promise[A], context: Context, cb: Callback[Throwable, A])( implicit ec: ExecutionContext ): Unit = { @@ -134,8 +135,8 @@ private[eval] object TaskMemoize { } /** - * Starts execution, eventually caching the value on completion. - */ +* Starts execution, eventually caching the value on completion. +*/ @tailrec private def start(context: Context, cb: Callback[Throwable, A]): Unit = { implicit val sc: Scheduler = context.scheduler self.state.get() match { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala index f6957e9b6..3bf254e84 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala @@ -26,10 +26,11 @@ import scala.util.control.NonFatal import scala.collection.mutable import scala.collection.mutable.ListBuffer +@scala.annotation.nowarn private[eval] object TaskParSequence { /** - * Implementation for [[Task.parSequence]] - */ +* Implementation for [[Task.parSequence]] +*/ def apply[A, M[X] <: Iterable[X]](in: Iterable[Task[A]], makeBuilder: () => mutable.Builder[A, M[A]]): Task[M[A]] = { Async( new Register(in, makeBuilder), @@ -39,11 +40,11 @@ private[eval] object TaskParSequence { ) } - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register[A, M[X] <: Iterable[X]]( in: Iterable[Task[A]], makeBuilder: () => mutable.Builder[A, M[A]] diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala index 4fd1ddb86..5705c10d7 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala @@ -23,10 +23,11 @@ import monix.catnap.ConcurrentQueue import monix.eval.Task import monix.execution.{ BufferCapacity, ChannelType } +@scala.annotation.nowarn private[eval] object TaskParSequenceN { /** - * Implementation for [[Task.parSequenceN]] - */ +* Implementation for [[Task.parSequenceN]] +*/ def apply[A]( parallelism: Int, in: Iterable[Task[A]] diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala index 802adde18..bc1feee10 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala @@ -30,10 +30,11 @@ import scala.util.control.NonFatal import scala.annotation.tailrec import scala.collection.mutable.ListBuffer +@scala.annotation.nowarn private[eval] object TaskParSequenceUnordered { /** - * Implementation for [[Task.parSequenceUnordered]] - */ +* Implementation for [[Task.parSequenceUnordered]] +*/ def apply[A](in: Iterable[Task[A]]): Task[List[A]] = { Async( new Register(in), @@ -43,11 +44,11 @@ private[eval] object TaskParSequenceUnordered { ) } - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register[A](in: Iterable[Task[A]]) extends ForkedRegister[List[A]] { def maybeSignalFinal( diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala index 224c142d3..be1f45363 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala @@ -21,10 +21,11 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.atomic.Atomic +@scala.annotation.nowarn private[eval] object TaskRace { /** - * Implementation for `Task.race`. - */ +* Implementation for `Task.race`. +*/ def apply[A, B](fa: Task[A], fb: Task[B]): Task[Either[A, B]] = Task.Async( new Register(fa, fb), @@ -32,11 +33,11 @@ private[eval] object TaskRace { trampolineAfter = true ) - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register[A, B](fa: Task[A], fb: Task[B]) extends ForkedRegister[Either[A, B]] { def apply(context: Task.Context, cb: Callback[Throwable, Either[A, B]]): Unit = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala index 14cc727e6..3a7c7a456 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala @@ -23,18 +23,19 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.atomic.{ Atomic, PaddingStrategy } +@scala.annotation.nowarn private[eval] object TaskRaceList { /** - * Implementation for `Task.raceList` - */ +* Implementation for `Task.raceList` +*/ def apply[A](tasks: Iterable[Task[A]]): Task[A] = Task.Async(new Register(tasks), trampolineBefore = true, trampolineAfter = true) - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register[A](tasks: Iterable[Task[A]]) extends ForkedRegister[A] { def apply(context: Task.Context, callback: Callback[Throwable, A]): Unit = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala index 2acc1acce..c1cf64f16 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala @@ -23,13 +23,13 @@ import monix.execution.atomic.Atomic import scala.concurrent.Promise -private[eval] object TaskRacePair { - // Type aliasing the result only b/c it's a mouthful +@scala.annotation.nowarn +private[eval] object TaskRacePair { // Type aliasing the result only b/c it's a mouthful type RaceEither[A, B] = Either[(A, Fiber[B]), (Fiber[A], B)] /** - * Implementation for `Task.racePair`. - */ + * Implementation for `Task.racePair`. + */ def apply[A, B](fa: Task[A], fb: Task[B]): Task[RaceEither[A, B]] = Task.Async( new Register(fa, fb), @@ -37,11 +37,11 @@ private[eval] object TaskRacePair { trampolineAfter = true ) - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register[A, B](fa: Task[A], fb: Task[B]) extends ForkedRegister[RaceEither[A, B]] { def apply(context: Task.Context, cb: Callback[Throwable, RaceEither[A, B]]): Unit = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala index 0698475cb..64c5f178d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala @@ -29,18 +29,19 @@ private[internal] abstract class TaskRestartCallback(contextInit: Context, callb extends Callback[Throwable, Any] with TrampolinedRunnable { // Modified on prepare() - private[this] var bFirst: Bind = _ - private[this] var bRest: CallStack = _ - private[this] var register: (Context, Callback[Throwable, Any]) => Unit = _ + private var bFirst: Bind = null.asInstanceOf[Bind] + private var bRest: CallStack = null.asInstanceOf[CallStack] + private var register: (Context, Callback[Throwable, Any]) => Unit = + null.asInstanceOf[(Context, Callback[Throwable, Any]) => Unit] // Mutated in onSuccess and onError, just before scheduling // onSuccessRun and onErrorRun - private[this] var value: Any = _ - private[this] var error: Throwable = _ - private[this] var trampolineAfter: Boolean = true + private var value: Any = null.asInstanceOf[Any] + private var error: Throwable = null.asInstanceOf[Throwable] + private var trampolineAfter: Boolean = true // Can change via ContextSwitch - private[this] var context = contextInit + private var context = contextInit final def contextSwitch(other: Context): Unit = { this.context = other @@ -90,9 +91,10 @@ private[internal] abstract class TaskRestartCallback(contextInit: Context, callb // $COVERAGE-ON$ } + @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") protected def prepareStart(@unused task: Task.Async[_]): Unit = () protected def prepareCallback: Callback[Throwable, Any] = callback - private[this] val wrappedCallback = prepareCallback + private val wrappedCallback = prepareCallback protected def syncOnSuccess(value: Any): Unit = { val bFirst = this.bFirst @@ -111,30 +113,30 @@ private[internal] abstract class TaskRestartCallback(contextInit: Context, callb } /** Reusable Runnable reference, to go lighter on memory allocations. */ - private[this] val onSuccessRun: TrampolinedRunnable = - new TrampolinedRunnable { - def run(): Unit = { - val v = value - value = null - syncOnSuccess(v) - } + private val onSuccessRun: TrampolinedRunnable = new TrampolinedRunnable { + def run(): Unit = { + val v = value + value = null + syncOnSuccess(v) } + } /** Reusable Runnable reference, to go lighter on memory allocations. */ - private[this] val onErrorRun: TrampolinedRunnable = - new TrampolinedRunnable { - def run(): Unit = { - val e = error - error = null - syncOnError(e) - } + private val onErrorRun: TrampolinedRunnable = new TrampolinedRunnable { + def run(): Unit = { + val e = error + error = null + syncOnError(e) } + } } +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=unused value of type") private[internal] object TaskRestartCallback { /** Builder for [[TaskRestartCallback]], returning a specific instance - * optimized for the passed in `Task.Options`. - */ + * optimized for the passed in `Task.Options`. + */ def apply(context: Context, callback: Callback[Throwable, Any]): TaskRestartCallback = { if (context.options.localContextPropagation) new WithLocals(context, callback) @@ -150,9 +152,10 @@ private[internal] object TaskRestartCallback { private final class WithLocals(context: Context, callback: Callback[Throwable, Any]) extends TaskRestartCallback(context, callback) { - private[this] var preparedLocals: Local.Context = _ - private[this] var previousLocals: Local.Context = _ + private var preparedLocals: Local.Context = null.asInstanceOf[Local.Context] + private var previousLocals: Local.Context = null.asInstanceOf[Local.Context] + @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") override protected def prepareStart(task: Task.Async[_]): Unit = { preparedLocals = if (task.restoreLocals) Local.getContext() else null } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala index 41279d2ce..46782ffde 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala @@ -31,17 +31,18 @@ import monix.eval.tracing.{ TaskEvent, TaskTrace } import scala.reflect.NameTransformer +@scala.annotation.nowarn private[eval] object TaskRunLoop { type Current = Task[Any] type Bind = Any => Task[Any] type CallStack = ChunkedArrayStack[Bind] /** Starts or resumes evaluation of the run-loop from where it left - * off. This is the complete run-loop. - * - * Used for continuing a run-loop after an async boundary - * happens from [[startFuture]] and [[startLight]]. - */ +* off. This is the complete run-loop. +* +* Used for continuing a run-loop after an async boundary +* happens from [[startFuture]] and [[startLight]]. +*/ def startFull[A]( source: Task[A], contextInit: Context, @@ -206,8 +207,8 @@ private[eval] object TaskRunLoop { } /** Internal utility, for forcing an asynchronous boundary in the - * trampoline loop. - */ +* trampoline loop. +*/ def restartAsync[A]( source: Task[A], context: Context, @@ -250,11 +251,11 @@ private[eval] object TaskRunLoop { } /** A run-loop that attempts to evaluate a `Task` without - * initializing a `Task.Context`, falling back to - * [[startFull]] when the first `Async` boundary is hit. - * - * Function gets invoked by `Task.runAsync(cb: Callback)`. - */ +* initializing a `Task.Context`, falling back to +* [[startFull]] when the first `Async` boundary is hit. +* +* Function gets invoked by `Task.runAsync(cb: Callback)`. +*/ def startLight[A]( source: Task[A], scheduler: Scheduler, @@ -413,8 +414,8 @@ private[eval] object TaskRunLoop { } /** A run-loop version that evaluates the given task until the - * first async boundary or until completion. - */ +* first async boundary or until completion. +*/ def startStep[A](source: Task[A], scheduler: Scheduler, opts: Task.Options): Either[Task[A], A] = { var current = source.asInstanceOf[Task[Any]] var bFirst: Bind = null @@ -558,11 +559,11 @@ private[eval] object TaskRunLoop { } /** A run-loop that attempts to complete a `CancelableFuture` - * synchronously falling back to [[startFull]] and actual - * asynchronous execution in case of an asynchronous boundary. - * - * Function gets invoked by `Task.runToFuture(implicit s: Scheduler)`. - */ +* synchronously falling back to [[startFull]] and actual +* asynchronous execution in case of an asynchronous boundary. +* +* Function gets invoked by `Task.runToFuture(implicit s: Scheduler)`. +*/ def startFuture[A](source: Task[A], scheduler: Scheduler, opts: Task.Options): CancelableFuture[A] = { var current = source.asInstanceOf[Task[Any]] var bFirst: Bind = null @@ -737,8 +738,8 @@ private[eval] object TaskRunLoop { } /** Called when we hit the first async boundary in - * [[startLight]]. - */ +* [[startLight]]. +*/ private def goAsyncForLightCB( source: Current, scheduler: Scheduler, @@ -884,10 +885,10 @@ private[eval] object TaskRunLoop { } /** - * If stack tracing and contextual exceptions are enabled, this - * function will rewrite the stack trace of a captured exception - * to include the async stack trace. - */ +* If stack tracing and contextual exceptions are enabled, this +* function will rewrite the stack trace of a captured exception +* to include the async stack trace. +*/ private[internal] def augmentException(ex: Throwable, ctx: StackTracedContext): Unit = { val stackTrace = ex.getStackTrace if (stackTrace.nonEmpty) { @@ -917,9 +918,8 @@ private[eval] object TaskRunLoop { private def dropRunLoopFrames(frames: Array[StackTraceElement]): Array[StackTraceElement] = frames.takeWhile(ste => !runLoopFilter.exists(ste.getClassName.startsWith(_))) - private[this] val runLoopFilter = List( + private val runLoopFilter = List( "monix.eval.", "scala.runtime." ) - } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala index 7a25dea03..3bb5bfbb8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala @@ -29,13 +29,14 @@ import monix.execution.{ Callback, CancelableFuture, Scheduler } import scala.concurrent.Promise import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object TaskRunToFutureWithLocal { /** A run-loop that attempts to complete a `CancelableFuture` - * synchronously falling back to [[startFull]] and actual - * asynchronous execution in case of an asynchronous boundary. - * - * Function gets invoked by `Task.runToFuture(implicit s: Scheduler)`. - */ +* synchronously falling back to [[startFull]] and actual +* asynchronous execution in case of an asynchronous boundary. +* +* Function gets invoked by `Task.runToFuture(implicit s: Scheduler)`. +*/ def startFuture[A](source: Task[A], scheduler: Scheduler, opts: Task.Options): CancelableFuture[A] = { var current = source.asInstanceOf[Task[Any]] var bFirst: Bind = null diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala index 1ac181261..c2bb59e65 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala @@ -22,6 +22,7 @@ import monix.execution.compat.BuildFrom import monix.execution.compat.internal._ import scala.collection.mutable +@scala.annotation.nowarn private[eval] object TaskSequence { /** Implementation for `Task.sequence`. */ def list[A, M[X] <: Iterable[X]](in: M[Task[A]])(implicit bf: BuildFrom[M[Task[A]], A, M[A]]): Task[M[A]] = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala index 223023fb4..4bd07674d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala @@ -24,10 +24,11 @@ import monix.execution.schedulers.TracingScheduler import monix.execution.{ Callback, Scheduler } import scala.concurrent.ExecutionContext +@scala.annotation.nowarn private[eval] object TaskShift { /** - * Implementation for `Task.shift` - */ +* Implementation for `Task.shift` +*/ def apply(ec: ExecutionContext): Task[Unit] = { Async( new Register(ec), @@ -37,11 +38,11 @@ private[eval] object TaskShift { ) } - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register(ec: ExecutionContext) extends ForkedRegister[Unit] { def apply(context: Context, cb: Callback[Throwable, Unit]): Unit = { val ec2 = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala index 23f65bedf..8f06c305b 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala @@ -25,6 +25,7 @@ import monix.eval.Task import scala.concurrent.duration.Duration +@scala.annotation.nowarn private[eval] object TaskSleep { /** Implementation for `Task.sleep`. */ def apply(timespan: Duration): Task[Unit] = @@ -34,11 +35,11 @@ private[eval] object TaskSleep { trampolineAfter = false ) - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class Register(timespan: Duration) extends ForkedRegister[Unit] { def apply(ctx: Context, cb: Callback[Throwable, Unit]): Unit = { implicit val s = ctx.scheduler @@ -58,11 +59,11 @@ private[eval] object TaskSleep { } } - // Implementing Async's "start" via `ForkedStart` in order to signal - // that this is a task that forks on evaluation. - // - // N.B. the contract is that the injected callback gets called after - // a full async boundary! +// Implementing Async's "start" via `ForkedStart` in order to signal +// that this is a task that forks on evaluation. +// +// N.B. the contract is that the injected callback gets called after +// a full async boundary! private final class SleepRunnable(ctx: Context, cb: Callback[Throwable, Unit]) extends Runnable { def run(): Unit = { ctx.connection.pop() diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala index d9c546395..0c1fabbda 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala @@ -21,10 +21,11 @@ package internal import monix.eval.Task.{ Async, Context } import monix.execution.{ Callback, CancelablePromise } +@scala.annotation.nowarn private[eval] object TaskStart { /** - * Implementation for `Task.fork`. - */ +* Implementation for `Task.fork`. +*/ def forked[A](fa: Task[A]): Task[Fiber[A]] = fa match { // There's no point in evaluating strict stuff diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala index ce926e3f5..a4d1420d5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala @@ -21,10 +21,11 @@ package internal import monix.execution.Callback import monix.eval.Task.Context +@scala.annotation.nowarn private[eval] object TaskStartAndForget { /** - * Implementation for `Task.startAndForget`. - */ +* Implementation for `Task.startAndForget`. +*/ def apply[A](fa: Task[A]): Task[Unit] = { val start = (ctx: Context, cb: Callback[Throwable, Unit]) => { implicit val sc = ctx.scheduler diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala index 2ee9f111b..07a5f34de 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala @@ -22,18 +22,18 @@ import monix.execution.rstreams.Subscription import monix.execution.{ Callback, Scheduler, UncaughtExceptionReporter } import org.reactivestreams.Subscriber +@scala.annotation.nowarn private[eval] object TaskToReactivePublisher { /** - * Implementation for `Task.toReactivePublisher` - */ +* Implementation for `Task.toReactivePublisher` +*/ def apply[A](self: Task[A])(implicit s: Scheduler): org.reactivestreams.Publisher[A] = new org.reactivestreams.Publisher[A] { def subscribe(out: Subscriber[_ >: A]): Unit = { out.onSubscribe(new Subscription { - private[this] var isActive = true - private[this] val conn = TaskConnection() - private[this] val context = - Task.Context(s, Task.defaultOptions.withSchedulerFeatures, conn, new StackTracedContext) + private var isActive = true + private val conn = TaskConnection() + private val context = Task.Context(s, Task.defaultOptions.withSchedulerFeatures, conn, new StackTracedContext) def request(n: Long): Unit = { require(n > 0, "n must be strictly positive, according to the Reactive Streams contract, rule 3.9") @@ -52,7 +52,7 @@ private[eval] object TaskToReactivePublisher { private final class PublisherCallback[A](out: Subscriber[_ >: A])(implicit s: UncaughtExceptionReporter) extends Callback[Throwable, A] { - private[this] var isActive = true + private var isActive = true def onError(e: Throwable): Unit = if (isActive) { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala index fc93fc1f0..d0f0afcb8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala @@ -26,8 +26,8 @@ import monix.eval.tracing.TaskEvent /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ +@scala.annotation.nowarn private[eval] object TaskTracing { - def decorated[A](source: Task[A]): Task[A] = Trace(source, buildFrame()) @@ -52,9 +52,8 @@ private[eval] object TaskTracing { TaskEvent.StackTrace(new Throwable().getStackTrace.toList) /** - * Global cache for trace frames. Keys are references to lambda classes. - * Should converge to the working set of traces very quickly for hot code paths. - */ - private[this] val frameCache: ConcurrentHashMap[Class[_], TaskEvent] = new ConcurrentHashMap() - +* Global cache for trace frames. Keys are references to lambda classes. +* Should converge to the working set of traces very quickly for hot code paths. +*/ + private val frameCache: ConcurrentHashMap[Class[_], TaskEvent] = new ConcurrentHashMap() } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala index 6125714e0..13e185882 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala @@ -24,10 +24,9 @@ import monix.execution.Callback /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ -private[eval] object TracedAsync { - - // Convenience function for internal Async calls that intend - // to opt into tracing so the following code isn't repeated. +@scala.annotation.nowarn +private[eval] object TracedAsync { // Convenience function for internal Async calls that intend +// to opt into tracing so the following code isn't repeated. def apply[A]( k: (Task.Context, Callback[Throwable, A]) => Unit, trampolineBefore: Boolean = false, @@ -46,5 +45,4 @@ private[eval] object TracedAsync { Task.Async(k, trampolineBefore, trampolineAfter, restoreLocals, trace) } - } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala index 4de8dfd34..5759c7efd 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala @@ -26,18 +26,19 @@ import monix.execution.internal.Platform import scala.collection.mutable.ListBuffer import scala.util.control.NonFatal +@scala.annotation.nowarn private[eval] object UnsafeCancelUtils { /** - * Internal API. - */ +* Internal API. +*/ def taskToCancelable(task: Task[Unit])(implicit s: Scheduler): Cancelable = { if (task == Task.unit) Cancelable.empty else Cancelable(() => task.runAsyncAndForget(s)) } /** - * Internal API — very unsafe! - */ +* Internal API — very unsafe! +*/ private[internal] def cancelAllUnsafe( cursor: Iterable[AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ] ): CancelToken[Task] = { @@ -52,8 +53,8 @@ private[eval] object UnsafeCancelUtils { } /** - * Internal API — very unsafe! - */ +* Internal API — very unsafe! +*/ private[internal] def unsafeCancel( task: AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ): CancelToken[Task] = { @@ -74,8 +75,8 @@ private[eval] object UnsafeCancelUtils { } /** - * Internal API — very unsafe! - */ +* Internal API — very unsafe! +*/ private[internal] def getToken(task: AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ): CancelToken[Task] = task match { case ref: Task[Unit] @unchecked => @@ -91,8 +92,8 @@ private[eval] object UnsafeCancelUtils { } /** - * Internal API — very unsafe! - */ +* Internal API — very unsafe! +*/ private[internal] def triggerCancel(task: AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ )( implicit s: Scheduler ): Unit = { @@ -114,11 +115,11 @@ private[eval] object UnsafeCancelUtils { } } - // Optimization for `cancelAll` +// Optimization for `cancelAll` private final class CancelAllFrame(cursor: Iterator[AnyRef /* Cancelable | Task[Unit] | CancelableF[Task] */ ]) extends StackFrame[Unit, Task[Unit]] { - private[this] val errors = ListBuffer.empty[Throwable] + private val errors = ListBuffer.empty[Throwable] def loop(): CancelToken[Task] = { var task: Task[Unit] = null diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala index 513ecb12d..a2e12a8f2 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/CoevalTrace.scala @@ -125,9 +125,9 @@ private[eval] object CoevalTrace { case None => methodName } - private[this] val anonfunRegex = "^\\$+anonfun\\$+(.+)\\$+\\d+$".r + private val anonfunRegex = "^\\$+anonfun\\$+(.+)\\$+\\d+$".r - private[this] val stackTraceFilter = List( + private val stackTraceFilter = List( "monix.", "cats.effect.", "cats.", diff --git a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala index 3a170facd..6c61bbadc 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala @@ -125,9 +125,9 @@ private[eval] object TaskTrace { case None => methodName } - private[this] val anonfunRegex = "^\\$+anonfun\\$+(.+)\\$+\\d+$".r + private val anonfunRegex = "^\\$+anonfun\\$+(.+)\\$+\\d+$".r - private[this] val stackTraceFilter = List( + private val stackTraceFilter = List( "monix.", "cats.effect.", "cats.", diff --git a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala index 9a7df292c..8aea23353 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/BaseLawsSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.Eq import cats.effect.laws.discipline.Parameters @@ -31,6 +32,7 @@ import scala.util.{ Either, Success, Try } /** * Base trait to inherit in all `monix-eval` tests that use ScalaCheck. */ +@nowarn trait BaseLawsSuite extends monix.execution.BaseLawsSuite with ArbitraryInstances { /** * Customizes Cats-Effect's default params. diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala index 64dd75024..cffeff516 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalBracketSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.laws._ import cats.laws.discipline._ @@ -24,6 +25,7 @@ import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform import scala.util.{ Failure, Success } +@nowarn object CoevalBracketSuite extends BaseTestSuite { test("equivalence with onErrorHandleWith") { _ => check2 { (coeval: Coeval[Int], f: Throwable => Coeval[Unit]) => diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala index 06b8f7ce3..bd094710a 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalCatsConversions.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.Eval import cats.effect.IO @@ -23,6 +24,7 @@ import monix.execution.atomic.Atomic import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } +@nowarn object CoevalCatsConversions extends BaseTestSuite { test("Coeval.now(value).to[Eval]") { _ => assertEquals(Coeval.now(10).to[Eval].value, 10) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala index e0fa41da5..8484e1b45 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalErrorSuite.scala @@ -16,11 +16,13 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.exceptions.DummyException import scala.concurrent.TimeoutException import scala.util.{ Failure, Success } +@nowarn object CoevalErrorSuite extends BaseTestSuite { test("Coeval.attempt should expose error") { _ => val dummy = DummyException("ex") diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala index 636e6b91f..e00cdddb5 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeOnSuccessSuite.scala @@ -16,12 +16,14 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.util.{ Failure, Success } +@nowarn object CoevalMemoizeOnSuccessSuite extends BaseTestSuite { test("Coeval.eval.memoizeOnSuccess should work for first subscriber") { _ => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala index 6498f1863..be1abcc89 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMemoizeSuite.scala @@ -16,12 +16,14 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.util.Success +@nowarn object CoevalMemoizeSuite extends BaseTestSuite { test("Coeval.eval.memoize should work for first subscriber") { _ => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala index e55e55124..8edca0181 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalMiscSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.laws._ import cats.laws.discipline._ @@ -23,6 +24,7 @@ import cats.laws.discipline._ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } +@nowarn object CoevalMiscSuite extends BaseTestSuite { test("Coeval.now.attempt should succeed") { _ => val result = Coeval.now(1).attempt.value() diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala index 4b7a86da3..9144e6d87 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalNowSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.laws._ import cats.laws.discipline._ @@ -23,6 +24,7 @@ import cats.laws.discipline._ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } +@nowarn object CoevalNowSuite extends BaseTestSuite { test("Coeval.now should work") { _ => var wasTriggered = false diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala index 42480087a..edfd97edc 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalRunSuite.scala @@ -16,10 +16,12 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success, Try } +@nowarn object CoevalRunSuite extends BaseTestSuite { def testRun(build: (() => Int) => Coeval[Int]): Unit = { val fa1 = build(() => 10 + 20) diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala index 11437386d..cc05f55f2 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala @@ -16,10 +16,12 @@ */ package monix.eval +import scala.annotation.nowarn import cats.laws._ import cats.laws.discipline._ +@nowarn object CoevalSequenceSuite extends BaseTestSuite { test("Coeval.sequence") { _ => check1 { (numbers: List[Int]) => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala index b5f431730..7a30d42a4 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskBracketSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.effect.concurrent.Deferred import cats.laws._ @@ -26,6 +27,7 @@ import monix.execution.internal.Platform import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object TaskBracketSuite extends BaseTestSuite { test("equivalence with onErrorHandleWith") { implicit sc => check2 { (task: Task[Int], f: Throwable => Task[Unit]) => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala index ce8bdde91..8cb968a7f 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCallbackSafetySuite.scala @@ -16,12 +16,14 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.exceptions.CallbackCalledMultipleTimesException import monix.execution.schedulers.TestScheduler import scala.util.{ Failure, Success } +@nowarn object TaskCallbackSafetySuite extends BaseTestSuite { test("Task.async's callback can be called multiple times") { implicit sc => runTestCanCallMultipleTimes(Task.async) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala index 02688140b..45f6fbaeb 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCancelableSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.effect.ExitCase import monix.execution.Callback @@ -24,6 +25,7 @@ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success, Try } +@nowarn object TaskCancelableSuite extends BaseTestSuite { test("Task.cancelable0 should be stack safe on repeated, right-associated binds") { implicit s => def signal[A](a: A): Task[A] = Task.cancelable0[A] { (_, cb) => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala index 96871eb1e..c7b2196aa 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCancellationSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import java.util.concurrent.CancellationException import cats.laws._ @@ -27,6 +28,7 @@ import monix.execution.internal.Platform import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object TaskCancellationSuite extends BaseTestSuite { test("cancellation works for async actions") { implicit ec => implicit val opts = Task.defaultOptions.disableAutoCancelableRunLoops diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala index 6d7c2c7e2..022c6dba8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCoevalForeachSuite.scala @@ -16,11 +16,13 @@ */ package monix.eval +import scala.annotation.nowarn import minitest.TestSuite import monix.execution.exceptions.DummyException import monix.execution.schedulers.TestScheduler +@nowarn object TaskCoevalForeachSuite extends TestSuite[TestScheduler] { def setup(): TestScheduler = TestScheduler() def tearDown(env: TestScheduler): Unit = { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala index 884c9dc28..5f4bc8eaa 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionRefSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.catnap.CancelableF import monix.catnap.cancelables.BooleanCancelableF @@ -23,6 +24,7 @@ import monix.execution.cancelables.BooleanCancelable import monix.eval.internal.TaskConnectionRef import monix.execution.ExecutionModel.SynchronousExecution +@nowarn object TaskConnectionRefSuite extends BaseTestSuite { test("assign and cancel a Cancelable") { implicit s => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala index 89c46c54b..7d73cd4dd 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.eval.internal.TaskConnection import monix.execution.Cancelable @@ -23,6 +24,7 @@ import monix.execution.cancelables.BooleanCancelable import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.internal.Platform +@nowarn object TaskConnectionSuite extends BaseTestSuite { test("initial push") { implicit s => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala index 7529856bb..6a3b89d12 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala @@ -16,12 +16,14 @@ */ package monix.eval +import scala.annotation.nowarn import cats.effect.{ ContextShift, IO } import monix.catnap.SchedulerEffect import scala.util.Success +@nowarn object TaskConversionsKSuite extends BaseTestSuite { test("Task.liftTo[IO]") { implicit s => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala index 977f7a962..85864eb7b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.effect._ import cats.laws._ @@ -31,6 +32,7 @@ import org.reactivestreams.{ Publisher, Subscriber, Subscription } import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object TaskConversionsSuite extends BaseTestSuite { test("Task.from(task.to[IO]) == task") { implicit s => check1 { (task: Task[Int]) => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala index 928020fdb..ac99556f3 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskCreateSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.effect.IO import monix.execution.Cancelable @@ -24,6 +25,7 @@ import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } import scala.concurrent.duration._ +@nowarn object TaskCreateSuite extends BaseTestSuite { test("can use Unit as return type") { implicit sc => val task = Task.create[Int]((_, cb) => cb.onSuccess(1)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala index 0a045e765..95fb5c6a4 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskErrorSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.exceptions.DummyException import monix.execution.internal.Platform @@ -23,6 +24,7 @@ import scala.concurrent.TimeoutException import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object TaskErrorSuite extends BaseTestSuite { test("Task.attempt should expose error") { implicit s => val dummy = DummyException("dummy") diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala index f425934ea..c8d8956b8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskExecuteWithOptionsSuite.scala @@ -16,9 +16,11 @@ */ package monix.eval +import scala.annotation.nowarn import scala.util.Success +@nowarn object TaskExecuteWithOptionsSuite extends BaseTestSuite { test("executeWithOptions works") { implicit s => val task = Task diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala index ea5c23722..0ee6a7055 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFlatMapSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.laws._ import cats.laws.discipline._ @@ -25,6 +26,7 @@ import monix.execution.exceptions.DummyException import monix.execution.internal.Platform import scala.util.{ Failure, Random, Success, Try } +@nowarn object TaskFlatMapSuite extends BaseTestSuite { test("runAsync flatMap loop is not cancelable if autoCancelableRunLoops=false") { implicit s => implicit val opts = Task.defaultOptions.disableAutoCancelableRunLoops diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala index 7217f06e6..862437e57 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.eval.Task.{ Error, Now } import monix.execution.exceptions.DummyException @@ -23,6 +24,7 @@ import monix.execution.internal.Platform import scala.util.{ Failure, Success } +@nowarn object TaskFromEitherSuite extends BaseTestSuite { test("Task.fromEither (`E <: Throwable` version) should returns a Now with a Right") { _ => val t = Task.fromEither(Right(10)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala index 5b0868dea..60fbbc558 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromFutureSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.{ Cancelable, CancelableFuture } import monix.execution.exceptions.DummyException @@ -24,6 +25,7 @@ import scala.concurrent.{ Future, Promise } import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object TaskFromFutureSuite extends BaseTestSuite { test("Task.fromFuture should be faster for completed futures, success") { implicit s => val t = Task.fromFuture(Future.successful(10)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala index b271d635c..06a78164b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskGuaranteeSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.implicits._ import monix.execution.atomic.Atomic @@ -24,6 +25,7 @@ import monix.execution.internal.Platform import scala.util.{ Failure, Success } import scala.concurrent.duration._ +@nowarn object TaskGuaranteeSuite extends BaseTestSuite { test("finalizer is evaluated on success") { implicit sc => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala index 132ffebb5..ef4e5fcc0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLiftSuite.scala @@ -16,12 +16,15 @@ */ package monix.eval +import scala.annotation.nowarn + import cats.effect.{ ContextShift, IO } import monix.catnap.SchedulerEffect import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success } +@nowarn object TaskLiftSuite extends BaseTestSuite { import TaskConversionsSuite.{ CIO, CustomConcurrentEffect, CustomEffect } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala index 547a8ccad..937f53a2e 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLikeConversionsSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.Eval import cats.effect.{ ContextShift, IO, SyncIO } @@ -26,6 +27,7 @@ import monix.execution.exceptions.DummyException import scala.concurrent.Promise import scala.util.{ Failure, Success, Try } +@nowarn object TaskLikeConversionsSuite extends BaseTestSuite { import TaskConversionsSuite.{ CIO, CustomConcurrentEffect, CustomEffect } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala index f41a6b7de..05073acda 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import scala.concurrent.Future import scala.concurrent.duration._ @@ -27,6 +28,7 @@ import monix.execution.misc.Local import cats.implicits._ import monix.catnap.{ ConcurrentChannel, ConsumerF } +@nowarn object TaskLocalSuite extends SimpleTestSuite { implicit val ec: Scheduler = monix.execution.Scheduler.Implicits.global implicit val opts: Task.Options = Task.defaultOptions.enableLocalContextPropagation @@ -275,12 +277,11 @@ object TaskLocalSuite extends SimpleTestSuite { l: TaskLocal[String], ch: ConcurrentChannel[Task, Unit, Int] ) { - private[this] def produceLoop(n: Int): Task[Unit] = - if (n == 0) Task.unit - else - ch.push(n) >> l.read.flatMap { s => - Task(assertEquals(s, "producer")) - } >> produceLoop(n - 1) + private[this] def produceLoop(n: Int): Task[Unit] = if (n == 0) Task.unit + else + ch.push(n) >> l.read.flatMap { s => + Task(assertEquals(s, "producer")) + } >> produceLoop(n - 1) def produce: Task[Unit] = for { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala index 89e622146..06ce5bb1b 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeOnSuccessSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.atomic.AtomicInt @@ -25,6 +26,7 @@ import scala.concurrent.Promise import scala.util.{ Failure, Success } import concurrent.duration._ +@nowarn object TaskMemoizeOnSuccessSuite extends BaseTestSuite { test("Task.memoizeOnSuccess should work asynchronously for first subscriber") { implicit s => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala index beb158c57..bcbc74d61 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMemoizeSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.atomic.AtomicInt @@ -26,6 +27,7 @@ import scala.concurrent.Promise import scala.util.{ Failure, Success } import concurrent.duration._ +@nowarn object TaskMemoizeSuite extends BaseTestSuite { test("Task.memoize should work asynchronously for first subscriber") { implicit s => var effect = 0 diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala index cedfc85c5..7d9b4b079 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskMiscSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.exceptions.DummyException @@ -24,6 +25,7 @@ import org.reactivestreams.{ Subscriber, Subscription } import scala.concurrent.Promise import scala.util.{ Failure, Success } +@nowarn object TaskMiscSuite extends BaseTestSuite { test("Task.attempt should succeed") { implicit s => val result = Task.now(1).attempt.runToFuture diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala index 31ec5d25d..a06646828 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskNowSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.laws._ import cats.laws.discipline._ @@ -24,6 +25,7 @@ import monix.execution.ExecutionModel.AlwaysAsyncExecution import monix.execution.exceptions.DummyException import scala.util.{ Failure, Success, Try } +@nowarn object TaskNowSuite extends BaseTestSuite { test("Task.now should work synchronously") { implicit s => var wasTriggered = false diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala index f3ced415f..78267b123 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOptionsSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import minitest.SimpleTestSuite import monix.eval.Task.Options @@ -23,6 +24,7 @@ import monix.execution.Callback import monix.execution.Scheduler.Implicits.global import scala.concurrent.Promise +@nowarn object TaskOptionsSuite extends SimpleTestSuite { implicit val opts: Options = Task.defaultOptions.enableLocalContextPropagation diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala index e63012684..ca441f96d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOrCoevalTransformWithSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.exceptions.DummyException @@ -23,6 +24,7 @@ import monix.execution.internal.Platform import scala.concurrent.Promise import scala.util.{ Failure, Success } +@nowarn object TaskOrCoevalTransformWithSuite extends BaseTestSuite { test("Task.materialize flatMap loop") { implicit s => val count = if (Platform.isJVM) 10000 else 1000 diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala index b936d01df..ea172aac2 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskOverloadsSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.ExecutionModel.AlwaysAsyncExecution @@ -23,6 +24,7 @@ import monix.execution.exceptions.DummyException import scala.concurrent.Promise import scala.util.{ Failure, Success } +@nowarn object TaskOverloadsSuite extends BaseTestSuite { test("Now.runAsync(scheduler)") { implicit s => val task = Task.now(1) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala index 3d91443b9..ebb47d5af 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceNSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.atomic.AtomicInt import monix.execution.exceptions.DummyException @@ -24,6 +25,7 @@ import monix.execution.internal.Platform import scala.concurrent.duration._ import scala.util.{ Failure, Success } +@nowarn object TaskParSequenceNSuite extends BaseTestSuite { test("Task.parSequenceN should execute in parallel bounded by parallelism") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala index dae9b4046..73f1bd30c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.exceptions.DummyException @@ -25,6 +26,7 @@ import scala.collection.mutable.ListBuffer import scala.concurrent.duration._ import scala.util.{ Failure, Success, Try } +@nowarn object TaskParSequenceUnorderedSuite extends BaseTestSuite { test("Task.parSequenceUnordered should execute in parallel") { implicit s => val seq = Seq( diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala index dcd3796f0..c7b235109 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.exceptions.DummyException @@ -25,6 +26,7 @@ import scala.collection.mutable.ListBuffer import scala.concurrent.duration._ import scala.util.{ Failure, Success, Try } +@nowarn object TaskParTraverseUnorderedSuite extends BaseTestSuite { test("Task.parTraverseUnordered should execute in parallel") { implicit s => val seq = Seq((1, 2), (2, 1), (3, 3)) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala index 2beda35e8..60cb2155c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParZipSuite.scala @@ -16,11 +16,13 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.exceptions.DummyException import concurrent.duration._ import scala.util.{ Failure, Random, Success } +@nowarn object TaskParZipSuite extends BaseTestSuite { test("Task.parZip2 should work if source finishes first") { implicit s => val f = Task.parZip2(Task(1), Task(2).delayExecution(1.second)).runToFuture diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala index 593b715ae..5d3ec07eb 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRaceSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.CancelableFuture import monix.execution.exceptions.DummyException @@ -25,6 +26,7 @@ import scala.concurrent.duration._ import scala.util.{ Failure, Success } import monix.execution.atomic.Atomic +@nowarn object TaskRaceSuite extends BaseTestSuite { test("Task.raceMany should switch to other") { implicit s => val task = diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala index 71477fa7b..2122975a8 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskRunAsyncSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.ExecutionModel.AlwaysAsyncExecution @@ -25,6 +26,7 @@ import scala.concurrent.Promise import scala.util.{ Failure, Success } import scala.concurrent.duration._ +@nowarn object TaskRunAsyncSuite extends BaseTestSuite { test("runAsync") { implicit s => val task = Task(1).flatMap(x => Task(x + 2)).executeAsync.map(_ + 1) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala index 23448c094..5a38f8053 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForParallelApplicativeSuite.scala @@ -16,12 +16,14 @@ */ package monix.eval +import scala.annotation.nowarn import cats.CommutativeApplicative import cats.laws.discipline.CommutativeApplicativeTests import monix.catnap.internal.ParallelApplicative import monix.eval.instances.CatsParallelForTask +@nowarn object TypeClassLawsForParallelApplicativeSuite extends BaseLawsSuite { implicit val ap: CommutativeApplicative[Task] = ParallelApplicative(new CatsParallelForTask) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala index d0f255e4b..9db2a7157 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskSuite.scala @@ -16,11 +16,13 @@ */ package monix.eval +import scala.annotation.nowarn import cats.effect.laws.discipline.{ ConcurrentEffectTests, ConcurrentTests } import cats.kernel.laws.discipline.MonoidTests import cats.laws.discipline.{ CoflatMapTests, CommutativeApplicativeTests, ParallelTests, SemigroupKTests } +@nowarn object TypeClassLawsForTaskSuite extends BaseTypeClassLawsForTaskSuite()( Task.defaultOptions.disableAutoCancelableRunLoops diff --git a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala index 43d2aab0b..5a6bb30ca 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala @@ -16,6 +16,7 @@ */ package monix.eval +import scala.annotation.nowarn import cats.Eq import cats.effect.laws.discipline.{ ConcurrentEffectTests, ConcurrentTests } @@ -31,6 +32,7 @@ import scala.concurrent.Promise * Type class tests for Task that use an alternative `Eq`, making * use of Task's `runAsync(callback)`. */ +@nowarn object TypeClassLawsForTaskWithCallbackSuite extends BaseTypeClassLawsForTaskWithCallbackSuite()( Task.defaultOptions.disableAutoCancelableRunLoops diff --git a/monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/Atomic.scala index 471f96524..096b2afc5 100644 --- a/monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/Atomic.scala +++ b/monix-execution/atomic/js/src/main/scala-3/monix/execution/atomic/Atomic.scala @@ -153,8 +153,10 @@ object Atomic { /** Returns the builder that would be chosen to construct Atomic * references for the given `initialValue`. */ - def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = + def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = { + val _ = initialValue builder + } extension [A](self: Atomic[A]) { /** DEPRECATED - switch to [[Atomic.get]]. */ diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala index 61ef329e1..06945711a 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -25,7 +25,7 @@ import scala.annotation.unused * by reference and not by value. */ final class AtomicAny[A <: AnyRef] private[atomic] (initialValue: A) extends Atomic[A] { - private[this] var ref = initialValue + private var ref = initialValue def getAndSet(update: A): A = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index 20d63875b..c6ea45484 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -26,7 +26,7 @@ import scala.annotation.unused */ final class AtomicBoolean private[atomic] (initialValue: Boolean) extends Atomic[Boolean] { - private[this] var ref = initialValue + private var ref = initialValue def getAndSet(update: Boolean): Boolean = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala index afff95095..363523250 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -26,8 +26,8 @@ import scala.annotation.unused */ final class AtomicByte private[atomic] (initialValue: Byte) extends AtomicNumber[Byte] { - private[this] var ref = initialValue - private[this] val mask = 255 + private var ref = initialValue + private val mask = 255 def getAndSet(update: Byte): Byte = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala index 888072174..22141f67c 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -26,8 +26,8 @@ import scala.annotation.unused */ final class AtomicChar private[atomic] (initialValue: Char) extends AtomicNumber[Char] { - private[this] var ref = initialValue - private[this] val mask = 255 + 255 * 256 + private var ref = initialValue + private val mask = 255 + 255 * 256 def getAndSet(update: Char): Char = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala index 2e63d49e8..c740f06ce 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -26,7 +26,7 @@ import scala.annotation.unused */ final class AtomicDouble private[atomic] (initialValue: Double) extends AtomicNumber[Double] { - private[this] var ref = initialValue + private var ref = initialValue def getAndSet(update: Double): Double = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 9d8c3646c..9be4606a7 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -26,7 +26,7 @@ import scala.annotation.unused */ final class AtomicFloat private[atomic] (initialValue: Float) extends AtomicNumber[Float] { - private[this] var ref = initialValue + private var ref = initialValue def getAndSet(update: Float): Float = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala index 850e2b98d..62d18087d 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -26,7 +26,7 @@ import scala.annotation.unused */ final class AtomicInt private[atomic] (initialValue: Int) extends AtomicNumber[Int] { - private[this] var ref = initialValue + private var ref = initialValue def getAndSet(update: Int): Int = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala index 887bcc669..584ac308c 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -26,7 +26,7 @@ import scala.annotation.unused */ final class AtomicLong private[atomic] (initialValue: Long) extends AtomicNumber[Long] { - private[this] var ref = initialValue + private var ref = initialValue def getAndSet(update: Long): Long = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index 88a7a8d7b..4a632f67f 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -29,8 +29,8 @@ import scala.annotation.unused */ final class AtomicNumberAny[A <: AnyRef: Numeric] private[atomic] (initialValue: A) extends AtomicNumber[A] { - private[this] val ev = implicitly[Numeric[A]] - private[this] var ref = initialValue + private val ev = implicitly[Numeric[A]] + private var ref = initialValue def getAndSet(update: A): A = { val current = ref diff --git a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala index d3666cac6..386cdeb48 100644 --- a/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/atomic/js/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -26,8 +26,8 @@ import scala.annotation.unused */ final class AtomicShort private[atomic] (initialValue: Short) extends AtomicNumber[Short] { - private[this] var ref = initialValue - private[this] val mask = 255 + 255 * 256 + private var ref = initialValue + private val mask = 255 + 255 * 256 def getAndSet(update: Short): Short = { val current = ref diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java index c5375edfe..a97290bc6 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Factory.java @@ -30,65 +30,27 @@ */ public final class Factory { public static BoxedObject newBoxedObject(Object initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { - boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; - boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; - switch (padding) { case NO_PADDING: - if (useJava8Unsafe) - return new NormalJava8BoxedObject(initial); - else if (useJava7Unsafe) - return new NormalJava7BoxedObject(initial); - else - return new NormalJavaXBoxedObject(initial); + return new NormalJavaXBoxedObject(initial); case LEFT_64: - if (useJava8Unsafe) - return new Left64Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Left64Java7BoxedObject(initial); - else - return new Left64JavaXBoxedObject(initial); + return new Left64JavaXBoxedObject(initial); case RIGHT_64: - if (useJava8Unsafe) - return new Right64Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Right64Java7BoxedObject(initial); - else - return new Right64JavaXBoxedObject(initial); + return new Right64JavaXBoxedObject(initial); case LEFT_RIGHT_128: - if (useJava8Unsafe) - return new LeftRight128Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new LeftRight128Java7BoxedObject(initial); - else - return new LeftRight128JavaXBoxedObject(initial); + return new LeftRight128JavaXBoxedObject(initial); case LEFT_128: - if (useJava8Unsafe) - return new Left128Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Left128Java7BoxedObject(initial); - else - return new Left128JavaXBoxedObject(initial); + return new Left128JavaXBoxedObject(initial); case RIGHT_128: - if (useJava8Unsafe) - return new Right128Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Right128Java7BoxedObject(initial); - else - return new Right128JavaXBoxedObject(initial); + return new Right128JavaXBoxedObject(initial); case LEFT_RIGHT_256: - if (useJava8Unsafe) - return new LeftRight256Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new LeftRight256Java7BoxedObject(initial); - else - return new LeftRight256JavaXBoxedObject(initial); + return new LeftRight256JavaXBoxedObject(initial); default: throw new MatchError(padding); @@ -96,65 +58,27 @@ else if (useJava7Unsafe) } public static BoxedInt newBoxedInt(int initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { - boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; - boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; - switch (padding) { case NO_PADDING: - if (useJava8Unsafe) - return new NormalJava8BoxedInt(initial); - else if (useJava7Unsafe) - return new NormalJava7BoxedInt(initial); - else - return new NormalJavaXBoxedInt(initial); + return new NormalJavaXBoxedInt(initial); case LEFT_64: - if (useJava8Unsafe) - return new Left64Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Left64Java7BoxedInt(initial); - else - return new Left64JavaXBoxedInt(initial); + return new Left64JavaXBoxedInt(initial); case RIGHT_64: - if (useJava8Unsafe) - return new Right64Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Right64Java7BoxedInt(initial); - else - return new Right64JavaXBoxedInt(initial); + return new Right64JavaXBoxedInt(initial); case LEFT_RIGHT_128: - if (useJava8Unsafe) - return new LeftRight128Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new LeftRight128Java7BoxedInt(initial); - else - return new LeftRight128JavaXBoxedInt(initial); + return new LeftRight128JavaXBoxedInt(initial); case LEFT_128: - if (useJava8Unsafe) - return new Left128Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Left128Java7BoxedInt(initial); - else - return new Left128JavaXBoxedInt(initial); + return new Left128JavaXBoxedInt(initial); case RIGHT_128: - if (useJava8Unsafe) - return new Right128Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Right128Java7BoxedInt(initial); - else - return new Right128JavaXBoxedInt(initial); + return new Right128JavaXBoxedInt(initial); case LEFT_RIGHT_256: - if (useJava8Unsafe) - return new LeftRight256Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new LeftRight256Java7BoxedInt(initial); - else - return new LeftRight256JavaXBoxedInt(initial); + return new LeftRight256JavaXBoxedInt(initial); default: throw new MatchError(padding); @@ -162,65 +86,27 @@ else if (useJava7Unsafe) } public static BoxedLong newBoxedLong(long initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { - boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; - boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; - switch (padding) { case NO_PADDING: - if (useJava8Unsafe) - return new NormalJava8BoxedLong(initial); - else if (useJava7Unsafe) - return new NormalJava7BoxedLong(initial); - else - return new NormalJavaXBoxedLong(initial); + return new NormalJavaXBoxedLong(initial); case LEFT_64: - if (useJava8Unsafe) - return new Left64Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Left64Java7BoxedLong(initial); - else - return new Left64JavaXBoxedLong(initial); + return new Left64JavaXBoxedLong(initial); case RIGHT_64: - if (useJava8Unsafe) - return new Right64Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Right64Java7BoxedLong(initial); - else - return new Right64JavaXBoxedLong(initial); + return new Right64JavaXBoxedLong(initial); case LEFT_RIGHT_128: - if (useJava8Unsafe) - return new LeftRight128Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new LeftRight128Java7BoxedLong(initial); - else - return new LeftRight128JavaXBoxedLong(initial); + return new LeftRight128JavaXBoxedLong(initial); case LEFT_128: - if (useJava8Unsafe) - return new Left128Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Left128Java7BoxedLong(initial); - else - return new Left128JavaXBoxedLong(initial); + return new Left128JavaXBoxedLong(initial); case RIGHT_128: - if (useJava8Unsafe) - return new Right128Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Right128Java7BoxedLong(initial); - else - return new Right128JavaXBoxedLong(initial); + return new Right128JavaXBoxedLong(initial); case LEFT_RIGHT_256: - if (useJava8Unsafe) - return new LeftRight256Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new LeftRight256Java7BoxedLong(initial); - else - return new LeftRight256JavaXBoxedLong(initial); + return new LeftRight256JavaXBoxedLong(initial); default: throw new MatchError(padding); diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java deleted file mode 100644 index 495565b30..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedInt.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128Java7BoxedInt extends LeftPadding120 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java7BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java7BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java deleted file mode 100644 index a2b72ea50..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedLong.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128Java7BoxedLong extends LeftPadding120 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java7BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java7BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java deleted file mode 100644 index 518df0f21..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java7BoxedObject.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128Java7BoxedObject extends LeftPadding120 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java7BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java7BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java deleted file mode 100644 index 92f0517fb..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedInt.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128Java8BoxedInt extends LeftPadding120 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java8BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java8BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java deleted file mode 100644 index 3afce1c1f..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedLong.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128Java8BoxedLong extends LeftPadding120 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java8BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java8BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java deleted file mode 100644 index efa5e2e8f..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128Java8BoxedObject.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128Java8BoxedObject extends LeftPadding120 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java8BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java8BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - return UNSAFE.getAndSetObject(this, OFFSET, update); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java index b24f9ac52..5944a69b6 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedInt.java @@ -17,48 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128JavaXBoxedInt extends LeftPadding120 implements BoxedInt { - public volatile int value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class Left128JavaXBoxedInt extends LeftPadding120 implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Left128JavaXBoxedInt.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(Left128JavaXBoxedInt.class, "value"); + private int value; Left128JavaXBoxedInt(int initialValue) { this.value = initialValue; } - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); - } - - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java index 5dd9b7e72..25a44b24f 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedLong.java @@ -17,48 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128JavaXBoxedLong extends LeftPadding120 implements BoxedLong { - public volatile long value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class Left128JavaXBoxedLong extends LeftPadding120 implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Left128JavaXBoxedLong.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(Left128JavaXBoxedLong.class, "value"); + private long value; Left128JavaXBoxedLong(long initialValue) { this.value = initialValue; } - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); - } - - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java index a0a5fffb6..c20dc8218 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left128JavaXBoxedObject.java @@ -17,44 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left128JavaXBoxedObject extends LeftPadding120 implements BoxedObject { - public volatile Object value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class Left128JavaXBoxedObject extends LeftPadding120 implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Left128JavaXBoxedObject.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(Left128JavaXBoxedObject.class, Object.class, "value"); + private Object value; Left128JavaXBoxedObject(Object initialValue) { this.value = initialValue; } - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); - } - - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java deleted file mode 100644 index 42bdfa4c1..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedInt.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64Java7BoxedInt extends LeftPadding56 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java7BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java7BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+ delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java deleted file mode 100644 index ccd46cde7..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedLong.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64Java7BoxedLong extends LeftPadding56 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java7BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java7BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java deleted file mode 100644 index 0975aa666..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java7BoxedObject.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64Java7BoxedObject extends LeftPadding56 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java7BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java7BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java deleted file mode 100644 index db5d76a57..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedInt.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64Java8BoxedInt extends LeftPadding56 implements BoxedInt { - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java8BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - public volatile int value; - - Left64Java8BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java deleted file mode 100644 index 5dfa207c3..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedLong.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64Java8BoxedLong extends LeftPadding56 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java8BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java8BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java deleted file mode 100644 index d934cacfc..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64Java8BoxedObject.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64Java8BoxedObject extends LeftPadding56 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java8BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java8BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - return UNSAFE.getAndSetObject(this, OFFSET, update); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java index 4efa1a831..0eba03d29 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedInt.java @@ -17,48 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64JavaXBoxedInt extends LeftPadding56 implements BoxedInt { - public volatile int value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class Left64JavaXBoxedInt extends LeftPadding56 implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Left64JavaXBoxedInt.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(Left64JavaXBoxedInt.class, "value"); + private int value; Left64JavaXBoxedInt(int initialValue) { this.value = initialValue; } - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); - } - - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java index b3e5d9444..7851fe5d3 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedLong.java @@ -17,49 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64JavaXBoxedLong extends LeftPadding56 implements BoxedLong { - - public volatile long value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class Left64JavaXBoxedLong extends LeftPadding56 implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Left64JavaXBoxedLong.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(Left64JavaXBoxedLong.class, "value"); + private long value; Left64JavaXBoxedLong(long initialValue) { this.value = initialValue; } - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); - } - - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java index 539a384be..0dcd3576d 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Left64JavaXBoxedObject.java @@ -17,45 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Left64JavaXBoxedObject extends LeftPadding56 implements BoxedObject { - - public volatile Object value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class Left64JavaXBoxedObject extends LeftPadding56 implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Left64JavaXBoxedObject.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(Left64JavaXBoxedObject.class, Object.class, "value"); + private Object value; Left64JavaXBoxedObject(Object initialValue) { this.value = initialValue; } - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); - } - - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java deleted file mode 100644 index cc9d09026..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedInt.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight128Java7BoxedInt extends LeftRight128Java7BoxedIntImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java7BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128Java7BoxedIntImpl extends LeftPadding56 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java deleted file mode 100644 index e87bb177d..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedLong.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight128Java7BoxedLong extends LeftRight128Java7BoxedLongImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java7BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128Java7BoxedLongImpl extends LeftPadding56 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java deleted file mode 100644 index 922d41b8b..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java7BoxedObject.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight128Java7BoxedObject extends LeftRight128Java7BoxedObjectImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128Java7BoxedObjectImpl extends LeftPadding56 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java deleted file mode 100644 index cfb04dd15..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedInt.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight128Java8BoxedInt extends LeftRight128Java8BoxedIntImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java8BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128Java8BoxedIntImpl extends LeftPadding56 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java8BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java8BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java deleted file mode 100644 index 7500b5719..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedLong.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight128Java8BoxedLong extends LeftRight128Java8BoxedLongImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java8BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128Java8BoxedLongImpl extends LeftPadding56 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java8BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java8BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java deleted file mode 100644 index bcf932573..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128Java8BoxedObject.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight128Java8BoxedObject extends LeftRight128Java8BoxedObjectImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java8BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128Java8BoxedObjectImpl extends LeftPadding56 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java8BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java8BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java index 52585e451..9f4ceb6c2 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedInt.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class LeftRight128JavaXBoxedInt extends LeftRight128JavaXBoxedIntImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -40,46 +32,24 @@ final class LeftRight128JavaXBoxedInt extends LeftRight128JavaXBoxedIntImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128JavaXBoxedIntImpl extends LeftPadding56 implements BoxedInt { - public volatile int value; - - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(LeftRight128JavaXBoxedIntImpl.class, "value"); +abstract class LeftRight128JavaXBoxedIntImpl extends LeftPadding56 implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; - LeftRight128JavaXBoxedIntImpl(int initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(LeftRight128JavaXBoxedIntImpl.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public int volatileGet() { - return value; - } + private int value; - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); + LeftRight128JavaXBoxedIntImpl(int initialValue) { + this.value = initialValue; } - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java index 2010186ab..e408c89dd 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedLong.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class LeftRight128JavaXBoxedLong extends LeftRight128JavaXBoxedLongImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -40,46 +32,24 @@ final class LeftRight128JavaXBoxedLong extends LeftRight128JavaXBoxedLongImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128JavaXBoxedLongImpl extends LeftPadding56 implements BoxedLong { - public volatile long value; - - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(LeftRight128JavaXBoxedLongImpl.class, "value"); +abstract class LeftRight128JavaXBoxedLongImpl extends LeftPadding56 implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; - LeftRight128JavaXBoxedLongImpl(long initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(LeftRight128JavaXBoxedLongImpl.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public long volatileGet() { - return value; - } + private long value; - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); + LeftRight128JavaXBoxedLongImpl(long initialValue) { + this.value = initialValue; } - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java index 9db4ccbf3..15d5841e3 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight128JavaXBoxedObject.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class LeftRight128JavaXBoxedObject extends LeftRight128JavaXBoxedObjectImpl { public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; @Override public long sum() { @@ -40,42 +32,24 @@ final class LeftRight128JavaXBoxedObject extends LeftRight128JavaXBoxedObjectImp } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight128JavaXBoxedObjectImpl extends LeftPadding56 implements BoxedObject { - public volatile Object value; - - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(LeftRight128JavaXBoxedObjectImpl.class, Object.class, "value"); +abstract class LeftRight128JavaXBoxedObjectImpl extends LeftPadding56 implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; - LeftRight128JavaXBoxedObjectImpl(Object initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(LeftRight128JavaXBoxedObjectImpl.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public Object volatileGet() { - return value; - } + private Object value; - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); + LeftRight128JavaXBoxedObjectImpl(Object initialValue) { + this.value = initialValue; } - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java deleted file mode 100644 index 581097aa8..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedInt.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight256Java7BoxedInt extends LeftRight256Java7BoxedIntImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java7BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256Java7BoxedIntImpl extends LeftPadding120 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java deleted file mode 100644 index 6fda6111a..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedLong.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight256Java7BoxedLong extends LeftRight256Java7BoxedLongImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java7BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256Java7BoxedLongImpl extends LeftPadding120 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java deleted file mode 100644 index f31dad768..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java7BoxedObject.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight256Java7BoxedObject extends LeftRight256Java7BoxedObjectImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256Java7BoxedObjectImpl extends LeftPadding120 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java deleted file mode 100644 index 2fa5ae48e..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedInt.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight256Java8BoxedInt extends LeftRight256Java8BoxedIntImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java8BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256Java8BoxedIntImpl extends LeftPadding120 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java8BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java8BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java deleted file mode 100644 index b590c2ae8..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedLong.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight256Java8BoxedLong extends LeftRight256Java8BoxedLongImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java8BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256Java8BoxedLongImpl extends LeftPadding120 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java8BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java8BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java deleted file mode 100644 index 799f16491..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256Java8BoxedObject.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class LeftRight256Java8BoxedObject extends LeftRight256Java8BoxedObjectImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java8BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256Java8BoxedObjectImpl extends LeftPadding120 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java8BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java8BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - return UNSAFE.getAndSetObject(this, OFFSET, update); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java index c1ff8da10..477a5c34d 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedInt.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class LeftRight256JavaXBoxedInt extends LeftRight256JavaXBoxedIntImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -44,46 +36,24 @@ final class LeftRight256JavaXBoxedInt extends LeftRight256JavaXBoxedIntImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256JavaXBoxedIntImpl extends LeftPadding120 implements BoxedInt { - public volatile int value; - - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(LeftRight256JavaXBoxedIntImpl.class, "value"); +abstract class LeftRight256JavaXBoxedIntImpl extends LeftPadding120 implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; - LeftRight256JavaXBoxedIntImpl(int initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(LeftRight256JavaXBoxedIntImpl.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public int volatileGet() { - return value; - } + private int value; - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); + LeftRight256JavaXBoxedIntImpl(int initialValue) { + this.value = initialValue; } - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java index a7a77e1d6..9b34c41c1 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedLong.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class LeftRight256JavaXBoxedLong extends LeftRight256JavaXBoxedLongImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -44,46 +36,24 @@ final class LeftRight256JavaXBoxedLong extends LeftRight256JavaXBoxedLongImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256JavaXBoxedLongImpl extends LeftPadding120 implements BoxedLong { - public volatile long value; - - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(LeftRight256JavaXBoxedLongImpl.class, "value"); +abstract class LeftRight256JavaXBoxedLongImpl extends LeftPadding120 implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; - LeftRight256JavaXBoxedLongImpl(long initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(LeftRight256JavaXBoxedLongImpl.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public long volatileGet() { - return value; - } + private long value; - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); + LeftRight256JavaXBoxedLongImpl(long initialValue) { + this.value = initialValue; } - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java index 3f8785d4d..5add612ed 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/LeftRight256JavaXBoxedObject.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class LeftRight256JavaXBoxedObject extends LeftRight256JavaXBoxedObjectImpl { public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; @@ -44,42 +36,24 @@ final class LeftRight256JavaXBoxedObject extends LeftRight256JavaXBoxedObjectImp } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class LeftRight256JavaXBoxedObjectImpl extends LeftPadding120 implements BoxedObject { - public volatile Object value; - - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(LeftRight256JavaXBoxedObjectImpl.class, Object.class, "value"); +abstract class LeftRight256JavaXBoxedObjectImpl extends LeftPadding120 implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; - LeftRight256JavaXBoxedObjectImpl(Object initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(LeftRight256JavaXBoxedObjectImpl.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public Object volatileGet() { - return value; - } + private Object value; - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); + LeftRight256JavaXBoxedObjectImpl(Object initialValue) { + this.value = initialValue; } - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java deleted file mode 100644 index beb1c80c1..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedInt.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJava7BoxedInt implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava7BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava7BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java deleted file mode 100644 index 7ee24bfd0..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedLong.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJava7BoxedLong implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava7BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava7BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java deleted file mode 100644 index a56974673..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava7BoxedObject.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJava7BoxedObject implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava7BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava7BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java deleted file mode 100644 index cdada9824..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedInt.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJava8BoxedInt implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava8BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava8BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java deleted file mode 100644 index 33b6921b8..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedLong.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJava8BoxedLong implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava8BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava8BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java deleted file mode 100644 index 1d38e50e1..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJava8BoxedObject.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJava8BoxedObject implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava8BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava8BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - return UNSAFE.getAndSetObject(this, OFFSET, update); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java index 568b4168a..240a34531 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedInt.java @@ -17,48 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJavaXBoxedInt implements BoxedInt { - public volatile int value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class NormalJavaXBoxedInt implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(NormalJavaXBoxedInt.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(NormalJavaXBoxedInt.class, "value"); + private int value; NormalJavaXBoxedInt(int initialValue) { this.value = initialValue; } - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); - } - - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java index 00cab30de..764444135 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedLong.java @@ -17,49 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJavaXBoxedLong implements BoxedLong { - - public volatile long value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class NormalJavaXBoxedLong implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(NormalJavaXBoxedLong.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(NormalJavaXBoxedLong.class, "value"); + private long value; NormalJavaXBoxedLong(long initialValue) { this.value = initialValue; } - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); - } - - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java index c12eb7716..a918ebd02 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/NormalJavaXBoxedObject.java @@ -17,44 +17,27 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class NormalJavaXBoxedObject implements BoxedObject { - public volatile Object value; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; + +final class NormalJavaXBoxedObject implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; + + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(NormalJavaXBoxedObject.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } + } - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(NormalJavaXBoxedObject.class, Object.class, "value"); + private Object value; NormalJavaXBoxedObject(Object initialValue) { this.value = initialValue; } - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); - } - - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java deleted file mode 100644 index d26041000..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedInt.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right128Java7BoxedInt extends Right128Java7BoxedIntImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java7BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128Java7BoxedIntImpl implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java deleted file mode 100644 index 5980e2a01..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedLong.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right128Java7BoxedLong extends Right128Java7BoxedLongImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java7BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128Java7BoxedLongImpl implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java deleted file mode 100644 index ad64b09b1..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java7BoxedObject.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right128Java7BoxedObject extends Right128Java7BoxedObjectImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128Java7BoxedObjectImpl implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java deleted file mode 100644 index 473150327..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedInt.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right128Java8BoxedInt extends Right128Java8BoxedIntImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java8BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128Java8BoxedIntImpl implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java8BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java8BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java deleted file mode 100644 index 415f54f49..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedLong.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right128Java8BoxedLong extends Right128Java8BoxedLongImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java8BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128Java8BoxedLongImpl implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java8BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java8BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java deleted file mode 100644 index 343f4130f..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128Java8BoxedObject.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right128Java8BoxedObject extends Right128Java8BoxedObjectImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java8BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128Java8BoxedObjectImpl implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java8BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java8BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - return UNSAFE.getAndSetObject(this, OFFSET, update); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java index b24646f75..b9d7407d6 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedInt.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class Right128JavaXBoxedInt extends Right128JavaXBoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -41,46 +33,24 @@ public long sum() { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128JavaXBoxedIntImpl implements BoxedInt { - public volatile int value; - - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(Right128JavaXBoxedIntImpl.class, "value"); +abstract class Right128JavaXBoxedIntImpl implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; - Right128JavaXBoxedIntImpl(int initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Right128JavaXBoxedIntImpl.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public int volatileGet() { - return value; - } + private int value; - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); + Right128JavaXBoxedIntImpl(int initialValue) { + this.value = initialValue; } - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java index bd6d297ce..4f3170dea 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedLong.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class Right128JavaXBoxedLong extends Right128JavaXBoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -41,46 +33,24 @@ public long sum() { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128JavaXBoxedLongImpl implements BoxedLong { - public volatile long value; - - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(Right128JavaXBoxedLongImpl.class, "value"); +abstract class Right128JavaXBoxedLongImpl implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; - Right128JavaXBoxedLongImpl(long initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Right128JavaXBoxedLongImpl.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public long volatileGet() { - return value; - } + private long value; - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); + Right128JavaXBoxedLongImpl(long initialValue) { + this.value = initialValue; } - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java index f3017410d..e6051bd75 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right128JavaXBoxedObject.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class Right128JavaXBoxedObject extends Right128JavaXBoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; @@ -41,42 +33,24 @@ public long sum() { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right128JavaXBoxedObjectImpl implements BoxedObject { - public volatile Object value; - - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(Right128JavaXBoxedObjectImpl.class, Object.class, "value"); +abstract class Right128JavaXBoxedObjectImpl implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; - Right128JavaXBoxedObjectImpl(Object initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Right128JavaXBoxedObjectImpl.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public Object volatileGet() { - return value; - } + private Object value; - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); + Right128JavaXBoxedObjectImpl(Object initialValue) { + this.value = initialValue; } - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java deleted file mode 100644 index 4f7a04ec8..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedInt.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64Java7BoxedIntImpl implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right64Java7BoxedInt extends Right64Java7BoxedIntImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java7BoxedInt(int initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java deleted file mode 100644 index 20cea12b1..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedLong.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64Java7BoxedLongImpl implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right64Java7BoxedLong extends Right64Java7BoxedLongImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java7BoxedLong(long initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java deleted file mode 100644 index 14e4296cf..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java7BoxedObject.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64Java7BoxedObjectImpl implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right64Java7BoxedObject extends Right64Java7BoxedObjectImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java deleted file mode 100644 index 6a66edd2c..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedInt.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64Java8BoxedIntImpl implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java8BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java8BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - return UNSAFE.getAndSetInt(this, OFFSET, update); - } - - public int getAndAdd(int delta) { - return UNSAFE.getAndAddInt(this, OFFSET, delta); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right64Java8BoxedInt extends Right64Java8BoxedIntImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java8BoxedInt(int initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java deleted file mode 100644 index 25364563a..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedLong.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64Java8BoxedLongImpl implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java8BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java8BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - return UNSAFE.getAndSetLong(this, OFFSET, update); - } - - public long getAndAdd(long delta) { - return UNSAFE.getAndAddLong(this, OFFSET, delta); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right64Java8BoxedLong extends Right64Java8BoxedLongImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java8BoxedLong(long initialValue) { - super(initialValue); - } -} \ No newline at end of file diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java deleted file mode 100644 index f4ad8db90..000000000 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64Java8BoxedObject.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2014-2022 Monix Contributors. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.atomic.internal; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64Java8BoxedObjectImpl implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java8BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java8BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - return UNSAFE.getAndSetObject(this, OFFSET, update); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -final class Right64Java8BoxedObject extends Right64Java8BoxedObjectImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java8BoxedObject(Object initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java index 642b89291..011920957 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedInt.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class Right64JavaXBoxedInt extends Right64JavaXBoxedIntImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } @@ -37,46 +29,24 @@ final class Right64JavaXBoxedInt extends Right64JavaXBoxedIntImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64JavaXBoxedIntImpl implements BoxedInt { - public volatile int value; - - private static final AtomicIntegerFieldUpdater UPDATER = - AtomicIntegerFieldUpdater.newUpdater(Right64JavaXBoxedIntImpl.class, "value"); +abstract class Right64JavaXBoxedIntImpl implements VarHandleBoxedInt { + private static final VarHandle VALUE_VH; - Right64JavaXBoxedIntImpl(int initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Right64JavaXBoxedIntImpl.class, "value", int.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public int volatileGet() { - return value; - } + private int value; - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(int current, int update) { - return UPDATER.compareAndSet(this, current, update); - } - - public int getAndSet(int update) { - return UPDATER.getAndSet(this, update); + Right64JavaXBoxedIntImpl(int initialValue) { + this.value = initialValue; } - public int getAndAdd(int delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java index 63aadb29a..c59a4cae8 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedLong.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicLongFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class Right64JavaXBoxedLong extends Right64JavaXBoxedLongImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } @@ -37,46 +29,24 @@ final class Right64JavaXBoxedLong extends Right64JavaXBoxedLongImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64JavaXBoxedLongImpl implements BoxedLong { - public volatile long value; - - private static final AtomicLongFieldUpdater UPDATER = - AtomicLongFieldUpdater.newUpdater(Right64JavaXBoxedLongImpl.class, "value"); +abstract class Right64JavaXBoxedLongImpl implements VarHandleBoxedLong { + private static final VarHandle VALUE_VH; - Right64JavaXBoxedLongImpl(long initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Right64JavaXBoxedLongImpl.class, "value", long.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public long volatileGet() { - return value; - } + private long value; - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(long current, long update) { - return UPDATER.compareAndSet(this, current, update); - } - - public long getAndSet(long update) { - return UPDATER.getAndSet(this, update); + Right64JavaXBoxedLongImpl(long initialValue) { + this.value = initialValue; } - public long getAndAdd(long delta) { - return UPDATER.getAndAdd(this, delta); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java index f02a95437..c1893d357 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/Right64JavaXBoxedObject.java @@ -17,17 +17,9 @@ package monix.execution.atomic.internal; -import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.VarHandle; -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ final class Right64JavaXBoxedObject extends Right64JavaXBoxedObjectImpl { public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } @@ -37,42 +29,24 @@ final class Right64JavaXBoxedObject extends Right64JavaXBoxedObjectImpl { } } -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -abstract class Right64JavaXBoxedObjectImpl implements BoxedObject { - public volatile Object value; - - private static final AtomicReferenceFieldUpdater UPDATER = - AtomicReferenceFieldUpdater.newUpdater(Right64JavaXBoxedObjectImpl.class, Object.class, "value"); +abstract class Right64JavaXBoxedObjectImpl implements VarHandleBoxedObject { + private static final VarHandle VALUE_VH; - Right64JavaXBoxedObjectImpl(Object initialValue) { - this.value = initialValue; + static { + try { + VALUE_VH = MethodHandles.lookup().findVarHandle(Right64JavaXBoxedObjectImpl.class, "value", Object.class); + } catch (NoSuchFieldException | IllegalAccessException e) { + throw new AssertionError(e); + } } - public Object volatileGet() { - return value; - } + private Object value; - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UPDATER.lazySet(this, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UPDATER.compareAndSet(this, current, update); + Right64JavaXBoxedObjectImpl(Object initialValue) { + this.value = initialValue; } - public Object getAndSet(Object update) { - return UPDATER.getAndSet(this, update); + public final VarHandle valueHandle() { + return VALUE_VH; } -} \ No newline at end of file +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java index 3b739284c..f57ea6f32 100644 --- a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/UnsafeAccess.java @@ -17,160 +17,17 @@ package monix.execution.atomic.internal; -import scala.util.control.NonFatal; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -/** - * INTERNAL API — Provides access to `sun.misc.Unsafe`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ public final class UnsafeAccess { - private static final Object UNSAFE; - - /** True in case the underlying platform supports - * `sun.misc.Unsafe`, `false` otherwise. - * - * In case [[IS_ALLOWED]] is set to `false`, then - * [[IS_AVAILABLE]] is also going to be set to `false`. - */ - public static final boolean IS_AVAILABLE; - - /** - * True in case the `sun.misc.Unsafe` usage is disabled - * by means of setting `-Dmonix.environment.canUseUnsafe=false`. - * - * In case this is set to `false`, then [[IS_AVAILABLE]] is - * also going to be set to `false`. - */ - public static final boolean IS_ALLOWED; + public static final boolean IS_AVAILABLE = false; + public static final boolean IS_ALLOWED = false; + public static final boolean HAS_JAVA8_INTRINSICS = false; + public static final boolean IS_OPENJDK_COMPATIBLE = false; - /** - * True in case the underlying platform supports Java 8's - * `Unsafe` features for platform intrinsics. - */ - public static final boolean HAS_JAVA8_INTRINSICS; - - /** - * Some platforms do not expose a `theUnsafe` private reference - * to a `sun.misc.Unsafe` instance, but unfortunately some libraries - * (notably version 2.0 of JCTools) depends on this. - * - * This reference is set to `true` in case `Unsafe.theUnsafe` exists, - * or `false` otherwise. - */ - public static final boolean IS_OPENJDK_COMPATIBLE; - - /** - * Returns a reusable reference for `sun.misc.Unsafe`. - */ public static Object getInstance() { - if (UNSAFE == null) - throw new AssertionError( - "Platform does not support sun.misc.Unsafe, " + - "please file a bug report for the Monix project " + - "(see https://monix.io)" - ); - - return UNSAFE; - } - - private static boolean isUnsafeAllowed() { - String env = System.getProperty("monix.environment.canUseUnsafe", "").trim().toLowerCase(); - boolean disabled = env.equals("no") || env.equals("false") || env.equals("0"); - return !disabled; + throw new UnsupportedOperationException( + "Legacy unsafe access is not used by monix.execution.atomic.internal on JDK 17+" + ); } - static { - Object instance = null; - boolean isJava8 = false; - boolean isAllowed = false; - boolean isOpenJDKCompatible = false; - - try { - isAllowed = isUnsafeAllowed(); - - if (isAllowed) { - Class cls = Class.forName("sun.misc.Unsafe", true, UnsafeAccess.class.getClassLoader()); - try { - Field field = cls.getDeclaredField("theUnsafe"); - field.setAccessible(true); - instance = field.get(null); - if (instance == null) throw null; - isOpenJDKCompatible = true; - } - catch (Exception ex) { - if (!NonFatal.apply(ex)) { - throw ex; - } - else { - // Workaround for older Android versions or other non-OpenJDK - // implementations that may not have a `theUnsafe` instance - Constructor c = cls.getDeclaredConstructor(); - c.setAccessible(true); - instance = c.newInstance(); - } - } - - boolean supportsGetAndSet = false; - try { - cls.getMethod("getAndSetObject", Object.class, Long.TYPE, Object.class); - supportsGetAndSet = true; - } - catch (Exception e) { - if (!NonFatal.apply(e)) throw e; - } - - boolean supportsGetAndAddInt = false; - try { - cls.getMethod("getAndAddInt", Object.class, Long.TYPE, Integer.TYPE); - supportsGetAndAddInt = true; - } - catch (Exception e) { - if (!NonFatal.apply(e)) throw e; - } - - boolean supportsGetAndAddLong = false; - try { - cls.getMethod("getAndAddLong", Object.class, Long.TYPE, Long.TYPE); - supportsGetAndAddLong = true; - } - catch (Exception e) { - if (!NonFatal.apply(e)) throw e; - } - - boolean supportsMemoryFences = false; - try { - Method m = cls.getDeclaredMethod("fullFence"); - supportsMemoryFences = m != null; - } - catch (Exception e) { - if (!NonFatal.apply(e)) throw e; - } - - isJava8 = supportsGetAndSet && - supportsGetAndAddInt && - supportsGetAndAddLong && - supportsMemoryFences; - } - } - catch (Exception ex) { - instance = null; - isJava8 = false; - if (!NonFatal.apply(ex)) - throw new RuntimeException(ex); - } - finally { - UNSAFE = instance; - IS_AVAILABLE = instance != null; - IS_ALLOWED = isAllowed; - HAS_JAVA8_INTRINSICS = isJava8; - IS_OPENJDK_COMPATIBLE = isOpenJDKCompatible; - } - } + private UnsafeAccess() {} } diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedInt.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedInt.java new file mode 100644 index 000000000..3ec6f68dd --- /dev/null +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedInt.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.atomic.internal; + +import java.lang.invoke.VarHandle; + +interface VarHandleBoxedInt extends BoxedInt { + VarHandle valueHandle(); + + @Override + default int volatileGet() { + return (int) valueHandle().getVolatile(this); + } + + @Override + default void volatileSet(int update) { + valueHandle().setVolatile(this, update); + } + + @Override + default void lazySet(int update) { + valueHandle().setRelease(this, update); + } + + @Override + default boolean compareAndSet(int current, int update) { + return valueHandle().compareAndSet(this, current, update); + } + + @Override + default int getAndAdd(int delta) { + return (int) valueHandle().getAndAdd(this, delta); + } + + @Override + default int getAndSet(int update) { + return (int) valueHandle().getAndSet(this, update); + } +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedLong.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedLong.java new file mode 100644 index 000000000..3390dcab6 --- /dev/null +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedLong.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.atomic.internal; + +import java.lang.invoke.VarHandle; + +interface VarHandleBoxedLong extends BoxedLong { + VarHandle valueHandle(); + + @Override + default long volatileGet() { + return (long) valueHandle().getVolatile(this); + } + + @Override + default void volatileSet(long update) { + valueHandle().setVolatile(this, update); + } + + @Override + default void lazySet(long update) { + valueHandle().setRelease(this, update); + } + + @Override + default boolean compareAndSet(long current, long update) { + return valueHandle().compareAndSet(this, current, update); + } + + @Override + default long getAndSet(long update) { + return (long) valueHandle().getAndSet(this, update); + } + + @Override + default long getAndAdd(long delta) { + return (long) valueHandle().getAndAdd(this, delta); + } +} diff --git a/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedObject.java b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedObject.java new file mode 100644 index 000000000..030107f63 --- /dev/null +++ b/monix-execution/atomic/jvm/src/main/java/monix/execution/atomic/internal/VarHandleBoxedObject.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.execution.atomic.internal; + +import java.lang.invoke.VarHandle; + +interface VarHandleBoxedObject extends BoxedObject { + VarHandle valueHandle(); + + @Override + default Object volatileGet() { + return valueHandle().getVolatile(this); + } + + @Override + default void volatileSet(Object update) { + valueHandle().setVolatile(this, update); + } + + @Override + default void lazySet(Object update) { + valueHandle().setRelease(this, update); + } + + @Override + default boolean compareAndSet(Object current, Object update) { + return valueHandle().compareAndSet(this, current, update); + } + + @Override + default Object getAndSet(Object update) { + return valueHandle().getAndSet(this, update); + } +} diff --git a/monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/Atomic.scala b/monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/Atomic.scala index e6af72d6c..f69389cfe 100644 --- a/monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/Atomic.scala +++ b/monix-execution/atomic/jvm/src/main/scala-3/monix/execution/atomic/Atomic.scala @@ -184,8 +184,10 @@ object Atomic { /** Returns the builder that would be chosen to construct Atomic * references for the given `initialValue`. */ - def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = + def builderFor[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): AtomicBuilder[A, R] = { + val _ = initialValue builder + } extension [A](self: Atomic[A]) { /** DEPRECATED - switch to [[Atomic.get]]. */ diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala index 70955e940..e25b041be 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -25,7 +25,7 @@ import monix.execution.atomic.internal.{ BoxedObject, Factory } * @tparam A is forced to be an `AnyRef` because the equality test is * by reference and not by value. */ -final class AtomicAny[A <: AnyRef] private (private[this] val ref: BoxedObject) extends Atomic[A] { +final class AtomicAny[A <: AnyRef] private (private val ref: BoxedObject) extends Atomic[A] { def get(): A = ref.volatileGet().asInstanceOf[A] def set(update: A): Unit = ref.volatileSet(update) diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index b053461d5..9646f569a 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -25,7 +25,7 @@ import monix.execution.atomic.internal.{ BoxedInt, Factory } * Note that the equality test in `compareAndSet` is value based, * since `Boolean` is a primitive. */ -final class AtomicBoolean private (private[this] val ref: BoxedInt) extends Atomic[Boolean] { +final class AtomicBoolean private (private val ref: BoxedInt) extends Atomic[Boolean] { def get(): Boolean = ref.volatileGet() == 1 diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index e92d05a96..aabaf7948 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -47,10 +47,10 @@ private[atomic] object Implicits { implicit def AtomicNumberBuilder[A <: AnyRef: Numeric]: AtomicBuilder[A, AtomicNumberAny[A]] = new AtomicBuilder[A, AtomicNumberAny[A]] { def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = - AtomicNumberAny.create(initialValue, padding, allowPlatformIntrinsics)(implicitly[Numeric[A]]) + AtomicNumberAny.create(initialValue, padding, allowPlatformIntrinsics) def buildSafeInstance(initialValue: A, padding: PaddingStrategy) = - AtomicNumberAny.safe(initialValue, padding)(implicitly[Numeric[A]]) + AtomicNumberAny.safe(initialValue, padding) } } } diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala index 7057f9695..e1f003143 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -25,9 +25,9 @@ import monix.execution.atomic.internal.{ BoxedInt, Factory } * Note that the equality test in `compareAndSet` is value based, * since `Byte` is a primitive. */ -final class AtomicByte private (private[this] val ref: BoxedInt) extends AtomicNumber[Byte] { +final class AtomicByte private (private val ref: BoxedInt) extends AtomicNumber[Byte] { - private[this] val mask = 255 + private val mask = 255 def get(): Byte = (ref.volatileGet() & mask).asInstanceOf[Byte] diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala index bcfd408b0..39cf64c90 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -25,8 +25,8 @@ import monix.execution.atomic.internal.{ BoxedInt, Factory } * Note that the equality test in `compareAndSet` is value based, * since `Char` is a primitive. */ -final class AtomicChar private (private[this] val ref: BoxedInt) extends AtomicNumber[Char] { - private[this] val mask = 255 + 255 * 256 +final class AtomicChar private (private val ref: BoxedInt) extends AtomicNumber[Char] { + private val mask = 255 + 255 * 256 def get(): Char = (ref.volatileGet() & mask).asInstanceOf[Char] diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala index b1897a19f..0cb74f7dc 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -27,7 +27,7 @@ import scala.annotation.tailrec * Note that the equality test in `compareAndSet` is value based, * since `Double` is a primitive. */ -final class AtomicDouble private (val ref: BoxedLong) extends AtomicNumber[Double] { +final class AtomicDouble private (private val ref: BoxedLong) extends AtomicNumber[Double] { def get(): Double = longBitsToDouble(ref.volatileGet()) def set(update: Double): Unit = ref.volatileSet(doubleToLongBits(update)) @@ -131,9 +131,9 @@ final class AtomicDouble private (val ref: BoxedLong) extends AtomicNumber[Doubl def decrementAndGet(v: Int = 1): Double = incrementAndGet(-v) def getAndDecrement(v: Int = 1): Double = getAndIncrement(-v) - private[this] def plusOp(a: Double, b: Double): Double = a + b - private[this] def minusOp(a: Double, b: Double): Double = a - b - private[this] def incrementOp(a: Double, b: Int): Double = a + b + private def plusOp(a: Double, b: Double): Double = a + b + private def minusOp(a: Double, b: Double): Double = a - b + private def incrementOp(a: Double, b: Int): Double = a + b } /** @define createDesc Constructs an [[AtomicDouble]] reference, allowing diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 8d49357cf..ddf9ac54d 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -27,7 +27,7 @@ import java.lang.Float.{ floatToIntBits, intBitsToFloat } * Note that the equality test in `compareAndSet` is value based, * since `Float` is a primitive. */ -final class AtomicFloat private (private[this] val ref: BoxedInt) extends AtomicNumber[Float] { +final class AtomicFloat private (private val ref: BoxedInt) extends AtomicNumber[Float] { def get(): Float = intBitsToFloat(ref.volatileGet()) def set(update: Float): Unit = ref.volatileSet(floatToIntBits(update)) @@ -131,9 +131,9 @@ final class AtomicFloat private (private[this] val ref: BoxedInt) extends Atomic def decrementAndGet(v: Int = 1): Float = incrementAndGet(-v) def getAndDecrement(v: Int = 1): Float = getAndIncrement(-v) - private[this] def plusOp(a: Float, b: Float): Float = a + b - private[this] def minusOp(a: Float, b: Float): Float = a - b - private[this] def incrementOp(a: Float, b: Int): Float = a + b + private def plusOp(a: Float, b: Float): Float = a + b + private def minusOp(a: Float, b: Float): Float = a - b + private def incrementOp(a: Float, b: Int): Float = a + b } /** @define createDesc Constructs an [[AtomicFloat]] reference, allowing diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala index 5472e539a..8c865fbef 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -25,7 +25,7 @@ import monix.execution.atomic.internal.{ BoxedInt, Factory } * Note that the equality test in `compareAndSet` is value based, * since `Int` is a primitive. */ -final class AtomicInt private (private[this] val ref: BoxedInt) extends AtomicNumber[Int] { +final class AtomicInt private (private val ref: BoxedInt) extends AtomicNumber[Int] { def get(): Int = ref.volatileGet() def set(update: Int): Unit = ref.volatileSet(update) diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala index 38962ee8f..79a737f10 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -25,7 +25,7 @@ import monix.execution.atomic.internal.{ BoxedLong, Factory } * Note that the equality test in `compareAndSet` is value based, * since `Long` is a primitive. */ -final class AtomicLong private (private[this] val ref: BoxedLong) extends AtomicNumber[Long] { +final class AtomicLong private (private val ref: BoxedLong) extends AtomicNumber[Long] { def get(): Long = ref.volatileGet() def set(update: Long): Unit = ref.volatileSet(update) diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index 0eaa1d615..7284e747e 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -29,9 +29,9 @@ import scala.annotation.tailrec * of the JVM that's the semantic of `compareAndSet`. This behavior * is kept consistent even on top of Scala.js / Javascript. */ -final class AtomicNumberAny[A <: AnyRef: Numeric] private (private[this] val ref: BoxedObject) extends AtomicNumber[A] { +final class AtomicNumberAny[A <: AnyRef: Numeric] private (private val ref: BoxedObject) extends AtomicNumber[A] { - private[this] val ev = implicitly[Numeric[A]] + private val ev = implicitly[Numeric[A]] def get(): A = ref.volatileGet().asInstanceOf[A] def set(update: A): Unit = ref.volatileSet(update) diff --git a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala index d8e08ada5..f5b5a4a0c 100644 --- a/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/atomic/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -25,8 +25,8 @@ import monix.execution.atomic.internal.{ BoxedInt, Factory } * Note that the equality test in `compareAndSet` is value based, * since `Short` is a primitive. */ -final class AtomicShort private (private[this] val ref: BoxedInt) extends AtomicNumber[Short] { - private[this] val mask = 255 + 255 * 256 +final class AtomicShort private (private val ref: BoxedInt) extends AtomicNumber[Short] { + private val mask = 255 + 255 * 256 def get(): Short = (ref.volatileGet() & mask).asInstanceOf[Short] diff --git a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala index 2195044e1..4864f13ef 100644 --- a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala +++ b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala @@ -42,7 +42,7 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == ev.fromInt(500)) } @@ -55,7 +55,7 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == ev.fromInt(100)) } @@ -68,7 +68,7 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == ev.fromInt(500)) } @@ -81,7 +81,7 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == ev.fromInt(500)) } @@ -94,7 +94,7 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == ev.fromInt(500)) } } diff --git a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala index a4f66b84c..5db41ee81 100644 --- a/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala +++ b/monix-execution/atomic/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala @@ -45,7 +45,7 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == valueFromInt(500)) } @@ -58,7 +58,7 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( } val f = Future.sequence(futures) - Await.result(f, 30.seconds) + val _ = Await.result(f, 30.seconds) assert(r.get() == valueFromInt(99)) } } diff --git a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala index c437507b7..9c9c30783 100644 --- a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala +++ b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/PaddingStrategy.scala @@ -32,8 +32,9 @@ package monix.execution.atomic * import monix.execution.atomic.Atomic * import monix.execution.atomic.PaddingStrategy.Right64 * - * val paddedAtomic = Atomic.withPadding(10, Right64) - * }}} + * val paddedAtomic = Atomic.withPadding(10, Right64) + * val _ = paddedAtomic.get() + * }}} * * @see [[PaddingStrategy.NoPadding]] * @see [[PaddingStrategy.Left64]] diff --git a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala index b31484477..eb18e0eaa 100644 --- a/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala +++ b/monix-execution/atomic/shared/src/main/scala/monix/execution/atomic/internal/AtomicDocs.scala @@ -39,14 +39,17 @@ package internal * {{{ * import monix.execution.atomic._ * - * def getAndSet[A](ref: Atomic[A], update: A): A = { - * val current = ref.get() - * if (!ref.compareAndSet(current, update)) - * getAndSet(ref, update) // update failed, repeat! - * else - * current - * } - * }}} + * def getAndSet[A](ref: Atomic[A], update: A): A = { + * val current = ref.get() + * if (!ref.compareAndSet(current, update)) + * getAndSet(ref, update) // update failed, repeat! + * else + * current + * } + * + * val ref = Atomic(0) + * val _ = getAndSet(ref, 1) + * }}} * * NOTE — on top of the JVM this operation is a platform intrinsic, * meaning that it's more efficient than a `compareAndSet`-driven loop. @@ -79,7 +82,7 @@ package internal * import monix.execution.atomic._ * import scala.collection.immutable.Queue * - * class ConcurrentQueue0[A] private (ref: Atomic[Queue[A]]) { + * class ConcurrentQueue0[A](ref: Atomic[Queue[A]]) { * def enqueue(value: A): Unit = { * val current = ref.get() * val update = current.enqueue(value) @@ -97,10 +100,14 @@ package internal * dequeue() // transaction failed, retry! * else * Some(elem) - * } - * } - * } - * }}} + * } + * } + * } + * + * val q0 = new ConcurrentQueue0[Int](Atomic(Queue.empty[Int])) + * q0.enqueue(1) + * val _ = q0.dequeue() + * }}} * * @define atomicBestPractices BEST PRACTICES: * @@ -141,7 +148,7 @@ package internal * import monix.execution.atomic._ * import scala.collection.immutable.Queue * - * final class ConcurrentQueue1[A] private (state: AtomicAny[Queue[A]]) { + * final class ConcurrentQueue1[A](state: Atomic[Queue[A]]) { * def enqueue(value: A): Unit = * state.transform(_.enqueue(value)) * @@ -152,10 +159,14 @@ package internal * else { * val (a, update) = queue.dequeue * (Some(a), update) - * } - * } - * } - * }}} + * } + * } + * } + * + * val q1 = new ConcurrentQueue1[Int](Atomic(Queue.empty[Int])) + * q1.enqueue(1) + * val _ = q1.dequeue() + * }}} * * @see [[getAndTransform]] and [[transformAndGet]]. * @@ -192,13 +203,16 @@ package internal * {{{ * import monix.execution.atomic._ * - * final class CountDown0 private (state: AtomicLong) { + * final class CountDown0(state: AtomicLong) { * def next(): Boolean = { * val n = state.transformAndGet(n => math.max(n - 1, 0)) - * n > 0 - * } - * } - * }}} + * n > 0 + * } + * } + * + * val c0 = new CountDown0(Atomic(10L)) + * val _ = c0.next() + * }}} * * @see [[getAndTransform]] and [[transformAndExtract]]. * @@ -218,13 +232,16 @@ package internal * {{{ * import monix.execution.atomic._ * - * final class CountDown1 private (state: AtomicLong, n: Int) { + * final class CountDown1(state: AtomicLong, n: Int) { * def next(): Boolean = { * val i = state.getAndTransform(i => math.min(n, i + 1)) - * i < n - * } - * } - * }}} + * i < n + * } + * } + * + * val c1 = new CountDown1(Atomic(0L), 10) + * val _ = c1.next() + * }}} * * @see [[transformAndGet]] and [[transformAndExtract]]. * @@ -242,10 +259,14 @@ package internal * {{{ * import monix.execution.atomic._ * - * final class Counter private (state: AtomicLong) { - * def mark(i: Int = 1): Unit = state.transform(_ + i) - * def get(): Long = state.get() - * } - * }}} + * final class Counter(state: AtomicLong) { + * def mark(i: Int = 1): Unit = state.transform(_ + i) + * def get(): Long = state.get() + * } + * + * val counter = new Counter(Atomic(0L)) + * counter.mark(1) + * val _ = counter.get() + * }}} */ -private[atomic] trait AtomicDocs { this: Atomic[_] => } +private[atomic] trait AtomicDocs { this: Atomic[?] => } diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala b/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala index f10d67056..56fb7ee49 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/DefaultUncaughtExceptionReporter.scala @@ -28,6 +28,5 @@ private[execution] object DefaultUncaughtExceptionReporter extends UncaughtExcep def reportFailure(e: Throwable): Unit = logger(e) - private[this] lazy val logger = - ExecutionContext.defaultReporter + private val logger = ExecutionContext.defaultReporter } diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala index 608c79a79..8aa4f09f5 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/Platform.scala @@ -129,7 +129,7 @@ private[monix] object Platform { * Useful utility that combines an `Either` result, which is what * `MonadError#attempt` returns. */ - def composeErrors(first: Throwable, second: Either[Throwable, _]): Throwable = + def composeErrors(first: Throwable, second: Either[Throwable, Any]): Throwable = second match { case Left(e2) => composeErrors(first, e2) case _ => first diff --git a/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala b/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala index 88bf7fbbd..f802e6dd7 100644 --- a/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala +++ b/monix-execution/js/src/main/scala/monix/execution/internal/collection/JSArrayQueue.scala @@ -28,10 +28,9 @@ import scala.scalajs.js private[monix] final class JSArrayQueue[A] private (_size: Int, triggerEx: Int => Throwable = null) extends EvictingQueue[A] with LowLevelConcurrentQueue[A] { - private[this] var queue = new js.Array[A]() - private[this] var offset = 0 - private[this] val bufferSize = - if (_size <= 0) 0 else nextPowerOf2(_size) + private var queue = new js.Array[A]() + private var offset = 0 + private val bufferSize = if (_size <= 0) 0 else nextPowerOf2(_size) override def capacity: Int = if (bufferSize == 0) Int.MaxValue else bufferSize @@ -53,7 +52,7 @@ private[monix] final class JSArrayQueue[A] private (_size: Int, triggerEx: Int = if (triggerEx != null) throw triggerEx(capacity) 1 // rejecting new element as we are at capacity } else { - queue.push(elem) + val _ = queue.push(elem) 0 } } diff --git a/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala b/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala index c22def015..0f71c9f79 100644 --- a/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala +++ b/monix-execution/js/src/main/scala/monix/execution/misc/ThreadLocal.scala @@ -31,7 +31,7 @@ package monix.execution.misc * any values yet. */ final class ThreadLocal[A] private (val initial: A) { - private[this] var tl = initial + private var tl = initial /** Returns the value in the current thread's copy of this * thread-local variable. If the variable has no value for the diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala index c87cba475..94fa83449 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/JSTimer.scala @@ -34,7 +34,7 @@ private[schedulers] object JSTimer { } def clearTimeout(task: js.Dynamic): Unit = { - js.Dynamic.global.clearTimeout(task) + val _ = js.Dynamic.global.clearTimeout(task) () } } diff --git a/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index f50883ad7..4759b8437 100644 --- a/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/js/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -53,7 +53,7 @@ import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor } */ final class TrampolineExecutionContext private (underlying: ExecutionContext) extends ExecutionContextExecutor { - private[this] val trampoline = new Trampoline + private val trampoline = new Trampoline override def execute(runnable: Runnable): Unit = trampoline.execute(runnable, underlying) diff --git a/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala b/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala index 98aecf18c..509d0d879 100644 --- a/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala +++ b/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala @@ -17,6 +17,8 @@ package org.reactivestreams +import scala.annotation.nowarn + /** * Mirrors the `Publisher` interface from the * [[http://www.reactive-streams.org/ Reactive Streams]] project. @@ -43,5 +45,6 @@ trait Publisher[T] extends Any { * @param subscriber the [[Subscriber]] that will consume signals * from this [[Publisher]] */ + @nowarn("msg=.*") def subscribe(subscriber: Subscriber[_ >: T]): Unit } diff --git a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala index 52d7524f1..062625496 100644 --- a/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala +++ b/monix-execution/js/src/test/scala/monix/execution/internal/AsyncSchedulerJSSuite.scala @@ -74,7 +74,7 @@ object AsyncSchedulerJSSuite extends TestSuite[Scheduler] with TestUtils { import concurrent.duration._ val p = Promise[Unit]() val startAt = s.clockMonotonic(MILLISECONDS) - s.scheduleOnce(100.millis) { p.success(()); () } + val _ = s.scheduleOnce(100.millis) { p.success(()); () } for (_ <- p.future) yield { val duration = s.clockMonotonic(MILLISECONDS) - startAt diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala index 9f0e98633..bb7826db9 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala @@ -18,6 +18,7 @@ package monix.execution.internal import monix.execution.schedulers.CanBlock +import scala.annotation.nowarn import scala.annotation.unused import scala.concurrent.{ Await, Awaitable } import scala.concurrent.duration.Duration @@ -161,7 +162,7 @@ private[monix] object Platform { /** Useful utility that combines an `Either` result, which is what * `MonadError#attempt` returns. */ - def composeErrors(first: Throwable, second: Either[Throwable, _]): Throwable = + def composeErrors(first: Throwable, second: Either[Throwable, Any]): Throwable = second match { case Left(e2) if first ne e2 => first.addSuppressed(e2) @@ -176,6 +177,7 @@ private[monix] object Platform { * To be used for multi-threading optimizations. Note that * in JavaScript this always returns the same value. */ + @nowarn("cat=deprecation") def currentThreadId(): Long = { Thread.currentThread().getId } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala index a1e026c44..4460fa43d 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala @@ -17,12 +17,10 @@ package monix.execution.internal.collection.queues +import java.lang.invoke.VarHandle import monix.execution.ChannelType -import monix.execution.ChannelType.{ SingleConsumer, SingleProducer } -import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue -import sun.misc.Unsafe import scala.collection.mutable private[internal] abstract class FromCircularQueue[A](queue: MessagePassingQueue[A]) @@ -59,14 +57,11 @@ private[internal] object FromCircularQueue { case ChannelType.MPMC => new MPMC[A](queue) case ChannelType.MPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8MPSC[A](queue) - else new Java7[A](queue, ct) + new Java8MPSC[A](queue) case ChannelType.SPMC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPMC[A](queue) - else new Java7[A](queue, ct) + new Java8SPMC[A](queue) case ChannelType.SPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPSC[A](queue) - else new Java7[A](queue, ct) + new Java8SPSC[A](queue) } private final class MPMC[A](queue: MessagePassingQueue[A]) extends FromCircularQueue[A](queue) { @@ -77,46 +72,19 @@ private[internal] object FromCircularQueue { private final class Java8SPMC[A](queue: MessagePassingQueue[A]) extends FromCircularQueue[A](queue) { - private[this] val UNSAFE = - UnsafeAccess.getInstance().asInstanceOf[Unsafe] - - def fenceOffer(): Unit = UNSAFE.fullFence() + def fenceOffer(): Unit = VarHandle.fullFence() def fencePoll(): Unit = () } private final class Java8MPSC[A](queue: MessagePassingQueue[A]) extends FromCircularQueue[A](queue) { - private[this] val UNSAFE = - UnsafeAccess.getInstance().asInstanceOf[Unsafe] - def fenceOffer(): Unit = () - def fencePoll(): Unit = UNSAFE.fullFence() + def fencePoll(): Unit = VarHandle.fullFence() } private final class Java8SPSC[A](queue: MessagePassingQueue[A]) extends FromCircularQueue[A](queue) { - private[this] val UNSAFE = - UnsafeAccess.getInstance().asInstanceOf[Unsafe] - - def fenceOffer(): Unit = UNSAFE.fullFence() - def fencePoll(): Unit = UNSAFE.fullFence() - } - - private final class Java7[A](queue: MessagePassingQueue[A], ct: ChannelType) - extends FromCircularQueue[A](queue) { - - def fenceOffer(): Unit = - if (ct.producerType == SingleProducer) { - raise() - } - - def fencePoll(): Unit = - if (ct.consumerType == SingleConsumer) { - raise() - } - - private def raise(): Unit = { - throw new IllegalAccessException("Unsafe.fullFence not supported on this platform! (please report bug)") - } + def fenceOffer(): Unit = VarHandle.fullFence() + def fencePoll(): Unit = VarHandle.fullFence() } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala index 951a8d78a..da6544d28 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala @@ -17,12 +17,10 @@ package monix.execution.internal.collection.queues +import java.lang.invoke.VarHandle import monix.execution.ChannelType -import monix.execution.ChannelType.{ SingleConsumer, SingleProducer } -import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue -import sun.misc.Unsafe import scala.collection.mutable private[internal] abstract class FromMessagePassingQueue[A](queue: MessagePassingQueue[A]) @@ -56,14 +54,11 @@ private[internal] object FromMessagePassingQueue { case ChannelType.MPMC => new MPMC[A](queue) case ChannelType.MPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8MPSC[A](queue) - else new Java7[A](queue, ct) + new Java8MPSC[A](queue) case ChannelType.SPMC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPMC[A](queue) - else new Java7[A](queue, ct) + new Java8SPMC[A](queue) case ChannelType.SPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPSC[A](queue) - else new Java7[A](queue, ct) + new Java8SPSC[A](queue) } private final class MPMC[A](queue: MessagePassingQueue[A]) extends FromMessagePassingQueue[A](queue) { @@ -74,46 +69,19 @@ private[internal] object FromMessagePassingQueue { private final class Java8SPMC[A](queue: MessagePassingQueue[A]) extends FromMessagePassingQueue[A](queue) { - private[this] val UNSAFE = - UnsafeAccess.getInstance().asInstanceOf[Unsafe] - - def fenceOffer(): Unit = UNSAFE.fullFence() + def fenceOffer(): Unit = VarHandle.fullFence() def fencePoll(): Unit = () } private final class Java8MPSC[A](queue: MessagePassingQueue[A]) extends FromMessagePassingQueue[A](queue) { - private[this] val UNSAFE = - UnsafeAccess.getInstance().asInstanceOf[Unsafe] - def fenceOffer(): Unit = () - def fencePoll(): Unit = UNSAFE.fullFence() + def fencePoll(): Unit = VarHandle.fullFence() } private final class Java8SPSC[A](queue: MessagePassingQueue[A]) extends FromMessagePassingQueue[A](queue) { - private[this] val UNSAFE = - UnsafeAccess.getInstance().asInstanceOf[Unsafe] - - def fenceOffer(): Unit = UNSAFE.fullFence() - def fencePoll(): Unit = UNSAFE.fullFence() - } - - private final class Java7[A](queue: MessagePassingQueue[A], ct: ChannelType) - extends FromMessagePassingQueue[A](queue) { - - def fenceOffer(): Unit = - if (ct.producerType == SingleProducer) { - raise() - } - - def fencePoll(): Unit = - if (ct.consumerType == SingleConsumer) { - raise() - } - - private def raise(): Unit = { - throw new IllegalAccessException("Unsafe.fullFence not supported on this platform! (please report bug)") - } + def fenceOffer(): Unit = VarHandle.fullFence() + def fencePoll(): Unit = VarHandle.fullFence() } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index 28eac27f3..f8d6b6914 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -21,10 +21,8 @@ import java.util.concurrent.ConcurrentLinkedQueue import monix.execution.{ BufferCapacity, ChannelType } import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } import monix.execution.internal.Platform -import monix.execution.atomic.internal.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues._ -import monix.execution.internal.jctools.queues.atomic._ private[internal] trait LowLevelConcurrentQueueBuilders { /** @@ -39,59 +37,27 @@ private[internal] trait LowLevelConcurrentQueueBuilders { /** * Builds a bounded `ConcurrentQueue` reference. */ - private def bounded[A](capacity: Int, ct: ChannelType, fenced: Boolean): LowLevelConcurrentQueue[A] = - if (UnsafeAccess.IS_OPENJDK_COMPATIBLE) { - // Support for memory fences in Unsafe is only available in Java 8+ - if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) - ct match { - case MPMC => FromCircularQueue[A](new MpmcArrayQueue[A](capacity), ct) - case MPSC => FromCircularQueue[A](new MpscArrayQueue[A](capacity), ct) - case SPMC => FromCircularQueue[A](new SpmcArrayQueue[A](capacity), ct) - case SPSC => FromCircularQueue[A](new SpscArrayQueue[A](capacity), ct) - } - else { - // Without support for Unsafe.fullFence, falling back to a MPMC queue - FromCircularQueue[A](new MpmcArrayQueue[A](capacity), ct) - } - } else if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) { - ct match { - case MPMC => FromMessagePassingQueue[A](new MpmcAtomicArrayQueue[A](capacity), ct) - case MPSC => FromMessagePassingQueue[A](new MpscAtomicArrayQueue[A](capacity), ct) - case SPMC => FromMessagePassingQueue[A](new SpmcAtomicArrayQueue[A](capacity), ct) - case SPSC => FromMessagePassingQueue[A](new SpscAtomicArrayQueue[A](capacity), ct) - } - } else { - // Without support for Unsafe.fullFence, falling back to a MPMC queue - FromMessagePassingQueue[A](new MpmcAtomicArrayQueue[A](capacity), ct) + private def bounded[A](capacity: Int, ct: ChannelType, fenced: Boolean): LowLevelConcurrentQueue[A] = { + val _ = fenced + ct match { + case MPMC => FromCircularQueue[A](new MpmcArrayQueue[A](capacity), ct) + case MPSC => FromCircularQueue[A](new MpscArrayQueue[A](capacity), ct) + case SPMC => FromCircularQueue[A](new SpmcArrayQueue[A](capacity), ct) + case SPSC => FromCircularQueue[A](new SpscArrayQueue[A](capacity), ct) } + } /** * Builds an bounded `ConcurrentQueue` reference. */ private def unbounded[A](chunkSize: Option[Int], ct: ChannelType, fenced: Boolean): LowLevelConcurrentQueue[A] = { + val _ = fenced val chunk = chunkSize.getOrElse(Platform.recommendedBufferChunkSize) - if (UnsafeAccess.IS_OPENJDK_COMPATIBLE) { - // Support for memory fences in Unsafe is only available in Java 8+ - if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) { - ct match { - case MPSC => FromMessagePassingQueue[A](new MpscUnboundedArrayQueue(chunk), ct) - case SPSC => FromMessagePassingQueue[A](new SpscUnboundedArrayQueue(chunk), ct) - case _ => new FromJavaQueue[A](new ConcurrentLinkedQueue[A]()) - } - } else { - // Without support for Unsafe.fullFence, falling back to a MPMC queue - new FromJavaQueue[A](new ConcurrentLinkedQueue[A]()) - } - } else if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) { - ct match { - case MPSC => FromMessagePassingQueue[A](new MpscUnboundedAtomicArrayQueue(chunk), ct) - case SPSC => FromMessagePassingQueue[A](new SpscUnboundedAtomicArrayQueue(chunk), ct) - case _ => new FromJavaQueue[A](new ConcurrentLinkedQueue[A]()) - } - } else { - // Without support for Unsafe.fullFence, falling back to a MPMC queue - new FromJavaQueue[A](new ConcurrentLinkedQueue[A]()) + ct match { + case MPSC => FromMessagePassingQueue[A](new MpscUnboundedArrayQueue(chunk), ct) + case SPSC => FromMessagePassingQueue[A](new SpscUnboundedArrayQueue(chunk), ct) + case _ => new FromJavaQueue[A](new ConcurrentLinkedQueue[A]()) } } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala index a2184b764..d179584b9 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/QueueDrain.scala @@ -22,7 +22,7 @@ import scala.collection.mutable private[internal] final class QueueDrain[A](buffer: mutable.Buffer[A]) extends Consumer[A] { - private[this] var _count = 0 + private var _count = 0 def count: Int = _count def accept(e: A): Unit = { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala index 1355e243b..bc325534b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/AdaptedForkJoinPool.scala @@ -19,7 +19,7 @@ package monix.execution.internal.forkJoin import java.lang.Thread.UncaughtExceptionHandler import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory -import java.util.concurrent.{ ForkJoinPool, ForkJoinTask, ForkJoinWorkerThread } +import java.util.concurrent.{ ForkJoinPool, ForkJoinWorkerThread } private[monix] final class AdaptedForkJoinPool( parallelism: Int, @@ -29,10 +29,7 @@ private[monix] final class AdaptedForkJoinPool( ) extends ForkJoinPool(parallelism, factory, handler, asyncMode) { override def execute(runnable: Runnable): Unit = { - val fjt: ForkJoinTask[_] = runnable match { - case t: ForkJoinTask[_] => t - case r => new AdaptedForkJoinTask(r) - } + val fjt = new AdaptedForkJoinTask(runnable) Thread.currentThread match { case fjw: ForkJoinWorkerThread if fjw.getPool eq this => fjt.fork() diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala index bc9e75bea..01abf4ffd 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/DynamicWorkerThreadFactory.scala @@ -24,6 +24,7 @@ import monix.execution.atomic.AtomicInt import monix.execution.internal.forkJoin.DynamicWorkerThreadFactory.EmptyBlockContext import scala.annotation.tailrec +import scala.annotation.nowarn import scala.concurrent.{ BlockContext, CanAwait } // Implement BlockContext on FJP threads @@ -37,7 +38,7 @@ private[monix] final class DynamicWorkerThreadFactory( require(prefix ne null, "DefaultWorkerThreadFactory.prefix must be non null") require(maxThreads > 0, "DefaultWorkerThreadFactory.maxThreads must be greater than 0") - private[this] val currentNumberOfThreads = AtomicInt(0) + private val currentNumberOfThreads = AtomicInt(0) @tailrec private def reserveThread(): Boolean = currentNumberOfThreads.get() match { @@ -51,6 +52,7 @@ private[monix] final class DynamicWorkerThreadFactory( case other => currentNumberOfThreads.compareAndSet(other, other - 1) || deregisterThread() } + @nowarn("cat=deprecation") def wire[T <: Thread](thread: T): T = { thread.setDaemon(daemonic) thread.setUncaughtExceptionHandler(uncaught) @@ -66,7 +68,7 @@ private[monix] final class DynamicWorkerThreadFactory( try { runnable.run() } finally { - deregisterThread() + val _ = deregisterThread() () } })) @@ -77,15 +79,14 @@ private[monix] final class DynamicWorkerThreadFactory( wire(new ForkJoinWorkerThread(fjp) with BlockContext { // We have to decrement the current thread count when the thread exits final override def onTermination(exception: Throwable): Unit = { - deregisterThread() + val _ = deregisterThread() () } final override def blockOn[T](thunk: => T)(implicit permission: CanAwait): T = { var result: T = null.asInstanceOf[T] ForkJoinPool.managedBlock(new ManagedBlocker { - @volatile - private[this] var isDone = false + @volatile private var isDone = false def isReleasable = isDone def block(): Boolean = { diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala index 91816567b..bbfbb67dc 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/forkJoin/StandardWorkerThreadFactory.scala @@ -20,12 +20,15 @@ package monix.execution.internal.forkJoin import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory import java.util.concurrent.{ ForkJoinPool, ForkJoinWorkerThread, ThreadFactory } +import scala.annotation.nowarn + private[monix] final class StandardWorkerThreadFactory( prefix: String, uncaught: Thread.UncaughtExceptionHandler, daemonic: Boolean ) extends ThreadFactory with ForkJoinWorkerThreadFactory { + @nowarn("cat=deprecation") def wire[T <: Thread](thread: T): T = { thread.setDaemon(daemonic) thread.setUncaughtExceptionHandler(uncaught) diff --git a/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala b/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala index 8cc527066..0e0daab82 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/misc/ThreadLocal.scala @@ -31,7 +31,7 @@ package monix.execution.misc * any values yet. */ final class ThreadLocal[A] private (val initial: A) { - private[this] val tl = new java.lang.ThreadLocal[A]() { + private val tl = new java.lang.ThreadLocal[A]() { override def initialValue(): A = initial } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala index 0f88be68f..3c61385d6 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/AdaptedThreadPoolExecutor.scala @@ -30,10 +30,12 @@ private[schedulers] abstract class AdaptedThreadPoolExecutor(corePoolSize: Int, super.afterExecute(r, t) var exception: Throwable = t - if ((exception eq null) && r.isInstanceOf[Future[_]]) { + if ((exception eq null) && classOf[Future[AnyRef]].isInstance(r)) { try { - val future = r.asInstanceOf[Future[_]] - if (future.isDone) future.get() + val future = r.asInstanceOf[Future[AnyRef]] + if (future.isDone) { + val _ = future.get() + } } catch { case ex: ExecutionException => exception = ex.getCause diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala index 3a6304195..0979d38a9 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/ThreadFactoryBuilder.scala @@ -20,6 +20,8 @@ package monix.execution.schedulers import java.util.concurrent.ThreadFactory import monix.execution.UncaughtExceptionReporter +import scala.annotation.nowarn + private[schedulers] object ThreadFactoryBuilder { /** Constructs a ThreadFactory using the provided name prefix and appending * with a unique incrementing thread identifier. @@ -28,6 +30,7 @@ private[schedulers] object ThreadFactoryBuilder { * @param daemonic specifies whether the created threads should be daemonic * (non-daemonic threads are blocking the JVM process on exit). */ + @nowarn("cat=deprecation") def apply(name: String, reporter: UncaughtExceptionReporter, daemonic: Boolean): ThreadFactory = (r: Runnable) => { val thread = new Thread(r) diff --git a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala index 5fb9073fa..0970d9d5c 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/schedulers/TrampolineExecutionContext.scala @@ -94,7 +94,7 @@ object TrampolineExecutionContext { private val localContext: ThreadLocal[BlockContext] = { try { val methods = BlockContext.getClass.getDeclaredMethods - .filter(m => m.getParameterCount == 0 && m.getReturnType == classOf[ThreadLocal[_]]) + .filter(m => m.getParameterCount == 0 && m.getReturnType == classOf[ThreadLocal[AnyRef]]) .toList methods match { diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala index c3bf17b9b..1ed510ece 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CallbackSafetyJVMSuite.scala @@ -38,7 +38,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils override def tearDown(env: SchedulerService): Unit = { env.shutdown() - env.awaitTermination(10.seconds) + val _ = env.awaitTermination(10.seconds) () } @@ -85,12 +85,12 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils } test("Normal callback is not thread-safe via onSuccess") { implicit sc => - intercept[AssertionException] { executeOnSuccessTest(x => x) } + val _ = intercept[AssertionException] { executeOnSuccessTest(x => x) } () } test("Normal callback is not thread-safe via onError") { implicit sc => - intercept[AssertionException] { executeOnErrorTest(x => x) } + val _ = intercept[AssertionException] { executeOnErrorTest(x => x) } () } @@ -101,7 +101,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val f = (r: Either[Throwable, Int]) => cb(r) Callback.fromAttempt(f) } - intercept[AssertionException] { executeOnSuccessTest(wrap, retries = RETRIES * 100) } + val _ = intercept[AssertionException] { executeOnSuccessTest(wrap, retries = RETRIES * 100) } () } @@ -112,7 +112,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val f = (r: Either[Throwable, String]) => cb(r) Callback.fromAttempt(f) } - intercept[AssertionException] { executeOnErrorTest(wrap, retries = RETRIES * 100) } + val _ = intercept[AssertionException] { executeOnErrorTest(wrap, retries = RETRIES * 100) } () } @@ -123,7 +123,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val f = (r: Try[Int]) => cb(r) Callback.fromTry(f) } - intercept[AssertionException] { executeOnSuccessTest(wrap, retries = RETRIES * 100) } + val _ = intercept[AssertionException] { executeOnSuccessTest(wrap, retries = RETRIES * 100) } () } @@ -134,7 +134,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils val f = (r: Try[String]) => cb(r) Callback.fromTry(f) } - intercept[AssertionException] { executeOnErrorTest(wrap, retries = RETRIES * 100) } + val _ = intercept[AssertionException] { executeOnErrorTest(wrap, retries = RETRIES * 100) } () } @@ -167,14 +167,14 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils } test("Normal callback is not quasi-safe via onSuccess") { _ => - intercept[MiniTestException] { + val _ = intercept[MiniTestException] { executeQuasiSafeOnSuccessTest(x => x) } () } test("Normal callback is not quasi-safe via onError") { _ => - intercept[MiniTestException] { + val _ = intercept[MiniTestException] { executeQuasiSafeOnFailureTest(x => x) } () @@ -194,7 +194,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils assert(tryTrigger(cb), "cb.tryOnSuccess(1)") assert(!tryTrigger(cb), "!cb.tryOnSuccess(1)") - intercept[CallbackCalledMultipleTimesException] { trigger(cb) } + val _ = intercept[CallbackCalledMultipleTimesException] { trigger(cb) } assertEquals(effect, 1) } @@ -216,7 +216,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils assert(tryTrigger(cb), "cb.tryOnError(1)") assert(!tryTrigger(cb), "!cb.tryOnError(1)") - intercept[CallbackCalledMultipleTimesException] { trigger(cb) } + val _ = intercept[CallbackCalledMultipleTimesException] { trigger(cb) } assertEquals(effect, 1) } @@ -321,7 +321,7 @@ object CallbackSafetyJVMSuite extends TestSuite[SchedulerService] with TestUtils for (_ <- 0 until WORKERS) { sc.execute { () => latchWorkersStart.countDown() - try { f; () } + try { val _ = f; () } finally latchWorkersFinished.countDown() } } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala index 36e652041..b9f9bc9a9 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CancelableFutureJVMSuite.scala @@ -51,8 +51,8 @@ object CancelableFutureJVMSuite extends SimpleTestSuite { test("never") { val f = CancelableFuture.never[Int] - intercept[TimeoutException] { Await.result(f, 1.milli); () } - intercept[TimeoutException] { Await.ready(f, 1.milli); () } + val _ = intercept[TimeoutException] { val _ = Await.result(f, 1.milli); () } + val _ = intercept[TimeoutException] { Await.ready(f, 1.milli); () } () } } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala index a0b7aa7af..dc7c8c1cd 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/CompletableFutureConversionsSuite.scala @@ -53,7 +53,7 @@ object CompletableFutureConversionsSuite extends TestSuite[TestScheduler] { test("FutureUtils.toJavaCompletable works") { implicit s => val f = Future.successful(42) val cf = FutureUtils.toJavaCompletable(f) - s.tickOne() + val _ = s.tickOne() assertEquals(cf.getNow(-1), 42) } @@ -61,7 +61,7 @@ object CompletableFutureConversionsSuite extends TestSuite[TestScheduler] { val dummy = DummyException("dummy") val ef = Future.failed[Int](dummy) val ecf = FutureUtils.toJavaCompletable(ef) - s.tickOne() + val _ = s.tickOne() try { ecf.getNow(-1) fail("Should throw an error") diff --git a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala index 477bb9a48..a34168216 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala @@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicLong import minitest.TestSuite import monix.execution.FutureUtils.extensions._ import monix.execution.schedulers.TestScheduler +import scala.annotation.nowarn import scala.concurrent.Future import scala.concurrent.duration._ @@ -47,6 +48,7 @@ object FutureUtilsJVMSuite extends TestSuite[TestScheduler] { val originalTimeout = 50.millis + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def runFuture(timeout: FiniteDuration): Future[Unit] = { total.incrementAndGet() @@ -66,7 +68,7 @@ object FutureUtilsJVMSuite extends TestSuite[TestScheduler] { success.incrementAndGet() () }.recover { - case _: TestException => + case _ => error.incrementAndGet() () } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala index 337e838a6..4c3162820 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/AsyncSchedulerJVMSuite.scala @@ -36,7 +36,7 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { test("scheduleOnce with delay") { val p = Promise[Long]() val startedAt = System.nanoTime() - scheduleOnce(s, 100.millis) { p.success(System.nanoTime()); () } + val _ = scheduleOnce(s, 100.millis) { p.success(System.nanoTime()); () } val timeTaken = Await.result(p.future, 3.second) assert((timeTaken - startedAt).nanos.toMillis >= 100) @@ -44,7 +44,7 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { test("scheduleOnce with delay lower than 1.milli") { val p = Promise[Int]() - scheduleOnce(s, 20.nanos) { p.success(1); () } + val _ = scheduleOnce(s, 20.nanos) { p.success(1); () } assert(Await.result(p.future, 3.seconds) == 1) } @@ -53,8 +53,8 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { val task = scheduleOnce(s, 100.millis) { p.success(1); () } task.cancel() - intercept[TimeoutException] { - Await.result(p.future, 150.millis) + val _ = intercept[TimeoutException] { + val _ = Await.result(p.future, 150.millis) () } () @@ -145,23 +145,23 @@ object AsyncSchedulerJVMSuite extends SimpleTestSuite { test("Scheduler.cached") { import scala.concurrent.duration._ - intercept[IllegalArgumentException] { - monix.execution.Scheduler.cached("dummy", -1, 2, 1.second) + val _ = intercept[IllegalArgumentException] { + val _ = monix.execution.Scheduler.cached("dummy", -1, 2, 1.second) () } - intercept[IllegalArgumentException] { - monix.execution.Scheduler.cached("dummy", 0, 0, 1.second) + val _ = intercept[IllegalArgumentException] { + val _ = monix.execution.Scheduler.cached("dummy", 0, 0, 1.second) () } - intercept[IllegalArgumentException] { - monix.execution.Scheduler.cached("dummy", 2, 1, 1.second) + val _ = intercept[IllegalArgumentException] { + val _ = monix.execution.Scheduler.cached("dummy", 2, 1, 1.second) () } - intercept[IllegalArgumentException] { - monix.execution.Scheduler.cached("dummy", 2, 10, -1.second) + val _ = intercept[IllegalArgumentException] { + val _ = monix.execution.Scheduler.cached("dummy", 2, 10, -1.second) () } diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala index 24ff47af1..708eb4705 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ExecutorSchedulerSuite.scala @@ -57,7 +57,7 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self test("scheduleOnce with delay") { scheduler => val p = Promise[Long]() val startedAt = System.nanoTime() - scheduleOnce(scheduler, 100.millis) { + val _ = scheduleOnce(scheduler, 100.millis) { p.success(System.nanoTime()) () } @@ -67,7 +67,7 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self test("scheduleOnce with delay lower than 1.milli") { scheduler => val p = Promise[Int]() - scheduleOnce(scheduler, 20.nanos) { p.success(1); () } + val _ = scheduleOnce(scheduler, 20.nanos) { p.success(1); () } assert(Await.result(p.future, 3.seconds) == 1) } @@ -76,8 +76,8 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self val task = scheduleOnce(scheduler, 100.millis) { p.success(1); () } task.cancel() - intercept[TimeoutException] { - Await.result(p.future, 150.millis) + val _ = intercept[TimeoutException] { + val _ = Await.result(p.future, 150.millis) () } () @@ -183,7 +183,7 @@ abstract class ExecutorSchedulerSuite extends TestSuite[SchedulerService] { self try { val ex = DummyException("dummy") - scheduler.scheduleOnce( + val _ = scheduler.scheduleOnce( 1, TimeUnit.MILLISECONDS, () => throw ex diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala index d99c8855f..2cba14d67 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduleOnceJVMSuite.scala @@ -89,7 +89,7 @@ object ScheduleOnceJVMSuite extends SimpleTestSuite { def runTest(sc: Scheduler, threadPrefix: Option[String] = None): Unit = { def runAndGetThread(sc: Scheduler, delayMs: Int): Future[String] = { val p = Promise[String]() - sc.scheduleOnce( + val _ = sc.scheduleOnce( delayMs.toLong, MILLISECONDS, () => { diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala index 0b37af829..b83c6a8a0 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/ScheduledExecutorToSchedulerSuite.scala @@ -56,7 +56,7 @@ object ScheduledExecutorToSchedulerSuite extends TestSuite[ExecutorScheduler] { test("scheduleOnce with delay") { implicit s => val p = Promise[Long]() val startedAt = System.nanoTime() - s.scheduleOnce(100.millis) { p.success(System.nanoTime()); () } + val _ = s.scheduleOnce(100.millis) { p.success(System.nanoTime()); () } val timeTaken = Await.result(p.future, 30.second) assert((timeTaken - startedAt).nanos.toMillis >= 100) @@ -64,7 +64,7 @@ object ScheduledExecutorToSchedulerSuite extends TestSuite[ExecutorScheduler] { test("scheduleOnce with negative delay") { implicit s => val p = Promise[Boolean]() - s.scheduleOnce(-100.millis) { p.success(true); () } + val _ = s.scheduleOnce(-100.millis) { p.success(true); () } val result = Await.result(p.future, 30.second) assert(result) @@ -78,7 +78,7 @@ object ScheduledExecutorToSchedulerSuite extends TestSuite[ExecutorScheduler] { test("scheduleOnce with delay lower than 1.milli") { implicit s => val p = Promise[Int]() - s.scheduleOnce(20.nanos) { p.success(1); () } + val _ = s.scheduleOnce(20.nanos) { p.success(1); () } assert(Await.result(p.future, 3.seconds) == 1) } @@ -87,8 +87,8 @@ object ScheduledExecutorToSchedulerSuite extends TestSuite[ExecutorScheduler] { val task = s.scheduleOnce(100.millis) { p.success(1); () } task.cancel() - intercept[TimeoutException] { - Await.result(p.future, 150.millis) + val _ = intercept[TimeoutException] { + val _ = Await.result(p.future, 150.millis) () } () diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala index 3bd427784..750b0ecb4 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TestSchedulerCompanionSuite.scala @@ -31,7 +31,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s = Scheduler(service, ec) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { service.shutdown() @@ -47,7 +47,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s = Scheduler(service, ec) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { service.shutdown() @@ -60,7 +60,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s = Scheduler(ec, UncaughtExceptionReporter(ec.reportFailure)) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } @@ -70,7 +70,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val s = Scheduler(ec) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } @@ -82,7 +82,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val latch = new CountDownLatch(2) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { s.shutdown() @@ -97,7 +97,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val latch = new CountDownLatch(2) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { s.shutdown() @@ -110,7 +110,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val latch = new CountDownLatch(2) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { s.shutdown() @@ -123,7 +123,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val latch = new CountDownLatch(2) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { s.shutdown() @@ -136,7 +136,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val latch = new CountDownLatch(2) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { s.shutdown() @@ -149,7 +149,7 @@ object TestSchedulerCompanionSuite extends SimpleTestSuite { val latch = new CountDownLatch(2) val r: Runnable = () => latch.countDown() s.execute(r) - s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) + val _ = s.scheduleOnce(10, TimeUnit.MILLISECONDS, r) assert(latch.await(15, TimeUnit.MINUTES), "latch.await failed") } finally { s.shutdown() diff --git a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala index d852e21d3..9ab218968 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/schedulers/TrampolineExecutionContextSuite.scala @@ -34,7 +34,7 @@ object TrampolineExecutionContextSuite extends SimpleTestSuite { assertEquals(effect, 2) - intercept[NullPointerException] { + val _ = intercept[NullPointerException] { ctx.execute(() => { ctx.execute(() => effect += 1) diff --git a/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala index 1691094c6..a3c3957a0 100644 --- a/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala @@ -193,34 +193,33 @@ object Local extends LocalCompanionDeprecated { // $COVERAGE-ON$ } - private[this] final def isolateLoop(): Unbound = - this match { - case unbound: Unbound => - val map = unbound.ref.get() - new Unbound(AtomicAny(map)) - case _ => - var it = this - var done = false - var map = Map.empty[Key, Any] - val bannedKeys = collection.mutable.Set.empty[Key] - while (!done) { - it match { - case unbound: Unbound => - done = true - unbound.ref.get().foreach { - case (k, v) if !bannedKeys(k) && !map.contains(k) => map = map.updated(k, v) - case _ => () - } - case bound: Bound => - if (!map.contains(bound.key) && !bannedKeys(bound.key)) { - if (bound.hasValue) map = map.updated(bound.key, bound.value) - else bannedKeys += bound.key - } - it = bound.rest - } + private def isolateLoop(): Unbound = this match { + case unbound: Unbound => + val map = unbound.ref.get() + new Unbound(AtomicAny(map)) + case _ => + var it = this + var done = false + var map = Map.empty[Key, Any] + val bannedKeys = collection.mutable.Set.empty[Key] + while (!done) { + it match { + case unbound: Unbound => + done = true + unbound.ref.get().foreach { + case (k, v) if !bannedKeys(k) && !map.contains(k) => map = map.updated(k, v) + case _ => () + } + case bound: Bound => + if (!map.contains(bound.key) && !bannedKeys(bound.key)) { + if (bound.hasValue) map = map.updated(bound.key, bound.value) + else bannedKeys += bound.key + } + it = bound.rest } - new Unbound(AtomicAny(map)) - } + } + new Unbound(AtomicAny(map)) + } } private[execution] final class Unbound(val ref: AtomicAny[Map[Key, Any]]) extends Context diff --git a/monix-execution/shared/src/main/scala-3/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala-3/monix/execution/misc/Local.scala index b922c2553..6a47e2354 100644 --- a/monix-execution/shared/src/main/scala-3/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala-3/monix/execution/misc/Local.scala @@ -60,7 +60,7 @@ object Local extends LocalCompanionDeprecated { def newContext(): Context = new Unbound(AtomicAny(Map())) /** Current [[Context]] kept in a `ThreadLocal`. */ - private[this] val localContext: ThreadLocal[Context] = + private val localContext: ThreadLocal[Context] = ThreadLocal(newContext()) /** Return the state of the current Local state. */ @@ -123,7 +123,7 @@ object Local extends LocalCompanionDeprecated { localContext.get().set(key, null, isPresent = false) } - private def restoreKey(key: Key, value: Option[_]): Unit = + private def restoreKey(key: Key, value: Option[?]): Unit = value match { case None => clearKey(key) case Some(v) => saveKey(key, v) @@ -194,34 +194,33 @@ object Local extends LocalCompanionDeprecated { // $COVERAGE-ON$ } - private[this] final def isolateLoop(): Unbound = - this match { - case unbound: Unbound => - val map = unbound.ref.get() - new Unbound(AtomicAny(map)) - case _ => - var it = this - var done = false - var map = Map.empty[Key, Any] - val bannedKeys = collection.mutable.Set.empty[Key] - while (!done) { - it match { - case unbound: Unbound => - done = true - unbound.ref.get().foreach { - case (k, v) if !bannedKeys(k) && !map.contains(k) => map = map.updated(k, v) - case _ => () - } - case bound: Bound => - if (!map.contains(bound.key) && !bannedKeys(bound.key)) { - if (bound.hasValue) map = map.updated(bound.key, bound.value) - else bannedKeys += bound.key - } - it = bound.rest - } + private def isolateLoop(): Unbound = this match { + case unbound: Unbound => + val map = unbound.ref.get() + new Unbound(AtomicAny(map)) + case _ => + var it = this + var done = false + var map = Map.empty[Key, Any] + val bannedKeys = collection.mutable.Set.empty[Key] + while (!done) { + it match { + case unbound: Unbound => + done = true + unbound.ref.get().foreach { + case (k, v) if !bannedKeys(k) && !map.contains(k) => map = map.updated(k, v) + case _ => () + } + case bound: Bound => + if (!map.contains(bound.key) && !bannedKeys(bound.key)) { + if (bound.hasValue) map = map.updated(bound.key, bound.value) + else bannedKeys += bound.key + } + it = bound.rest } - new Unbound(AtomicAny(map)) - } + } + new Unbound(AtomicAny(map)) + } } private[execution] final class Unbound(val ref: AtomicAny[Map[Key, Any]]) extends Context diff --git a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala index 55a2fcfdf..56c5b72f5 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala @@ -19,6 +19,7 @@ package monix.execution import scala.util.control.NonFatal import monix.execution.schedulers.TrampolineExecutionContext.immediate +import scala.annotation.nowarn import scala.concurrent.duration.Duration import scala.concurrent.{ CanAwait, ExecutionContext, Future, Promise } import scala.util.{ Failure, Success, Try } @@ -55,7 +56,8 @@ sealed abstract class Ack extends Future[Ack] with Serializable { final def onComplete[U](func: Try[Ack] => U)(implicit executor: ExecutionContext): Unit = executor.execute(() => { - func(AsSuccess); () + val _ = func(AsSuccess) + () }) } @@ -102,6 +104,7 @@ object Ack { * Use with great care as an optimization. Don't use * it in tail-recursive loops! */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") implicit class AckExtensions[Self <: Future[Ack]](val source: Self) extends AnyVal { /** Returns `true` if self is a direct reference to * `Continue` or `Stop`, `false` otherwise. @@ -217,12 +220,10 @@ object Ack { * promise with a value. */ def syncOnContinueFollow[A](p: Promise[A], value: A): Self = { - if (source eq Continue) - p.trySuccess(value) + if (source eq Continue) { val _ = p.trySuccess(value); () } else if (source ne Stop) source.onComplete { r => - if (r.isSuccess && (r.get eq Continue)) - p.trySuccess(value) + if (r.isSuccess && (r.get eq Continue)) { val _ = p.trySuccess(value); () } }(immediate) source } @@ -231,12 +232,10 @@ object Ack { * promise with a value. */ def syncOnStopFollow[A](p: Promise[A], value: A): Self = { - if (source eq Stop) - p.trySuccess(value) + if (source eq Stop) { val _ = p.trySuccess(value); () } else if (source ne Continue) source.onComplete { r => - if (r.isSuccess && (r.get eq Stop)) - p.trySuccess(value) + if (r.isSuccess && (r.get eq Stop)) { val _ = p.trySuccess(value); () } }(immediate) source } diff --git a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala index 0cb20796f..8a3ffba0f 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/AsyncQueue.scala @@ -270,17 +270,15 @@ final class AsyncQueue[A] private[monix] ( def isEmpty: Boolean = queue.isEmpty - private[this] val queue: LowLevelConcurrentQueue[A] = + private val queue: LowLevelConcurrentQueue[A] = LowLevelConcurrentQueue(capacity, channelType, fenced = true) - private[this] val consumersAwaiting = - AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) + private val consumersAwaiting = AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) - private[this] val producersAwaiting = - if (capacity.isBounded) - AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) - else - null + private val producersAwaiting = if (capacity.isBounded) + AtomicAny.withPadding[CancelablePromise[Unit]](null, LeftRight128) + else + null private def tryOfferUnsafe(a: A): Boolean = { if (queue.offer(a) == 0) { @@ -348,11 +346,11 @@ final class AsyncQueue[A] private[monix] ( private def toSeq(buffer: ArrayBuffer[A]): Seq[A] = buffer.toArray[Any].toSeq.asInstanceOf[Seq[A]] - private[this] val pollQueue: () => A = () => tryPollUnsafe() - private[this] val pollTest: A => Boolean = _ != null - private[this] val pollMap: A => A = a => a - private[this] val offerTest: Boolean => Boolean = x => x - private[this] val offerMap: Boolean => Unit = _ => () + private val pollQueue: () => A = () => tryPollUnsafe() + private val pollTest: A => Boolean = _ != null + private val pollMap: A => A = a => a + private val offerTest: Boolean => Boolean = x => x + private val offerMap: Boolean => Unit = _ => () @tailrec private def sleepThenRepeat[T, U]( diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index 2a15c2822..306a88441 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -22,6 +22,7 @@ import monix.execution.schedulers.{ TrampolineExecutionContext, TrampolinedRunna import scala.concurrent.{ ExecutionContext, Promise } import scala.util.control.NonFatal import scala.util.{ Failure, Success, Try } +import scala.annotation.nowarn /** Represents a callback that should be called asynchronously * with the result of a computation. @@ -270,7 +271,7 @@ object Callback { case ref: Callback[E, A] @unchecked => ref case _ => new Callback[E, A] { - private[this] var isActive = true + private var isActive = true override def onSuccess(value: A): Unit = apply(Right(value)) override def onError(e: E): Unit = apply(Left(e)) @@ -299,7 +300,7 @@ object Callback { */ def fromTry[A](cb: Try[A] => Unit): Callback[Throwable, A] = new Callback[Throwable, A] { - private[this] var isActive = true + private var isActive = true override def onSuccess(value: A): Unit = apply(Success(value)) override def onError(e: Throwable): Unit = apply(Failure(e)) @@ -334,17 +335,19 @@ object Callback { private[monix] def signalErrorTrampolined[E, A](cb: Callback[E, A], e: E): Unit = TrampolineExecutionContext.immediate.execute(() => cb.onError(e)) + @nowarn("msg=Implicit parameters should be provided with a `using` clause") private final class AsyncFork[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) + @nowarn("msg=Implicit parameters should be provided with a `using` clause") private final class TrampolinedCallback[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) with TrampolinedRunnable /** Base implementation for `trampolined` and `forked`. */ private class Base[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Callback[E, A] with Runnable { - private[this] val state = monix.execution.atomic.AtomicInt(0) - private[this] var value: A = _ - private[this] var error: E = _ + private val state = monix.execution.atomic.AtomicInt(0) + private var value: A = null.asInstanceOf[A] + private var error: E = null.asInstanceOf[E] override final def onSuccess(value: A): Unit = if (!tryOnSuccess(value)) { @@ -408,8 +411,7 @@ object Callback { private final class Safe[-E, -A](underlying: Callback[E, A])(implicit r: UncaughtExceptionReporter) extends Callback[E, A] { - private[this] val isActive = - monix.execution.atomic.AtomicBoolean(true) + private val isActive = monix.execution.atomic.AtomicBoolean(true) override def onSuccess(value: A): Unit = { if (isActive.compareAndSet(true, false)) diff --git a/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala index dd0d0d2bf..bf87f433a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Cancelable.scala @@ -18,7 +18,6 @@ package monix.execution import monix.execution.atomic.AtomicAny -import monix.execution.internal.Platform import monix.execution.schedulers.TrampolinedRunnable import scala.collection.mutable.ListBuffer import scala.concurrent.Promise @@ -92,7 +91,10 @@ object Cancelable { */ def fromPromise[A](p: Promise[A], e: Throwable): Cancelable = new Cancelable { - def cancel(): Unit = { p.tryFailure(e); () } + def cancel(): Unit = { + val _ = p.tryFailure(e) + () + } } /** Given a collection of cancelables, cancel them all. @@ -115,7 +117,8 @@ object Cancelable { case one :: Nil => throw one case first :: rest => - throw Platform.composeErrors(first, rest: _*) + rest.foreach(e => if (e ne first) first.addSuppressed(e)) + throw first case _ => () // Nothing } @@ -129,7 +132,7 @@ object Cancelable { private final class CancelableTask(cb: () => Unit) extends Cancelable { - private[this] val callbackRef = /*_*/ AtomicAny(cb) /*_*/ + private val callbackRef = /*_*/ AtomicAny(cb) /*_*/ def cancel(): Unit = { // Setting the callback to null with a `getAndSet` is solving @@ -145,7 +148,7 @@ object Cancelable { private final class CollectionTrampolined(refs: Iterable[Cancelable], sc: Scheduler) extends Cancelable with TrampolinedRunnable { - private[this] val atomic = /*_*/ AtomicAny(refs) /*_*/ + private val atomic = /*_*/ AtomicAny(refs) /*_*/ def cancel(): Unit = sc.execute(this) diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala index 520f4cfbf..3f26e3ad3 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala @@ -23,6 +23,7 @@ import monix.execution.cancelables.{ ChainedCancelable, SingleAssignCancelable } import monix.execution.misc.Local import monix.execution.schedulers.TrampolinedRunnable import monix.execution.schedulers.TrampolineExecutionContext.immediate +import scala.annotation.nowarn import scala.concurrent._ import scala.concurrent.duration.Duration import scala.reflect.ClassTag @@ -121,7 +122,7 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s this match { case Async(other, cRef, local) => CancelableFuture.applyWithLocal(other.mapTo[S], cRef, local) - case p: Pure[_] => + case p: Pure[Any] => CancelableFuture.applyWithLocal(super.mapTo[S], Cancelable.empty, p.isolatedCtx) case Never => Never @@ -132,7 +133,9 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s executor: ExecutionContext ): CancelableFuture[A] = transformWith { r => - if (pf.isDefinedAt(r)) pf(r) + if (pf.isDefinedAt(r)) { + val _ = pf(r) + } this } @@ -363,11 +366,13 @@ object CancelableFuture extends internal.CancelableFutureForPlatform { def onComplete[U](f: (Try[A]) => U)(implicit executor: ExecutionContext): Unit = executor.execute(() => { - f(immediate); () + val _ = f(immediate) + () }) } /** An actual [[CancelableFuture]] implementation; internal. */ + @nowarn("msg=Implicit parameters should be provided with a `using` clause") private[execution] final case class Async[+A]( underlying: Future[A], cancelable: Cancelable, diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala index b8f639a1c..7441c1da2 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelablePromise.scala @@ -18,7 +18,6 @@ package monix.execution import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.Platform import monix.execution.internal.exceptions.matchError import monix.execution.atomic.{ AtomicAny, PaddingStrategy } @@ -188,13 +187,13 @@ object CancelablePromise { // States: // - Try[A]: completed with a result // - MapQueue: listeners queue - private[this] val state = AtomicAny.withPadding[AnyRef](emptyMapQueue, ps) + private val state = AtomicAny.withPadding[AnyRef](emptyMapQueue, ps) override def subscribe(cb: Try[A] => Unit): Cancelable = unsafeSubscribe(cb) override def isCompleted: Boolean = - state.get().isInstanceOf[Try[_]] + state.get().isInstanceOf[Try[Any]] override def future: CancelableFuture[A] = state.get() match { @@ -242,8 +241,11 @@ object CancelablePromise { } if (errors ne null) { // Throws all errors as a composite - val x :: xs = errors.toList - throw Platform.composeErrors(x, xs: _*) + val errorList = errors.toList + val x = errorList.head + val xs = errorList.tail + xs.foreach(e => if (e ne x) x.addSuppressed(e)) + throw x } true } @@ -285,7 +287,7 @@ object CancelablePromise { private final class IdCancelable(id: Long) extends Cancelable { @tailrec def cancel(): Unit = state.get() match { - case queue: MapQueue[_] => + case queue: MapQueue[Any] => if (!state.compareAndSet(queue, queue.dequeue(id))) cancel() case _ => @@ -306,6 +308,6 @@ object CancelablePromise { map.valuesIterator } - private[this] val emptyMapQueue: MapQueue[Nothing] = + private val emptyMapQueue: MapQueue[Nothing] = MapQueue(LongMap.empty, 0) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala index 0836368b6..6f37c4b92 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/FutureUtils.scala @@ -41,7 +41,8 @@ object FutureUtils extends internal.FutureUtilsForPlatform { atMost.length, atMost.unit, () => { - promise.tryFailure(err); () + val _ = promise.tryFailure(err) + () } ) @@ -76,7 +77,8 @@ object FutureUtils extends internal.FutureUtilsForPlatform { atMost.length, atMost.unit, () => { - promise.trySuccess(None); () + val _ = promise.trySuccess(None) + () } ) @@ -129,7 +131,7 @@ object FutureUtils extends internal.FutureUtilsForPlatform { */ def delayedResult[A](delay: FiniteDuration)(result: => A)(implicit s: Scheduler): Future[A] = { val p = Promise[A]() - s.scheduleOnce(delay.length, delay.unit, () => p.complete(Try(result))) + val _ = s.scheduleOnce(delay.length, delay.unit, () => p.complete(Try(result))) p.future } diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala index 0ef68aac9..6497fff14 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/AssignableCancelable.scala @@ -65,7 +65,7 @@ object AssignableCancelable { /** A reusable [[AssignableCancelable]] instance that's already * canceled and that's going to cancel given values on assignment. */ - val alreadyCanceled: Bool with Empty = + val alreadyCanceled: Bool = new Bool with Empty { def isCanceled = true def cancel(): Unit = () diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala index 06a2ce40f..ea6b87324 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/BooleanCancelable.scala @@ -35,7 +35,7 @@ object BooleanCancelable { /** Builder for [[BooleanCancelable]]. */ def apply(): BooleanCancelable = new BooleanCancelable { - @volatile private[this] var _isCanceled = false + @volatile private var _isCanceled = false def isCanceled = _isCanceled def cancel(): Unit = { @@ -54,7 +54,7 @@ object BooleanCancelable { /** Returns an instance of a [[BooleanCancelable]] that's * already canceled. */ - val alreadyCanceled: BooleanCancelable with Empty = + val alreadyCanceled: BooleanCancelable = new BooleanCancelable with Empty { val isCanceled = true def cancel() = () @@ -73,7 +73,7 @@ object BooleanCancelable { private final class BooleanCancelableTask(cb: () => Unit) extends BooleanCancelable { - private[this] val callbackRef = AtomicAny(cb) + private val callbackRef = AtomicAny(cb) def isCanceled: Boolean = callbackRef.get() eq null def cancel(): Unit = { diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala index 075c3ada2..3c7d36d7a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala @@ -234,7 +234,7 @@ final class CompositeCancelable private (stateRef: AtomicAny[CompositeCancelable object CompositeCancelable { /** Builder for [[CompositeCancelable]]. */ def apply(initial: Cancelable*): CompositeCancelable = - withPadding(Set(initial: _*), PaddingStrategy.LeftRight128) + withPadding(initial.toSet, PaddingStrategy.LeftRight128) /** Builder for [[CompositeCancelable]]. */ def fromSet(initial: Set[Cancelable]): CompositeCancelable = diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala index 854a35dd4..cfcf60871 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/MultiAssignCancelable.scala @@ -49,7 +49,7 @@ import scala.annotation.tailrec */ final class MultiAssignCancelable private (initial: Cancelable) extends AssignableCancelable.Multi { - private[this] val state = { + private val state = { AtomicAny.withPadding(initial, PaddingStrategy.LeftRight128) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala index 63dae8a74..3a9c3816d 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/OrderedCancelable.scala @@ -66,7 +66,7 @@ final class OrderedCancelable private (initial: Cancelable) extends AssignableCa import OrderedCancelable.{ Active, Cancelled, State } - private[this] val state = { + private val state = { val ref = if (initial != null) initial else Cancelable.empty AtomicAny.withPadding(Active(ref, 0): State, PaddingStrategy.LeftRight128) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala index a1117e951..8c8f170ae 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/RefCountCancelable.scala @@ -84,8 +84,8 @@ final class RefCountCancelable private (onCancel: () => Unit) extends BooleanCan } } - private[this] val state = AtomicAny(State(isCanceled = false, activeCounter = 0)) - private[this] case class State( + private val state = AtomicAny(State(isCanceled = false, activeCounter = 0)) + private case class State( isCanceled: Boolean, activeCounter: Int ) diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala index 7d7139216..26d14a0c5 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SerialCancelable.scala @@ -41,7 +41,7 @@ import scala.annotation.tailrec */ final class SerialCancelable private (initial: Cancelable) extends AssignableCancelable.Multi { - private[this] val state = { + private val state = { AtomicAny.withPadding(initial, PaddingStrategy.LeftRight128) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala index a97a59b8a..ee1d398f5 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/SingleAssignCancelable.scala @@ -114,7 +114,7 @@ final class SingleAssignCancelable private (extra: Cancelable) extends Assignabl ) } - private[this] val state = AtomicAny(Empty: State) + private val state = AtomicAny(Empty: State) } object SingleAssignCancelable { diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala index e5c91cb8b..c15b143f0 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/StackedCancelable.scala @@ -123,10 +123,9 @@ object StackedCancelable { * in order to safe a `state.get` instruction before the * `compareAndSet` happens. */ - private[this] var cache = initial + private var cache = initial - private[this] val state = - AtomicAny.withPadding(initial, PaddingStrategy.LeftRight128) + private val state = AtomicAny.withPadding(initial, PaddingStrategy.LeftRight128) override def isCanceled: Boolean = state.get() == null diff --git a/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala b/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala index d452f2b32..96196ea4e 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/exceptions/APIContractViolationException.scala @@ -56,10 +56,10 @@ object CallbackCalledMultipleTimesException extends AbstractFunction1[String, Ca def unapply(arg: CallbackCalledMultipleTimesException): Option[(String, Throwable)] = Some((arg.message, arg.getCause)) - def forResult[E](r: Try[_]): CallbackCalledMultipleTimesException = + def forResult[E](r: Try[Any]): CallbackCalledMultipleTimesException = forResult(r match { case Success(a) => Right(a); case Failure(e) => Left(e) }) - def forResult[E](r: Either[E, _]): CallbackCalledMultipleTimesException = { + def forResult[E](r: Either[E, Any]): CallbackCalledMultipleTimesException = { val (msg, cause) = r match { case Left(e) => ("onError", UncaughtErrorException.wrap(e)) case Right(_) => ("onSuccess", null) diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala index b35c05eaf..50d9d2160 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericSemaphore.scala @@ -29,8 +29,7 @@ private[monix] abstract class GenericSemaphore[CancelToken] protected (provision import GenericSemaphore.State require(provisioned >= 0, "provisioned >= 0") - private[this] val stateRef = - AtomicAny.withPadding(GenericSemaphore.initialState(provisioned), ps) + private val stateRef = AtomicAny.withPadding(GenericSemaphore.initialState(provisioned), ps) protected def emptyCancelable: CancelToken protected def makeCancelable(f: Listener[Unit] => Unit, p: Listener[Unit]): CancelToken @@ -187,7 +186,7 @@ private[monix] abstract class GenericSemaphore[CancelToken] protected (provision while (cursor.hasNext) cursor.next().apply(Constants.eitherOfUnit) } - private[this] val cancelAwaitRelease: (Listener[Unit] => Unit) = { + private val cancelAwaitRelease: (Listener[Unit] => Unit) = { @tailrec def loop(p: Listener[Unit]): Unit = { val current: State = stateRef.get() val update = current.removeAwaitReleaseRef(p) @@ -197,7 +196,7 @@ private[monix] abstract class GenericSemaphore[CancelToken] protected (provision loop } - private[this] def cancelAcquisition(n: Long, isAsync: Boolean): (Listener[Unit] => Unit) = { + private def cancelAcquisition(n: Long, isAsync: Boolean): (Listener[Unit] => Unit) = { @tailrec def loop(permit: Listener[Unit]): Unit = { val current: State = stateRef.get() diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala index ecfc2bf09..03be498aa 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/GenericVar.scala @@ -30,7 +30,7 @@ import scala.annotation.tailrec private[monix] abstract class GenericVar[A, CancelToken] protected (initial: Option[A], ps: PaddingStrategy) { import GenericVar._ - private[this] val stateRef: AtomicAny[State[A]] = + private val stateRef: AtomicAny[State[A]] = AtomicAny.withPadding( initial match { case None => State.empty[A]; case Some(a) => State(a) }, ps @@ -264,7 +264,7 @@ private[monix] object GenericVar { /** Private [[State]] builders.*/ private object State { - private[this] val ref = WaitForPut[Any](LinkedMap.empty, LinkedMap.empty) + private val ref = WaitForPut[Any](LinkedMap.empty, LinkedMap.empty) def apply[A](a: A): State[A] = WaitForTake(a, LinkedMap.empty) /** `Empty` state, reusing the same instance. */ def empty[A]: State[A] = ref.asInstanceOf[State[A]] diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala index 4264f37c8..480bcf4ae 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Newtype1.scala @@ -31,7 +31,7 @@ package monix.execution.internal private[monix] abstract class Newtype1[F[_]] { self => type Base trait Tag extends Any - type Type[+A] <: Base with Tag + type Type[+A] <: Base def apply[A](fa: F[A]): Type[A] = fa.asInstanceOf[Type[A]] diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala index 0a225db90..a4ed0e805 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/RingBuffer.scala @@ -25,11 +25,11 @@ package monix.execution.internal final private[monix] class RingBuffer[A <: AnyRef](logSize: Int) { // These two probably don't need to be allocated every single time, maybe in Java? - private[this] val length = 1 << logSize - private[this] val mask = length - 1 + private val length = 1 << logSize + private val mask = length - 1 - private[this] val array: Array[AnyRef] = new Array(length) - private[this] var index: Int = 0 + private val array: Array[AnyRef] = new Array(length) + private var index: Int = 0 def push(a: A): A = { val wi = index & mask diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala index 6d14e9155..ed47877c9 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/Trampoline.scala @@ -24,8 +24,8 @@ import scala.concurrent.{ BlockContext, CanAwait, ExecutionContext } private[execution] class Trampoline { private def makeQueue(): ChunkedArrayQueue[Runnable] = ChunkedArrayQueue[Runnable](chunkSize = 16) - private[this] var immediateQueue = makeQueue() - private[this] var withinLoop = false + private var immediateQueue = makeQueue() + private var withinLoop = false def startLoop(runnable: Runnable, ec: ExecutionContext): Unit = { withinLoop = true diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala index 2ea6fb01d..f41892d10 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayQueue.scala @@ -28,11 +28,11 @@ private[monix] final class ChunkedArrayQueue[A] private ( assert(chunkSize > 1, "chunkSize > 1") - private[this] val modulo = chunkSize - 1 - private[this] var tailArray = initialTailArray - private[this] var tailIndex = initialTailIndex - private[this] var headArray = initialHeadArray - private[this] var headIndex = initialHeadIndex + private val modulo = chunkSize - 1 + private var tailArray = initialTailArray + private var tailIndex = initialTailIndex + private var headArray = initialHeadArray + private var headIndex = initialHeadIndex /** * Returns `true` if the queue is empty, `false` otherwise. @@ -92,10 +92,10 @@ private[monix] final class ChunkedArrayQueue[A] private ( /** Builds an iterator out of this queue. */ def iterator: Iterator[A] = new Iterator[A] { - private[this] var headArray = self.headArray - private[this] var headIndex = self.headIndex - private[this] val tailArray = self.tailArray - private[this] val tailIndex = self.tailIndex + private var headArray = self.headArray + private var headIndex = self.headIndex + private val tailArray = self.tailArray + private val tailIndex = self.tailIndex def hasNext: Boolean = { (headArray ne tailArray) || headIndex < tailIndex diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala index e9047073b..1f180f84f 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/ChunkedArrayStack.scala @@ -27,9 +27,9 @@ private[monix] final class ChunkedArrayStack[A] private (initialArray: Array[Any assert(chunkSize > 1, "chunkSize > 1") - private[this] val modulo = chunkSize - 1 - private[this] var array = initialArray - private[this] var index = initialIndex + private val modulo = chunkSize - 1 + private var array = initialArray + private var index = initialIndex /** Returns `true` if the stack is empty. */ def isEmpty: Boolean = @@ -86,8 +86,8 @@ private[monix] final class ChunkedArrayStack[A] private (initialArray: Array[Any /** Builds an iterator out of this stack. */ def iteratorReversed: Iterator[A] = new Iterator[A] { - private[this] var array = self.array - private[this] var index = self.index + private var array = self.array + private var index = self.index def hasNext: Boolean = { index > 0 || (array(0) ne null) diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala index 3374948e3..04a6bca9a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropAllOnOverflowQueue.scala @@ -31,19 +31,19 @@ private[monix] final class DropAllOnOverflowQueue[A: ClassTag] private (_recomme extends EvictingQueue[A] { self => require(_recommendedCapacity > 0, "recommendedCapacity must be positive") - private[this] val maxSize = { + private val maxSize = { val v = nextPowerOf2(_recommendedCapacity + 1) if (v <= 1) 2 else v } - private[this] val modulus = maxSize - 1 + private val modulus = maxSize - 1 def capacity: Int = modulus - private[this] val array = new Array[A](maxSize) + private val array = new Array[A](maxSize) // head is incremented by `poll()`, or by `offer()` on overflow - private[this] var headIdx = 0 + private var headIdx = 0 // tail is incremented by `offer()` - private[this] var tailIdx = 0 + private var tailIdx = 0 override def isAtCapacity: Boolean = size >= modulus @@ -138,12 +138,12 @@ private[monix] final class DropAllOnOverflowQueue[A: ClassTag] private (_recomme */ def iterator(exactSize: Boolean): Iterator[A] = { new Iterator[A] { - private[this] var isStarted = false - private[this] val initialTailIdx = self.tailIdx - private[this] var tailIdx = 0 - private[this] var headIdx = 0 + private var isStarted = false + private val initialTailIdx = self.tailIdx + private var tailIdx = 0 + private var headIdx = 0 - private[this] val initialHeadIdx = { + private val initialHeadIdx = { if (!exactSize) self.headIdx else { // Dropping extra elements @@ -170,7 +170,7 @@ private[monix] final class DropAllOnOverflowQueue[A: ClassTag] private (_recomme } } - private[this] def init(): Unit = { + private def init(): Unit = { isStarted = true if (self.headIdx != self.tailIdx) { headIdx = initialHeadIdx diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala index 56cc53d19..f3cf7241f 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/DropHeadOnOverflowQueue.scala @@ -32,19 +32,19 @@ private[monix] final class DropHeadOnOverflowQueue[A: ClassTag] private (_recomm extends EvictingQueue[A] { self => require(_recommendedCapacity > 0, "recommendedCapacity must be positive") - private[this] val maxSize = { + private val maxSize = { val v = nextPowerOf2(_recommendedCapacity + 1) if (v <= 1) 2 else v } - private[this] val modulus = maxSize - 1 + private val modulus = maxSize - 1 def capacity: Int = modulus - private[this] val array = new Array[A](maxSize) + private val array = new Array[A](maxSize) // head is incremented by `poll()`, or by `offer()` on overflow - private[this] var headIdx = 0 + private var headIdx = 0 // tail is incremented by `offer()` - private[this] var tailIdx = 0 + private var tailIdx = 0 override def isEmpty: Boolean = headIdx == tailIdx @@ -142,10 +142,10 @@ private[monix] final class DropHeadOnOverflowQueue[A: ClassTag] private (_recomm */ def iterator(exactSize: Boolean): Iterator[A] = { new Iterator[A] { - private[this] var isStarted = false + private var isStarted = false - private[this] val initialTailIdx = self.tailIdx - private[this] val initialHeadIdx = { + private val initialTailIdx = self.tailIdx + private val initialHeadIdx = { if (!exactSize) self.headIdx else { // Dropping extra elements @@ -155,8 +155,8 @@ private[monix] final class DropHeadOnOverflowQueue[A: ClassTag] private (_recomm } } - private[this] var tailIdx = 0 - private[this] var headIdx = 0 + private var tailIdx = 0 + private var headIdx = 0 def hasNext: Boolean = { if (!isStarted) init() @@ -175,7 +175,7 @@ private[monix] final class DropHeadOnOverflowQueue[A: ClassTag] private (_recomm } } - private[this] def init(): Unit = { + private def init(): Unit = { isStarted = true if (self.headIdx != self.tailIdx) { headIdx = initialHeadIdx diff --git a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala index f7bba6372..e38201dd5 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/internal/collection/LinkedMap.scala @@ -26,8 +26,8 @@ import scala.collection.immutable.LongMap */ private[monix] class LinkedMap[K, +V]( val entries: Map[K, (V, Long)], - private[this] val insertionOrder: LongMap[K], - private[this] val nextId: Long + private val insertionOrder: LongMap[K], + private val nextId: Long ) { /** Returns `true` if this map is empty, or `false` otherwise. */ diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala index e83a059c6..e89ba3ff2 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala @@ -22,6 +22,7 @@ import monix.execution.{ CancelableFuture, FutureUtils } import monix.execution.schedulers.TrampolineExecutionContext import scala.annotation.implicitNotFound +import scala.annotation.nowarn import scala.concurrent.Future import scala.annotation.unused @@ -120,6 +121,7 @@ private[misc] abstract class CanIsolateInstancesLevel0 { /** Implementation for [[CanBindLocals.cancelableFuture]]. */ protected object CancelableFutureInstance extends CanBindLocals[CancelableFuture[Any]] { + @nowarn("msg=Implicit parameters should be provided with a `using` clause") override def bindContext(ctx: Local.Context)(f: => CancelableFuture[Any]): CancelableFuture[Any] = { val prev = Local.getContext() Local.setContext(ctx) @@ -137,6 +139,7 @@ private[misc] abstract class CanIsolateInstancesLevel0 { /** Implementation for [[CanBindLocals.future]]. */ protected object FutureInstance extends CanBindLocals[Future[Any]] { + @nowarn("msg=Implicit parameters should be provided with a `using` clause") override def bindContext(ctx: Local.Context)(f: => Future[Any]): Future[Any] = { val prev = Local.getContext() Local.setContext(ctx) diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala index 4d403e472..72fed5983 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala @@ -18,6 +18,7 @@ package monix.execution.misc import monix.execution.atomic.AtomicAny +import scala.annotation.nowarn private[execution] trait LocalDeprecated[A] { self: Local[A] => /** @@ -57,6 +58,7 @@ private[execution] trait LocalCompanionDeprecated { self: Local.type => * DEPRECATED — switch to `local.closed[R: CanIsolate]`. */ @deprecated("Switch to local.closed[R: CanIsolate]", since = "3.0.0") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def closed[R](fn: () => R): () => R = { // $COVERAGE-OFF$ import CanBindLocals.Implicits.synchronousAsDefault diff --git a/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala b/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala index 5590835ab..6f141944a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/rstreams/SingleAssignSubscription.scala @@ -35,7 +35,7 @@ final class SingleAssignSubscription private () extends Subscription { import SingleAssignSubscription.State import SingleAssignSubscription.State._ - private[this] val state = AtomicAny(Empty: State) + private val state = AtomicAny(Empty: State) def :=(s: org.reactivestreams.Subscription): Unit = set(s) diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala index d3538c081..224f3ba9e 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/BatchingScheduler.scala @@ -36,13 +36,12 @@ import scala.concurrent.ExecutionContext trait BatchingScheduler extends Scheduler { self => protected def executeAsync(r: Runnable): Unit - private[this] val trampoline = - TrampolineExecutionContext(new ExecutionContext { - def execute(runnable: Runnable): Unit = - self.executeAsync(runnable) - def reportFailure(cause: Throwable): Unit = - self.reportFailure(cause) - }) + private val trampoline = TrampolineExecutionContext(new ExecutionContext { + def execute(runnable: Runnable): Unit = + self.executeAsync(runnable) + def reportFailure(cause: Throwable): Unit = + self.reportFailure(cause) + }) override final def execute(runnable: Runnable): Unit = runnable match { diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala index eb0580c8b..c704f24c9 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/ReferenceScheduler.scala @@ -109,7 +109,7 @@ object ReferenceScheduler { override val executionModel: ExecModel, reporter: UncaughtExceptionReporter = null ) extends Scheduler { - private[this] val reporterRef = if (reporter eq null) s else reporter + private val reporterRef = if (reporter eq null) s else reporter override def execute(runnable: Runnable): Unit = s.execute(InterceptRunnable(runnable, reporter)) diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala index 58792a87c..66b901ba1 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala @@ -20,6 +20,7 @@ package monix.execution.schedulers import monix.execution.{ ExecutionModel => ExecModel, Scheduler, UncaughtExceptionReporter } import monix.execution.internal.Platform import monix.execution.schedulers.TrampolineExecutionContext.immediate +import scala.annotation.nowarn import scala.concurrent.{ ExecutionContext, Future } import scala.concurrent.duration.{ FiniteDuration, TimeUnit } @@ -124,6 +125,7 @@ object SchedulerService { self.awaitTermination(timeout, awaitOn) @deprecated("Extension methods are now implemented on `SchedulerService` directly", "3.4.0") + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def awaitTermination(timeout: FiniteDuration)(implicit permit: CanBlock): Boolean = self.awaitTermination(timeout)(permit) } diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala index 66ad234fe..760ce528a 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TestScheduler.scala @@ -19,7 +19,6 @@ package monix.execution package schedulers import monix.execution.atomic.AtomicAny -import monix.execution.cancelables.SingleAssignCancelable import scala.util.control.NonFatal import monix.execution.schedulers.TestScheduler._ @@ -126,7 +125,7 @@ import scala.util.Random * }}} */ final class TestScheduler private ( - private[this] val stateRef: AtomicAny[State], + private val stateRef: AtomicAny[State], override val executionModel: ExecutionModel ) extends ReferenceScheduler with BatchingScheduler { @@ -395,7 +394,6 @@ object TestScheduler { // $COVERAGE-ON$ val newID = state.lastID + 1 - SingleAssignCancelable() val task = Task(newID, r, state.clock + delay) val cancelable = new Cancelable { def cancel(): Unit = cancelTask(task) diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala index a06b40f67..14c5cffb8 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/TrampolineScheduler.scala @@ -56,8 +56,7 @@ import monix.execution.{ ExecutionModel => ExecModel } final class TrampolineScheduler(underlying: Scheduler, override val executionModel: ExecModel) extends Scheduler { self => - private[this] val trampoline = - TrampolineExecutionContext(underlying) + private val trampoline = TrampolineExecutionContext(underlying) override def execute(runnable: Runnable): Unit = trampoline.execute(runnable) diff --git a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala index 74e80bdc2..8ed528de7 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AckSuite.scala @@ -46,7 +46,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnContinue(Continue) should execute synchronously #1") { implicit s => var triggered = false - Continue.syncOnContinue { triggered = true } + val _ = Continue.syncOnContinue { triggered = true } assert(triggered, "triggered") } @@ -58,26 +58,26 @@ object AckSuite extends TestSuite[TestScheduler] { () => triggered = value } - continue.syncOnContinue(trigger()) + val _ = continue.syncOnContinue(trigger()) assert(triggered, "triggered") } test("syncOnContinue(Future.successful(Continue)) should execute trampolined") { implicit s => def loop(source: Future[Ack], n: Int): Future[Ack] = source.syncOnContinue { - if (n > 0) { loop(source, n - 1); () } + if (n > 0) { val _ = loop(source, n - 1); () } } var triggered = false val continue: Future[Ack] = Future.successful(Continue) - loop(continue, stackSafeLoopN).syncOnContinue { triggered = true } + val _ = loop(continue, stackSafeLoopN).syncOnContinue { triggered = true } assert(triggered, "triggered") } test("syncOnContinue(Future(Continue)) should execute async") { implicit s => var triggered = false val continue: Future[Ack] = Future(Continue) - continue.syncOnContinue { triggered = true } + val _ = continue.syncOnContinue { triggered = true } assert(!triggered, "!triggered") s.tick() @@ -86,7 +86,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnContinue(Stop) should execute synchronously #1") { implicit s => var triggered = false - (Stop: Future[Ack]).syncOnContinue { triggered = true } + val _ = (Stop: Future[Ack]).syncOnContinue { triggered = true } assert(!triggered, "!triggered") assert(s.state.tasks.isEmpty, "there should be no async task registered") } @@ -99,7 +99,7 @@ object AckSuite extends TestSuite[TestScheduler] { () => triggered = value } - cancel.syncOnContinue(trigger()) + val _ = cancel.syncOnContinue(trigger()) assert(!triggered, "!triggered") assert(s.state.tasks.isEmpty, "there should be no async task registered") } @@ -107,14 +107,14 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnContinue(Future.successful(Stop)) should execute trampolined") { implicit s => var triggered = false val stop = Future.successful(Stop: Ack) - stop.syncOnContinue { triggered = true } + val _ = stop.syncOnContinue { triggered = true } assert(!triggered, "!triggered") assert(s.state.tasks.isEmpty, "tasks.isEmpty") } test("syncOnContinue(Future(Stop)) should execute async") { implicit s => var triggered = false - Future(Stop: Ack).syncOnContinue { triggered = true } + val _ = Future(Stop: Ack).syncOnContinue { triggered = true } assert(s.state.tasks.nonEmpty, "async tasks should be registered") s.tick() assert(!triggered, "!triggered") @@ -122,19 +122,19 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnContinue(Continue) should protect against user errors") { implicit s => val ex = new RuntimeException("dummy") - Continue.syncOnContinue { throw ex } + val _ = Continue.syncOnContinue { throw ex } assertEquals(s.state.lastReportedError, ex) } test("syncOnContinue(Future.successful(Continue)) should protect against user errors") { implicit s => val ex = new RuntimeException("dummy") - Future.successful(Continue).syncOnContinue { throw ex } + val _ = Future.successful(Continue).syncOnContinue { throw ex } assertEquals(s.state.lastReportedError, ex) } test("syncOnStopOrFailure(Stop) should execute synchronously") { implicit s => var triggered = false - Stop.syncOnStopOrFailure { ex => + val _ = Stop.syncOnStopOrFailure { ex => if (ex.isEmpty) triggered = true } assert(triggered, "triggered") @@ -143,7 +143,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future(Stop)) should execute asynchronously") { implicit s => var triggered = false - Future(Stop).syncOnStopOrFailure { ex => + val _ = Future(Stop).syncOnStopOrFailure { ex => if (ex.isEmpty) triggered = true } assert(!triggered, "!triggered") @@ -156,11 +156,11 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future.successful(Stop)) should execute trampolined") { implicit s => def loop(source: Future[Ack], n: Int): Future[Ack] = source.syncOnStopOrFailure { _ => - if (n > 0) { loop(source, n - 1); () } + if (n > 0) { val _ = loop(source, n - 1); () } } var triggered = false - loop(Future.successful(Stop), stackSafeLoopN).syncOnStopOrFailure { ex => + val _ = loop(Future.successful(Stop), stackSafeLoopN).syncOnStopOrFailure { ex => triggered = ex.isEmpty } assert(triggered, "triggered") @@ -168,7 +168,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Continue) should execute synchronously") { implicit s => var triggered = false - (Continue: Ack).syncOnStopOrFailure { ex => + val _ = (Continue: Ack).syncOnStopOrFailure { ex => if (ex.isEmpty) triggered = true } assert(!triggered, "!triggered") @@ -177,7 +177,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future.successful(Continue)) should execute trampolined") { implicit s => var triggered = false - (Future.successful(Continue): Future[Ack]).syncOnStopOrFailure { ex => + val _ = (Future.successful(Continue): Future[Ack]).syncOnStopOrFailure { ex => triggered = ex.isEmpty } assert(!triggered, "!triggered") @@ -186,7 +186,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future(Continue)) should execute asynchronously") { implicit s => var triggered = false - (Future(Continue): Future[Ack]).syncOnStopOrFailure { ex => + val _ = (Future(Continue): Future[Ack]).syncOnStopOrFailure { ex => if (ex.isEmpty) triggered = true } assert(s.state.tasks.nonEmpty, "there should be async tasks registered") @@ -200,7 +200,7 @@ object AckSuite extends TestSuite[TestScheduler] { var triggered = false val ex = new RuntimeException("dummy") val ack: Future[Ack] = Future.failed(ex) - ack.syncOnStopOrFailure { p => + val _ = ack.syncOnStopOrFailure { p => triggered = p.fold(triggered)(_ == ex) } assertEquals(triggered, true) @@ -210,7 +210,7 @@ object AckSuite extends TestSuite[TestScheduler] { var triggered = false val ex = new RuntimeException("dummy") val ack: Future[Ack] = Future { throw ex } - ack.syncOnStopOrFailure { p => + val _ = ack.syncOnStopOrFailure { p => triggered = p.fold(triggered)(_ == ex) } @@ -222,7 +222,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Stop) should protect against user errors") { implicit s => val ex = new RuntimeException("dummy") - Stop.syncOnStopOrFailure { _ => + val _ = Stop.syncOnStopOrFailure { _ => throw ex } assertEquals(s.state.lastReportedError, ex) @@ -230,7 +230,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future(Stop)) should protect against user errors") { implicit s => val ex = new RuntimeException("dummy") - Future(Stop).syncOnStopOrFailure { _ => + val _ = Future(Stop).syncOnStopOrFailure { _ => throw ex } s.tick() @@ -240,7 +240,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future.failed(ex)) should protect against user errors") { implicit s => val ex = new RuntimeException("dummy") val source = Future.failed[Ack](new RuntimeException("first")) - source.syncOnStopOrFailure { _ => + val _ = source.syncOnStopOrFailure { _ => throw ex } assertEquals(s.state.lastReportedError, ex) @@ -249,7 +249,7 @@ object AckSuite extends TestSuite[TestScheduler] { test("syncOnStopOrFailure(Future(throw ex)) should protect against user errors") { implicit s => val ex = new RuntimeException("dummy") val source = Future[Ack](throw new RuntimeException("first")) - source.syncOnStopOrFailure { _ => + val _ = source.syncOnStopOrFailure { _ => throw ex } s.tick() @@ -716,7 +716,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Continue val p = Promise[Int]() - ack.syncOnContinueFollow(p, 1) + val _ = ack.syncOnContinueFollow(p, 1) // should be immediate assertEquals(p.future.value, Some(Success(1))) } @@ -725,7 +725,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Stop val p = Promise[Int]() - ack.syncOnContinueFollow(p, 1) + val _ = ack.syncOnContinueFollow(p, 1) s.tick() assertEquals(p.future.value, None) } @@ -734,7 +734,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Future(Continue) val p = Promise[Int]() - ack.syncOnContinueFollow(p, 1) + val _ = ack.syncOnContinueFollow(p, 1) assertEquals(p.future.value, None) // should be async @@ -746,7 +746,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Future(Stop) val p = Promise[Int]() - ack.syncOnContinueFollow(p, 1) + val _ = ack.syncOnContinueFollow(p, 1) s.tick() assertEquals(p.future.value, None) } @@ -755,7 +755,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Continue val p = Promise[Int]() - ack.syncOnStopFollow(p, 1) + val _ = ack.syncOnStopFollow(p, 1) s.tick() assertEquals(p.future.value, None) } @@ -764,7 +764,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Stop val p = Promise[Int]() - ack.syncOnStopFollow(p, 1) + val _ = ack.syncOnStopFollow(p, 1) // should be immediate assertEquals(p.future.value, Some(Success(1))) } @@ -773,7 +773,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Future(Continue) val p = Promise[Int]() - ack.syncOnStopFollow(p, 1) + val _ = ack.syncOnStopFollow(p, 1) s.tick() assertEquals(p.future.value, None) } @@ -782,7 +782,7 @@ object AckSuite extends TestSuite[TestScheduler] { val ack: Future[Ack] = Future(Stop) val p = Promise[Int]() - ack.syncOnStopFollow(p, 1) + val _ = ack.syncOnStopFollow(p, 1) s.tick() assertEquals(p.future.value, Some(Success(1))) } diff --git a/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala index 23c32a6b7..dc0097e87 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/AsyncQueueSuite.scala @@ -41,7 +41,7 @@ object AsyncQueueFakeSuite extends BaseAsyncQueueSuite[TestScheduler] { Future.successful(()) test(name) { implicit ec => - repeatTest(f(ec), times) + val _ = repeatTest(f(ec), times) ec.tick(1.day) } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala index 6511ec00d..59dddb184 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CallbackSuite.scala @@ -95,8 +95,8 @@ object CallbackSuite extends TestSuite[TestScheduler] { cb.onSuccess(1) assertEquals(p.future.value, Some(Success(1))) - intercept[IllegalStateException] { cb.onSuccess(2) } - intercept[CallbackCalledMultipleTimesException] { cb.onSuccess(2) } + val _ = intercept[IllegalStateException] { cb.onSuccess(2) } + val _ = intercept[CallbackCalledMultipleTimesException] { cb.onSuccess(2) } () } @@ -108,8 +108,8 @@ object CallbackSuite extends TestSuite[TestScheduler] { cb.onError(dummy) assertEquals(p.future.value, Some(Failure(dummy))) - intercept[IllegalStateException] { cb.onSuccess(1) } - intercept[CallbackCalledMultipleTimesException] { cb.onSuccess(1) } + val _ = intercept[IllegalStateException] { cb.onSuccess(1) } + val _ = intercept[CallbackCalledMultipleTimesException] { cb.onSuccess(1) } () } diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala index b2df86462..377c3b4b0 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelablePromiseSuite.scala @@ -31,7 +31,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { val f1 = p.future val f2 = p.future val p3 = Promise[Int]() - p.subscribe { v => p3.complete(v); () } + val _ = p.subscribe { v => p3.complete(v); () } assert(f1 ne f2, "f1 != f2") @@ -44,7 +44,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { assertEquals(p.future.value, Some(Success(99))) val p4 = Promise[Int]() - p.subscribe { v => p4.complete(v); () } + val _ = p.subscribe { v => p4.complete(v); () } assertEquals(p4.future.value, Some(Success(99))) } @@ -55,7 +55,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { val f1 = p.future val f2 = p.future val p3 = Promise[Int]() - p.subscribe { v => p3.complete(v); () } + val _ = p.subscribe { v => p3.complete(v); () } assert(f1 ne f2, "f1 != f2") @@ -69,7 +69,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { assertEquals(p.future.value, Some(Failure(dummy))) val p4 = Promise[Int]() - p.subscribe { v => p4.complete(v); () } + val _ = p.subscribe { v => p4.complete(v); () } assertEquals(p4.future.value, Some(Failure(dummy))) } @@ -96,7 +96,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { val c1 = p.subscribe { v => p1.complete(v); () } val p2 = Promise[Int]() - p.subscribe { v => p2.complete(v); () } + val _ = p.subscribe { v => p2.complete(v); () } val p3 = Promise[Int]() val c3 = p.subscribe { v => p3.complete(v); () } @@ -116,7 +116,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { assert(p.isCompleted) val p1 = Promise[Int]() - p.subscribe { v => p1.complete(v); () } + val _ = p.subscribe { v => p1.complete(v); () } assertEquals(p1.future.value, Some(Success(1))) val f = p.future @@ -134,7 +134,7 @@ object CancelablePromiseSuite extends SimpleTestSuite { assert(p.isCompleted) val p1 = Promise[Int]() - p.subscribe { v => p1.complete(v); () } + val _ = p.subscribe { v => p1.complete(v); () } assertEquals(p1.future.value, Some(Failure(dummy))) val f = p.future diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala index 04cd2e603..ea80a8c75 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala @@ -21,10 +21,12 @@ import minitest.SimpleTestSuite import monix.execution.exceptions.{ CompositeException, DummyException } import monix.execution.schedulers.TestScheduler import monix.execution.internal.Platform +import scala.annotation.nowarn import scala.concurrent.Promise import scala.util.Failure import scala.util.control.NonFatal +@nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") object CancelableSuite extends SimpleTestSuite { test("Cancelable.empty") { val c = Cancelable() @@ -79,8 +81,10 @@ object CancelableSuite extends SimpleTestSuite { assertEquals(e, dummy1) assertEquals(e.getSuppressed.toList, List(dummy2)) } else { - val CompositeException(errors) = e - assertEquals(errors.toList, List(dummy1, dummy2)) + e match { + case CompositeException(errors) => assertEquals(errors.toList, List(dummy1, dummy2)) + case other => assertEquals(other, dummy1) + } } } } @@ -121,8 +125,10 @@ object CancelableSuite extends SimpleTestSuite { assertEquals(e, dummy1) assertEquals(e.getSuppressed.toList, List(dummy2)) } else { - val CompositeException(errors) = sc.state.lastReportedError - assertEquals(errors.toList, List(dummy1, dummy2)) + sc.state.lastReportedError match { + case CompositeException(errors) => assertEquals(errors.toList, List(dummy1, dummy2)) + case other => assertEquals(other, dummy1) + } } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala index 7d14d7ce3..b731a7edf 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/FutureUtilsSuite.scala @@ -55,7 +55,7 @@ object FutureUtilsSuite extends TestSuite[TestScheduler] { val t = f.timeout(30.millis) s.tick(10.seconds) - intercept[TimeoutException] { t.value.get.get; () } + val _ = intercept[TimeoutException] { val _ = t.value.get.get; () } () } diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala index 29dda7a35..8a75a4293 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala @@ -21,9 +21,11 @@ import minitest.SimpleTestSuite import minitest.laws.Checkers import monix.execution.Cancelable import monix.execution.atomic.PaddingStrategy.LeftRight256 +import scala.annotation.nowarn import scala.collection.mutable.ListBuffer +@nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") object CompositeCancelableSuite extends SimpleTestSuite with Checkers { test("simple cancel") { val s = CompositeCancelable() diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala index 46217133f..3dd6f78dd 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/MultiAssignCancelableSuite.scala @@ -73,12 +73,12 @@ object MultiAssignCancelableSuite extends SimpleTestSuite { val sub = BooleanCancelable() mSub := sub - mSub.clear() + val _ = mSub.clear() mSub.cancel() assert(!sub.isCanceled, "!sub.isCanceled") - mSub.clear() + val _ = mSub.clear() mSub := sub assert(sub.isCanceled, "sub.isCanceled") } diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala index 7908af8c3..85bccdfb0 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/SingleAssignCancelableSuite.scala @@ -109,7 +109,7 @@ object SingleAssignCancelableSuite extends SimpleTestSuite { val b1 = Cancelable() s := b1 - intercept[IllegalStateException] { + val _ = intercept[IllegalStateException] { val b2 = Cancelable() s := b2 () @@ -124,7 +124,7 @@ object SingleAssignCancelableSuite extends SimpleTestSuite { val b1 = Cancelable() s := b1 - intercept[IllegalStateException] { + val _ = intercept[IllegalStateException] { val b2 = Cancelable() s := b2 () diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala index 3dd88ee06..81ae187f8 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/StackedCancelableSuite.scala @@ -55,7 +55,7 @@ object StackedCancelableSuite extends SimpleTestSuite { val c = StackedCancelable() c.push(initial1) c.push(initial2) - c.pop() + val _ = c.pop() c.cancel() assertEquals(effect, 1) @@ -156,7 +156,7 @@ object StackedCancelableSuite extends SimpleTestSuite { val sc = StackedCancelable() val c = BooleanCancelable() - sc.popAndPushList(List(c)) + val _ = sc.popAndPushList(List(c)) assert(!sc.isCanceled, "!sc.isCanceled") assert(!c.isCanceled, "!c.isCanceled") @@ -170,7 +170,7 @@ object StackedCancelableSuite extends SimpleTestSuite { val c = BooleanCancelable() - sc.popAndPushList(List(c)) + val _ = sc.popAndPushList(List(c)) assert(sc.isCanceled, "sc.isCanceled") assert(c.isCanceled, "c.isCanceled") } diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala index f3ae311a1..31ff43497 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/RingBufferSuite.scala @@ -30,7 +30,7 @@ object RingBufferSuite extends SimpleTestSuite { test("non-empty ring buffer") { val buffer = new RingBuffer[Integer](2) - buffer.push(0) + val _ = buffer.push(0) assertEquals(buffer.isEmpty, false) } diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala index 3877ae051..66f1963b4 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala @@ -18,13 +18,15 @@ package monix.execution.internal.collection import minitest.SimpleTestSuite +import scala.annotation.nowarn import scala.collection.mutable.ListBuffer +@nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") object DropAllOnOverflowQueueSuite extends SimpleTestSuite { test("should not accept null values") { val q = DropAllOnOverflowQueue[String](100) - intercept[NullPointerException] { - q.offer(null) + val _ = intercept[NullPointerException] { + val _ = q.offer(null) () } () @@ -43,13 +45,13 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { val q4 = DropAllOnOverflowQueue[Int](1025) assertEquals(q4.capacity, 2047) - intercept[IllegalArgumentException] { - DropAllOnOverflowQueue[Int](0) + val _ = intercept[IllegalArgumentException] { + val _ = DropAllOnOverflowQueue[Int](0) () } - intercept[IllegalArgumentException] { - DropAllOnOverflowQueue[Int](-100) + val _ = intercept[IllegalArgumentException] { + val _ = DropAllOnOverflowQueue[Int](-100) () } () @@ -156,27 +158,27 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { assert(q.isEmpty) assert(!q.nonEmpty) - intercept[NoSuchElementException] { q.head; () } + val _ = intercept[NoSuchElementException] { val _ = q.head; () } assertEquals(q.headOption, None) - q.offer(1) + val _ = q.offer(1) assert(!q.isEmpty) assert(q.nonEmpty) assertEquals(q.head, 1) assertEquals(q.headOption, Some(1)) - q.poll() + val _ = q.poll() assert(q.isEmpty) assert(!q.nonEmpty) - intercept[NoSuchElementException] { q.head; () } + val _ = intercept[NoSuchElementException] { val _ = q.head; () } assertEquals(q.headOption, None) } test("iterable") { val q = DropAllOnOverflowQueue[Int](127) - q.offerMany(0 until 200: _*) + val _ = q.offerMany(0 until 200: _*) assertEquals(q.toList, 127 until 200) } @@ -184,15 +186,15 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { val q = DropAllOnOverflowQueue[Int](1) assert(q.isEmpty) - q.offerMany(0 until 10: _*) + val _ = q.offerMany(0 until 10: _*) assertEquals(q.head, 9) assertEquals(q.length, 1) - q.offerMany(10 until 20: _*) + val _ = q.offerMany(10 until 20: _*) assertEquals(q.head, 19) assertEquals(q.length, 1) - q.offerMany(20 until 30: _*) + val _ = q.offerMany(20 until 30: _*) assertEquals(q.head, 29) assertEquals(q.length, 1) assertEquals(q.poll(), 29) @@ -201,7 +203,7 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { test("should iterate with fixed capacity") { val q = DropAllOnOverflowQueue[Int](10) - q.offerMany(0 until 15: _*) + val _ = q.offerMany(0 until 15: _*) val list1 = q.iterator(exactSize = false).toList assertEquals(list1.length, 15) @@ -224,7 +226,7 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { test("should box") { val q = DropAllOnOverflowQueue.boxed[Int](10) - q.offerMany(0 until 15: _*) + val _ = q.offerMany(0 until 15: _*) assertEquals(q.toList, (0 until 15).toList) } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala index ed4a8f7f0..7c0ca6a6f 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala @@ -18,13 +18,15 @@ package monix.execution.internal.collection import minitest.SimpleTestSuite +import scala.annotation.nowarn import scala.collection.mutable.ListBuffer +@nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { test("should not accept null values") { val q = DropAllOnOverflowQueue[String](100) - intercept[NullPointerException] { - q.offer(null) + val _ = intercept[NullPointerException] { + val _ = q.offer(null) () } () @@ -43,13 +45,13 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { val q4 = DropHeadOnOverflowQueue[Int](1025) assertEquals(q4.capacity, 2047) - intercept[IllegalArgumentException] { - DropHeadOnOverflowQueue[Int](0) + val _ = intercept[IllegalArgumentException] { + val _ = DropHeadOnOverflowQueue[Int](0) () } - intercept[IllegalArgumentException] { - DropHeadOnOverflowQueue[Int](-100) + val _ = intercept[IllegalArgumentException] { + val _ = DropHeadOnOverflowQueue[Int](-100) () } () @@ -155,21 +157,21 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { assert(q.isEmpty) assert(!q.nonEmpty) - intercept[NoSuchElementException] { q.head; () } + val _ = intercept[NoSuchElementException] { val _ = q.head; () } assertEquals(q.headOption, None) - q.offer(1) + val _ = q.offer(1) assert(!q.isEmpty) assert(q.nonEmpty) assertEquals(q.head, 1) assertEquals(q.headOption, Some(1)) - q.poll() + val _ = q.poll() assert(q.isEmpty) assert(!q.nonEmpty) - intercept[NoSuchElementException] { q.head; () } + val _ = intercept[NoSuchElementException] { val _ = q.head; () } assertEquals(q.headOption, None) } @@ -177,7 +179,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { val q = DropHeadOnOverflowQueue[Int](127) assertEquals(q.capacity, 127) - q.offerMany(0 until 200: _*) + val _ = q.offerMany(0 until 200: _*) assertEquals(q.toList, 73 until 200) } @@ -185,15 +187,15 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { val q = DropHeadOnOverflowQueue[Int](1) assert(q.isEmpty) - q.offerMany(0 until 10: _*) + val _ = q.offerMany(0 until 10: _*) assertEquals(q.head, 9) assertEquals(q.length, 1) - q.offerMany(10 until 20: _*) + val _ = q.offerMany(10 until 20: _*) assertEquals(q.head, 19) assertEquals(q.length, 1) - q.offerMany(20 until 30: _*) + val _ = q.offerMany(20 until 30: _*) assertEquals(q.head, 29) assertEquals(q.length, 1) assertEquals(q.poll(), 29) @@ -202,7 +204,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { test("should iterate with fixed capacity") { val q = DropHeadOnOverflowQueue[Int](10) - q.offerMany(0 to 200: _*) + val _ = q.offerMany(0 to 200: _*) val list1 = q.iterator(exactSize = false).toList assertEquals(list1.length, 15) @@ -225,7 +227,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { test("should box") { val q = DropHeadOnOverflowQueue.boxed[Int](10) - q.offerMany(0 until 15: _*) + val _ = q.offerMany(0 until 15: _*) assertEquals(q.toList, (0 until 15).toList) } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala index 575d38b7f..f7f59e978 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/ReferenceSchedulerSuite.scala @@ -126,7 +126,7 @@ object ReferenceSchedulerSuite extends SimpleTestSuite { val ws = s.withExecutionModel(AlwaysAsyncExecution) var effect = 0 - ws.scheduleOnce(1.second) { effect += 1 } + val _ = ws.scheduleOnce(1.second) { effect += 1 } assertEquals(effect, 0) s.tick(1.second) diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala index f53b4b627..a5c69d04a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TestSchedulerSuite.scala @@ -76,13 +76,13 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { var firstBatch = 0 var secondBatch = 0 - s.scheduleOnce( + val _ = s.scheduleOnce( 10, TimeUnit.SECONDS, action { firstBatch += 1 s.execute(action { firstBatch += 1 }) - s.scheduleOnce( + val _ = s.scheduleOnce( 10, TimeUnit.SECONDS, action { @@ -93,13 +93,13 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { } ) - s.scheduleOnce( + val _ = s.scheduleOnce( 20, TimeUnit.SECONDS, action { secondBatch += 1 s.execute(action { secondBatch += 1 }) - s.scheduleOnce( + val _ = s.scheduleOnce( 10, TimeUnit.SECONDS, action { @@ -139,7 +139,7 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { assertEquals(f.value, None) s.tick(10.seconds) - intercept[TimeoutException] { f.value.get.get; () } + val _ = intercept[TimeoutException] { val _ = f.value.get.get; () } () } @@ -167,7 +167,7 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { test("complicated scheduling, test 1") { implicit s => var counter = 0 - delayedResult(50.millis, 300.millis) { + val _ = delayedResult(50.millis, 300.millis) { counter += 1 delayedResult(50.millis, 300.millis) { @@ -196,7 +196,7 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { test("complicated scheduling, test 2") { implicit s => var counter = 0 - delayedResult(50.millis, 300.millis) { + val _ = delayedResult(50.millis, 300.millis) { counter += 1 delayedResult(50.millis, 300.millis) { @@ -279,7 +279,7 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { assertEquals(s.state.lastReportedError, ex) // Other runnables have been rescheduled async - s.tickOne() + val _ = s.tickOne() assertEquals(effect, 1 + 2 + 3) } @@ -310,7 +310,7 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { } assertEquals(effect, 0) - s.tickOne() + val _ = s.tickOne() assertEquals(effect, 3) } @@ -338,14 +338,14 @@ object TestSchedulerSuite extends TestSuite[TestScheduler] { def delayedResult[A](delay: FiniteDuration, timeout: FiniteDuration)(r: => A)(implicit s: Scheduler) = { val f1 = { val p = Promise[A]() - s.scheduleOnce(delay.length, delay.unit, action { p.success(r); () }) + val _ = s.scheduleOnce(delay.length, delay.unit, action { p.success(r); () }) p.future } // catching the exception here, for non-useless stack traces val err = Try(throw new TimeoutException) val promise = Promise[A]() - val task = s.scheduleOnce(timeout.length, timeout.unit, action { promise.tryComplete(err); () }) + val task = s.scheduleOnce(timeout.length, timeout.unit, action { val _ = promise.tryComplete(err); () }) f1.onComplete { result => // canceling task to prevent waisted CPU resources and memory leaks diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala index 79865cf03..1d5591901 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/TrampolineSchedulerSuite.scala @@ -78,7 +78,7 @@ object TrampolineSchedulerSuite extends TestSuite[(Scheduler, TestScheduler)] { import concurrent.duration._ val p = Promise[Unit]() val startAt = s.clockRealTime(MILLISECONDS) - s.scheduleOnce(100.millis) { p.success(()); () } + val _ = s.scheduleOnce(100.millis) { p.success(()); () } u.tick(100.millis) val duration = s.clockRealTime(MILLISECONDS) - startAt @@ -156,7 +156,7 @@ object TrampolineSchedulerSuite extends TestSuite[(Scheduler, TestScheduler)] { } assertEquals(effect, 16) - u.tickOne() + val _ = u.tickOne() assertEquals(effect, 56) } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala index c5dc02ffb..4a8283fdc 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala @@ -19,6 +19,7 @@ package monix.execution.schedulers import scala.concurrent.{ ExecutionContext, Promise } import scala.concurrent.duration._ +import scala.annotation.nowarn import minitest.TestSuite import monix.execution.{ ExecutionModel, FutureUtils, Scheduler, UncaughtExceptionReporter } @@ -26,16 +27,17 @@ class UncaughtExceptionReporterBaseSuite extends TestSuite[Promise[Throwable]] { protected val immediateEC = TrampolineExecutionContext.immediate object Dummy extends Throwable - private[this] val throwRunnable: Runnable = () => throw Dummy + private val throwRunnable: Runnable = () => throw Dummy def setup() = Promise[Throwable]() def tearDown(env: Promise[Throwable]): Unit = () - private[this] def reporter(p: Promise[Throwable]) = UncaughtExceptionReporter { t => + private def reporter(p: Promise[Throwable]) = UncaughtExceptionReporter { t => p.success(t) () } + @nowarn("msg=Implicit parameters should be provided with a `using` clause") def testReports(name: String)(f: UncaughtExceptionReporter => Scheduler) = { testAsync(name) { p => f(reporter(p)).execute(throwRunnable) diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index b9ba48d9e..a8cc15e6d 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -35,17 +35,17 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( extends BufferedSubscriber[A] { require(_size > 0, "bufferSize must be a strictly positive number") - private[this] val bufferSize = nextPowerOf2(_size) + private val bufferSize = nextPowerOf2(_size) - private[this] val em = out.scheduler.executionModel + private val em = out.scheduler.executionModel implicit final val scheduler: Scheduler = out.scheduler - private[this] var upstreamIsComplete = false - private[this] var downstreamIsComplete = false - private[this] var errorThrown: Throwable = null - private[this] var isLoopActive = false - private[this] var backPressured: Promise[Ack] = null - private[this] var lastIterationAck: Future[Ack] = Continue + private var upstreamIsComplete = false + private var downstreamIsComplete = false + private var errorThrown: Throwable = null + private var isLoopActive = false + private var backPressured: Promise[Ack] = null + private var lastIterationAck: Future[Ack] = Continue protected val queue = JSArrayQueue.unbounded[A] final def onNext(elem: A): Future[Ack] = { @@ -58,17 +58,17 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( backPressured match { case null => if (queue.length < bufferSize) { - queue.offer(elem) + val _ = queue.offer(elem) pushToConsumer() Continue } else { backPressured = Promise[Ack]() - queue.offer(elem) + val _ = queue.offer(elem) pushToConsumer() backPressured.future } case promise => - queue.offer(elem) + val _ = queue.offer(elem) pushToConsumer() promise.future } @@ -97,7 +97,7 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( protected def fetchNext(): R - private[this] val consumerRunLoop = new Runnable { + private val consumerRunLoop = new Runnable { def run(): Unit = fastLoop(lastIterationAck, 0) private final def signalNext(next: R): Future[Ack] = diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala index c41e7c577..b34b59102 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala @@ -32,7 +32,7 @@ private[monix] final class BatchedBufferedSubscriber[A] private (out: Subscriber if (queue.isEmpty) null else { val buffer = ListBuffer.empty[A] - queue.drainToBuffer(buffer, Platform.recommendedBatchSize) + val _ = queue.drainToBuffer(buffer, Platform.recommendedBatchSize) buffer.toList } } diff --git a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala index 69e63c5f3..2f8e5f407 100644 --- a/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala +++ b/monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala @@ -41,19 +41,19 @@ private[observers] final class SyncBufferedSubscriber[-A] private ( implicit val scheduler: Scheduler = out.scheduler // to be modified only in onError, before upstreamIsComplete - private[this] var errorThrown: Throwable = _ + private var errorThrown: Throwable = null.asInstanceOf[Throwable] // to be modified only in onError / onComplete - private[this] var upstreamIsComplete = false + private var upstreamIsComplete = false // to be modified only by consumer - private[this] var downstreamIsComplete = false + private var downstreamIsComplete = false // represents an indicator that there's a loop in progress - private[this] var isLoopActive = false + private var isLoopActive = false // events being dropped - private[this] var droppedCount = 0L + private var droppedCount = 0L // last acknowledgement received by consumer loop - private[this] var lastIterationAck: Future[Ack] = Continue + private var lastIterationAck: Future[Ack] = Continue // Used on the consumer side to split big synchronous workloads in batches - private[this] val em = scheduler.executionModel + private val em = scheduler.executionModel def onNext(elem: A): Ack = { if (!upstreamIsComplete && !downstreamIsComplete) { @@ -95,7 +95,7 @@ private[observers] final class SyncBufferedSubscriber[-A] private ( scheduler.execute(consumerRunLoop) } - private[this] val consumerRunLoop = new Runnable { + private val consumerRunLoop = new Runnable { def run(): Unit = { fastLoop(lastIterationAck, 0) } diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala index 54a4cdb6b..9e3d43a60 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.compression.internal.operators +import scala.annotation.nowarn import java.util.zip.Deflater import monix.execution.Ack @@ -30,6 +31,7 @@ import scala.concurrent.Future import scala.util.Success import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[compression] final class DeflateOperator( bufferSize: Int, params: CompressionParameters, @@ -39,8 +41,8 @@ private[compression] final class DeflateOperator( new Subscriber[Array[Byte]] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = Continue - private[this] val deflate = + private var ack: Future[Ack] = Continue + private val deflate = new DeflateAdapter( bufferSize, params.level, diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala index 2c07525df..5dee07f36 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.compression.internal.operators +import scala.annotation.nowarn import java.util.zip.{ CRC32, DataFormatException, Inflater } import java.{ util => ju } @@ -39,15 +40,16 @@ import scala.concurrent.Future import scala.util.Success import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[compression] final class GunzipOperator(bufferSize: Int) extends Operator[Array[Byte], Array[Byte]] { def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] = new Subscriber[Array[Byte]] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = _ - private[this] val gunzipper = new Gunzipper(bufferSize) + private var isDone = false + private var ack: Future[Ack] = null.asInstanceOf[Future[Ack]] + private val gunzipper = new Gunzipper(bufferSize) def onNext(elem: Array[Byte]): Future[Ack] = { if (isDone) { diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala index 7f50d066d..4bd93920d 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GzipOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.compression.internal.operators +import scala.annotation.nowarn import java.nio.charset.StandardCharsets import java.time.Instant import java.util.zip.{ CRC32, Deflater } @@ -44,6 +45,7 @@ import scala.concurrent.Future import scala.util.Success import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[compression] final class GzipOperator( fileName: Option[String], modificationTime: Option[Instant], @@ -55,8 +57,8 @@ private[compression] final class GzipOperator( new Subscriber[Array[Byte]] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = _ - private[this] val gzipper = + private var ack: Future[Ack] = null.asInstanceOf[Future[Ack]] + private val gzipper = new Gzipper( bufferSize, params.level, diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala index e823715a4..d7a83386f 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/InflateOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.compression.internal.operators +import scala.annotation.nowarn import java.util.zip.{ DataFormatException, Inflater } import java.{ util => ju } @@ -32,6 +33,7 @@ import scala.concurrent.Future import scala.util.Success import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[compression] final class InflateOperator(bufferSize: Int, noWrap: Boolean) extends Operator[Array[Byte], Array[Byte]] { @@ -39,9 +41,9 @@ private[compression] final class InflateOperator(bufferSize: Int, noWrap: Boolea new Subscriber[Array[Byte]] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = _ - private[this] val inflater = new InflateAdapter(bufferSize, noWrap) + private var isDone = false + private var ack: Future[Ack] = null.asInstanceOf[Future[Ack]] + private val inflater = new InflateAdapter(bufferSize, noWrap) def onNext(elem: Array[Byte]): Future[Ack] = { if (isDone) { diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala index 8cfce3dd7..54d087a18 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.observers.buffers +import scala.annotation.nowarn import monix.execution.{ Ack, ChannelType } import monix.execution.Ack.{ Continue, Stop } import monix.execution.BufferCapacity.Unbounded @@ -37,6 +38,7 @@ import scala.util.{ Failure, Success } /** Shared internals between [[BackPressuredBufferedSubscriber]] and * [[BatchedBufferedSubscriber]]. */ +@nowarn("msg=unused value of type") private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( out: Subscriber[R], _bufferSize: Int, @@ -45,8 +47,8 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( require(_bufferSize > 0, "bufferSize must be a strictly positive number") - private[this] val bufferSize = math.nextPowerOf2(_bufferSize) - private[this] val em = out.scheduler.executionModel + private val bufferSize = math.nextPowerOf2(_bufferSize) + private val em = out.scheduler.executionModel implicit final val scheduler: Scheduler = out.scheduler protected final val queue: LowLevelConcurrentQueue[A] = @@ -56,9 +58,9 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( fenced = false ) - private[this] val itemsToPush = + private val itemsToPush = Atomic.withPadding(0, LeftRight256) - private[this] val backPressured = + private val backPressured = Atomic.withPadding(null: Promise[Ack], LeftRight256) @tailrec @@ -129,7 +131,7 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R]( protected def fetchNext(): R protected def fetchSize(r: R): Int - private[this] val consumerRunLoop = new Runnable { + private val consumerRunLoop = new Runnable { def run(): Unit = { fastLoop(lastIterationAck, 0, 0) } diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala index 5af6bbd1a..b9e6663aa 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/BatchedBufferedSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.observers.buffers +import scala.annotation.nowarn import monix.execution.ChannelType import monix.execution.internal.Platform import monix.reactive.observers.Subscriber @@ -27,6 +28,7 @@ import scala.collection.mutable.ListBuffer * [[monix.reactive.OverflowStrategy.BackPressure BackPressured]] * buffer overflowStrategy that sends events in bundles. */ +@nowarn("msg=unused value of type") private[monix] final class BatchedBufferedSubscriber[A] private ( out: Subscriber[List[A]], _bufferSize: Int, diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala index c55d8e243..eb98a5b4a 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/DropNewBufferedSubscriber.scala @@ -29,7 +29,6 @@ import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import scala.concurrent.Future import scala.util.{ Failure, Success } -import scala.annotation.nowarn /** A high-performance and non-blocking [[BufferedSubscriber]] * implementation for the [[monix.reactive.OverflowStrategy.DropNew DropNew]] @@ -39,22 +38,22 @@ import scala.annotation.nowarn private[observers] final class DropNewBufferedSubscriber[A] private ( out: Subscriber[A], bufferSize: Int, - @nowarn onOverflow: Long => Coeval[Option[A]] = null, + onOverflow: Long => Coeval[Option[A]], ) extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { require(bufferSize > 0, "bufferSize must be a strictly positive number") implicit val scheduler: Scheduler = out.scheduler - private[this] val em = out.scheduler.executionModel + private val em = out.scheduler.executionModel - private[this] val itemsToPush = + private val itemsToPush = Atomic.withPadding(0, LeftRight256) - private[this] val droppedCount: AtomicInt = + private val droppedCount: AtomicInt = if (onOverflow != null) AtomicInt.withPadding(0, LeftRight128) else null - private[this] val queue = + private val queue = ConcurrentQueue.limited[A](bufferSize) def onNext(elem: A): Ack = { @@ -86,7 +85,7 @@ private[observers] final class DropNewBufferedSubscriber[A] private ( } } - private[this] def pushToConsumer(): Unit = { + private def pushToConsumer(): Unit = { val currentNr = itemsToPush.getAndIncrement() // If a run-loop isn't started, then go, go, go! @@ -97,7 +96,7 @@ private[observers] final class DropNewBufferedSubscriber[A] private ( } } - private[this] val consumerRunLoop = new Runnable { + private val consumerRunLoop = new Runnable { def run(): Unit = { // This lastIterationAck is also being set by the consumer-loop, // but it's important for the write to happen before `itemsToPush`, diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala index facebed94..021254260 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala @@ -24,7 +24,7 @@ import monix.execution.Scheduler import monix.execution.atomic.PaddingStrategy.{ LeftRight128, LeftRight256 } import monix.execution.atomic.{ Atomic, AtomicAny, AtomicInt } import monix.execution.internal.math - +import scala.annotation.nowarn import scala.util.control.NonFatal import monix.reactive.OverflowStrategy._ import monix.reactive.observers.buffers.AbstractEvictingBufferedSubscriber._ @@ -107,6 +107,7 @@ private[observers] object EvictingBufferedSubscriber { } } +@nowarn("msg=The syntax") private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( out: Subscriber[A], strategy: Evicted[Nothing], @@ -116,13 +117,13 @@ private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( require(strategy.bufferSize > 0, "bufferSize must be a strictly positive number") implicit val scheduler: Scheduler = out.scheduler - private[this] val em = out.scheduler.executionModel + private val em = out.scheduler.executionModel - private[this] val droppedCount: AtomicInt = + private val droppedCount: AtomicInt = if (onOverflow != null) AtomicInt.withPadding(0, LeftRight128) else null - private[this] val itemsToPush = + private val itemsToPush = Atomic.withPadding(0, LeftRight256) private[this] val queue = new ConcurrentBuffer[A](strategy) @@ -160,7 +161,7 @@ private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( } } - private[this] def pushToConsumer(increment: Int): Unit = { + private def pushToConsumer(increment: Int): Unit = { val currentNr = { if (increment != 0) itemsToPush.getAndIncrement(increment) @@ -176,7 +177,7 @@ private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( } } - private[this] val consumerLoop = new Runnable { + private val consumerLoop = new Runnable { def run(): Unit = { // This lastIterationAck is also being set by the consumer-loop, // but it's important for the write to happen before `itemsToPush`, @@ -357,7 +358,7 @@ private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( private[observers] object AbstractEvictingBufferedSubscriber { private final class ConcurrentBuffer[A](strategy: Evicted[Nothing]) { - private[this] val bufferRef: AtomicAny[Buffer[A]] = + private val bufferRef: AtomicAny[Buffer[A]] = AtomicAny.withPadding(emptyBuffer, LeftRight256) def drain(): Queue[A] = { diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala index 1ef07ba05..598b2ce1c 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/SimpleBufferedSubscriber.scala @@ -61,10 +61,10 @@ private[observers] abstract class AbstractSimpleBufferedSubscriber[A] protected capacity: Int ) extends CommonBufferMembers with BufferedSubscriber[A] with Subscriber.Sync[A] { - private[this] val queue = _qRef - private[this] val em = out.scheduler.executionModel + private val queue = _qRef + private val em = out.scheduler.executionModel implicit val scheduler: Scheduler = out.scheduler - private[this] val itemsToPush = + private val itemsToPush = Atomic.withPadding(0, LeftRight256) def onNext(elem: A): Ack = { @@ -111,7 +111,7 @@ private[observers] abstract class AbstractSimpleBufferedSubscriber[A] protected } } - private[this] def pushToConsumer(): Unit = { + private def pushToConsumer(): Unit = { val currentNr = itemsToPush.getAndIncrement() // If a run-loop isn't started, then go, go, go! @@ -123,7 +123,7 @@ private[observers] abstract class AbstractSimpleBufferedSubscriber[A] protected } } - private[this] val consumerLoop = new Runnable { + private val consumerLoop = new Runnable { def run(): Unit = { // This lastIterationAck is also being set by the consumer-loop, // but it's important for the write to happen before `itemsToPush`, diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index 3a37ea1b4..29c8b3e1c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -17,6 +17,7 @@ package monix.reactive +import scala.annotation.nowarn import java.io.{ BufferedReader, InputStream, PrintStream, Reader } import cats.{ @@ -277,6 +278,10 @@ import scala.util.{ Failure, Success, Try } * Eq.fromUniversalEquals * }}} */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=The syntax ` _` is no longer supported;") +@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") abstract class Observable[+A] extends Serializable { self => // ----------------------------------------------------------------------- @@ -3269,7 +3274,7 @@ abstract class Observable[+A] extends Serializable { self => * * @param trigger task that will cancel the stream as soon as it completes. */ - final def takeUntilEval(trigger: Task[_]): Observable[A] = + final def takeUntilEval(trigger: Task[?]): Observable[A] = self.takeUntil(Observable.fromTask(trigger)) /** Version of [[takeUntil]] that can work with a trigger expressed by a generic `F[_]` @@ -3942,8 +3947,8 @@ abstract class Observable[+A] extends Serializable { self => * val sub = SingleAssignSubscription() * * source.subscribe(new Subscriber[Int] { - * private[this] var requested = 0L - * private[this] var sum = 0L + * private var requested = 0L + * private var sum = 0L * * def onSubscribe(s: Subscription): Unit = { * sub := s @@ -3983,7 +3988,7 @@ abstract class Observable[+A] extends Serializable { self => */ final def toReactivePublisher[B >: A](implicit s: Scheduler): RPublisher[B] = new RPublisher[B] { - def subscribe(subscriber: RSubscriber[_ >: B]): Unit = { + def subscribe(subscriber: RSubscriber[? >: B]): Unit = { val subscription = SingleAssignCancelable() subscription := unsafeSubscribeFn( SafeSubscriber( @@ -4012,8 +4017,8 @@ abstract class Observable[+A] extends Serializable { self => Task.create { (s, cb) => unsafeSubscribeFn(new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var value: A = _ - private[this] var isEmpty = true + private var value: A = null.asInstanceOf[A] + private var isEmpty = true def onNext(elem: A): Ack = { if (isEmpty) isEmpty = false @@ -4263,7 +4268,7 @@ abstract class Observable[+A] extends Serializable { self => Task.create { (s, cb) => unsafeSubscribeFn(new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = { cb.onSuccess(elem) @@ -4444,7 +4449,7 @@ abstract class Observable[+A] extends Serializable { self => Task.create { (s, cb) => unsafeSubscribeFn(new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = Continue @@ -4840,6 +4845,10 @@ abstract class Observable[+A] extends Serializable { self => * [[monix.execution.Scheduler.withExecutionModel Scheduler.withExecutionModel]], * or per `Observable`, see [[Observable.executeWithModel]]. */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=The syntax ` _` is no longer supported;") +@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") object Observable extends ObservableDeprecatedBuilders { /** An `Operator` is a function for transforming observers, * that can be used for lifting observables. @@ -5633,6 +5642,7 @@ object Observable extends ObservableDeprecatedBuilders { /** Creates an Observable that continuously emits the given ''item'' repeatedly. */ + @nowarn("msg=The syntax") def repeat[A](elems: A*): Observable[A] = new builders.RepeatObservable(elems: _*) @@ -6338,6 +6348,7 @@ object Observable extends ObservableDeprecatedBuilders { * result: - - 1 1 1 - 1 - 1 - - * */ + @nowarn("msg=The syntax") def firstStartedOf[A](source: Observable[A]*): Observable[A] = new builders.FirstStartedObservable(source: _*) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala index b239d60a0..6054712d7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala @@ -17,6 +17,7 @@ package monix.reactive +import scala.annotation.nowarn import java.io.PrintStream import monix.execution.Ack.{ Continue, Stop } @@ -43,6 +44,7 @@ import scala.util.control.NonFatal * and after onComplete or onError, a well behaved `Observable` * implementation shouldn't send any more onNext events. */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") trait Observer[-A] extends Any with Serializable { def onNext(elem: A): Future[Ack] @@ -67,6 +69,7 @@ trait Observer[-A] extends Any with Serializable { * asynchronous boundaries, and when it is seen as being `isCanceled`, * streaming is stopped */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") object Observer { /** An `Observer.Sync` is an [[Observer]] that signals demand * to upstream synchronously (i.e. the upstream observable doesn't need to @@ -100,7 +103,7 @@ object Observer { def stopped[A]: Observer.Sync[A] = stoppedRef // Reusable reference - private[this] val stoppedRef: Observer.Sync[Any] = + private val stoppedRef: Observer.Sync[Any] = new Observer.Sync[Any] { def onNext(elem: Any): Ack = Stop def onError(ex: Throwable): Unit = () @@ -196,7 +199,7 @@ object Observer { def scheduleFeedLoop(promise: Promise[Ack], iterator: Iterator[A]): Future[Ack] = { s.execute(new Runnable { - private[this] val em = s.executionModel + private val em = s.executionModel @tailrec def fastLoop(syncIndex: Int): Unit = { @@ -337,7 +340,7 @@ object Observer { private[reactive] class DumpObserver[-A](prefix: String, out: PrintStream) extends Observer.Sync[A] { - private[this] var pos = 0 + private var pos = 0 def onNext(elem: A): Ack = { out.println(s"$pos: $prefix --> $elem") @@ -356,9 +359,9 @@ object Observer { } } - private[this] final class ContravariantObserver[A, B](source: Observer[A])(f: B => A) extends Observer[B] { + private final class ContravariantObserver[A, B](source: Observer[A])(f: B => A) extends Observer[B] { // For protecting the contract - private[this] var isDone = false + private var isDone = false override def onNext(elem: B): Future[Ack] = { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala b/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala index e7dfa2c60..20c73c71b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/OverflowStrategy.scala @@ -196,6 +196,6 @@ object OverflowStrategy { final def Default[A]: OverflowStrategy[A] = defaultInstance - private[this] val defaultInstance: OverflowStrategy[Nothing] = + private val defaultInstance: OverflowStrategy[Nothing] = BackPressure(bufferSize = Platform.recommendedBatchSize * 2) } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala index 80aab3687..cf4f8ed13 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala @@ -17,6 +17,7 @@ package monix.reactive +import scala.annotation.nowarn import monix.execution.ChannelType.MultiProducer import monix.execution.{ ChannelType, Scheduler } @@ -30,6 +31,8 @@ import monix.reactive.subjects._ /** Represents a factory for an input/output channel for * broadcasting input to multiple subscribers. */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=unused value of type") abstract class Pipe[I, +O] extends Serializable { /** Returns an input/output pair that can be used to * push input to a single subscriber. @@ -99,6 +102,7 @@ abstract class Pipe[I, +O] extends Serializable { new TransformedPipe(this, f) } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") object Pipe { /** Given a [[MulticastStrategy]] returns the corresponding [[Pipe]]. */ def apply[A](strategy: MulticastStrategy[A]): Pipe[A, A] = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala index ea262d310..d5108b5ba 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.cancelables.BooleanCancelable @@ -31,11 +32,12 @@ import scala.concurrent.Future import scala.util.control.NonFatal import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class BufferedIteratorAsObservable[A](iterator: Iterator[A], bufferSize: Int) extends Observable[Seq[A]] { require(bufferSize > 0, "bufferSize must be strictly positive") - private[this] val wasSubscribed = Atomic(false) + private val wasSubscribed = Atomic(false) def unsafeSubscribeFn(out: Subscriber[Seq[A]]): Cancelable = { if (wasSubscribed.getAndSet(true)) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala index 100e1adbf..ac18d0886 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import java.io.Reader import java.util @@ -35,11 +36,12 @@ import scala.annotation.tailrec import scala.concurrent.{ blocking, Future } import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class CharsReaderObservable(in: Reader, chunkSize: Int) extends Observable[Array[Char]] { require(chunkSize > 0, "chunkSize > 0") - private[this] val wasSubscribed = Atomic(false) + private val wasSubscribed = Atomic(false) def unsafeSubscribeFn(out: Subscriber[Array[Char]]): Cancelable = { if (!wasSubscribed.compareAndSet(false, true)) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala index e82ca628e..3f73aca48 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable, SingleAssignCancelable } import monix.reactive.Observable @@ -24,6 +25,9 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") +@nowarn("msg=unused value of type") private[reactive] final class ConsObservable[+A](head: A, tail: Observable[A]) extends ChainedObservable[A] { def unsafeSubscribeFn(conn: AssignableCancelable.Multi, out: Subscriber[A]): Unit = { @@ -42,7 +46,7 @@ private[reactive] final class ConsObservable[+A](head: A, tail: Observable[A]) e } override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { - if (!tail.isInstanceOf[ChainedObservable[_]]) { + if (!tail.isInstanceOf[ChainedObservable[?]]) { val conn = SingleAssignCancelable() simpleSubscribe(conn, out) conn diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala index 90104a7e8..3b340ef5a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable } import scala.util.control.NonFatal @@ -25,13 +26,14 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") private[reactive] final class DeferObservable[+A](factory: () => Observable[A]) extends ChainedObservable[A] { override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val fa = try factory() catch { case e if NonFatal(e) => Observable.raiseError(e) } - if (fa.isInstanceOf[ChainedObservable[_]]) { + if (fa.isInstanceOf[ChainedObservable[?]]) { val ch = fa.asInstanceOf[ChainedObservable[A]] val conn = MultiAssignCancelable() ch.unsafeSubscribeFn(conn, out) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala index 064f5901d..e780fde10 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalAlwaysObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -25,6 +26,7 @@ import monix.reactive.observers.Subscriber /** An observable that evaluates the given by-name argument, * and emits it. */ +@nowarn("msg=unused value of type") private[reactive] final class EvalAlwaysObservable[+A](f: () => A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala index a6223f11a..0feb45f81 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/EvalOnceObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -25,11 +26,12 @@ import monix.reactive.observers.Subscriber /** An observable that evaluates the given by-name argument, * and emits it. */ +@nowarn("msg=unused value of type") private[reactive] final class EvalOnceObservable[A](a: => A) extends Observable[A] { - private[this] var result: A = _ - private[this] var errorThrown: Throwable = null - @volatile private[this] var hasResult = false + private var result: A = null.asInstanceOf[A] + private var errorThrown: Throwable = null + @volatile private var hasResult = false private def signalResult(out: Subscriber[A], value: A, ex: Throwable): Unit = { if (ex == null) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala index 6f04baf1e..8ff3fd9f7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FirstStartedObservable.scala @@ -73,7 +73,7 @@ private[reactive] final class FirstStartedObservable[A](source: Observable[A]*) observable.unsafeSubscribeFn(new Observer[A] { // for fast path - private[this] var finishLineCache = -1 + private var finishLineCache = -1 private def shouldStream(): Boolean = { if (finishLineCache != idx) finishLineCache = finishLine.get() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala index c53ec7d1b..2be50fc0f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import scala.util.control.NonFatal import monix.execution.{ Cancelable, CancelableFuture } import monix.reactive.Observable @@ -26,6 +27,7 @@ import scala.concurrent.Future import scala.util.{ Failure, Success } /** Converts any `Future` into an observable */ +@nowarn("msg=unused value of type") private[reactive] final class FutureAsObservable[A](factory: => Future[A]) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala index dde20807d..ab60b8c76 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import java.io.InputStream import java.util @@ -34,11 +35,12 @@ import scala.concurrent.{ blocking, Future } import scala.util.control.NonFatal import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class InputStreamObservable(in: InputStream, chunkSize: Int) extends Observable[Array[Byte]] { require(chunkSize > 0, "chunkSize > 0") - private[this] val wasSubscribed = Atomic(false) + private val wasSubscribed = Atomic(false) def unsafeSubscribeFn(out: Subscriber[Array[Byte]]): Cancelable = { if (wasSubscribed.compareAndSet(expect = false, update = true)) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala index 58dd09458..6a56468a9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Interleave2Observable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable } @@ -25,6 +26,7 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } +@nowarn("msg=unused value of type") private[reactive] final class Interleave2Observable[+A](obsA1: Observable[A], obsA2: Observable[A]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala index 5aebf96c2..158519f12 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.cancelables.MultiAssignCancelable import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } @@ -26,6 +27,8 @@ import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import scala.util.{ Failure, Success } +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=unused value of type") private[reactive] final class IntervalFixedDelayObservable(initialDelay: FiniteDuration, delay: FiniteDuration) extends Observable[Long] { @@ -36,7 +39,7 @@ private[reactive] final class IntervalFixedDelayObservable(initialDelay: FiniteD val task = MultiAssignCancelable() val runnable = new Runnable { self => - private[this] var counter = 0L + private var counter = 0L def scheduleNext(): Cancelable = { counter += 1 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala index 668909338..449b75f5a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedRateObservable.scala @@ -38,9 +38,9 @@ private[reactive] final class IntervalFixedRateObservable(initialDelay: FiniteDu val task = MultiAssignCancelable() val runnable = new Runnable { self => - private[this] val periodNanos = period.toNanos - private[this] var counter = 0L - private[this] var startedAt = 0L + private val periodNanos = period.toNanos + private var counter = 0L + private var startedAt = 0L def scheduleNext(): Unit = { counter += 1 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala index 311fdf57b..f8eac0ca3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ @@ -30,8 +31,9 @@ import scala.concurrent.Future import scala.util.{ Failure, Success } /** Converts any `Iterator` into an observable */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class IteratorAsObservable[A](iterator: Iterator[A]) extends Observable[A] { - private[this] val wasSubscribed = Atomic(false) + private val wasSubscribed = Atomic(false) def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { if (wasSubscribed.getAndSet(true)) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala index 8d165729a..a9464e2d9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import java.io.{ BufferedReader, Reader } import monix.execution.Ack.{ Continue, Stop } @@ -33,15 +34,16 @@ import scala.annotation.tailrec import scala.concurrent.{ blocking, Future } import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class LinesReaderObservable(reader: Reader) extends Observable[String] { self => - private[this] val in: BufferedReader = + private val in: BufferedReader = if (!reader.isInstanceOf[BufferedReader]) new BufferedReader(reader) else reader.asInstanceOf[BufferedReader] - private[this] val wasSubscribed = Atomic(false) + private val wasSubscribed = Atomic(false) def unsafeSubscribeFn(out: Subscriber[String]): Cancelable = { if (wasSubscribed.getAndSet(true)) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala index c22529007..ab82d8f71 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable, Scheduler } @@ -43,6 +44,8 @@ import scala.util.Success * same order as received from the source, and at most a single item from a * given source will be in flight at a time. */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=unused value of type") private[reactive] final class MergePrioritizedListObservable[A]( sources: Seq[(Int, Observable[A])] ) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala index 55827cbfd..782ef2790 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/NowObservable.scala @@ -17,11 +17,13 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import monix.reactive.Observable import monix.reactive.observers.Subscriber /** Builds an observable that emits a single strict value. */ +@nowarn("msg=unused value of type") private[reactive] final class NowObservable[+A](elem: A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala index bd2ccae4d..3371e7bbc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateEvalObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.eval.Task import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Callback, Cancelable } @@ -25,6 +26,7 @@ import monix.reactive.observers.Subscriber import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[reactive] final class PaginateEvalObservable[S, A](seed: S, f: S => Task[(A, Option[S])]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala index 485b29249..22fd6d01c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/PaginateObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution.{ Ack, Cancelable } @@ -27,6 +28,7 @@ import scala.annotation.tailrec import scala.util.control.NonFatal import scala.util.{ Failure, Try } +@nowarn("msg=unused value of type") private[reactive] final class PaginateObservable[S, A](seed: => S, f: S => (A, Option[S])) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { var streamErrors = true @@ -44,16 +46,16 @@ private[reactive] final class PaginateObservable[S, A](seed: => S, f: S => (A, O } } - private[this] final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => (A, Option[S])) + private final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => (A, Option[S])) extends Runnable { self => import o.{ scheduler => s } - private[this] var seed = initialSeed - private[this] val em = s.executionModel + private var seed = initialSeed + private val em = s.executionModel - private[this] val asyncReschedule: Try[Ack] => Unit = { + private val asyncReschedule: Try[Ack] => Unit = { case Continue.AsSuccess => self.run() case Failure(ex) => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala index 5041bf896..583423596 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } @@ -28,6 +29,7 @@ import scala.concurrent.Future import scala.util.{ Failure, Success } /** Generates ranges */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class RangeObservable(from: Long, until: Long, step: Long = 1) extends Observable[Long] { require(step != 0, "step != 0") diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala index 85c9d0649..40a8d353f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ @@ -28,6 +29,7 @@ import scala.annotation.tailrec import scala.concurrent.Future import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class RepeatEvalObservable[+A](eval: => A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala index 5aa1eb7b7..5fb865096 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatObservable.scala @@ -23,7 +23,7 @@ import monix.reactive.observers.Subscriber /** Repeats the given elements */ private[reactive] final class RepeatObservable[A](elems: A*) extends Observable[A] { - private[this] val source = + private val source = if (elems.isEmpty) Observable.empty else if (elems.length == 1) new RepeatOneObservable(elems.head) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala index d75199759..f89cb8faf 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } @@ -27,6 +28,7 @@ import scala.annotation.tailrec import scala.concurrent.Future import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class RepeatOneObservable[A](elem: A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { val s = subscriber.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala index 406a5728c..442828a8c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatedValueObservable.scala @@ -43,11 +43,11 @@ private[reactive] final class RepeatedValueObservable[A](initialDelay: FiniteDur task } - private[this] def runnable(subscriber: Subscriber[A], task: MultiAssignCancelable): Runnable = + private def runnable(subscriber: Subscriber[A], task: MultiAssignCancelable): Runnable = new Runnable { self => - private[this] implicit val s: Scheduler = subscriber.scheduler - private[this] val periodMs = period.toMillis - private[this] var startedAt = 0L + private implicit val s: Scheduler = subscriber.scheduler + private val periodMs = period.toMillis + private var startedAt = 0L def syncScheduleNext(): Unit = { val initialDelay = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala index a9f5b3cb1..1c8b3b68d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala @@ -19,6 +19,8 @@ package monix.reactive package internal package builders +import scala.annotation.nowarn + import cats.effect.ExitCase import monix.execution.Callback import monix.eval.Task @@ -29,6 +31,7 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observers.Subscriber import scala.util.Success +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class ResourceCaseObservable[A]( acquire: Task[A], release: (A, ExitCase[Throwable]) => Task[Unit] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala index 5401cfa51..b93f220b0 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RunnableObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import scala.util.control.NonFatal import monix.reactive.Observable @@ -25,6 +26,7 @@ import monix.reactive.observers.Subscriber /** An observable that evaluates the given by-name argument, * and emits it. */ +@nowarn("msg=unused value of type") private[reactive] final class RunnableObservable(r: Runnable) extends Observable[Unit] { def unsafeSubscribeFn(subscriber: Subscriber[Unit]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala index 1e625ae1c..1509b605c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/StateActionObservable.scala @@ -44,14 +44,14 @@ private[reactive] final class StateActionObservable[S, A](seed: => S, f: S => (A } } - private[this] final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => (A, S)) + private final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => (A, S)) extends Runnable { self => import o.{ scheduler => s } - private[this] var seed = initialSeed - private[this] val em = s.executionModel + private var seed = initialSeed + private val em = s.executionModel - private[this] val asyncReschedule: Try[Ack] => Unit = { + private val asyncReschedule: Try[Ack] => Unit = { case Continue.AsSuccess => self.run() case Failure(ex) => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala index 8b90a24b0..61106f4fd 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TailRecMObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Scheduler import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.AtomicBoolean @@ -30,6 +31,7 @@ import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success } /** Implementation for `Observable.tailRecM`. */ +@nowarn("msg=unused value of type") private[monix] final class TailRecMObservable[A, B](seed: A, f: A => Observable[Either[A, B]]) extends Observable[B] { def unsafeSubscribeFn(out: Subscriber[B]): Cancelable = { @@ -69,7 +71,7 @@ private[monix] final class TailRecMObservable[A, B](seed: A, f: A => Observable[ val loopSubscriber = new Subscriber[Either[A, B]] { override def scheduler = s - private[this] implicit val s: Scheduler = out.scheduler + private implicit val s: Scheduler = out.scheduler // We need to protect `conn.pop()` - unfortunately // there has to be an order for `push` and `pop` on @@ -79,12 +81,12 @@ private[monix] final class TailRecMObservable[A, B](seed: A, f: A => Observable[ // `onComplete`, unfortunately we need it. Hopefully // on Java 8 it is fast enough as we are doing a // `getAndSet` instead of `compareAndSet`. - private[this] val isActive = AtomicBoolean(true) + private val isActive = AtomicBoolean(true) // Stores the last acknowledgement we received from // `out.onNext` - to be used for applying back-pressure // where needed. - private[this] var lastAck: Future[Ack] = Continue + private var lastAck: Future[Ack] = Continue // Pushes a final result (for this iteration of `loop` at least), // but before that it pops the current cancelable from our diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala index 4c9a1a765..be439c29e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/TaskAsObservable.scala @@ -17,12 +17,14 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.Cancelable import monix.reactive.Observable import monix.reactive.observers.Subscriber import monix.execution.Callback import monix.eval.Task +@nowarn("msg=unused value of type") private[reactive] final class TaskAsObservable[+A](task: Task[A]) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { import subscriber.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala index d42f3c3a0..70c0f4bf2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnfoldObservable.scala @@ -44,16 +44,16 @@ private[reactive] final class UnfoldObservable[S, A](seed: => S, f: S => Option[ } } - private[this] final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => Option[(A, S)]) + private final class StateRunLoop(o: Subscriber[A], c: BooleanCancelable, initialSeed: S, f: S => Option[(A, S)]) extends Runnable { self => import o.{ scheduler => s } - private[this] var seed = initialSeed - private[this] val em = s.executionModel + private var seed = initialSeed + private val em = s.executionModel - private[this] val asyncReschedule: Try[Ack] => Unit = { + private val asyncReschedule: Try[Ack] => Unit = { case Continue.AsSuccess => self.run() case Failure(ex) => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala index 8f9e19cf5..692ce9c64 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/UnsafeCreateObservable.scala @@ -45,7 +45,7 @@ private[reactive] object UnsafeCreateObservable { private final class SafeSubscriber[-A](underlying: Subscriber[A]) extends Subscriber[A] { self => implicit val scheduler: Scheduler = underlying.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Future[Ack] = if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala index 1a8ae3d51..49b836b4e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip2Observable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } @@ -27,6 +28,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.Success +@nowarn("msg=unused value of type") private[reactive] final class Zip2Observable[A1, A2, +R](obsA1: Observable[A1], obsA2: Observable[A2])(f: (A1, A2) => R) extends Observable[R] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala index 23df814bb..a14382154 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip3Observable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable @@ -27,6 +28,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.Success +@nowarn("msg=unused value of type") private[reactive] final class Zip3Observable[A1, A2, A3, +R]( obsA1: Observable[A1], obsA2: Observable[A2], diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala index b936c3ce9..121f5f2c6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip4Observable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable @@ -27,6 +28,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.Success +@nowarn("msg=unused value of type") private[reactive] final class Zip4Observable[A1, A2, A3, A4, +R]( obsA1: Observable[A1], obsA2: Observable[A2], diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala index 3dd738005..05dd49027 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip5Observable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } @@ -27,6 +28,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.Success +@nowarn("msg=unused value of type") private[reactive] final class Zip5Observable[A1, A2, A3, A4, A5, +R]( obsA1: Observable[A1], obsA2: Observable[A2], diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala index 98a1d973f..7c64af3f8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/Zip6Observable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.builders +import scala.annotation.nowarn import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable, Scheduler } import monix.execution.Ack.{ Continue, Stop } @@ -27,6 +28,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.Success +@nowarn("msg=unused value of type") private[reactive] final class Zip6Observable[A1, A2, A3, A4, A5, A6, +R]( obsA1: Observable[A1], obsA2: Observable[A2], diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala index 4c4870fa6..e7c606179 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ContraMapConsumer.scala @@ -37,7 +37,7 @@ private[reactive] final class ContraMapConsumer[In2, -In, +R](source: Consumer[I val out2 = new Subscriber[In2] { implicit val scheduler: Scheduler = out.scheduler // For protecting the contract - private[this] var isDone = false + private var isDone = false def onError(ex: Throwable): Unit = if (!isDone) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala index 249eb6def..4d97583f2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FirstNotificationConsumer.scala @@ -32,7 +32,7 @@ private[reactive] final class FirstNotificationConsumer[A] extends Consumer.Sync ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = { isDone = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala index 1d8b3052c..6a03dc012 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftConsumer.scala @@ -31,8 +31,8 @@ private[reactive] final class FoldLeftConsumer[A, R](initial: () => R, f: (R, A) def createSubscriber(cb: Callback[Throwable, R], s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false - private[this] var state = initial() + private var isDone = false + private var state = initial() def onNext(elem: A): Ack = { // Protects calls to user code from within the operator, diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala index 5ba80cb99..ae51ae033 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FoldLeftTaskConsumer.scala @@ -38,7 +38,7 @@ private[reactive] final class FoldLeftTaskConsumer[A, R](initial: () => R, f: (R val out = new Subscriber[A] { implicit val scheduler: Scheduler = s - private[this] var state = initial() + private var state = initial() def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator, diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala index 6b2148c95..4d96009e8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/ForeachConsumer.scala @@ -31,7 +31,7 @@ private[reactive] final class ForeachConsumer[A](f: A => Unit) extends Consumer. def createSubscriber(cb: Callback[Throwable, Unit], s: Scheduler): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = { try { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala index 5047bbe42..f7d10e49b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/FromObserverConsumer.scala @@ -41,7 +41,7 @@ private[reactive] final class FromObserverConsumer[In](f: Scheduler => Observer[ val sub = new Subscriber[In] { self => implicit val scheduler: Scheduler = s - private[this] val isDone = Atomic(false) + private val isDone = Atomic(false) private def signal(ex: Throwable): Unit = if (!isDone.getAndSet(true)) { if (ex == null) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala index 6415c2a7c..a1635140e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala @@ -32,7 +32,7 @@ private[reactive] final class HeadConsumer[A] extends Consumer.Sync[A, A] { ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = { isDone = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala index 6141924b6..d136f0473 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala @@ -32,7 +32,7 @@ private[reactive] final class HeadOptionConsumer[A] extends Consumer.Sync[A, Opt ): (Subscriber.Sync[A], AssignableCancelable) = { val out = new Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = { isDone = true diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala index eb31f69f2..18b69cbd6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/LoadBalanceConsumer.scala @@ -53,29 +53,29 @@ private[reactive] final class LoadBalanceConsumer[-In, R](parallelism: Int, cons // Trying to prevent contract violations, once this turns // true, then no final events are allowed to happen. // MUST BE synchronized by `self`. - private[this] var isUpstreamComplete = false + private var isUpstreamComplete = false // Trying to prevent contract violations. Turns true in case // we already signaled a result upstream. // MUST BE synchronized by `self`. - private[this] var isDownstreamDone = false + private var isDownstreamDone = false // Stores the error that was reported upstream - basically // multiple subscribers can report multiple errors, but we // emit the first one, so in case multiple errors happen we // want to log them, but only if they aren't the same reference // MUST BE synchronized by `self` - private[this] var reportedError: Throwable = _ + private var reportedError: Throwable = null.asInstanceOf[Throwable] // Results accumulator - when length == parallelism, // that's when we need to trigger `onFinish.onSuccess`. // MUST BE synchronized by `self` - private[this] val accumulator = ListBuffer.empty[R] + private val accumulator = ListBuffer.empty[R] /** Builds cancelables for subscribers. */ private def newCancelableFor(out: IndexedSubscriber[In]): Cancelable = new Cancelable { - private[this] var isCanceled = false + private var isCanceled = false // Forcing an asynchronous boundary, to avoid any possible // initialization issues (in building subscribersQueue) or // stack overflows and other problems @@ -98,7 +98,7 @@ private[reactive] final class LoadBalanceConsumer[-In, R](parallelism: Int, cons // Asynchronous queue that serves idle subscribers waiting // for something to process, or that puts the stream on wait // until there are subscribers available - private[this] val subscribersQueue = self.synchronized { + private val subscribersQueue = self.synchronized { var initial = Queue.empty[IndexedSubscriber[In]] // When the callback gets called by each subscriber, on success we // do nothing because for normal completion we are listing on @@ -296,7 +296,7 @@ private[reactive] object LoadBalanceConsumer { private final class AsyncQueue[In](initialQueue: Queue[IndexedSubscriber[In]], parallelism: Int) { - private[this] val stateRef = { + private val stateRef = { val initial: State[In] = Available(initialQueue, BitSet.empty, parallelism) Atomic.withPadding(initial, PaddingStrategy.LeftRight256) } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala index 9af8e2118..32ac23265 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/TransformInputConsumer.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.consumers +import scala.annotation.nowarn import monix.execution.Callback import monix.execution.Scheduler import monix.execution.cancelables.AssignableCancelable @@ -24,6 +25,7 @@ import monix.reactive.observers.Subscriber import monix.reactive.{ Consumer, Observable, Pipe } /** Implementation for [[monix.reactive.Consumer.transformInput]]. */ +@nowarn("msg=unused value of type") private[reactive] final class TransformInputConsumer[In2, -In, +R]( source: Consumer[In, R], f: Observable[In2] => Observable[In] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala index 6f97ac672..e8d3632ae 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala @@ -17,11 +17,13 @@ package monix.reactive.internal.deprecated +import scala.annotation.nowarn import cats.Eval import cats.effect.IO import monix.execution.Scheduler import monix.reactive.{ Observable, OverflowStrategy } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] trait ObservableDeprecatedBuilders extends Any { /** DEPRECATED — please use [[Observable!.executeAsync .executeAsync]]. * diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala index 8247dcf38..659727549 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.deprecated +import scala.annotation.nowarn import cats.effect.{ Effect, ExitCase } import cats.{ Monoid, Order } import monix.eval.{ Task, TaskLike } @@ -27,6 +28,7 @@ import monix.reactive.internal.operators.DoOnTerminateOperator import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] trait ObservableDeprecatedMethods[+A] extends Any { def self: Observable[A] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala index 5aad055f3..b113067e3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferSlidingOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -25,6 +26,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future import monix.execution.compat.internal.toSeq +@nowarn("msg=unused value of type") private[reactive] final class BufferSlidingOperator[A](count: Int, skip: Int) extends Operator[A, Seq[A]] { require(count > 0, "count must be strictly positive") @@ -34,15 +36,15 @@ private[reactive] final class BufferSlidingOperator[A](count: Int, skip: Int) ex new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = _ + private var isDone = false + private var ack: Future[Ack] = null.asInstanceOf[Future[Ack]] - private[this] val toDrop = if (count > skip) 0 else skip - count - private[this] val toRepeat = if (skip > count) 0 else count - skip + private val toDrop = if (count > skip) 0 else skip - count + private val toRepeat = if (skip > count) 0 else count - skip - private[this] var buffer = new Array[AnyRef](count) - private[this] var dropped = 0 - private[this] var length = 0 + private var buffer = new Array[AnyRef](count) + private var dropped = 0 + private var length = 0 def onNext(elem: A): Future[Ack] = { if (isDone) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala index f3523b1ef..7d8e11c6f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -29,6 +30,8 @@ import scala.collection.mutable.ListBuffer import scala.concurrent.Future import scala.concurrent.duration.{ Duration, FiniteDuration, MILLISECONDS } +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=unused value of type") private[reactive] final class BufferTimedObservable[+A](source: Observable[A], timespan: FiniteDuration, maxCount: Int) extends Observable[Seq[A]] { @@ -41,13 +44,13 @@ private[reactive] final class BufferTimedObservable[+A](source: Observable[A], t val connection = source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => implicit val scheduler: Scheduler = out.scheduler - private[this] val timespanMillis = timespan.toMillis + private val timespanMillis = timespan.toMillis // MUST BE synchronized by `self` - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue // MUST BE synchronized by `self` - private[this] var buffer = ListBuffer.empty[A] + private var buffer = ListBuffer.empty[A] // MUST BE synchronized by `self` - private[this] var expiresAt = scheduler.clockMonotonic(MILLISECONDS) + timespanMillis + private var expiresAt = scheduler.clockMonotonic(MILLISECONDS) + timespanMillis locally { // Scheduling the first tick, in the constructor diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala index 9ea405419..996055dde 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWhileOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -27,14 +28,15 @@ import scala.collection.mutable.ListBuffer import scala.concurrent.Future import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[reactive] final class BufferWhileOperator[A](p: A => Boolean, inclusive: Boolean) extends Operator[A, Seq[A]] { def apply(out: Subscriber[Seq[A]]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue - private[this] var buffer = ListBuffer.empty[A] + private var isDone = false + private var ack: Future[Ack] = Continue + private var buffer = ListBuffer.empty[A] def onNext(elem: A): Future[Ack] = if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala index c01ba37e7..d752700ce 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferWithSelectorObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } @@ -26,6 +27,7 @@ import monix.reactive.observers.Subscriber import scala.collection.mutable.ListBuffer import scala.concurrent.{ Future, Promise } +@nowarn("msg=unused value of type") private[reactive] final class BufferWithSelectorObservable[+A, S]( source: Observable[A], sampler: Observable[S], @@ -42,18 +44,18 @@ private[reactive] final class BufferWithSelectorObservable[+A, S]( implicit val scheduler: Scheduler = downstream.scheduler // MUST BE synchronized by `self` - private[this] var buffer = ListBuffer.empty[A] + private var buffer = ListBuffer.empty[A] // Maintain internal buffer weight not to compute the weight // of the buffer each time an element is added. // So to keep complexity to O(1) for each added element. // MUST BE synchronized by `self` - private[this] var bufferWeight: Int = 0 + private var bufferWeight: Int = 0 // MUST BE synchronized by `self` - private[this] var promise = Promise[Ack]() + private var promise = Promise[Ack]() // To be written in onComplete/onError, to be read from tick - private[this] var upstreamIsDone = false + private var upstreamIsDone = false // MUST BE synchronized by `self`. - private[this] var downstreamIsDone = false + private var downstreamIsDone = false def onNext(elem: A): Future[Ack] = upstreamSubscriber.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala index b638fa135..828b784bc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectOperator.scala @@ -32,7 +32,7 @@ private[reactive] final class CollectOperator[-A, +B](pf: PartialFunction[A, B]) def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala index 0b4d3234d..840eb67f1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CollectWhileOperator.scala @@ -32,7 +32,7 @@ private[reactive] final class CollectWhileOperator[-A, +B](pf: PartialFunction[A def apply(out: Subscriber[B]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isActive = true + private var isActive = true def onNext(elem: A): Future[Ack] = { if (!isActive) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala index 5f3cfefea..84b599bca 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapIterableOperator.scala @@ -32,8 +32,8 @@ private[reactive] final class ConcatMapIterableOperator[-A, +B](f: A => immutabl def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue + private var isDone = false + private var ack: Future[Ack] = Continue def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala index f5e306e88..a07e90a33 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatMapObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import cats.effect.ExitCase import monix.eval.Task import monix.execution.Ack.{ Continue, Stop } @@ -65,6 +66,7 @@ import scala.util.Failure * however it's OK-ish, since these CAS operations are not going * to be contended */ +@nowarn("msg=unused value of type") private[reactive] final class ConcatMapObservable[A, B]( source: Observable[A], f: A => Observable[B], @@ -90,18 +92,18 @@ private[reactive] final class ConcatMapObservable[A, B]( implicit val scheduler: Scheduler = out.scheduler // For gathering errors - private[this] val errors = + private val errors = if (delayErrors) Atomic(List.empty[Throwable]) else null // Boolean for keeping the `isActive` state, needed because we could miss // out on seeing a `Cancelled` state due to the `lazySet` instructions, // making the visibility of the `Cancelled` state thread-unsafe! - private[this] val isActive = Atomic(true) + private val isActive = Atomic(true) // For synchronizing our internal state machine, padded // in order to avoid the false sharing problem - private[this] val stateRef = + private val stateRef = Atomic.withPadding(WaitOnNextChild(Continue): FlatMapState, LeftRight128) /** For canceling the current active task, in case there is any. Here @@ -342,10 +344,10 @@ private[reactive] final class ConcatMapObservable[A, B]( private final class ChildSubscriber(out: Subscriber[B], asyncUpstreamAck: Promise[Ack]) extends Subscriber[B] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue // Reusable reference to stop creating function references for each `onNext` - private[this] val onStopOrFailureRef = (err: Option[Throwable]) => { + private val onStopOrFailureRef = (err: Option[Throwable]) => { if (err.isDefined) out.scheduler.reportFailure(err.get) signalChildOnComplete(Stop, isStop = true) } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala index 11dc321a6..1f46e4d3b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ConcatObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.Scheduler @@ -29,6 +30,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future /** Implementation for observable concatenation `++`. */ +@nowarn("msg=unused value of type") private[reactive] final class ConcatObservable[A](lh: Observable[A], rh: Observable[A]) extends ChainedObservable[A] { def unsafeSubscribeFn(conn: AssignableCancelable.Multi, out: Subscriber[A]): Unit = { @@ -36,7 +38,7 @@ private[reactive] final class ConcatObservable[A](lh: Observable[A], rh: Observa lh, conn, new Subscriber[A] { - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala index 0e49ffad6..20a0337f7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/CountOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.Scheduler @@ -24,11 +25,12 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] object CountOperator extends Operator[Any, Long] { def apply(out: Subscriber[Long]): Subscriber[Any] = new Subscriber[Any] { implicit val scheduler: Scheduler = out.scheduler - private[this] var count = 0L + private var count = 0L def onNext(elem: Any): Future[Ack] = { count += 1 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala index e31bf0164..eab41b069 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -28,6 +29,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } +@nowarn("msg=discarded non-Unit value") private[reactive] final class DebounceObservable[A](source: Observable[A], timeout: FiniteDuration, repeat: Boolean) extends Observable[A] { @@ -39,11 +41,11 @@ private[reactive] final class DebounceObservable[A](source: Observable[A], timeo mainTask := source.unsafeSubscribeFn(new Subscriber.Sync[A] with Runnable { self => implicit val scheduler: Scheduler = out.scheduler - private[this] val timeoutMillis = timeout.toMillis - private[this] var isDone = false - private[this] var lastEvent: A = _ - private[this] var lastTSInMillis: Long = 0L - private[this] var hasValue = false + private val timeoutMillis = timeout.toMillis + private var isDone = false + private var lastEvent: A = null.asInstanceOf[A] + private var lastTSInMillis: Long = 0L + private var hasValue = false locally { scheduleNext(timeoutMillis) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala index 42542678f..cadcd7605 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DefaultIfEmptyOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Scheduler import scala.util.control.NonFatal @@ -25,12 +26,13 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] final class DefaultIfEmptyOperator[A](default: () => A) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isEmpty = true + private var isEmpty = true def onNext(elem: A): Future[Ack] = { if (isEmpty) isEmpty = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala index 6bc531f95..719758241 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayBySelectorObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable } @@ -27,6 +28,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } +@nowarn("msg=unused value of type") private[reactive] final class DelayBySelectorObservable[A, S](source: Observable[A], selector: A => Observable[S]) extends Observable[A] { @@ -37,12 +39,12 @@ private[reactive] final class DelayBySelectorObservable[A, S](source: Observable composite += source.unsafeSubscribeFn(new Subscriber[A] { self => implicit val scheduler: Scheduler = out.scheduler - private[this] var completeTriggered = false - private[this] var isDone = false - private[this] var currentElem: A = _ - private[this] var ack: Promise[Ack] = _ + private var completeTriggered = false + private var isDone = false + private var currentElem: A = null.asInstanceOf[A] + private var ack: Promise[Ack] = null.asInstanceOf[Promise[Ack]] - private[this] val trigger = new Subscriber.Sync[Any] { + private val trigger = new Subscriber.Sync[Any] { implicit val scheduler: Scheduler = out.scheduler def onNext(elem: Any): Ack = throw new IllegalStateException def onError(ex: Throwable): Unit = self.onError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala index 3ef1f23ef..b230a2a5b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -29,6 +30,8 @@ import monix.execution.atomic.Atomic import scala.concurrent.duration.FiniteDuration import scala.concurrent.{ Future, Promise } +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=unused value of type") private[reactive] final class DelayByTimespanObservable[A](source: Observable[A], delay: FiniteDuration) extends Observable[A] { @@ -38,12 +41,12 @@ private[reactive] final class DelayByTimespanObservable[A](source: Observable[A] composite += source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => implicit val scheduler: Scheduler = out.scheduler - private[this] var hasError = false - private[this] val isDone = Atomic(false) - private[this] var completeTriggered = false - private[this] val delayMs = delay.toMillis - private[this] var currentElem: A = _ - private[this] var ack: Promise[Ack] = _ + private var hasError = false + private val isDone = Atomic(false) + private var completeTriggered = false + private val delayMs = delay.toMillis + private var currentElem: A = null.asInstanceOf[A] + private var ack: Promise[Ack] = null.asInstanceOf[Promise[Ack]] def onNext(elem: A): Future[Ack] = { currentElem = elem diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala index 95903dd41..18350b1b6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.Stop import monix.execution.Scheduler import monix.execution.cancelables.OrderedCancelable @@ -25,7 +26,8 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future -private[reactive] final class DelayExecutionWithTriggerObservable[A](source: Observable[A], trigger: Observable[_]) +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") +private[reactive] final class DelayExecutionWithTriggerObservable[A](source: Observable[A], trigger: Observable[?]) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { @@ -35,7 +37,7 @@ private[reactive] final class DelayExecutionWithTriggerObservable[A](source: Obs .asInstanceOf[Observable[Any]] .unsafeSubscribeFn(new Subscriber[Any] { implicit val scheduler: Scheduler = subscriber.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: Any): Future[Ack] = { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala index 10389565f..5a628fade 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayOnCompleteObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.cancelables.OrderedCancelable import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable @@ -24,6 +25,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration +@nowarn("msg=unused value of type") private[reactive] final class DelayOnCompleteObservable[A](source: Observable[A], delay: FiniteDuration) extends Observable[A] { @@ -32,7 +34,7 @@ private[reactive] final class DelayOnCompleteObservable[A](source: Observable[A] val c = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Future[Ack] = { val ack = out.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala index edafb1801..a02803b3d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DematerializeOperator.scala @@ -31,7 +31,7 @@ private[reactive] final class DematerializeOperator[A] extends Operator[Notifica def apply(out: Subscriber[A]): Subscriber[Notification[A]] = new Subscriber[Notification[A]] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: Notification[A]): Future[Ack] = { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala index 0c2bf8812..9c00bb9af 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedByKeyOperator.scala @@ -35,9 +35,9 @@ private[reactive] final class DistinctUntilChangedByKeyOperator[A, K](key: A => new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var isFirst = true - private[this] var lastKey: K = _ + private var isDone = false + private var isFirst = true + private var lastKey: K = null.asInstanceOf[K] def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala index faf8668ba..bb44f0370 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DistinctUntilChangedOperator.scala @@ -31,8 +31,8 @@ private[reactive] final class DistinctUntilChangedOperator[A](implicit A: Eq[A]) def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isFirst = true - private[this] var lastElem: A = _ + private var isFirst = true + private var lastElem: A = null.asInstanceOf[A] def onNext(elem: A) = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala index 673990e7e..ecfee34d3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnEarlyStopOperator.scala @@ -35,7 +35,7 @@ private[reactive] final class DoOnEarlyStopOperator[A](onStop: Task[Unit]) exten def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] val isActive = Atomic(true) + private val isActive = Atomic(true) def onNext(elem: A): Future[Ack] = { val result = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala index 60505931a..77191d742 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala @@ -33,7 +33,7 @@ private[reactive] final class DoOnNextAckOperator[A](cb: (A, Ack) => Task[Unit]) def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { self => implicit val scheduler: Scheduler = out.scheduler - private[this] val isActive = Atomic(true) + private val isActive = Atomic(true) def onNext(elem: A): Future[Ack] = { // We are calling out.onNext directly, meaning that in onComplete/onError diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala index 3d20aff14..df2624313 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnStartOperator.scala @@ -33,8 +33,8 @@ private[reactive] final class DoOnStartOperator[A](cb: A => Task[Unit]) extends new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var isStart = true + private var isDone = false + private var isStart = true def onNext(elem: A): Future[Ack] = { if (isStart) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala index 8bc1339d6..d2bf24b7e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop @@ -31,6 +32,8 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=unused value of type") private[reactive] object DoOnSubscribeObservable { // Implementation for doBeforeSubscribe final class Before[+A](source: Observable[A], task: Task[Unit]) extends Observable[A] { @@ -63,8 +66,8 @@ private[reactive] object DoOnSubscribeObservable { val cancelable = source.unsafeSubscribeFn( new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] val completeGuard = Atomic(true) - private[this] var isActive = false + private val completeGuard = Atomic(true) + private var isActive = false def onNext(elem: A): Future[Ack] = { if (isActive) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala index 7979b40d1..92dbc5607 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala @@ -17,11 +17,13 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.eval.Task import monix.execution.Cancelable import monix.reactive.Observable import monix.reactive.observers.Subscriber +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class DoOnSubscriptionCancelObservable[+A](source: Observable[A], task: Task[Unit]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala index 7445f674e..f5975a87a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnTerminateOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Callback import monix.eval.Task import monix.execution.Ack @@ -30,6 +31,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.util.Success +@nowarn("msg=unused value of type") private[reactive] final class DoOnTerminateOperator[A]( onTerminate: Option[Throwable] => Task[Unit], happensBefore: Boolean @@ -39,7 +41,7 @@ private[reactive] final class DoOnTerminateOperator[A]( new Subscriber[A] { // Wrapping in a cancelable in order to protect it from // being called multiple times - private[this] val active = Atomic(true) + private val active = Atomic(true) implicit val scheduler: Scheduler = out.scheduler def onNext(elem: A): Future[Ack] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala index 28cbb4f00..4247bd8b3 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DownstreamTimeoutObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -29,6 +30,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } +@nowarn("msg=unused value of type") private[reactive] final class DownstreamTimeoutObservable[+A](source: Observable[A], timeout: FiniteDuration) extends Observable[A] { @@ -40,13 +42,13 @@ private[reactive] final class DownstreamTimeoutObservable[+A](source: Observable mainTask := source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => implicit val scheduler: Scheduler = downstream.scheduler - private[this] val timeoutMillis = timeout.toMillis + private val timeoutMillis = timeout.toMillis // MUST BE synchronized by `self` - private[this] var isProcessingOnNext = false + private var isProcessingOnNext = false // MUST BE synchronized by `self` - private[this] var isDone = false + private var isDone = false // MUST BE synchronized by `self` - private[this] var lastEmittedMillis: Long = + private var lastEmittedMillis: Long = scheduler.clockMonotonic(MILLISECONDS) locally { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala index 4a8008f53..161874dd2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateOperator.scala @@ -30,8 +30,8 @@ private[reactive] final class DropByPredicateOperator[A](p: A => Boolean, inclus def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var continueDropping = true - private[this] var isDone = false + private var continueDropping = true + private var isDone = false def onNext(elem: A): Future[Ack] = { if (continueDropping) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala index 8c43b0107..2b8ff0825 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByPredicateWithIndexOperator.scala @@ -28,9 +28,9 @@ private[reactive] final class DropByPredicateWithIndexOperator[A](p: (A, Int) => def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var continueDropping = true - private[this] var index = 0 - private[this] var isDone = false + private var continueDropping = true + private var index = 0 + private var isDone = false def onNext(elem: A) = { if (continueDropping) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala index 703590b65..9be17460e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropByTimespanObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.Continue import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } @@ -26,6 +27,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration +@nowarn("msg=unused value of type") private[reactive] final class DropByTimespanObservable[A](source: Observable[A], timespan: FiniteDuration) extends Observable[A] { @@ -35,7 +37,7 @@ private[reactive] final class DropByTimespanObservable[A](source: Observable[A], composite += source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => implicit val scheduler: Scheduler = out.scheduler - @volatile private[this] var shouldDrop = true + @volatile private var shouldDrop = true locally { trigger := scheduler.scheduleOnce(timespan.length, timespan.unit, self) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala index 6ef0de3e6..e89a086d6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropFirstOperator.scala @@ -27,7 +27,7 @@ private[reactive] final class DropFirstOperator[A](nr: Long) extends Operator[A, def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var count = 0L + private var count = 0L def onNext(elem: A) = { if (count < nr) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala index e09d7858f..d8d58b520 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropLastOperator.scala @@ -32,8 +32,8 @@ private[reactive] final class DropLastOperator[A](n: Int) extends Operator[A, A] def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var queue = mutable.Queue.empty[A] - private[this] var length = 0 + private var queue = mutable.Queue.empty[A] + private var length = 0 override def onNext(elem: A): Future[Ack] = { queue.enqueue(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala index e2238c424..54ce1ca42 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DropUntilObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } @@ -25,6 +26,7 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] final class DropUntilObservable[A](source: Observable[A], trigger: Observable[Any]) extends Observable[A] { @@ -35,11 +37,11 @@ private[reactive] final class DropUntilObservable[A](source: Observable[A], trig composite += source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isActive = true - private[this] var errorThrown: Throwable = null - @volatile private[this] var shouldDrop = true + private var isActive = true + private var errorThrown: Throwable = null + @volatile private var shouldDrop = true - private[this] def interruptDropMode(ex: Throwable /*| Null*/ ): Ack = { + private def interruptDropMode(ex: Throwable /*| Null*/ ): Ack = { // must happen before changing shouldDrop errorThrown = ex shouldDrop = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala index 597c1a62f..727af90c7 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DumpObservable.scala @@ -35,7 +35,7 @@ private[reactive] final class DumpObservable[A](source: Observable[A], prefix: S val upstream = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = subscriber.scheduler - private[this] val downstreamActive = Cancelable { () => + private val downstreamActive = Cancelable { () => pos += 1 out.println(s"$pos: $prefix stopped") } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala index e048f7230..e8279533e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/EchoObservable.scala @@ -32,7 +32,7 @@ import scala.util.Success private[reactive] final class EchoObservable[+A](source: Observable[A], timeout: FiniteDuration, onlyOnce: Boolean) extends Observable[A] { - private[this] val timeoutMillis = timeout.toMillis + private val timeoutMillis = timeout.toMillis def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val task = MultiAssignCancelable() @@ -42,11 +42,11 @@ private[reactive] final class EchoObservable[+A](source: Observable[A], timeout: mainTask := source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = Continue - private[this] var lastEvent: A = _ - private[this] var lastTSInMillis: Long = 0L - private[this] var isDone = false - private[this] var hasValue = false + private var ack: Future[Ack] = Continue + private var lastEvent: A = null.asInstanceOf[A] + private var lastTSInMillis: Long = 0L + private var isDone = false + private var hasValue = false locally { scheduleNext(timeoutMillis) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala index 63cdbb598..f78b4aea9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FailedOperator.scala @@ -17,11 +17,13 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.Continue import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber +@nowarn("msg=unused value of type") private[reactive] object FailedOperator extends Operator[Any, Throwable] { def apply(out: Subscriber[Throwable]): Subscriber[Any] = new Subscriber.Sync[Any] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala index 58906b801..95a54145b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FilterOperator.scala @@ -28,7 +28,7 @@ private[reactive] final class FilterOperator[A](p: A => Boolean) extends Operato def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: A) = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala index ef45dadaa..acf88731a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FlatScanObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 @@ -36,6 +37,7 @@ import scala.util.Failure * * Tricky concurrency handling within, here be dragons! */ +@nowarn("msg=unused value of type") private[reactive] final class FlatScanObservable[A, R]( source: Observable[A], initial: () => R, @@ -74,21 +76,21 @@ private[reactive] final class FlatScanObservable[A, R]( implicit val scheduler: Scheduler = out.scheduler // For gathering errors - private[this] val errors = + private val errors = if (delayErrors) Atomic(List.empty[Throwable]) else null // Boolean for keeping the `isActive` state, needed because we could miss // out on seeing a `Cancelled` state due to the `lazySet` instructions, // making the visibility of the `Cancelled` state thread-unsafe! - private[this] val isActive = Atomic(true) + private val isActive = Atomic(true) // For synchronizing our internal state machine, padded // in order to avoid the false sharing problem - private[this] val stateRef = Atomic.withPadding(WaitOnNextChild(Continue): FlatMapState, LeftRight128) + private val stateRef = Atomic.withPadding(WaitOnNextChild(Continue): FlatMapState, LeftRight128) // Mutable reference to the current state - private[this] var currentState = initial + private var currentState = initial /** For canceling the current active task, in case there is any. Here * we can afford a `compareAndSet`, not being a big deal since @@ -315,10 +317,10 @@ private[reactive] final class FlatScanObservable[A, R]( private final class ChildSubscriber(out: Subscriber[R], asyncUpstreamAck: Promise[Ack]) extends Subscriber[R] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue // Reusable reference to stop creating function references for each `onNext` - private[this] val onStopOrFailureRef = (err: Option[Throwable]) => { + private val onStopOrFailureRef = (err: Option[Throwable]) => { if (err.isDefined) out.scheduler.reportFailure(err.get) signalChildOnComplete(Stop, isStop = true) } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala index c58e1395d..68cb29c1e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldLeftObservable.scala @@ -17,12 +17,14 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import scala.util.control.NonFatal import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber +@nowarn("msg=unused value of type") private[reactive] final class FoldLeftObservable[A, R](source: Observable[A], initial: () => R, f: (R, A) => R) extends Observable[R] { @@ -34,8 +36,8 @@ private[reactive] final class FoldLeftObservable[A, R](source: Observable[A], in source.unsafeSubscribeFn(new Subscriber.Sync[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var state: R = initialState + private var isDone = false + private var state: R = initialState def onNext(elem: A): Ack = { // Protects calls to user code from within the operator, diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala index afbfa9802..26a33e9ab 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/FoldWhileLeftObservable.scala @@ -39,8 +39,8 @@ private[reactive] final class FoldWhileLeftObservable[A, S]( source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var state = initialState + private var isDone = false + private var state = initialState def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator, diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala index bec619a25..85a013e58 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GroupByOperator.scala @@ -37,12 +37,12 @@ private[reactive] final class GroupByOperator[A, K]( def apply(subscriber: Subscriber[GroupedObservable[K, A]]): Subscriber[A] = new Subscriber[A] { self => implicit val scheduler: Scheduler = subscriber.scheduler - private[this] var isDone = false - private[this] val downstream = BufferedSubscriber(subscriber, os, SingleProducer) - private[this] val cacheRef = Atomic(Map.empty[K, Observer[A]]) + private var isDone = false + private val downstream = BufferedSubscriber(subscriber, os, SingleProducer) + private val cacheRef = Atomic(Map.empty[K, Observer[A]]) @tailrec - private[this] def recycleKey(key: K): Unit = { + private def recycleKey(key: K): Unit = { val current = cacheRef.get() if (!cacheRef.compareAndSet(current, current - key)) recycleKey(key) @@ -106,7 +106,7 @@ private[reactive] final class GroupByOperator[A, K]( } } - private[this] def foreachObserver(f: Observer[A] => Unit): Unit = { + private def foreachObserver(f: Observer[A] => Unit): Unit = { val cache = cacheRef.get() if (cacheRef.compareAndSet(cache, Map.empty)) { cache.values.foreach(f) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala index 874552065..0c61acf14 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import cats.effect.ExitCase import monix.execution.Callback import monix.eval.Task @@ -32,6 +33,7 @@ import scala.concurrent.Future import scala.util.control.NonFatal import scala.util.{ Failure, Success, Try } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] class GuaranteeCaseObservable[A](source: Observable[A], f: ExitCase[Throwable] => Task[Unit]) extends Observable[A] { @@ -67,7 +69,7 @@ private[reactive] class GuaranteeCaseObservable[A](source: Observable[A], f: Exi extends Subscriber[A] with Cancelable { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue def onNext(elem: A): Future[Ack] = { var catchErrors = true @@ -98,7 +100,7 @@ private[reactive] class GuaranteeCaseObservable[A](source: Observable[A], f: Exi FutureUtils.transformWith(async, asyncTransformRef)(immediate) } - private[this] val asyncTransformRef: Try[Ack] => Future[Ack] = { + private val asyncTransformRef: Try[Ack] => Future[Ack] = { case Success(value) => detectStopOrFailure(value) case Failure(e) => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala index 1cc3d8930..173497fa6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.Continue import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable @@ -24,6 +25,8 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=unused value of type") private[reactive] final class IntersperseObservable[+A]( source: Observable[A], start: Option[A], @@ -35,8 +38,8 @@ private[reactive] final class IntersperseObservable[+A]( val upstream = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var atLeastOne = false - private[this] var downstreamAck = Continue: Future[Ack] + private var atLeastOne = false + private var downstreamAck = Continue: Future[Ack] override def onNext(elem: A): Future[Ack] = { downstreamAck = if (!atLeastOne) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala index 2256fe80b..0198cc5af 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IsEmptyOperator.scala @@ -17,18 +17,20 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Stop import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber +@nowarn("msg=unused value of type") private[reactive] object IsEmptyOperator extends Operator[Any, Boolean] { def apply(out: Subscriber[Boolean]): Subscriber[Any] = new Subscriber[Any] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var isEmpty = true + private var isDone = false + private var isEmpty = true def onNext(elem: Any): Ack = { isEmpty = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala index d09aa1473..bbe0a93f1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapAccumulateObservable.scala @@ -40,8 +40,8 @@ private[reactive] final class MapAccumulateObservable[A, S, R]( // Initial state was evaluated, subscribing to source source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var state = initialState + private var isDone = false + private var state = initialState def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala index d36d0b6bb..9e0f7ffcc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapOperator.scala @@ -30,7 +30,7 @@ private[reactive] final class MapOperator[-A, +B](f: A => B) extends Operator[A, def apply(out: Subscriber[B]): Subscriber[A] = { new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala index 8a29f0742..e995fafbb 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelOrderedObservable.scala @@ -59,24 +59,24 @@ private[reactive] final class MapParallelOrderedObservable[A, B]( implicit val scheduler: Scheduler = out.scheduler // Ensures we don't execute more than a maximum number of tasks in parallel - private[this] val semaphore = AsyncSemaphore(parallelism.toLong) + private val semaphore = AsyncSemaphore(parallelism.toLong) // Buffer with the supplied overflow strategy. - private[this] val buffer = BufferedSubscriber[B](out, overflowStrategy, MultiProducer) + private val buffer = BufferedSubscriber[B](out, overflowStrategy, MultiProducer) // Flag indicating whether a final event was called, after which // nothing else can happen. It's a very light protection, as // access to it is concurrent and not synchronized - private[this] var isDone = false + private var isDone = false // Turns to `Stop` when a stop acknowledgement is observed // coming from the `buffer` - this indicates that the downstream // no longer wants any events, so we must cancel - private[this] var lastAck: Ack = Continue + private var lastAck: Ack = Continue // Buffer for signaling new elements downstream preserving original order // It needs to be thread safe Queue because we want to allow adding and removing // elements at the same time. - private[this] val queue = new ConcurrentLinkedQueue[CancelableFuture[B]] + private val queue = new ConcurrentLinkedQueue[CancelableFuture[B]] // This lock makes sure that only one thread at the time sends processed elements downstream - private[this] val sendDownstreamSemaphore = AsyncSemaphore(1) + private val sendDownstreamSemaphore = AsyncSemaphore(1) private def shouldStop: Boolean = isDone || lastAck == Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala index defd63a2a..4a73aea01 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapParallelUnorderedObservable.scala @@ -68,18 +68,18 @@ private[reactive] final class MapParallelUnorderedObservable[A, B]( implicit val scheduler: Scheduler = out.scheduler // Ensures we don't execute more than a maximum number of tasks in parallel - private[this] val semaphore = AsyncSemaphore(parallelism.toLong) + private val semaphore = AsyncSemaphore(parallelism.toLong) // Buffer with the supplied overflow strategy. - private[this] val buffer = BufferedSubscriber[B](out, overflowStrategy, MultiProducer) + private val buffer = BufferedSubscriber[B](out, overflowStrategy, MultiProducer) // Flag indicating whether a final event was called, after which // nothing else can happen. It's a very light protection, as // access to it is concurrent and not synchronized - private[this] var isDone = false + private var isDone = false // Turns to `Stop` when a stop acknowledgement is observed // coming from the `buffer` - this indicates that the downstream // no longer wants any events, so we must cancel - private[this] var lastAck: Ack = Continue + private var lastAck: Ack = Continue private def process(elem: A) = { // For protecting against user code, without violating the diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala index 034152910..85398dcd6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MapTaskObservable.scala @@ -83,13 +83,13 @@ private[reactive] final class MapTaskObservable[A, B](source: Observable[A], f: // For synchronizing our internal state machine, padded // in order to avoid the false sharing problem - private[this] val stateRef = + private val stateRef = Atomic.withPadding(WaitOnNext: MapTaskState, LeftRight128) // Boolean for keeping the `isActive` state, needed because we could miss // out on seeing a `Cancelled` state due to the `lazySet` instructions, // making the visibility of the `Cancelled` state thread-unsafe! - private[this] val isActive = Atomic(true) + private val isActive = Atomic(true) /** For canceling the current active task, in case there is any. Here * we can afford a `compareAndSet`, not being a big deal since @@ -223,7 +223,7 @@ private[reactive] final class MapTaskObservable[A, B](source: Observable[A], f: // Reusable function reference, to prevent creating a new instance // on each `onNext` / `transformWith` call below - private[this] val childOnSuccess = (value: B) => { + private val childOnSuccess = (value: B) => { // Shoot first, ask questions later :-) val next = out.onNext(value) @@ -256,7 +256,7 @@ private[reactive] final class MapTaskObservable[A, B](source: Observable[A], f: // Reusable function reference, to prevent creating a new instance // on each `onNext` / `transformWith` call below - private[this] val childOnError = (error: Throwable) => { + private val childOnError = (error: Throwable) => { // The cancelable passed in WaitComplete here can be `null` // because it would only replace the child's own cancelable stateRef.getAndSet(WaitComplete(Some(error), null)) match { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala index baf60294d..708a999e9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MaterializeOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.Scheduler @@ -26,13 +27,14 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] final class MaterializeOperator[A] extends Operator[A, Notification[A]] { def apply(out: Subscriber[Notification[A]]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue + private var isDone = false + private var ack: Future[Ack] = Continue def onNext(elem: A): Future[Ack] = { ack = out.onNext(OnNext(elem)) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala index 5dd7c31da..ba996df54 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/MergeMapObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.MultiProducer import monix.execution.{ Ack, Cancelable, Scheduler } @@ -28,6 +29,7 @@ import monix.execution.atomic.Atomic import scala.util.control.NonFatal import scala.collection.mutable +@nowarn("msg=unused value of type") private[reactive] final class MergeMapObservable[A, B]( source: Observable[A], f: A => Observable[B], @@ -40,16 +42,16 @@ private[reactive] final class MergeMapObservable[A, B]( composite += source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = downstream.scheduler - private[this] val subscriberB: Subscriber[B] = + private val subscriberB: Subscriber[B] = BufferedSubscriber(downstream, overflowStrategy, MultiProducer) - private[this] val upstreamIsDone = Atomic(false) - private[this] val errors = + private val upstreamIsDone = Atomic(false) + private val errors = if (delayErrors) mutable.ArrayBuffer.empty[Throwable] else null - private[this] val refCount = RefCountCancelable { () => + private val refCount = RefCountCancelable { () => if (!upstreamIsDone.getAndSet(true)) { if (delayErrors) errors.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala index 763f7b5e8..3c858e569 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnCancelTriggerErrorObservable.scala @@ -30,7 +30,7 @@ private[reactive] final class OnCancelTriggerErrorObservable[A](source: Observab def unsafeSubscribeFn(downstream: Subscriber[A]): Cancelable = { val out: Subscriber[A] = new Subscriber[A] { self => implicit val scheduler: Scheduler = downstream.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Future[Ack] = self.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala index f57dfeea2..93c36e549 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRecoverWithObservable.scala @@ -35,7 +35,7 @@ private[reactive] final class OnErrorRecoverWithObservable[A](source: Observable val main = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue def onNext(elem: A) = { ack = out.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala index b0a51c0f3..4ef3da0e1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryCountedObservable.scala @@ -31,8 +31,8 @@ private[reactive] final class OnErrorRetryCountedObservable[+A](source: Observab private def loop(subscriber: Subscriber[A], task: OrderedCancelable, retryIdx: Long): Unit = { val cancelable = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = subscriber.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue + private var isDone = false + private var ack: Future[Ack] = Continue def onNext(elem: A) = { ack = subscriber.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala index e2cb311a4..02dd02ffc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/OnErrorRetryIfObservable.scala @@ -33,8 +33,8 @@ private[reactive] final class OnErrorRetryIfObservable[+A](source: Observable[A] private def loop(subscriber: Subscriber[A], task: OrderedCancelable, retryIdx: Long): Unit = { val cancelable = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = subscriber.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue + private var isDone = false + private var ack: Future[Ack] = Continue def onNext(elem: A): Future[Ack] = { ack = subscriber.onNext(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala index cbe18a3a0..597122e00 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -25,15 +26,16 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=discarded non-Unit value") private[reactive] final class ReduceOperator[A](op: (A, A) => A) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var state: A = _ - private[this] var isFirst = true + private var isDone = false + private var state: A = null.asInstanceOf[A] + private var isFirst = true def onNext(elem: A): Future[Ack] = { try { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala index 7efb28f5e..bc5aea83c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RepeatSourceObservable.scala @@ -35,9 +35,9 @@ private[reactive] final class RepeatSourceObservable[A](source: Observable[A]) e val cancelable = subject.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isEmpty = true - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue + private var isEmpty = true + private var isDone = false + private var ack: Future[Ack] = Continue def onNext(elem: A): Future[Ack] = { if (isEmpty) isEmpty = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala index f4d8b50bc..6b657604d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/RestartUntilObservable.scala @@ -41,8 +41,8 @@ private[reactive] final class RestartUntilObservable[A](source: Observable[A], p synchronized { subscription := source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isValidated = false - private[this] var isDone = false + private var isValidated = false + private var isDone = false def onNext(elem: A): Future[Ack] = { // Stream was validated, so we can just stream the event. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala index 0709f8722..87b4fb226 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanObservable.scala @@ -38,8 +38,8 @@ private[reactive] final class ScanObservable[A, R](source: Observable[A], initia // Initial state was evaluated, subscribing to source source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var state = initialState + private var isDone = false + private var state = initialState def onNext(elem: A): Future[Ack] = { // Protects calls to user code from within the operator and diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala index 8f2d38845..db4f1dbab 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop @@ -37,6 +38,7 @@ import scala.concurrent.Future * * Tricky concurrency handling within, here be dragons! */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], seed: Task[S], op: (S, A) => Task[S]) extends Observable[S] { @@ -71,15 +73,15 @@ private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], se // For synchronizing our internal state machine, padded // in order to avoid the false sharing problem - private[this] val stateRef = Atomic.withPadding(WaitOnNext: MapTaskState, LeftRight128) + private val stateRef = Atomic.withPadding(WaitOnNext: MapTaskState, LeftRight128) // Boolean for keeping the `isActive` state, needed because we could miss // out on seeing a `Cancelled` state due to the `lazySet` instructions, // making the visibility of the `Cancelled` state thread-unsafe! - private[this] val isActive = Atomic(true) + private val isActive = Atomic(true) // Current state, keeps getting updated by the task in `onNext` - private[this] var currentS = initial + private var currentS = initial /** For canceling the current active task, in case there is any. Here * we can afford a `compareAndSet`, not being a big deal since @@ -213,7 +215,7 @@ private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], se // Reusable function reference, to prevent creating a new instance // on each `onNext` / `transformWith` call below - private[this] val childOnSuccess = (value: S) => { + private val childOnSuccess = (value: S) => { // Updating mutable shared state, no need for synchronization // because `onNext` operations are ordered currentS = value @@ -249,7 +251,7 @@ private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], se // Reusable function reference, to prevent creating a new instance // on each `onNext` / `transformWith` call below - private[this] val childOnError = (error: Throwable) => { + private val childOnError = (error: Throwable) => { // The cancelable passed in WaitComplete here can be `null` // because it would only replace the child's own cancelable stateRef.getAndSet(WaitComplete(Some(error), null)) match { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala index 135220d6a..153132b8c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import cats.Order import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } @@ -29,6 +30,7 @@ import monix.reactive.observers.Subscriber /** * Common implementation for `minF`, `minByF`, `maxF`, `maxByF`. */ +@nowarn("msg=unused value of type") private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K) extends Operator[A, A] { @@ -38,10 +40,10 @@ private[reactive] abstract class SearchByOrderOperator[A, K](key: A => K) new Subscriber.Sync[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var minValue: A = _ - private[this] var minValueU: K = _ - private[this] var hasValue = false + private var isDone = false + private var minValue: A = null.asInstanceOf[A] + private var minValueU: K = null.asInstanceOf[K] + private var hasValue = false def onNext(elem: A): Ack = { try { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala index c0e7b99f2..b25ee9d93 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchIfEmptyObservable.scala @@ -32,7 +32,7 @@ private[reactive] final class SwitchIfEmptyObservable[+A](source: Observable[A], val mainSub = source.unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isEmpty = true + private var isEmpty = true def onNext(elem: A): Future[Ack] = { if (isEmpty) isEmpty = false diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala index b47005ff1..50c7c8dcc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SwitchMapObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SerialCancelable, SingleAssignCancelable } @@ -27,6 +28,7 @@ import monix.reactive.{ Observable, Observer } import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] final class SwitchMapObservable[A, B](source: Observable[A], f: A => Observable[B]) extends Observable[B] { @@ -38,13 +40,13 @@ private[reactive] final class SwitchMapObservable[A, B](source: Observable[A], f mainTask := source.unsafeSubscribeFn(new Subscriber.Sync[A] { self => implicit val scheduler: Scheduler = out.scheduler // MUST BE synchronized by `self` - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue // MUST BE synchronized by `self` - private[this] var activeChildIndex: Int = -1 + private var activeChildIndex: Int = -1 // MUST BE synchronized by `self` - private[this] var upstreamIsDone: Boolean = false + private var upstreamIsDone: Boolean = false // MUST BE synchronized by `self` - private[this] var lastChildIsDone: Boolean = false + private var lastChildIsDone: Boolean = false def onNext(elem: A): Ack = self.synchronized { if (upstreamIsDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala index 66a65c886..91080aced 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Stop import monix.execution.Scheduler @@ -25,12 +26,13 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=discarded non-Unit value") private[reactive] final class TakeByPredicateOperator[A](p: A => Boolean, inclusive: Boolean) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isActive = true + private var isActive = true def onNext(elem: A): Future[Ack] = { if (!isActive) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala index f634051c6..80c2b9c06 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeEveryNthOperator.scala @@ -31,7 +31,7 @@ private[reactive] final class TakeEveryNthOperator[A](n: Int) extends Operator[A def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var index = n + private var index = n def onNext(elem: A): Future[Ack] = { index -= 1 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala index 51f065f8b..74240b43d 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLastObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Continue import monix.execution.Scheduler @@ -26,6 +27,7 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observers.Subscriber import scala.collection.mutable +@nowarn("msg=unused value of type") private[reactive] final class TakeLastObservable[A](source: Observable[A], n: Int) extends ChainedObservable[A] { @@ -35,8 +37,8 @@ private[reactive] final class TakeLastObservable[A](source: Observable[A], n: In conn, new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] val queue = mutable.Queue.empty[A] - private[this] var queued = 0 + private val queue = mutable.Queue.empty[A] + private var queued = 0 def onNext(elem: A): Ack = { queue.enqueue(elem) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala index e7afb4c64..aa91fab32 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftByTimespanObservable.scala @@ -35,9 +35,9 @@ private[reactive] final class TakeLeftByTimespanObservable[A](source: Observable composite += source.unsafeSubscribeFn(new Subscriber[A] with Runnable { implicit val scheduler: Scheduler = out.scheduler - private[this] var isActive = true + private var isActive = true // triggers completion - private[this] val task: Cancelable = { + private val task: Cancelable = { val ref = scheduler.scheduleOnce(timespan.length, timespan.unit, this) composite += ref ref diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala index 6996e3712..a82517f3f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeLeftOperator.scala @@ -17,11 +17,13 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.Stop import monix.execution.Scheduler import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber +@nowarn("msg=unused value of type") private[reactive] final class TakeLeftOperator[A](n: Long) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = { @@ -29,8 +31,8 @@ private[reactive] final class TakeLeftOperator[A](n: Long) extends Operator[A, A new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var counter = 0L - private[this] var isActive = true + private var counter = 0L + private var isActive = true def onNext(elem: A) = { if (isActive && counter < n) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala index 941f24926..ee2bc98d9 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeWhileNotCanceledOperator.scala @@ -31,7 +31,7 @@ private[reactive] final class TakeWhileNotCanceledOperator[A](c: BooleanCancelab def apply(out: Subscriber[A]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var isActive = true + private var isActive = true def onNext(elem: A): Future[Ack] = if (!isActive) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala index b85d6a9b1..a6cc50f85 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala @@ -32,8 +32,8 @@ private[reactive] final class ThrottleFirstOperator[A](interval: FiniteDuration) new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] val intervalMs = interval.toMillis - private[this] var nextChange = 0L + private val intervalMs = interval.toMillis + private var nextChange = 0L def onNext(elem: A): Future[Ack] = { val rightNow = scheduler.clockMonotonic(MILLISECONDS) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala index 55384cbae..e43982b92 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, SingleAssignCancelable } @@ -25,6 +26,7 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] final class ThrottleLastObservable[+A, S]( source: Observable[A], sampler: Observable[S], @@ -41,13 +43,13 @@ private[reactive] final class ThrottleLastObservable[+A, S]( // Value is volatile to keep write to lastValue visible // after this one is seen as being true - @volatile private[this] var hasValue = false + @volatile private var hasValue = false // MUST BE written before `hasValue = true` - private[this] var lastValue: A = _ + private var lastValue: A = null.asInstanceOf[A] // To be written in onComplete/onError, to be read from tick - private[this] var upstreamIsDone = false + private var upstreamIsDone = false // MUST BE synchronized by `upstreamSubscriber`. - private[this] var downstreamIsDone = false + private var downstreamIsDone = false def onNext(elem: A): Ack = if (downstreamIsDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala index c84f452dd..9df9a1235 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } @@ -28,6 +29,8 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=unused value of type") private[reactive] final class ThrottleLatestObservable[A]( source: Observable[A], duration: FiniteDuration, @@ -43,12 +46,12 @@ private[reactive] final class ThrottleLatestObservable[A]( self => implicit val scheduler: Scheduler = out.scheduler - private[this] val durationMilis = duration.toMillis - private[this] var isDone = false - private[this] var lastEvent: A = _ - private[this] var hasValue = false - private[this] var shouldEmitNext = true - private[this] var ack: Future[Ack] = _ + private val durationMilis = duration.toMillis + private var isDone = false + private var lastEvent: A = null.asInstanceOf[A] + private var hasValue = false + private var shouldEmitNext = true + private var ack: Future[Ack] = null.asInstanceOf[Future[Ack]] def scheduleNext(delayMillis: Long): Unit = { // No need to synchronize this assignment, since we have a diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala index 7c33dd00b..f7741fd48 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UncancelableObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Cancelable import monix.execution.cancelables.AssignableCancelable import monix.reactive.Observable @@ -24,6 +25,7 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observers.Subscriber /** Implementation for `Observable.uncancelable`. */ +@nowarn("msg=unused value of type") private[reactive] final class UncancelableObservable[A](source: Observable[A]) extends ChainedObservable[A] { override def unsafeSubscribeFn(conn: AssignableCancelable.Multi, out: Subscriber[A]): Unit = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala index 863d879fd..c8a21353b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/UpstreamTimeoutObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -29,6 +30,7 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future import scala.concurrent.duration.{ FiniteDuration, MILLISECONDS } +@nowarn("msg=unused value of type") private[reactive] final class UpstreamTimeoutObservable[+A](source: Observable[A], timeout: FiniteDuration) extends Observable[A] { @@ -40,13 +42,13 @@ private[reactive] final class UpstreamTimeoutObservable[+A](source: Observable[A mainTask := source.unsafeSubscribeFn(new Subscriber[A] with Runnable { self => implicit val scheduler: Scheduler = downstream.scheduler - private[this] val timeoutMillis = timeout.toMillis + private val timeoutMillis = timeout.toMillis // MUST BE synchronized by `self` - private[this] var isProcessingOnNext = false + private var isProcessingOnNext = false // MUST BE synchronized by `self` - private[this] var isDone = false + private var isDone = false // MUST BE synchronized by `self` - private[this] var lastEmittedMillis: Long = + private var lastEmittedMillis: Long = scheduler.clockMonotonic(MILLISECONDS) locally { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala index 653761df1..057f94331 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyAggregateEventsOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -27,6 +28,7 @@ import scala.concurrent.Future import scala.util.{ Failure, Success } import scala.util.control.NonFatal +@nowarn("msg=unused value of type") private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => S, aggregate: (S, A) => S) extends Operator[A, S] { @@ -35,10 +37,10 @@ private[reactive] final class WhileBusyAggregateEventsOperator[A, S](seed: A => upstreamSubscriber => implicit val scheduler: Scheduler = downstream.scheduler - private[this] var aggregated: Option[S] = None - private[this] var lastAck: Future[Ack] = Continue - private[this] var pendingAck: Boolean = false - private[this] var downstreamIsDone = false + private var aggregated: Option[S] = None + private var lastAck: Future[Ack] = Continue + private var pendingAck: Boolean = false + private var downstreamIsDone = false override def onNext(elem: A): Ack = { upstreamSubscriber.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala index e1e67017e..baea7ed43 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsAndSignalOperator.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.operators +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -26,15 +27,16 @@ import monix.reactive.observers.Subscriber import scala.concurrent.Future +@nowarn("msg=unused value of type") private[reactive] final class WhileBusyDropEventsAndSignalOperator[A](onOverflow: Long => A) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber.Sync[A] = new Subscriber.Sync[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack = Continue: Future[Ack] - private[this] var eventsDropped = 0L - private[this] var isDone = false + private var ack = Continue: Future[Ack] + private var eventsDropped = 0L + private var isDone = false def onNext(elem: A) = if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala index b97089832..7f392620c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WhileBusyDropEventsOperator.scala @@ -30,8 +30,8 @@ private[reactive] final class WhileBusyDropEventsOperator[A] extends Operator[A, new Subscriber.Sync[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var ack = Continue: Future[Ack] - private[this] var isDone = false + private var ack = Continue: Future[Ack] + private var isDone = false def onNext(elem: A) = if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala index 8b3447060..c9060fc1b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/WithLatestFromObservable.scala @@ -39,11 +39,11 @@ private[reactive] final class WithLatestFromObservable[A, B, +R]( connection += source.unsafeSubscribeFn(new Subscriber[A] { self => implicit val scheduler: Scheduler = out.scheduler - private[this] var isDone = false - private[this] var otherStarted = false - private[this] var lastOther: B = _ + private var isDone = false + private var otherStarted = false + private var lastOther: B = null.asInstanceOf[B] - private[this] val otherConnection = { + private val otherConnection = { val ref = other.unsafeSubscribeFn(new Subscriber.Sync[B] { implicit val scheduler: Scheduler = out.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala index bf43f217b..f28990d96 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala @@ -28,7 +28,7 @@ private[reactive] final class ZipWithIndexOperator[A] extends Operator[A, (A, Lo def apply(out: Subscriber[(A, Long)]): Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = out.scheduler - private[this] var index = 0L + private var index = 0L def onNext(elem: A): Future[Ack] = { val oldIndex = index diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala index ca8538222..9b6d99c88 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/ReactiveSubscriberAsMonixSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.rstreams +import scala.annotation.nowarn import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.observers.Subscriber import monix.execution.atomic.Atomic @@ -32,6 +33,7 @@ import scala.concurrent.{ Future, Promise } * into an [[monix.reactive.Observer Observer]] instance that * respect the `Observer` contract. */ +@nowarn("msg=unused value of type") private[reactive] final class ReactiveSubscriberAsMonixSubscriber[A] private ( subscriber: RSubscriber[A], subscription: Cancelable @@ -40,11 +42,11 @@ private[reactive] final class ReactiveSubscriberAsMonixSubscriber[A] private ( if (subscriber == null) throw null - private[this] var isComplete = false - private[this] val requests = new RequestsQueue - private[this] var leftToPush = 0L - private[this] var firstEvent = true - private[this] var ack: Future[Ack] = Continue + private var isComplete = false + private val requests = new RequestsQueue + private var leftToPush = 0L + private var firstEvent = true + private var ack: Future[Ack] = Continue def cancel(): Unit = { requests.cancel() @@ -122,7 +124,7 @@ private[reactive] object ReactiveSubscriberAsMonixSubscriber { * requests from a Subscriber. */ private final class RequestsQueue { - private[this] val state = Atomic(ActiveState(Queue.empty, Queue.empty): State) + private val state = Atomic(ActiveState(Queue.empty, Queue.empty): State) @tailrec def await(): Future[Long] = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala index fe2d1b47f..267e9e6db 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.internal.rstreams +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.SingleProducer @@ -28,6 +29,8 @@ import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import org.reactivestreams.{ Subscriber => RSubscriber, Subscription => RSubscription } import scala.concurrent.Future +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=unused value of type") private[reactive] object SubscriberAsReactiveSubscriber { /** Wraps a [[monix.reactive.Observer Observer]] instance into a * `org.reactiveSubscriber` instance. The resulting subscriber respects @@ -41,7 +44,7 @@ private[reactive] object SubscriberAsReactiveSubscriber { * {{{ * // uses the default requestCount of 128 * val subscriber = SubscriberAsReactiveSubscriber(new Observer[Int] { - * private[this] var sum = 0 + * private var sum = 0 * * def onNext(elem: Int) = { * sum += elem @@ -91,14 +94,14 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub require(requestCount > 0, "requestCount must be strictly positive, according to the Reactive Streams contract") - private[this] val subscription = SingleAssignSubscription() - private[this] val downstream: Subscriber[A] = + private val subscription = SingleAssignSubscription() + private val downstream: Subscriber[A] = new Subscriber[A] { implicit val scheduler: Scheduler = target.scheduler - private[this] val isFinite = requestCount < Int.MaxValue - private[this] var isActive = true - private[this] var toReceive = requestCount + private val isFinite = requestCount < Int.MaxValue + private var isActive = true + private var toReceive = requestCount locally { // Requesting the first batch @@ -120,6 +123,7 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub Stop } + @nowarn("msg=Implicit parameters should be provided with a `using` clause") private def finiteOnNext(elem: A): Future[Ack] = target.onNext(elem).syncTryFlatten match { case Continue => continue() @@ -132,7 +136,7 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub case Stop => stop() }, err => { - stop() + val _ = stop() err } )(immediate) @@ -155,7 +159,7 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub } } - private[this] val buffer: Subscriber.Sync[A] = + private val buffer: Subscriber.Sync[A] = BufferedSubscriber.synchronous(downstream, Unbounded, SingleProducer) def onSubscribe(s: RSubscription): Unit = @@ -163,7 +167,7 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub def onNext(elem: A): Unit = { if (elem == null) throwNull("onNext") - buffer.onNext(elem) + val _ = buffer.onNext(elem) () } @@ -192,7 +196,7 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub * To async an instance, [[SyncSubscriberAsReactiveSubscriber]] must be used: {{{ * // uses the default requestCount of 128 * val subscriber = SyncSubscriberAsReactiveSubscriber(new Observer[Int] { - * private[this] var sum = 0 + * private var sum = 0 * * def onNext(elem: Int) = { * sum += elem @@ -214,9 +218,9 @@ private[reactive] final class SyncSubscriberAsReactiveSubscriber[A](target: Subs require(requestCount > 0, "requestCount must be strictly positive, according to the Reactive Streams contract") - private[this] var subscription = null: RSubscription - private[this] var expectingCount = 0L - @volatile private[this] var isCanceled = false + private var subscription = null: RSubscription + private var expectingCount = 0L + @volatile private var isCanceled = false def onSubscribe(s: RSubscription): Unit = { if (subscription == null && !isCanceled) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala index 83fb92fde..64f335e41 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/subscribers/ForeachSubscriber.scala @@ -28,7 +28,7 @@ private[reactive] final class ForeachSubscriber[A](f: A => Unit, onFinish: Callb extends Subscriber.Sync[A] { implicit val scheduler: Scheduler = s - private[this] var isDone = false + private var isDone = false def onNext(elem: A): Ack = { try { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala index 1038fa5eb..9ffa65fbc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/util/PromiseCounter.scala @@ -27,8 +27,8 @@ import scala.concurrent.{ Future, Promise } private[monix] final class PromiseCounter[A] private (value: A, initial: Int) { require(initial > 0, "length must be strictly positive") - private[this] val promise = Promise[A]() - private[this] val counter = Atomic(initial) + private val promise = Promise[A]() + private val counter = Atomic(initial) def future: Future[A] = promise.future diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala index a98509a0d..c4aaa1505 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.observables +import scala.annotation.nowarn import monix.execution.Cancelable import monix.reactive.Observable import monix.reactive.subjects.ReplaySubject @@ -34,9 +35,11 @@ import monix.execution.atomic.Atomic * @param source - the observable we are wrapping * @param maxCapacity - the buffer capacity, or 0 for usage of an unbounded buffer */ +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=The syntax") final class CachedObservable[+A] private (source: Observable[A], maxCapacity: Int) extends Observable[A] { - private[this] val isStarted = Atomic(false) + private val isStarted = Atomic(false) private[this] val subject = { if (maxCapacity > 0) ReplaySubject.createLimited[A](maxCapacity) else diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala index bf0369a5c..a7606e757 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.observables +import scala.annotation.nowarn import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.{ Cancelable, Scheduler } import monix.reactive.observers.{ CacheUntilConnectSubscriber, Subscriber } @@ -31,6 +32,7 @@ import monix.reactive.{ Observable, Pipe } * to multiple subscribers). */ @UnsafeBecauseImpure +@nowarn("msg=Implicit parameters should be provided with a `using` clause") abstract class ConnectableObservable[+A] extends Observable[A] { self => /** Starts emitting events to subscribers. */ def connect(): Cancelable @@ -44,6 +46,7 @@ abstract class ConnectableObservable[+A] extends Observable[A] { self => } } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") object ConnectableObservable { /** Builds a [[ConnectableObservable]] for the given observable source * and a given [[monix.reactive.subjects.Subject Subject]]. @@ -55,7 +58,7 @@ object ConnectableObservable { ): ConnectableObservable[B] = { new ConnectableObservable[B] { - private[this] lazy val connection: Cancelable = + private lazy val connection: Cancelable = source.unsafeSubscribeFn(Subscriber(subject, s)) def connect(): Cancelable = @@ -73,8 +76,8 @@ object ConnectableObservable { def multicast[A, B](source: Observable[A], recipe: Pipe[A, B])(implicit s: Scheduler): ConnectableObservable[B] = { new ConnectableObservable[B] { - private[this] val (input, output) = recipe.multicast(s) - private[this] lazy val connection = { + private val (input, output) = recipe.multicast(s) + private lazy val connection = { source.subscribe(input) } @@ -97,13 +100,13 @@ object ConnectableObservable { ): ConnectableObservable[B] = { new ConnectableObservable[B] { - private[this] val (connectable, cancelRef) = { + private val (connectable, cancelRef) = { val ref = CacheUntilConnectSubscriber(Subscriber(subject, s)) val c = source.unsafeSubscribeFn(ref) // connects immediately (ref, c) } - private[this] lazy val connection = { + private lazy val connection = { val connecting = connectable.connect() Cancelable { () => try cancelRef.cancel() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala index 8fdf2af3a..1aadbbd10 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/GroupedObservable.scala @@ -53,11 +53,11 @@ object GroupedObservable { extends GroupedObservable[K, V] with Subscriber[V] { self => // needs to be set upon subscription - private[this] var ref: Subscriber[V] = _ - private[this] val underlying = { + private var ref: Subscriber[V] = null.asInstanceOf[Subscriber[V]] + private val underlying = { val o = new Subscriber[V] { implicit val scheduler: Scheduler = self.scheduler - private[this] var isDone = false + private var isDone = false def onNext(elem: V) = { val cache = ref diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala index a91bcf10f..d1f6999bc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala @@ -17,6 +17,7 @@ package monix.reactive.observables +import scala.annotation.nowarn import monix.execution.{ Ack, Cancelable } import monix.execution.Scheduler import monix.reactive.Observable @@ -32,10 +33,11 @@ import scala.concurrent.Future * * @param source - the connectable observable we are wrapping */ +@nowarn("msg=discarded non-Unit value") final class RefCountObservable[+A] private (source: ConnectableObservable[A]) extends Observable[A] { - private[this] val refs = Atomic(-1) - private[this] lazy val connection: Cancelable = + private val refs = Atomic(-1) + private lazy val connection: Cancelable = source.connect() @tailrec @@ -89,7 +91,7 @@ final class RefCountObservable[+A] private (source: ConnectableObservable[A]) ex } @tailrec - private[this] def countDownToConnectionCancel(): Unit = refs.get() match { + private def countDownToConnectionCancel(): Unit = refs.get() match { case x if x > 0 => val update = x - 1 if (!refs.compareAndSet(x, update)) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala index 6712ee0e3..14f0e2ba1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.observers +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, CancelableFuture } import monix.execution.Scheduler @@ -30,29 +31,31 @@ import scala.util.{ Failure, Success } * the buffer is drained into the `underlying` observer, after which all * subsequent events are pushed directly. */ +@nowarn("msg=unused value of type") +@nowarn("msg=The syntax") final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) extends Subscriber[A] { self => implicit val scheduler: Scheduler = downstream.scheduler // MUST BE synchronized by `self`, only available if isConnected == false private[this] var queue = mutable.ArrayBuffer.empty[A] // MUST BE synchronized by `self` - private[this] var isConnectionStarted = false + private var isConnectionStarted = false // MUST BE synchronized by `self`, as long as isConnected == false - private[this] var wasCanceled = false + private var wasCanceled = false // Promise guaranteed to be fulfilled once isConnected is // seen as true and used for back-pressure. // MUST BE synchronized by `self`, only available if isConnected == false - private[this] var connectedPromise = Promise[Ack]() - private[this] var connectedFuture = connectedPromise.future + private var connectedPromise = Promise[Ack]() + private var connectedFuture = connectedPromise.future // Volatile that is set to true once the buffer is drained. // Once visible as true, it implies that the queue is empty // and has been drained and thus the onNext/onError/onComplete // can take the fast path - @volatile private[this] var isConnected = false + @volatile private var isConnected = false // Only accessible in `connect()` - private[this] var connectionRef: CancelableFuture[Ack] = _ + private var connectionRef: CancelableFuture[Ack] = null.asInstanceOf[CancelableFuture[Ack]] /** Connects the underling observer to the upstream publisher. * @@ -74,7 +77,7 @@ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) .fromIterable(queue) .unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = downstream.scheduler - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue bufferWasDrained.future.onComplete { case Success(Continue) => diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala index 935f8b492..7acf8fe4c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.observers +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, CancelableFuture, Scheduler } import monix.reactive.Observable @@ -80,6 +81,8 @@ import scala.util.{ Failure, Success } * // NOTE: that onNext("c") never happens * }}} */ +@nowarn("msg=unused value of type") +@nowarn("msg=The syntax") final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extends Subscriber[A] { self => implicit val scheduler: Scheduler = @@ -88,28 +91,28 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend // MUST BE synchronized by `self`, only available if isConnected == false private[this] var queue = mutable.ArrayBuffer.empty[A] // MUST BE synchronized by `self`, only available if isConnected == false - private[this] var scheduledDone = false + private var scheduledDone = false // MUST BE synchronized by `self`, only available if isConnected == false - private[this] var scheduledError = null: Throwable + private var scheduledError = null: Throwable // MUST BE synchronized by `self` - private[this] var isConnectionStarted = false + private var isConnectionStarted = false // MUST BE synchronized by `self`, as long as isConnected == false - private[this] var wasCanceled = false + private var wasCanceled = false // Promise guaranteed to be fulfilled once isConnected is // seen as true and used for back-pressure. // MUST BE synchronized by `self`, only available if isConnected == false - private[this] var connectedPromise = Promise[Ack]() - private[this] var connectedFuture = connectedPromise.future + private var connectedPromise = Promise[Ack]() + private var connectedFuture = connectedPromise.future // Volatile that is set to true once the buffer is drained. // Once visible as true, it implies that the queue is empty // and has been drained and thus the onNext/onError/onComplete // can take the fast path - @volatile private[this] var isConnected = false + @volatile private var isConnected = false // Only accessible in `connect()` - private[this] var connectionRef: CancelableFuture[Ack] = _ + private var connectionRef: CancelableFuture[Ack] = null.asInstanceOf[CancelableFuture[Ack]] /** Connects the underling observer to the upstream publisher. * @@ -126,7 +129,7 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend .fromIterable(queue) .unsafeSubscribeFn(new Subscriber[A] { implicit val scheduler: Scheduler = underlying.scheduler - private[this] var ack: Future[Ack] = Continue + private var ack: Future[Ack] = Continue bufferWasDrained.future.onComplete { case Success(Continue) => @@ -169,7 +172,7 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend def onComplete(): Unit = { if (!scheduledDone) { - ack.syncOnContinue { bufferWasDrained.trySuccess(Continue); () } + val _ = ack.syncOnContinue { bufferWasDrained.trySuccess(Continue); () } } else if (scheduledError ne null) { if (bufferWasDrained.trySuccess(Stop)) underlying.onError(scheduledError) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala index f09f8230b..1410fdfae 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.observers +import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -35,11 +36,12 @@ import scala.util.Try * - if downstream signals a `Stop`, the observer no longer accepts any events, * ensuring that the grammar is respected */ +@nowarn("msg=unused value of type") final class SafeSubscriber[-A] private (subscriber: Subscriber[A]) extends Subscriber[A] { implicit val scheduler: Scheduler = subscriber.scheduler - private[this] var isDone = false - private[this] var ack: Future[Ack] = Continue + private var isDone = false + private var ack: Future[Ack] = Continue def onNext(elem: A): Future[Ack] = { if (!isDone) { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala index de2986cf5..aea77f28b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala @@ -17,6 +17,7 @@ package monix.reactive.observers +import scala.annotation.nowarn import java.io.PrintStream import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable @@ -32,10 +33,12 @@ import scala.util.control.NonFatal * A `Subscriber` can be seen as an address that the data source needs * in order to send events, along with an execution context. */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") trait Subscriber[-A] extends Observer[A] { implicit def scheduler: Scheduler } +@nowarn("msg=Implicit parameters should be provided with a `using` clause") object Subscriber { /** Subscriber builder */ def apply[A](observer: Observer[A], scheduler: Scheduler): Subscriber[A] = @@ -209,7 +212,7 @@ object Subscriber { Subscriber.contramap(target)(f) } - private[this] final class Implementation[-A](private val underlying: Observer[A], val scheduler: Scheduler) + private final class Implementation[-A](private val underlying: Observer[A], val scheduler: Scheduler) extends Subscriber[A] { require(underlying != null, "Observer should not be null") @@ -220,7 +223,7 @@ object Subscriber { def onComplete(): Unit = underlying.onComplete() } - private[this] final class SyncImplementation[-A](observer: Observer.Sync[A], val scheduler: Scheduler) + private final class SyncImplementation[-A](observer: Observer.Sync[A], val scheduler: Scheduler) extends Subscriber.Sync[A] { require(observer != null, "Observer should not be null") @@ -231,10 +234,10 @@ object Subscriber { def onComplete(): Unit = observer.onComplete() } - private[this] final class ContravariantSubscriber[A, B](source: Subscriber[A])(f: B => A) extends Subscriber[B] { + private final class ContravariantSubscriber[A, B](source: Subscriber[A])(f: B => A) extends Subscriber[B] { override implicit def scheduler: Scheduler = source.scheduler // For protecting the contract - private[this] var isDone = false + private var isDone = false override def onNext(elem: B): Future[Ack] = { if (isDone) Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala index d26790b69..1c8c849cc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/AsyncSubject.scala @@ -17,6 +17,7 @@ package monix.reactive.subjects +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, Cancelable } import monix.reactive.observers.Subscriber @@ -31,15 +32,16 @@ import scala.annotation.tailrec * items to subsequent subscribers, but will simply pass along the error * notification from the source Observable. */ +@nowarn("msg=unused value of type") final class AsyncSubject[A] extends Subject[A, A] { self => /* * NOTE: the stored vector value can be null and if it is, then * that means our subject has been terminated. */ - private[this] val stateRef = Atomic(State[A]()) + private val stateRef = Atomic(State[A]()) - private[this] var onNextHappened = false - private[this] var cachedElem: A = _ + private var onNextHappened = false + private var cachedElem: A = null.asInstanceOf[A] def size: Int = stateRef.get().subscribers.size diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala index ed7a338b7..0b4a07961 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala @@ -17,6 +17,7 @@ package monix.reactive.subjects +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, Cancelable } import monix.reactive.Observable @@ -38,9 +39,10 @@ import scala.util.Success * * @see [[Subject]] */ +@nowarn("msg=unused value of type") final class BehaviorSubject[A] private (initialValue: A) extends Subject[A, A] { self => - private[this] val stateRef = + private val stateRef = Atomic(BehaviorSubject.State[A](initialValue)) def size: Int = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala index b0edc7ac4..f15584887 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala @@ -17,6 +17,7 @@ package monix.reactive.subjects +import scala.annotation.nowarn import monix.execution.ChannelType.MultiProducer import monix.execution.cancelables.SingleAssignCancelable import monix.execution.{ Ack, Cancelable, ChannelType, Scheduler } @@ -32,8 +33,14 @@ import org.reactivestreams.{ Processor => RProcessor, Subscriber => RSubscriber, * * (onNext)* (onComplete | onError) */ +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") abstract class ConcurrentSubject[I, +O] extends Subject[I, O] with Observer.Sync[I] +@nowarn("msg=Implicit parameters should be provided with a `using` clause") +@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") object ConcurrentSubject { def apply[A](multicast: MulticastStrategy[A])(implicit s: Scheduler): ConcurrentSubject[A, A] = apply(multicast, Unbounded)(s) @@ -141,6 +148,7 @@ object ConcurrentSubject { * @param initial is an initial sequence of elements that will be pushed * to subscribers before any elements emitted by the source. */ + @nowarn("msg=The syntax") def replay[A](initial: Seq[A])(implicit s: Scheduler): ConcurrentSubject[A, A] = from(ReplaySubject[A](initial: _*), Unbounded) @@ -152,6 +160,7 @@ object ConcurrentSubject { * used for buffering, which specifies what to do in case * we're dealing with slow consumers. */ + @nowarn("msg=The syntax") def replay[A](initial: Seq[A], strategy: Synchronous[A])(implicit s: Scheduler): ConcurrentSubject[A, A] = from(ReplaySubject[A](initial: _*), strategy) @@ -239,10 +248,10 @@ object ConcurrentSubject { ): RProcessor[I, O] = { new RProcessor[I, O] { - private[this] val subscriber: RSubscriber[I] = + private val subscriber: RSubscriber[I] = Subscriber(source, s).toReactive(bufferSize) - def subscribe(subscriber: RSubscriber[_ >: O]): Unit = { + def subscribe(subscriber: RSubscriber[? >: O]): Unit = { val sub = SingleAssignCancelable() sub := source.unsafeSubscribeFn(Subscriber.fromReactiveSubscriber(subscriber, sub)) () @@ -267,7 +276,7 @@ object ConcurrentSubject { scheduler: Scheduler ) extends ConcurrentSubject[I, O] { - private[this] val in: Subscriber.Sync[I] = + private val in: Subscriber.Sync[I] = BufferedSubscriber.synchronous(Subscriber(subject, scheduler), overflowStrategy, producerType) def size: Int = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala index dcaa524d0..8ec573e0c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala @@ -17,6 +17,7 @@ package monix.reactive.subjects +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 @@ -38,12 +39,14 @@ import scala.concurrent.Future * * @see [[Subject]] */ +@nowarn("msg=discarded non-Unit value") +@nowarn("msg=unused value of type") final class PublishSubject[A] private () extends Subject[A, A] { self => /* * NOTE: the stored vector value can be null and if it is, then * that means our subject has been terminated. */ - private[this] val stateRef = Atomic.withPadding(State[A](), LeftRight128) + private val stateRef = Atomic.withPadding(State[A](), LeftRight128) private def onSubscribeCompleted(subscriber: Subscriber[A], ex: Throwable): Cancelable = { if (ex != null) subscriber.onError(ex) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala index fd652e68b..fdda57cda 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishToOneSubject.scala @@ -41,9 +41,9 @@ import scala.concurrent.{ Future, Promise } final class PublishToOneSubject[A] private () extends Subject[A, A] with BooleanCancelable { import PublishToOneSubject.{ canceledState, pendingCompleteState } - private[this] val subscriptionP = Promise[Ack]() - private[this] var errorThrown: Throwable = _ - private[this] val ref = Atomic(null: Subscriber[A]) + private val subscriptionP = Promise[Ack]() + private var errorThrown: Throwable = null.asInstanceOf[Throwable] + private val ref = Atomic(null: Subscriber[A]) /** A `Future` that signals when the subscription happened * with a `Continue`, or with a `Stop` if the subscription diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala index 8f65cabb7..ab953e85a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala @@ -17,6 +17,7 @@ package monix.reactive.subjects +import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, Cancelable } import monix.execution.Scheduler @@ -33,9 +34,11 @@ import scala.concurrent.Future /** `ReplaySubject` emits to any observer all of the items that were emitted * by the source, regardless of when the observer subscribes. */ +@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") +@nowarn("msg=unused value of type") final class ReplaySubject[A] private (initialState: ReplaySubject.State[A]) extends Subject[A, A] { self => - private[this] val stateRef = Atomic(initialState) + private val stateRef = Atomic(initialState) def size: Int = stateRef.get().subscribers.size @@ -213,6 +216,7 @@ object ReplaySubject { * @param capacity is the maximum size of the internal buffer * @param initial is an initial sequence of elements to prepopulate the buffer */ + @nowarn("msg=The syntax") def createLimited[A](capacity: Int, initial: Seq[A]): ReplaySubject[A] = { require(capacity > 0, "capacity must be strictly positive") val elems = initial.takeRight(capacity) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala index 18ccdf4fc..42e5da163 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala @@ -17,6 +17,7 @@ package monix.reactive.subjects +import scala.annotation.nowarn import cats.arrow.Profunctor import monix.execution.Scheduler import monix.execution.cancelables.SingleAssignCancelable @@ -35,6 +36,7 @@ import org.reactivestreams.{ Processor => RProcessor, Subscriber => RSubscriber, * * Useful to build multicast Observables or reusable processing pipelines. */ +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") abstract class Subject[I, +O] extends Observable[O] with Observer[I] { self => /** Returns the number of connected subscribers. * @@ -53,6 +55,7 @@ abstract class Subject[I, +O] extends Observable[O] with Observer[I] { self => Subject.toReactiveProcessor(this, bufferSize) } +@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") object Subject { /** Transforms the source [[Subject]] into a `org.reactivestreams.Processor` * instance as defined by the [[http://www.reactive-streams.org/ Reactive Streams]] @@ -65,10 +68,10 @@ object Subject { */ def toReactiveProcessor[I, O](source: Subject[I, O], bufferSize: Int)(implicit s: Scheduler): RProcessor[I, O] = { new RProcessor[I, O] { - private[this] val subscriber: RSubscriber[I] = + private val subscriber: RSubscriber[I] = Subscriber(source, s).toReactive(bufferSize) - def subscribe(subscriber: RSubscriber[_ >: O]): Unit = { + def subscribe(subscriber: RSubscriber[? >: O]): Unit = { val sub = SingleAssignCancelable() sub := source.unsafeSubscribeFn(Subscriber.fromReactiveSubscriber(subscriber, sub)) () diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala index 2563125a5..6d72e4159 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Var.scala @@ -55,8 +55,8 @@ import monix.reactive.observers.Subscriber */ final class Var[A] private (initial: A)(implicit s: Scheduler) extends Observable[A] { self => - private[this] var value: A = initial - private[this] val underlying = ConcurrentSubject.behavior(initial, OverflowStrategy.Unbounded) + private var value: A = initial + private val underlying = ConcurrentSubject.behavior(initial, OverflowStrategy.Unbounded) def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = underlying.unsafeSubscribeFn(subscriber) diff --git a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala index f540664c9..b47bf8d9d 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala @@ -217,6 +217,9 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } * Eq.fromUniversalEquals * }}} */ +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") +@scala.annotation.nowarn sealed abstract class Iterant[F[_], A] extends Product with Serializable { self => @@ -2367,6 +2370,9 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { * `period` of time. The given `period` of time acts as a * fixed delay between successive events. */ +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") +@scala.annotation.nowarn object Iterant extends IterantInstances { /** * Alias for [[monix.catnap.ConsumerF]], using `Option[Throwable]` as @@ -3215,6 +3221,7 @@ private[tail] trait IterantInstances { new CatsSyncInstances[F]() /** Provides the `cats.effect.Sync` instance for [[Iterant]]. */ + @scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") class CatsSyncInstances[F[_]](implicit F: Sync[F]) extends StackSafeMonad[Iterant[F, *]] with MonadError[Iterant[F, *], Throwable] with Defer[Iterant[F, *]] with MonoidK[Iterant[F, *]] with CoflatMap[Iterant[F, *]] with FunctorFilter[Iterant[F, *]] { diff --git a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala index 1801b9937..4ee5a71d5 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala @@ -51,6 +51,9 @@ import scala.concurrent.duration.FiniteDuration * Iterant[Task].pure(1) * }}} */ +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") +@scala.annotation.nowarn object IterantBuilders { /** * See the description on [[IterantBuilders]] for the purpose of this class. diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala index 558cf12a2..fd1919d4e 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala @@ -46,8 +46,8 @@ final class ArrayCursor[@specialized(Boolean, Byte, Char, Int, Long, Double) A]( // Int.MaxValue means that arrays can be processed whole override val recommendedBatchSize: Int = Int.MaxValue - private[this] val limit = _offset + _length - private[this] var index: Int = -1 + private val limit = _offset + _length + private var index: Int = -1 def array: Array[A] = _array def offset: Int = _offset diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala index b4812f1c6..bbf35e226 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/Batch.scala @@ -158,7 +158,8 @@ object Batch { */ def fromArray[A](array: Array[A], offset: Int, length: Int): ArrayBatch[A] = { val tp = ClassTag[A](array.getClass.getComponentType) - new ArrayBatch[A](array, offset, length)(tp) + implicit val ct: ClassTag[A] = tp + new ArrayBatch[A](array, offset, length) } /** Converts a Scala [[scala.collection.Iterable Iterable]] into a [[Batch]]. */ diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala index 450221675..e2c47e93d 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala @@ -319,7 +319,8 @@ object BatchCursor { */ def fromArray[A](array: Array[A], offset: Int, length: Int): ArrayCursor[A] = { val tp = ClassTag[A](array.getClass.getComponentType) - new ArrayCursor[A](array, offset, length)(tp) + implicit val ct: ClassTag[A] = tp + new ArrayCursor[A](array, offset, length) } /** $fromAnyArrayDesc @@ -328,6 +329,7 @@ object BatchCursor { * @param offset $paramArrayOffset * @param length $paramArrayLength */ + @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") def fromAnyArray[A](array: Array[_], offset: Int, length: Int): ArrayCursor[A] = fromArray(array, offset, length).asInstanceOf[ArrayCursor[A]] @@ -335,6 +337,7 @@ object BatchCursor { * * @param array $paramArray */ + @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") def fromAnyArray[A](array: Array[_]): ArrayCursor[A] = fromAnyArray(array, 0, array.length) diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala index a9bde9c5c..2a0b8bb46 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala @@ -27,7 +27,7 @@ abstract class GenericCursor[+A] extends BatchCursor[A] { self => if (n <= 0) BatchCursor.empty else new GenericCursor[A] { - private[this] var taken = 0 + private var taken = 0 def hasNext(): Boolean = taken < n && self.hasNext() @@ -46,7 +46,7 @@ abstract class GenericCursor[+A] extends BatchCursor[A] { self => if (n <= 0) self else new GenericCursor[A] { - private[this] var dropped = false + private var dropped = false def hasNext(): Boolean = { if (!dropped) { @@ -54,7 +54,7 @@ abstract class GenericCursor[+A] extends BatchCursor[A] { self => var count = 0 while (count < n) { if (!self.hasNext()) return false - self.next() + val _ = self.next() count += 1 } } @@ -84,8 +84,8 @@ abstract class GenericCursor[+A] extends BatchCursor[A] { self => def filter(p: A => Boolean): BatchCursor[A] = new GenericCursor[A] { - private[this] var item: A = _ - private[this] var hasItem: Boolean = false + private var item: A = null.asInstanceOf[A] + private var hasItem: Boolean = false def hasNext(): Boolean = hasItem || { var continue = true @@ -113,8 +113,8 @@ abstract class GenericCursor[+A] extends BatchCursor[A] { self => def collect[B](pf: PartialFunction[A, B]): BatchCursor[B] = new GenericCursor[B] { - private[this] var item: A = _ - private[this] var hasItem: Boolean = false + private var item: A = null.asInstanceOf[A] + private var hasItem: Boolean = false def hasNext(): Boolean = hasItem || { var continue = true diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala index adfe3f73d..4bd468136 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantAttempt.scala @@ -46,8 +46,8 @@ private[tail] object IterantAttempt { type Attempt = Either[Throwable, A] - private[this] var wasErrorHandled = false - private[this] val handleError = (e: Throwable) => { + private var wasErrorHandled = false + private val handleError = (e: Throwable) => { self.wasErrorHandled = true Left(e): Attempt } @@ -158,7 +158,7 @@ private[tail] object IterantAttempt { def fail(e: Throwable): Iterant[F, Either[Throwable, A]] = Iterant.raiseError(e) - private[this] val continueMapRef: Either[Throwable, Iterant[F, A]] => Iterant[F, Attempt] = { + private val continueMapRef: Either[Throwable, Iterant[F, A]] => Iterant[F, Attempt] = { case Left(e) => Iterant.now(handleError(e)) case Right(iter) => diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala index 7c3b42a7a..649338594 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantBuffer.scala @@ -62,8 +62,8 @@ private[tail] object IterantBuffer { )(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Iterant[F, B]]] { loop => - private[this] val buffer = new Buffer[A](count, skip) - private[this] val stack = ChunkedArrayStack[F[Iterant[F, A]]]() + private val buffer = new Buffer[A](count, skip) + private val stack = ChunkedArrayStack[F[Iterant[F, A]]]() def visit(ref: Next[F, A]): F[Iterant[F, B]] = { val seq = buffer.push(ref.item) @@ -144,13 +144,13 @@ private[tail] object IterantBuffer { } private final class Buffer[A](count: Int, skip: Int) { - private[this] val toDrop = if (count > skip) 0 else skip - count - private[this] val toRepeat = if (skip > count) 0 else count - skip + private val toDrop = if (count > skip) 0 else skip - count + private val toRepeat = if (skip > count) 0 else count - skip - private[this] var isBufferNew = true - private[this] var buffer = new Array[AnyRef](count) - private[this] var dropped = 0 - private[this] var length = 0 + private var isBufferNew = true + private var buffer = new Array[AnyRef](count) + private var dropped = 0 + private var length = 0 def push(elem: A): Array[A] = { if (dropped > 0) { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala index 6c2297e58..cf3217994 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantCompleteL.scala @@ -37,7 +37,7 @@ private[tail] object IterantCompleteL { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -49,7 +49,7 @@ private[tail] object IterantCompleteL { else null.asInstanceOf[F[Iterant[F, A]]] } - private[this] val concatContinue: (Unit => F[Unit]) = + private val concatContinue: (Unit => F[Unit]) = _ => stackPop() match { case null => F.unit @@ -90,7 +90,9 @@ private[tail] object IterantCompleteL { F.raiseError(e) private def processCursor(cursor: BatchCursor[A], rest: F[Iterant[F, A]]) = { - while (cursor.hasNext()) cursor.next() + while (cursor.hasNext()) { + val _ = cursor.next() + } rest.flatMap(this) } } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala index ac3afe169..b97b96923 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDistinctUntilChanged.scala @@ -36,7 +36,7 @@ private[tail] object IterantDistinctUntilChanged { private class Loop[F[_], A, K](f: A => K)(implicit F: Sync[F], K: Eq[K]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var current: K = null.asInstanceOf[K] + private var current: K = null.asInstanceOf[K] def visit(ref: Next[F, A]): Iterant[F, A] = { val a = ref.item diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala index 3bbd051ed..bdbafb503 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDrop.scala @@ -32,7 +32,7 @@ private[tail] object IterantDrop { private final class Loop[F[_], A](n: Int)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var toDrop: Int = n + private var toDrop: Int = n def visit(ref: Next[F, A]): Iterant[F, A] = if (toDrop <= 0) ref @@ -85,7 +85,7 @@ private[tail] object IterantDrop { var droppedNow = 0 while (droppedNow < limit && cursor.hasNext()) { - cursor.next() + val _ = cursor.next() droppedNow += 1 toDrop -= 1 } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala index 08fbd7c64..78fe45d09 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropLast.scala @@ -37,8 +37,8 @@ private[tail] object IterantDropLast { private final class Loop[F[_], A](n: Int)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var queue = Queue[A]() - private[this] var length = 0 + private var queue = Queue[A]() + private var length = 0 def visit(ref: Next[F, A]): Iterant[F, A] = { queue = queue.enqueue(ref.item) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala index 34e7903ff..dc26b3004 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhile.scala @@ -32,7 +32,7 @@ private[tail] object IterantDropWhile { private class Loop[F[_], A](p: A => Boolean)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var dropFinished = false + private var dropFinished = false def visit(ref: Next[F, A]): Iterant[F, A] = if (dropFinished) ref diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala index e89035b7f..f5e510a00 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDropWhileWithIndex.scala @@ -33,8 +33,8 @@ private[tail] object IterantDropWhileWithIndex { private class Loop[F[_], A](p: (A, Int) => Boolean)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { loop => - private[this] var index = 0 - private[this] var dropFinished = false + private var index = 0 + private var dropFinished = false private def getAndIncrement(): Int = { val old = index diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala index 8a8eac353..25657c7d7 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDump.scala @@ -36,8 +36,8 @@ private[tail] object IterantDump { private class Loop[F[_], A](prefixInit: String, out: PrintStream)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { loop => - private[this] var pos = 0L - private[this] var prefix = prefixInit + private var pos = 0L + private var prefix = prefixInit def visit(ref: Next[F, A]): Iterant[F, A] = { out.println(s"$pos: $prefix --> next --> ${ref.item}") diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala index 9f1f77404..3699b0157 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldLeftL.scala @@ -58,11 +58,11 @@ private[tail] object IterantFoldLeftL { extends Iterant.Visitor[F, A, F[S]] { loop => /** Current calculated state. */ - private[this] var state = seed + private var state = seed // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -74,7 +74,7 @@ private[tail] object IterantFoldLeftL { else null.asInstanceOf[F[Iterant[F, A]]] } - private[this] val concatContinue: (S => F[S]) = + private val concatContinue: (S => F[S]) = state => stackPop() match { case null => F.pure(state) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala index 8bf65b223..ba8bc9054 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldRightL.scala @@ -31,12 +31,12 @@ private[tail] object IterantFoldRightL { private final class Loop[F[_], A, B](b: F[B], f: (A, F[B]) => F[B])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[B]] { self => - private[this] var remainder: Iterant[F, A] = _ - private[this] var suspendRef: F[B] = _ + private var remainder: Iterant[F, A] = null.asInstanceOf[Iterant[F, A]] + private var suspendRef: F[B] = null.asInstanceOf[F[B]] // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala index 45476c690..c9482d9d1 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFoldWhileLeftL.scala @@ -54,11 +54,11 @@ private[tail] object IterantFoldWhileLeftL { private class StrictLoop[F[_], A, S](seed: S, f: (S, A) => Either[S, S])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Either[S, S]]] { self => - private[this] var state: S = seed + private var state: S = seed // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -70,7 +70,7 @@ private[tail] object IterantFoldWhileLeftL { else null.asInstanceOf[F[Iterant[F, A]]] } - private[this] val concatContinue: (Either[S, S] => F[Either[S, S]]) = { + private val concatContinue: (Either[S, S] => F[Either[S, S]]) = { case left @ Left(_) => stackPop() match { case null => F.pure(left) @@ -151,11 +151,11 @@ private[tail] object IterantFoldWhileLeftL { private class LazyLoop[F[_], A, S](seed: S, f: (S, A) => F[Either[S, S]])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Either[S, S]]] { self => - private[this] var state: S = seed + private var state: S = seed // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -167,7 +167,7 @@ private[tail] object IterantFoldWhileLeftL { else null.asInstanceOf[F[Iterant[F, A]]] } - private[this] val concatContinue: (Either[S, S] => F[Either[S, S]]) = { + private val concatContinue: (Either[S, S] => F[Either[S, S]]) = { case left @ Left(_) => stackPop() match { case null => F.pure(left) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala index 2dcfbbba2..0ef52faaf 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromReactivePublisher.scala @@ -53,8 +53,8 @@ private[tail] object IterantFromReactivePublisher { private final class IterantSubscriber[F[_], A](bufferSize: Int, eagerBuffer: Boolean)(implicit F: Async[F]) extends Subscriber[A] { - private[this] val sub = SingleAssignSubscription() - private[this] val state = Atomic.withPadding(Uninitialized: State[F, A], LeftRight128) + private val sub = SingleAssignSubscription() + private val state = Atomic.withPadding(Uninitialized: State[F, A], LeftRight128) def start: F[Iterant[F, A]] = F.async { cb => @@ -72,7 +72,7 @@ private[tail] object IterantFromReactivePublisher { private def initialize(): Boolean = state.compareAndSet(Uninitialized, Empty(bufferSize)) - private[this] val generate: (Int => F[Iterant[F, A]]) = { + private val generate: (Int => F[Iterant[F, A]]) = { if (eagerBuffer) { val task = F.async[Iterant[F, A]](take) toReceive => { @@ -106,7 +106,7 @@ private[tail] object IterantFromReactivePublisher { @tailrec def onNext(a: A): Unit = state.get() match { case Uninitialized => - initialize() + val _ = initialize() onNext(a) case current @ Enqueue(queue, length, toReceive) => @@ -131,7 +131,7 @@ private[tail] object IterantFromReactivePublisher { @tailrec private def finish(fa: Iterant[F, A]): Unit = state.get() match { case Uninitialized => - initialize() + val _ = initialize() finish(fa) case current @ Enqueue(queue, length, _) => @@ -171,7 +171,7 @@ private[tail] object IterantFromReactivePublisher { @tailrec private def take(cb: Either[Throwable, Iterant[F, A]] => Unit): Unit = state.get() match { case Uninitialized => - initialize() + val _ = initialize() take(cb) case current @ Enqueue(queue, length, toReceive) => diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala index 7877fb262..c1fed0b96 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantHeadOptionL.scala @@ -42,7 +42,7 @@ private[tail] object IterantHeadOptionL { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -54,7 +54,7 @@ private[tail] object IterantHeadOptionL { else null.asInstanceOf[F[Iterant[F, A]]] } - private[this] val concatContinue: (Option[A] => F[Option[A]]) = { + private val concatContinue: (Option[A] => F[Option[A]]) = { case None => stackPop() match { case null => F.pure(None) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala index d220517d1..c08f63951 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantInterleave.scala @@ -39,8 +39,8 @@ private[tail] object IterantInterleave { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used by Concat: - private[this] var _lhStack: ChunkedArrayStack[F[Iterant[F, A]]] = _ - private[this] var _rhStack: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var _lhStack: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] + private var _rhStack: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def lhStackPush(ref: F[Iterant[F, A]]): Unit = { if (_lhStack == null) _lhStack = ChunkedArrayStack() @@ -62,13 +62,13 @@ private[tail] object IterantInterleave { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - private[this] val lhLoop = new LHLoop - private[this] val rhLoop = new RHLoop + private val lhLoop = new LHLoop + private val rhLoop = new RHLoop // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private final class LHLoop extends Iterant.Visitor[F, A, Iterant[F, A]] { - protected var rhRef: F[Iterant[F, A]] = _ + protected var rhRef: F[Iterant[F, A]] = null.asInstanceOf[F[Iterant[F, A]]] def continue(lh: F[Iterant[F, A]], rh: F[Iterant[F, A]]): F[Iterant[F, A]] = { rhRef = rh @@ -135,7 +135,7 @@ private[tail] object IterantInterleave { } private final class RHLoop extends Iterant.Visitor[F, A, Iterant[F, A]] { - protected var lhRef: F[Iterant[F, A]] = _ + protected var lhRef: F[Iterant[F, A]] = null.asInstanceOf[F[Iterant[F, A]]] def continue(lh: F[Iterant[F, A]], rh: F[Iterant[F, A]]): F[Iterant[F, A]] = { lhRef = lh diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala index 144e929c3..37812c8f6 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantIntersperse.scala @@ -35,8 +35,8 @@ private[tail] object IterantIntersperse { } private class Loop[F[_], A](separator: A)(implicit F: Sync[F]) extends (Iterant[F, A] => Iterant[F, A]) { - private[this] var prepend = false - private[this] val stack = ChunkedArrayStack[F[Iterant[F, A]]]() + private var prepend = false + private val stack = ChunkedArrayStack[F[Iterant[F, A]]]() def apply(source: Iterant[F, A]): Iterant[F, A] = { try source match { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala index 031b5880d..d67301de5 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala @@ -36,8 +36,8 @@ private[tail] object IterantMapEval { private final class Loop[F[_], A, B](ff: A => F[B])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, B]] { self => - private[this] var restRef: F[Iterant[F, A]] = _ - private[this] val continueRef = (b: B) => nextS(b, self.restRef.map(self)) + private var restRef: F[Iterant[F, A]] = null.asInstanceOf[F[Iterant[F, A]]] + private val continueRef = (b: B) => nextS(b, self.restRef.map(self)) private def continue(rest: F[Iterant[F, A]]) = { this.restRef = rest diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala index 20cb2a958..14186f7a7 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantOnErrorHandleWith.scala @@ -41,9 +41,9 @@ private[tail] object IterantOnErrorHandleWith { private final class Loop[F[_], A](handler: Throwable => Iterant[F, A])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { self => - private[this] var wasErrorHandled = false + private var wasErrorHandled = false - private[this] val f = (e: Throwable) => { + private val f = (e: Throwable) => { self.wasErrorHandled = true try handler(e) catch { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala index 075b4a7f1..db0f25254 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantPushToChannel.scala @@ -39,8 +39,8 @@ private[tail] object IterantPushToChannel { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // For dealing with push results - private[this] val trueRef = F.pure(true) - private[this] var rest: F[Iterant[F, A]] = _ + private val trueRef = F.pure(true) + private var rest: F[Iterant[F, A]] = null.asInstanceOf[F[Iterant[F, A]]] private val bindNext = (continue: Boolean) => { if (continue) F.flatMap(rest)(loop) else F.unit @@ -53,7 +53,7 @@ private[tail] object IterantPushToChannel { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -68,7 +68,7 @@ private[tail] object IterantPushToChannel { private def isStackEmpty(): Boolean = stackRef == null || stackRef.isEmpty - private[this] val concatContinue: (Unit => F[Unit]) = + private val concatContinue: (Unit => F[Unit]) = _ => stackPop() match { case null => F.unit diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala index 47dbb51a0..cbb13ae60 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala @@ -32,12 +32,12 @@ private[tail] object IterantReduce { private class Loop[F[_], A](op: (A, A) => A)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, F[Option[A]]] { - private[this] var isEmpty = true - private[this] var state: A = _ + private var isEmpty = true + private var state: A = null.asInstanceOf[A] // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -49,7 +49,7 @@ private[tail] object IterantReduce { else null.asInstanceOf[F[Iterant[F, A]]] } - private[this] val concatContinue: (Option[A] => F[Option[A]]) = + private val concatContinue: (Option[A] => F[Option[A]]) = state => stackPop() match { case null => F.pure(state) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala index 549cb3856..f902152e1 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRepeat.scala @@ -52,8 +52,8 @@ private[tail] object IterantRepeat { private final class Loop[F[_], A](source: Iterant[F, A])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var hasElements = false - private[this] val repeatTask = F.delay { + private var hasElements = false + private val repeatTask = F.delay { if (hasElements) cycle() else diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala index 42f631215..9a66ffb86 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantRetryIfEmpty.scala @@ -41,9 +41,9 @@ private[tail] object IterantRetryIfEmpty { private final class Loop[F[_], A](source: Iterant[F, A], maxRetries: Option[Int])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var hasElements = false - private[this] var retriesRemaining = maxRetries.getOrElse(-1) - private[this] val retryTask = F.delay { + private var hasElements = false + private var retriesRemaining = maxRetries.getOrElse(-1) + private val retryTask = F.delay { if (hasElements || retriesRemaining == 0) Iterant.empty[F, A] else { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala index 091c145c4..326bcf144 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScan.scala @@ -42,8 +42,8 @@ private[tail] object IterantScan { class Loop[F[_], A, S](initial: S, f: (S, A) => S)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, S]] { - private[this] var state = initial - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var state = initial + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -101,7 +101,7 @@ private[tail] object IterantScan { def fail(e: Throwable): Iterant[F, S] = Iterant.raiseError(e) - private[this] def processCursor(cursor: BatchCursor[A], rest: F[Iterant[F, A]]) = { + private def processCursor(cursor: BatchCursor[A], rest: F[Iterant[F, A]]) = { if (!cursor.hasNext()) { Suspend(rest.map(this)) } else if (cursor.recommendedBatchSize <= 1) { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala index 3c77decb9..904e423fd 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantScanEval.scala @@ -37,8 +37,8 @@ private[tail] object IterantScanEval { private class Loop[F[_], S, A](seed: S, ff: (S, A) => F[S])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, S]] { - private[this] var state: S = seed - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var state: S = seed + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala index 52e375320..1d59fc1c2 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantSwitchIfEmpty.scala @@ -45,10 +45,10 @@ private[tail] object IterantSwitchIfEmpty { private final class Loop[F[_], A](backup: Iterant[F, A])(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { self => - private[this] var isEmpty = true - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var isEmpty = true + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] - private[this] def isStackEmpty: Boolean = + private def isStackEmpty: Boolean = stackRef == null || stackRef.isEmpty private def stackPush(item: F[Iterant[F, A]]): Unit = { diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala index 63f5424dd..cb459fda6 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTake.scala @@ -38,7 +38,7 @@ private[tail] object IterantTake { private final class Loop[F[_], A](n: Int)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var toTake = n + private var toTake = n def visit(ref: Next[F, A]): Iterant[F, A] = { toTake -= 1 diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala index 5f4ea01f4..420efe3b6 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeEveryNth.scala @@ -38,7 +38,7 @@ private[tail] object IterantTakeEveryNth { } private final class Loop[F[_], A](n: Int)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var index = n + private var index = n def visit(ref: Next[F, A]): Iterant[F, A] = { if (index == 1) { @@ -94,7 +94,7 @@ private[tail] object IterantTakeEveryNth { buffer += cursor.next() idx = n } else { - cursor.next() + val _ = cursor.next() idx -= 1 } toProcess -= 1 diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala index c8caf0594..0136a846f 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeLast.scala @@ -38,7 +38,7 @@ private[tail] object IterantTakeLast { private class Loop[F[_], A](n: Int)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { loop => private val buffer = DropHeadOnOverflowQueue.boxed[A](n) - private[this] var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var stackRef: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (stackRef == null) stackRef = ChunkedArrayStack() @@ -51,19 +51,23 @@ private[tail] object IterantTakeLast { } def visit(ref: Next[F, A]): Iterant[F, A] = { - buffer.offer(ref.item) + val _ = buffer.offer(ref.item) Suspend(ref.rest.map(loop)) } def visit(ref: NextBatch[F, A]): Iterant[F, A] = { val cursor = ref.batch.cursor() - while (cursor.hasNext()) buffer.offer(cursor.next()) + while (cursor.hasNext()) { + val _ = buffer.offer(cursor.next()) + } Suspend(ref.rest.map(loop)) } def visit(ref: NextCursor[F, A]): Iterant[F, A] = { val cursor = ref.cursor - while (cursor.hasNext()) buffer.offer(cursor.next()) + while (cursor.hasNext()) { + val _ = buffer.offer(cursor.next()) + } Suspend(ref.rest.map(loop)) } @@ -81,7 +85,7 @@ private[tail] object IterantTakeLast { def visit(ref: Last[F, A]): Iterant[F, A] = stackPop() match { case null => - buffer.offer(ref.item) + val _ = buffer.offer(ref.item) finalCursor() case some => loop(Next(ref.item, some)) diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala index 0a9de6a9e..612bea42b 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhile.scala @@ -31,7 +31,7 @@ private[tail] object IterantTakeWhile { private class Loop[F[_], A](p: A => Boolean)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { - private[this] var isActive = true + private var isActive = true def visit(ref: Next[F, A]): Iterant[F, A] = { val item = ref.item diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala index cc7c7fd2f..65493c6f4 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantTakeWhileWithIndex.scala @@ -32,8 +32,8 @@ private[tail] object IterantTakeWhileWithIndex { private class Loop[F[_], A](p: (A, Long) => Boolean)(implicit F: Sync[F]) extends Iterant.Visitor[F, A, Iterant[F, A]] { loop => - private[this] var isActive = true - private[this] var index = 0L + private var isActive = true + private var index = 0L private def getAndIncrement(): Long = { val old = index diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala index 93c275ba1..9c9dc9820 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala @@ -34,6 +34,9 @@ import org.reactivestreams.{ Publisher, Subscriber } import scala.annotation.tailrec import scala.util.control.NonFatal +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") +@scala.annotation.nowarn private[tail] object IterantToReactivePublisher { /** * Implementation for `toReactivePublisher` @@ -69,9 +72,9 @@ private[tail] object IterantToReactivePublisher { implicit F: Effect[F] ) extends Subscription { parent => - private[this] val cancelable = + private val cancelable = SingleAssignCancelable() - private[this] val state = + private val state = Atomic.withPadding(null: RequestState, LeftRight128) def request(n: Long): Unit = { @@ -160,13 +163,13 @@ private[tail] object IterantToReactivePublisher { } private final class Loop extends Iterant.Visitor[F, A, F[Unit]] { - private[this] var requested = 0L - private[this] var haltSignal = Option.empty[Option[Throwable]] - private[this] var streamErrors = true + private var requested = 0L + private var haltSignal = Option.empty[Option[Throwable]] + private var streamErrors = true // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used in visit(Concat) - private[this] var _stack: ChunkedArrayStack[F[Iterant[F, A]]] = _ + private var _stack: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] private def stackPush(item: F[Iterant[F, A]]): Unit = { if (_stack == null) _stack = ChunkedArrayStack() @@ -181,7 +184,7 @@ private[tail] object IterantToReactivePublisher { private def isStackEmpty(): Boolean = _stack == null || _stack.isEmpty - private[this] val concatContinue: (Unit => F[Unit]) = + private val concatContinue: (Unit => F[Unit]) = state => stackPop() match { case null => F.pure(state) @@ -319,8 +322,8 @@ private[tail] object IterantToReactivePublisher { } } - private[this] var suspendedRef: Iterant[F, A] = _ - private[this] val afterPoll: Unit => F[Unit] = _ => { + private var suspendedRef: Iterant[F, A] = null.asInstanceOf[Iterant[F, A]] + private val afterPoll: Unit => F[Unit] = _ => { haltSignal match { case None => if (requested == 0) @@ -344,5 +347,5 @@ private[tail] object IterantToReactivePublisher { private final case class Interrupt(err: Option[Throwable]) extends RequestState - private[this] val rightUnit = Right(()) + private val rightUnit = Right(()) } diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala index 223d61f87..781de83f8 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala @@ -29,6 +29,8 @@ import monix.tail.batches.{ Batch, BatchCursor } import scala.collection.mutable.ArrayBuffer +@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") +@scala.annotation.nowarn private[tail] object IterantZipMap { /** * Implementation for `Iterant#zipMap` @@ -60,8 +62,8 @@ private[tail] object IterantZipMap { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // Used by Concat: - private[this] var _lhStack: ChunkedArrayStack[F[Iterant[F, A]]] = _ - private[this] var _rhStack: ChunkedArrayStack[F[Iterant[F, B]]] = _ + private var _lhStack: ChunkedArrayStack[F[Iterant[F, A]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, A]]]] + private var _rhStack: ChunkedArrayStack[F[Iterant[F, B]]] = null.asInstanceOf[ChunkedArrayStack[F[Iterant[F, B]]]] private def lhStackPush(ref: F[Iterant[F, A]]): Unit = { if (_lhStack == null) _lhStack = ChunkedArrayStack() @@ -83,27 +85,27 @@ private[tail] object IterantZipMap { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - private[this] val lhLoop = new LHLoop + private val lhLoop = new LHLoop - private[this] var _rhNextLoop: RHNextLoop = _ + private var _rhNextLoop: RHNextLoop = null.asInstanceOf[RHNextLoop] private def rhNextLoop = { if (_rhNextLoop == null) _rhNextLoop = new RHNextLoop _rhNextLoop } - private[this] var _rhNextCursorLoop: RHNextCursorLoop = _ + private var _rhNextCursorLoop: RHNextCursorLoop = null.asInstanceOf[RHNextCursorLoop] private def rhNextCursorLoop = { if (_rhNextCursorLoop == null) _rhNextCursorLoop = new RHNextCursorLoop _rhNextCursorLoop } - private[this] var _rhSuspendLoop: RHSuspendLoop = _ + private var _rhSuspendLoop: RHSuspendLoop = null.asInstanceOf[RHSuspendLoop] private def rhSuspendLoop = { if (_rhSuspendLoop == null) _rhSuspendLoop = new RHSuspendLoop _rhSuspendLoop } - private[this] var _rhLastLoop: RHLastLoop = _ + private var _rhLastLoop: RHLastLoop = null.asInstanceOf[RHLastLoop] private def rhLastLoop = { if (_rhLastLoop == null) _rhLastLoop = new RHLastLoop _rhLastLoop @@ -112,7 +114,7 @@ private[tail] object IterantZipMap { // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= private final class LHLoop extends Iterant.Visitor[F, A, Iterant[F, C]] { - protected var rhRef: Iterant[F, B] = _ + protected var rhRef: Iterant[F, B] = null.asInstanceOf[Iterant[F, B]] def withRh(ref: Iterant[F, B]): LHLoop = { rhRef = ref @@ -175,7 +177,7 @@ private[tail] object IterantZipMap { private abstract class RHBaseLoop[LH <: Iterant[F, A]] extends Iterant.Visitor[F, B, Iterant[F, C]] { - protected var lhRef: LH = _ + protected var lhRef: LH = null.asInstanceOf[LH] def visit(lh: LH, rh: Iterant[F, B]): Iterant[F, C] = { lhRef = lh diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala index 1805e7ff2..c94d03cc3 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipWithIndex.scala @@ -37,9 +37,9 @@ private[tail] object IterantZipWithIndex { private class Loop[F[_], A](implicit F: Sync[F]) extends (Iterant[F, A] => Iterant[F, (A, Long)]) { - private[this] var index = 0L + private var index = 0L - private[this] def processSeq(ref: NextCursor[F, A]): NextCursor[F, (A, Long)] = { + private def processSeq(ref: NextCursor[F, A]): NextCursor[F, (A, Long)] = { val NextCursor(cursor, rest) = ref val buffer = ArrayBuffer.empty[(A, Long)] diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 7174420f5..0bd426712 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -106,4 +106,15 @@ object MimaFilters { // Scala 3 / Dotty support exclude[MissingClassProblem]("monix.execution.schedulers.AdaptedThreadPoolExecutorMixin") ) + + lazy val changesFor_3_5_0 = Seq( + // Java 7 boxed internals were removed after the JDK 17 / VarHandle migration; these were internal implementation classes. + exclude[MissingClassProblem]("monix.execution.atomic.internal.*Java7Boxed*"), + // JDK8-era boxed internals were removed for the same migration; routing now goes directly to JavaX VarHandle implementations. + exclude[MissingClassProblem]("monix.execution.atomic.internal.*Java8Boxed*"), + // Legacy queue adapter kept only for Java 7 was removed because full-fence support now assumes JDK 17+. + exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java7"), + // MessagePassingQueue Java 7 adapter was removed as part of the same support-policy cleanup. + exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#Java7") + ) } diff --git a/project/plugins.sbt b/project/plugins.sbt index db339d207..2e5fd388b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -13,3 +13,5 @@ addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") + +libraryDependencies += "org.typelevel" %% "scalac-options" % "0.1.9" From 201c6bf18581330c3cce413dafacaa84c7d1cfda Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 1 Apr 2026 11:02:13 +0300 Subject: [PATCH 62/69] Disable auto-publishing for main --- .github/workflows/build.yml | 64 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de7754ffc..6330a3e7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -268,35 +268,35 @@ jobs: with: jobs: ${{ toJSON(needs) }} - publish: - name: Publish to Sonatype - if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x') - needs: [ all_tests ] - - env: - CI: true - - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 100 - - - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: temurin - - - name: Install GnuPG2 - run: | - ./.github/scripts/setup-pgp - - - name: .github/scripts/release - run: | - .github/scripts/release - env: - PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }} - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - PUBLISH_STABLE_VERSION: false + # publish: + # name: Publish to Sonatype + # if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x') + # needs: [ all_tests ] + + # env: + # CI: true + + # runs-on: ubuntu-22.04 + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 100 + + # - uses: actions/setup-java@v4 + # with: + # java-version: 17 + # distribution: temurin + + # - name: Install GnuPG2 + # run: | + # ./.github/scripts/setup-pgp + + # - name: .github/scripts/release + # run: | + # .github/scripts/release + # env: + # PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }} + # PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + # SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + # SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + # PUBLISH_STABLE_VERSION: false From f38a4f526f837615f81723c6361e95a858cc85f9 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Thu, 2 Apr 2026 10:27:01 +0300 Subject: [PATCH 63/69] Re-enable Mima (#2018) This is for checking binary backwards compatibility against version 3.4.0 --- AGENTS.md | 15 ++ .../ChunkedEvalFilterMapSumBenchmark.scala | 6 +- .../ChunkedMapFilterSumBenchmark.scala | 6 +- .../MapParallelObservableBenchmark.scala | 2 +- .../ObservableConcatMapBenchmark.scala | 2 +- .../ObservableMapTaskBenchmark.scala | 2 +- .../ObservableIteratorBenchmark.scala | 2 +- build.sbt | 73 +++--- .../internal/FutureLiftForPlatform.scala | 5 - .../main/scala/monix/catnap/CancelableF.scala | 5 - .../scala/monix/catnap/CircuitBreaker.scala | 4 - .../monix/catnap/ConcurrentChannel.scala | 3 - .../scala/monix/catnap/ConcurrentQueue.scala | 3 - .../main/scala/monix/catnap/FutureLift.scala | 5 - .../src/main/scala/monix/catnap/MVar.scala | 7 - .../main/scala/monix/catnap/Semaphore.scala | 6 - .../cancelables/AssignableCancelableF.scala | 2 - .../cancelables/BooleanCancelableF.scala | 2 - .../scala/monix/catnap/CancelableFSuite.scala | 4 +- .../src/main/scala/monix/eval/Coeval.scala | 1 - .../src/main/scala/monix/eval/Task.scala | 10 +- .../src/main/scala/monix/eval/TaskApp.scala | 1 - .../src/main/scala/monix/eval/TaskLift.scala | 4 - .../monix/eval/internal/CoevalBracket.scala | 1 - .../monix/eval/internal/CoevalRunLoop.scala | 7 +- .../monix/eval/internal/CoevalTracing.scala | 7 +- .../monix/eval/internal/ForkedRegister.scala | 5 +- .../eval/internal/ForwardCancelable.scala | 4 +- .../monix/eval/internal/FrameIndexRef.scala | 1 - .../scala/monix/eval/internal/LazyVal.scala | 1 - .../monix/eval/internal/StackFrame.scala | 1 - .../monix/eval/internal/TaskBracket.scala | 4 +- .../eval/internal/TaskCancellation.scala | 8 +- .../monix/eval/internal/TaskConnection.scala | 1 - .../internal/TaskConnectionComposite.scala | 3 +- .../eval/internal/TaskConnectionRef.scala | 1 - .../monix/eval/internal/TaskConversions.scala | 5 +- .../monix/eval/internal/TaskCreate.scala | 7 +- .../monix/eval/internal/TaskDeferAction.scala | 1 - .../monix/eval/internal/TaskDeprecated.scala | 1 - .../monix/eval/internal/TaskDoOnCancel.scala | 5 +- .../monix/eval/internal/TaskEffect.scala | 3 +- .../monix/eval/internal/TaskEvalAsync.scala | 1 - .../monix/eval/internal/TaskExecuteOn.scala | 1 - .../eval/internal/TaskExecuteWithModel.scala | 1 - .../internal/TaskExecuteWithOptions.scala | 1 - .../monix/eval/internal/TaskFromFuture.scala | 9 +- .../monix/eval/internal/TaskMapBoth.scala | 5 +- .../monix/eval/internal/TaskMemoize.scala | 3 +- .../monix/eval/internal/TaskParSequence.scala | 3 +- .../eval/internal/TaskParSequenceN.scala | 1 - .../internal/TaskParSequenceUnordered.scala | 3 +- .../scala/monix/eval/internal/TaskRace.scala | 9 +- .../monix/eval/internal/TaskRaceList.scala | 7 +- .../monix/eval/internal/TaskRacePair.scala | 9 +- .../eval/internal/TaskRestartCallback.scala | 8 +- .../monix/eval/internal/TaskRunLoop.scala | 7 +- .../internal/TaskRunToFutureWithLocal.scala | 1 - .../monix/eval/internal/TaskSequence.scala | 1 - .../scala/monix/eval/internal/TaskShift.scala | 1 - .../scala/monix/eval/internal/TaskSleep.scala | 3 +- .../scala/monix/eval/internal/TaskStart.scala | 1 - .../eval/internal/TaskStartAndForget.scala | 1 - .../internal/TaskToReactivePublisher.scala | 5 +- .../monix/eval/internal/TaskTracing.scala | 7 +- .../monix/eval/internal/TracedAsync.scala | 1 - .../eval/internal/UnsafeCancelUtils.scala | 3 +- .../monix/eval/CoevalSequenceSuite.scala | 2 +- .../monix/eval/TaskConnectionSuite.scala | 4 +- .../monix/eval/TaskConversionsSuite.scala | 4 +- .../monix/eval/TaskFromEitherSuite.scala | 8 +- .../scala/monix/eval/TaskLocalSuite.scala | 2 +- .../eval/TaskParSequenceUnorderedSuite.scala | 2 +- .../eval/TaskParTraverseUnorderedSuite.scala | 2 +- .../internal/HygieneUtilMacros.scala | 2 +- .../atomic/internal/InlineMacrosTest.scala | 2 +- .../scala/org/reactivestreams/Publisher.scala | 5 +- .../cancelables/ChainedCancelable.scala | 8 +- .../monix/execution/FutureUtilsJVMSuite.scala | 2 - .../scala-2/monix/execution/misc/Local.scala | 4 +- .../src/main/scala/monix/execution/Ack.scala | 2 - .../main/scala/monix/execution/Callback.scala | 3 - .../monix/execution/CancelableFuture.scala | 4 +- .../cancelables/CompositeCancelable.scala | 2 +- .../monix/execution/misc/CanBindLocals.scala | 3 - .../execution/misc/LocalDeprecated.scala | 2 - .../schedulers/SchedulerService.scala | 2 - .../monix/execution/CancelableSuite.scala | 4 +- .../CompositeCancelableSuite.scala | 2 +- .../DropAllOnOverflowQueueSuite.scala | 18 +- .../DropHeadOnOverflowQueueSuite.scala | 16 +- .../UncaughtExceptionReporterSuite.scala | 2 - .../buffers/EvictingBufferedSubscriber.scala | 7 +- .../LoadBalanceConsumerConcurrencySuite.scala | 2 +- .../scala/monix/reactive/Observable.scala | 19 +- .../main/scala/monix/reactive/Observer.scala | 3 - .../src/main/scala/monix/reactive/Pipe.scala | 6 +- .../BufferedIteratorAsObservable.scala | 2 - .../builders/CharsReaderObservable.scala | 2 - .../internal/builders/ConsObservable.scala | 11 +- .../internal/builders/DeferObservable.scala | 3 - .../builders/FutureAsObservable.scala | 2 +- .../builders/InputStreamObservable.scala | 2 - .../IntervalFixedDelayObservable.scala | 8 +- .../builders/IteratorAsObservable.scala | 2 - .../builders/LinesReaderObservable.scala | 2 - .../MergePrioritizedListObservable.scala | 5 +- .../internal/builders/RangeObservable.scala | 2 - .../builders/RepeatEvalObservable.scala | 2 - .../builders/RepeatOneObservable.scala | 2 - .../builders/ResourceCaseObservable.scala | 3 - .../ConcurrentSubjectDeprecatedBuilders.scala | 43 ++++ .../ObservableDeprecatedBuilders.scala | 2 - .../ObservableDeprecatedMethods.scala | 2 - .../operators/BufferTimedObservable.scala | 14 +- .../operators/DebounceObservable.scala | 1 - .../operators/DelayByTimespanObservable.scala | 9 +- .../DelayExecutionWithTriggerObservable.scala | 2 - .../operators/DoOnSubscribeObservable.scala | 7 +- .../DoOnSubscriptionCancelObservable.scala | 2 - .../operators/GuaranteeCaseObservable.scala | 2 - .../operators/IntersperseObservable.scala | 14 +- .../internal/operators/ReduceOperator.scala | 4 +- .../operators/ScanTaskObservable.scala | 2 - .../operators/TakeByPredicateOperator.scala | 4 +- .../operators/ThrottleLatestObservable.scala | 12 +- .../SubscriberAsReactiveSubscriber.scala | 6 +- .../observables/CachedObservable.scala | 11 +- .../observables/ChainedObservable.scala | 2 +- .../observables/ConnectableObservable.scala | 3 - .../observables/RefCountObservable.scala | 4 +- .../CacheUntilConnectSubscriber.scala | 18 +- .../observers/ConnectableSubscriber.scala | 20 +- .../reactive/observers/SafeSubscriber.scala | 2 +- .../monix/reactive/observers/Subscriber.scala | 9 +- .../reactive/subjects/ConcurrentSubject.scala | 15 +- .../reactive/subjects/PublishSubject.scala | 18 +- .../reactive/subjects/ReplaySubject.scala | 8 +- .../monix/reactive/subjects/Subject.scala | 3 - .../ObservableLikeConversionsSuite.scala | 2 +- .../consumers/LoadBalanceConsumerSuite.scala | 2 +- .../builders/CharsReaderObservableSuite.scala | 2 +- .../builders/InputStreamObservableSuite.scala | 2 +- .../builders/LinesReaderObservableSuite.scala | 2 +- .../operators/BaseOperatorSuite.scala | 6 +- .../operators/BufferIntrospectiveSuite.scala | 2 +- .../operators/CombineLatestListSuite.scala | 4 +- .../internal/operators/ConcatOneSuite.scala | 2 +- .../operators/MapParallelOrderedSuite.scala | 6 +- .../operators/MapParallelUnorderedSuite.scala | 6 +- .../internal/operators/MapTaskSuite.scala | 4 +- .../operators/MergePrioritizedListSuite.scala | 10 +- .../MonixSubscriberAsReactiveSuite.scala | 10 +- .../rstreams/ObservableIsPublisherSuite.scala | 10 +- .../rstreams/PublisherIsObservableSuite.scala | 2 +- .../subjects/BehaviorSubjectSuite.scala | 4 +- .../subjects/ProfunctorSubjectSuite.scala | 8 +- .../subjects/PublishSubjectSuite.scala | 4 +- .../subjects/ReplaySubjectSuite.scala | 4 +- .../src/main/scala/monix/tail/Iterant.scala | 17 +- .../scala/monix/tail/IterantBuilders.scala | 8 +- .../monix/tail/batches/BatchCursor.scala | 6 +- .../internal/IterantDeprecatedBuilders.scala | 41 ++++ .../internal/IterantToReactivePublisher.scala | 7 +- .../monix/tail/internal/IterantZipMap.scala | 3 - .../monix/tail/BatchCursorBuildersSuite.scala | 2 +- .../scala/monix/tail/BatchCursorSuite.scala | 2 +- .../scala/monix/tail/IterantConcatSuite.scala | 2 +- .../IterantFromReactivePublisherSuite.scala | 10 +- .../IterantFromReactiveStreamAsyncSuite.scala | 10 +- .../monix/tail/IterantFromSeqSuite.scala | 2 +- .../monix/tail/IterantHeadOptionSuite.scala | 4 +- .../monix/tail/IterantLastOptionSuite.scala | 4 +- .../monix/tail/IterantOnErrorSuite.scala | 2 +- .../IterantToReactivePublisherSuite.scala | 6 +- .../monix/tail/ThrowExceptionBatch.scala | 2 +- .../monix/tail/ThrowExceptionCursor.scala | 2 +- project/MimaFilters.scala | 217 +++++++++++++++++- project/MonixBuildUtils.scala | 6 +- project/build.properties | 2 +- project/plugins.sbt | 29 ++- 181 files changed, 632 insertions(+), 603 deletions(-) create mode 100644 AGENTS.md create mode 100644 monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ConcurrentSubjectDeprecatedBuilders.scala create mode 100644 monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecatedBuilders.scala diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..c662b5f52 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,15 @@ +# Agent Instructions for Monix + +This file contains mandatory rules for AI agents (Copilot, Claude, Cursor, etc.) working on this repository. +**Any violation is a CI-breaking mistake!** + +--- + +## Code rules + +- Never workaround the compiler, make an effort to solve errors in an idiomatic way: + - Avoid `asInstanceOf` downcasting, unless there's no other way (e.g., untagged union types in Scala 3). + - `@nowarn` annotations, or other ways for supressing warnings/errors, are not permitted without the user's consent. + - We fix warnings, we don't ignore them. +- Use package imports, instead of fully qualified names. +- Make an effort to write idiomatic, yet performant Scala code. diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala index ceaac0403..b6c98e316 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedEvalFilterMapSumBenchmark.scala @@ -96,7 +96,7 @@ class ChunkedEvalFilterMapSumBenchmark { @Benchmark def fs2Stream = { - val stream = FS2Stream(allElements: _*) + val stream = FS2Stream(allElements*) .chunkN(chunkSize) .evalMap[MonixTask, Int](chunk => MonixTask(sumIntScala(chunk.iterator))) .filter(_ > 0) @@ -109,7 +109,7 @@ class ChunkedEvalFilterMapSumBenchmark { @Benchmark def fs2StreamPreChunked = { - val stream = FS2Stream(fs2Chunks: _*) + val stream = FS2Stream(fs2Chunks*) .evalMap[MonixTask, Int](chunk => MonixTask(sumIntScala(chunk.iterator))) .filter(_ > 0) .map(_.toLong) @@ -148,7 +148,7 @@ class ChunkedEvalFilterMapSumBenchmark { @Benchmark def zioStreamPreChunked = { val stream = ZStream - .fromChunks(zioChunks: _*) + .fromChunks(zioChunks*) .mapChunksM(chunk => UIO(Chunk.single(sumIntScala(chunk)))) .filter(_ > 0) .map(_.toLong) diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala index c733bca2f..eec974d03 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ChunkedMapFilterSumBenchmark.scala @@ -121,7 +121,7 @@ class ChunkedMapFilterSumBenchmark { @Benchmark def fs2Stream(): Int = { - val stream = FS2Stream(fs2Chunks: _*) + val stream = FS2Stream(fs2Chunks*) .flatMap(FS2Stream.chunk) .map(_ + 1) .filter(_ % 2 == 0) @@ -134,7 +134,7 @@ class ChunkedMapFilterSumBenchmark { @Benchmark def zioStream(): Int = { val stream = ZStream - .fromChunks(zioChunks: _*) + .fromChunks(zioChunks*) .map(_ + 1) .filter(_ % 2 == 0) .runSum @@ -156,7 +156,7 @@ class ChunkedMapFilterSumBenchmark { val p = Promise[Int]() stream.unsafeSubscribeFn(new Subscriber.Sync[Int] { val scheduler = benchmarks.scheduler - private[this] var sum: Int = 0 + private var sum: Int = 0 def onError(ex: Throwable): Unit = p.failure(ex) diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala index a230c0db2..beb160c3c 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/MapParallelObservableBenchmark.scala @@ -79,7 +79,7 @@ class MapParallelObservableBenchmark { val p = Promise[Long]() stream.unsafeSubscribeFn(new Subscriber.Sync[Long] { val scheduler = global - private[this] var sum: Long = 0 + private var sum: Long = 0 def onError(ex: Throwable): Unit = { p.failure(ex) diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala index 95cef489e..ad331e525 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableConcatMapBenchmark.scala @@ -78,7 +78,7 @@ class ObservableConcatMapBenchmark { val p = Promise[Long]() stream.unsafeSubscribeFn(new Subscriber.Sync[Long] { val scheduler = global - private[this] var sum: Long = 0 + private var sum: Long = 0 def onError(ex: Throwable): Unit = { p.failure(ex) diff --git a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala index c294fe16e..87bc96a5c 100644 --- a/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala +++ b/benchmarks/shared/src/main/scala/monix/benchmarks/ObservableMapTaskBenchmark.scala @@ -63,7 +63,7 @@ class ObservableMapTaskBenchmark { val p = Promise[Long]() stream.unsafeSubscribeFn(new Subscriber.Sync[Long] { val scheduler = global - private[this] var sum: Long = 0 + private var sum: Long = 0 def onError(ex: Throwable): Unit = p.failure(ex) diff --git a/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala b/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala index 7a3f9e44d..214b565d6 100644 --- a/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala +++ b/benchmarks/vnext/src/main/scala/monix/benchmarks/ObservableIteratorBenchmark.scala @@ -86,7 +86,7 @@ class ObservableIteratorBenchmark { val p = Promise[Int]() stream.unsafeSubscribeFn(new Subscriber.Sync[Int] { val scheduler = benchmarks.scheduler - private[this] var sum: Int = 0 + private var sum: Int = 0 def onError(ex: Throwable): Unit = p.failure(ex) diff --git a/build.sbt b/build.sbt index 71a15a57e..c5318d54a 100644 --- a/build.sbt +++ b/build.sbt @@ -191,11 +191,21 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // Enable this to debug warnings... Compile / scalacOptions ++= { CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 13)) => Seq( + case Some((2, 13)) => + Seq( + "-Xfatal-warnings", + "-Xsource:3-cross", // Silence various warnings that are false positives or intentional patterns - "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent,any:warning-verbose" + "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent,any:warning-verbose", + "-Wconf:cat=unused-nowarn:s" + ) + case Some((3, _)) => + Seq( + "-Werror", + "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s" ) - case _ => Seq.empty + case _ => + Seq.empty } }, Test / scalacOptions ++= { @@ -204,26 +214,16 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // Silence various warnings in tests "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent" ) - case Some((3, _)) => Seq( + case Some((3, _)) => + Seq( // Scala 3.8.x surfaces a very large warning volume in legacy tests and doctests. // Keep -Werror for main sources, but silence test warnings to preserve CI signal. "-Wconf:any:silent" ) - case _ => Seq.empty + case _ => + Seq.empty } }, - // sbt-tpolecat 0.5.x in CI mode adds only ScalacOptions.fatalWarnings (-Xfatal-warnings), - // which is deprecated in Scala 3.6+ and itself causes a fatal error in 3.8+. - // Override tpolecatCiModeOptions to use the version-aware fatalWarningOptions from - // scalac-options 0.1.9, which emits -Werror for Scala 3.x and -Xfatal-warnings for older. - // Scala 2.13.18 introduced many new warnings; keep fatal warnings disabled there. - tpolecatCiModeOptions := { - val opts = tpolecatDevModeOptions.value ++ ScalacOptions.fatalWarningOptions - if (scalaBinaryVersion.value == "2.13" && scalaVersion.value.startsWith("2.13.18")) - opts -- ScalacOptions.fatalWarningOptions - else - opts - }, // Turning off fatal warnings for doc generation Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude, @@ -239,14 +239,6 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( ) }, - // Silence everything in auto-generated files - scalacOptions ++= { - if (isDotty.value) - Seq.empty - else - Seq.empty - }, - // Syntax improvements, linting, etc. libraryDependencies ++= { if (isDotty.value) @@ -444,17 +436,12 @@ lazy val sharedJSSettings = Seq( def mimaSettings(projectName: String) = Seq( ThisBuild / mimaFailOnNoPrevious := false, - // mimaPreviousArtifacts := Set("io.monix" %% projectName % monixSeries), - // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_0_1, - // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_2_0, - // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_3_0, - // mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0 -) - -lazy val doctestTestSettings = Seq( - doctestTestFramework := DoctestTestFramework.Minitest, - doctestIgnoreRegex := Some(s".*TaskApp.scala|.*reactive.internal.(builders|operators|rstreams).*"), - doctestOnlyCodeBlocksMode := true + mimaPreviousArtifacts := Set("io.monix" %% projectName % monixSeries), + mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_0_1, + mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_2_0, + mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_3_0, + mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0, + mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_5_0 ) // ------------------------------------------------------------------------------------------------ @@ -492,13 +479,11 @@ def monixSubModule( def jvmModule( projectName: String, withMimaChecks: Boolean, - withDocTests: Boolean, publishArtifacts: Boolean ): Project => Project = pr => { pr.configure(monixSubModule(projectName, publishArtifacts = publishArtifacts)) .settings(testDependencies) - .settings(if (withDocTests) doctestTestSettings else Seq.empty) .settings(if (withMimaChecks) mimaSettings(projectName) else Seq.empty) } @@ -513,7 +498,6 @@ def jsProfile(projectName: String, publishArtifacts: Boolean): Project => Projec def crossModule( projectName: String, withMimaChecks: Boolean = true, - withDocTests: Boolean = true, publishArtifacts: Boolean = true, crossSettings: Seq[sbt.Def.SettingsDefinition] = Nil ): MonixCrossModule = { @@ -522,7 +506,6 @@ def crossModule( jvm = jvmModule( projectName = projectName, withMimaChecks = withMimaChecks, - withDocTests = withDocTests, publishArtifacts = publishArtifacts ).andThen(_.settings(crossSettings: _*)), js = jsProfile( @@ -577,7 +560,6 @@ lazy val coreProfile = crossModule( projectName = "monix", withMimaChecks = false, - withDocTests = false, crossSettings = Seq( description := "Root project for Monix, a library for asynchronous programming in Scala. See: https://monix.io" ) @@ -604,7 +586,6 @@ lazy val executionShadedJCTools = project jvmModule( projectName = "monix-internal-jctools", withMimaChecks = false, - withDocTests = false, publishArtifacts = true ) ) @@ -626,8 +607,8 @@ lazy val executionShadedJCTools = project lazy val executionAtomicProfile = crossModule( - projectName = "monix-execution-atomic", - withDocTests = true, + projectName = "monix-execution-atomic", + withMimaChecks = false, crossSettings = Seq( description := "Sub-module of Monix, exposing low-level atomic references. See: https://monix.io", ) @@ -646,8 +627,7 @@ lazy val executionAtomicJS = project.in(file("monix-execution/atomic/js")) lazy val executionProfile = crossModule( - projectName = "monix-execution", - withDocTests = false, + projectName = "monix-execution", crossSettings = Seq( description := "Sub-module of Monix, exposing low-level primitives for dealing with async execution. See: https://monix.io", libraryDependencies += implicitBoxLib.value @@ -767,7 +747,6 @@ lazy val javaJVM = project jvmModule( projectName = "monix-java", withMimaChecks = true, - withDocTests = true, publishArtifacts = true ) ) diff --git a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala index d61ffd4e2..2318e3e7b 100644 --- a/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala +++ b/monix-catnap/jvm/src/main/scala/monix/catnap/internal/FutureLiftForPlatform.scala @@ -21,7 +21,6 @@ package internal import java.util.concurrent.{ CancellationException, CompletableFuture, CompletionException } import java.util.function.BiFunction import cats.effect.{ Async, Concurrent } -import scala.annotation.nowarn private[catnap] abstract class FutureLiftForPlatform { /** @@ -51,8 +50,6 @@ private[catnap] abstract class FutureLiftForPlatform { * A generic function that subsumes both [[javaCompletableToConcurrent]] * and [[javaCompletableToAsync]]. */ - @nowarn("cat=deprecation") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def javaCompletableToConcurrentOrAsync[F[_], A](fa: F[CompletableFuture[A]])( implicit F: OrElse[Concurrent[F], Async[F]] ): F[A] = { @@ -68,8 +65,6 @@ private[catnap] abstract class FutureLiftForPlatform { * `java.util.concurrent.CompletableFuture` to any `Concurrent` * or `Async` data type. */ - @nowarn("cat=deprecation") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") implicit def javaCompletableLiftForConcurrentOrAsync[F[_]]( implicit F: OrElse[Concurrent[F], Async[F]] ): FutureLift[F, CompletableFuture] = { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala index 50489a088..2beaf94ff 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CancelableF.scala @@ -22,7 +22,6 @@ import cats.effect.{ CancelToken, Sync } import monix.catnap.cancelables.BooleanCancelableF import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.exceptions.CompositeException -import scala.annotation.nowarn import scala.collection.mutable.ListBuffer /** Represents a pure data structure that describes an effectful, @@ -85,11 +84,9 @@ object CancelableF { /** Builds a [[CancelableF]] reference from a sequence, * cancelling everything when `cancel` gets evaluated. */ - @nowarn("cat=deprecation") def collection[F[_]](refs: CancelableF[F]*)(implicit F: Sync[F]): CancelableF[F] = wrap[F](cancelAllSeq(refs)) - @nowarn("msg=Implicit parameters should be provided with a `using` clause") private def cancelAllSeq[F[_]](seq: Seq[CancelableF[F]])(implicit F: Sync[F]): CancelToken[F] = if (seq.isEmpty) F.unit else F.defer(new CancelAllFrame[F](seq.iterator.map(_.cancel))(F).loop) @@ -103,7 +100,6 @@ object CancelableF { * - for the JVM "Suppressed Exceptions" are used * - for JS they are wrapped in a `CompositeException` */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def cancelAll[F[_]](seq: CancelableF[F]*)(implicit F: Sync[F]): CancelToken[F] = { if (seq.isEmpty) F.unit @@ -122,7 +118,6 @@ object CancelableF { * - for the JVM "Suppressed Exceptions" are used * - for JS they are wrapped in a `CompositeException` */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def cancelAllTokens[F[_]](seq: CancelToken[F]*)(implicit F: Sync[F]): CancelToken[F] = { if (seq.isEmpty) F.unit diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala index c848ac806..ebb02a2ee 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/CircuitBreaker.scala @@ -25,7 +25,6 @@ import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.atomic.{ Atomic, AtomicAny, PaddingStrategy } import monix.execution.exceptions.ExecutionRejectedException import monix.execution.internal.Constants -import scala.annotation.nowarn import scala.annotation.tailrec import scala.concurrent.duration._ @@ -270,8 +269,6 @@ final class CircuitBreaker[F[_]] private ( * be cancelable, to properly dispose of the registered * listener in case of cancellation. */ - @nowarn("cat=deprecation") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def awaitClose(implicit F: OrElse[Concurrent[F], Async[F]]): F[Unit] = { val F0 = F.unify F0.defer { @@ -737,7 +734,6 @@ object CircuitBreaker extends CircuitBreakerDocs { * @param padding $paddingParam */ @UnsafeBecauseImpure - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def unsafe( maxFailures: Int, resetTimeout: FiniteDuration, diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala index c3477856a..e2d1aa826 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentChannel.scala @@ -29,7 +29,6 @@ import monix.execution.internal.collection.{ LowLevelConcurrentQueue => LowLevel import monix.execution.internal.{ Constants, Platform } import monix.execution.{ CancelablePromise, ChannelType } -import scala.annotation.nowarn import scala.annotation.{ switch, tailrec } import scala.collection.mutable.ArrayBuffer @@ -586,7 +585,6 @@ object ConcurrentChannel { * @param cs $csParam * @param F $concurrentParam */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") @UnsafeProtocol @UnsafeBecauseImpure def unsafe[F[_], E, A]( @@ -599,7 +597,6 @@ object ConcurrentChannel { /** * Returned by the [[apply]] builder. */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") final class ApplyBuilders[F[_]](val F: Concurrent[F]) extends AnyVal { /** * @see documentation for [[ConcurrentChannel.of]] diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala index ac10f8573..1012f97dd 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/ConcurrentQueue.scala @@ -28,7 +28,6 @@ import monix.execution.atomic.PaddingStrategy.LeftRight128 import monix.execution.internal.Constants import monix.execution.internal.collection.{ LowLevelConcurrentQueue => LowLevelQueue } import monix.execution.{ BufferCapacity, CancelablePromise, ChannelType } -import scala.annotation.nowarn import scala.annotation.tailrec import scala.collection.mutable.ArrayBuffer @@ -481,7 +480,6 @@ object ConcurrentQueue { * @param cs $csParam * @param F $concurrentParam */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") @UnsafeProtocol @UnsafeBecauseImpure def unsafe[F[_], A](capacity: BufferCapacity, channelType: ChannelType = MPMC)( @@ -496,7 +494,6 @@ object ConcurrentQueue { /** * Returned by the [[apply]] builder. */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") final class ApplyBuilders[F[_]](val F: Concurrent[F]) extends AnyVal { /** * @see documentation for [[ConcurrentQueue.bounded]] diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala index 064ec2a70..226947473 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/FutureLift.scala @@ -22,7 +22,6 @@ import cats.effect.{ Async, Concurrent } import monix.execution.CancelableFuture import monix.execution.internal.AttemptCallback import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.annotation.nowarn import scala.concurrent.{ Future => ScalaFuture } /** @@ -145,8 +144,6 @@ object FutureLift extends internal.FutureLiftForPlatform { * N.B. this works with [[monix.execution.CancelableFuture]] * if the given `Future` is such an instance. */ - @nowarn("cat=deprecation") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def scalaToConcurrentOrAsync[F[_], MF[T] <: ScalaFuture[T], A](fa: F[MF[A]])( implicit F: OrElse[Concurrent[F], Async[F]] ): F[A] = { @@ -164,8 +161,6 @@ object FutureLift extends internal.FutureLiftForPlatform { * [[scala.concurrent.Future]] or [[monix.execution.CancelableFuture]] to * any `Concurrent` or `Async` data type. */ - @nowarn("cat=deprecation") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") implicit def scalaFutureLiftForConcurrentOrAsync[F[_], MF[T] <: ScalaFuture[T]]( implicit F: OrElse[Concurrent[F], Async[F]] ): FutureLift[F, MF] = { diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala index 084163856..886a31e5c 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/MVar.scala @@ -24,7 +24,6 @@ import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericVar import monix.execution.internal.GenericVar.Id -import scala.annotation.nowarn /** A mutable location, that is either empty or contains * a value of type `A`. @@ -201,14 +200,12 @@ object MVar { * * @see [[of]] and [[empty]] */ - @nowarn("cat=deprecation") def apply[F[_]](implicit F: OrElse[Concurrent[F], Async[F]]): ApplyBuilders[F] = new ApplyBuilders[F](F) /** * Builds an [[MVar]] instance with an `initial` value. */ - @nowarn("cat=deprecation") def of[F[_], A](initial: A, ps: PaddingStrategy = NoPadding)( implicit F: OrElse[Concurrent[F], Async[F]], @@ -224,7 +221,6 @@ object MVar { /** * Builds an empty [[MVar]] instance. */ - @nowarn("cat=deprecation") def empty[F[_], A]( ps: PaddingStrategy = NoPadding )(implicit F: OrElse[Concurrent[F], Async[F]], cs: ContextShift[F]): F[MVar[F, A]] = { @@ -238,14 +234,12 @@ object MVar { /** * Returned by the [[apply]] builder. */ - @nowarn("cat=deprecation") final class ApplyBuilders[F[_]](val F: OrElse[Concurrent[F], Async[F]]) extends AnyVal { /** * Builds an `MVar` with an initial value. * * @see documentation for [[MVar.of]] */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def of[A](a: A, ps: PaddingStrategy = NoPadding)(implicit cs: ContextShift[F]): F[MVar[F, A]] = MVar.of(a, ps)(F, cs) @@ -254,7 +248,6 @@ object MVar { * * @see documentation for [[MVar.empty]] */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def empty[A](ps: PaddingStrategy = NoPadding)(implicit cs: ContextShift[F]): F[MVar[F, A]] = MVar.empty(ps)(F, cs) } diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala index 489d037ac..07a12c1f8 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/Semaphore.scala @@ -25,7 +25,6 @@ import monix.execution.atomic.PaddingStrategy import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.GenericSemaphore import monix.execution.internal.GenericSemaphore.Listener -import scala.annotation.nowarn import scala.concurrent.Promise /** The `Semaphore` is an asynchronous semaphore implementation that @@ -67,8 +66,6 @@ import scala.concurrent.Promise * inspired by the implementation in Cats-Effect, which was ported * from FS2. */ -@nowarn("cat=deprecation") -@nowarn("msg=Implicit parameters should be provided with a `using` clause") final class Semaphore[F[_]] private (provisioned: Long, ps: PaddingStrategy)( implicit F: OrElse[Concurrent[F], Async[F]], @@ -234,7 +231,6 @@ object Semaphore { * @param cs is a `ContextShift` instance required in order to introduce * async boundaries after successful `acquire` operations, for safety */ - @nowarn("cat=deprecation") def apply[F[_]](provisioned: Long, ps: PaddingStrategy = NoPadding)( implicit F: OrElse[Concurrent[F], Async[F]], @@ -262,7 +258,6 @@ object Semaphore { * async boundaries after successful `acquire` operations, for safety */ @UnsafeBecauseImpure - @nowarn("cat=deprecation") def unsafe[F[_]](provisioned: Long, ps: PaddingStrategy = NoPadding)( implicit F: OrElse[Concurrent[F], Async[F]], @@ -329,7 +324,6 @@ object Semaphore { protected def makeCancelable(f: (Listener[Unit]) => Unit, p: Listener[Unit]): F[Unit] = F0.delay(f(p)) - @nowarn("msg=Implicit parameters should be provided with a `using` clause") private def make[A](k: (Either[Throwable, A] => Unit) => F[Unit]): F[A] = F.fold( F => F.cancelable(k), diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala index b2a246d0e..bf57f65c8 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala @@ -22,7 +22,6 @@ import cats.Applicative import cats.effect.CancelToken import monix.catnap.CancelableF import monix.catnap.CancelableF.Empty -import scala.annotation.nowarn /** Represents a class of cancelable references that can hold * an internal reference to another cancelable (and thus has to @@ -63,7 +62,6 @@ object AssignableCancelableF { /** * Builds an [[AssignableCancelableF]] instance that's already canceled. */ - @nowarn("msg=.*") def alreadyCanceled[F[_]](implicit F: Applicative[F]): Bool[F] = new Bool[F] with Empty[F] { def set(ref: CancelableF[F]): F[Unit] = ref.cancel diff --git a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala index 72063a687..27ebaea52 100644 --- a/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala +++ b/monix-catnap/shared/src/main/scala/monix/catnap/cancelables/BooleanCancelableF.scala @@ -24,7 +24,6 @@ import monix.catnap.CancelableF import monix.catnap.CancelableF.Empty import monix.execution.annotations.UnsafeBecauseImpure import monix.execution.atomic.Atomic -import scala.annotation.nowarn /** * Represents a [[CancelableF]] that can be queried for the @@ -72,7 +71,6 @@ object BooleanCancelableF { * Returns an instance of a [[BooleanCancelableF]] that's * already canceled. */ - @nowarn("msg=.*") def alreadyCanceled[F[_]](implicit F: Applicative[F]): BooleanCancelableF[F] = new BooleanCancelableF[F] with Empty[F] { val isCanceled = F.pure(true) diff --git a/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala b/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala index df827abae..59eae881d 100644 --- a/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala +++ b/monix-catnap/shared/src/test/scala/monix/catnap/CancelableFSuite.scala @@ -61,7 +61,7 @@ object CancelableFSuite extends SimpleTestSuite { test("cancel multiple cancelables") { var effect = 0 val seq = (0 until 100).map(_ => CancelableF.unsafeApply(IO { effect += 1 })) - val col = CancelableF.collection(seq: _*) + val col = CancelableF.collection(seq*) assertEquals(effect, 0) col.cancel.unsafeRunSync() @@ -71,7 +71,7 @@ object CancelableFSuite extends SimpleTestSuite { test("cancel multiple tokens") { var effect = 0 val seq = (0 until 100).map(_ => IO { effect += 1 }) - val cancel = CancelableF.cancelAllTokens(seq: _*) + val cancel = CancelableF.cancelAllTokens(seq*) assertEquals(effect, 0) cancel.unsafeRunSync() diff --git a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala index ecc7c8852..0d26951e1 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Coeval.scala @@ -181,7 +181,6 @@ import scala.util.{ Failure, Success, Try } * it might be better to pass such a reference around as * a parameter. */ -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") sealed abstract class Coeval[+A] extends (() => A) with Serializable { self => import monix.eval.Coeval._ diff --git a/monix-eval/shared/src/main/scala/monix/eval/Task.scala b/monix-eval/shared/src/main/scala/monix/eval/Task.scala index c2d761935..5f4d9065b 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/Task.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/Task.scala @@ -471,8 +471,6 @@ import scala.annotation.unused * it might be better to pass such a reference around as * a parameter. */ -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=unused value of type") sealed abstract class Task[+A] extends Serializable with TaskDeprecated.BinCompat[A] { import cats.effect.Async import monix.eval.Task._ @@ -934,7 +932,13 @@ sealed abstract class Task[+A] extends Serializable with TaskDeprecated.BinCompa def runAsyncUncancelableOpt(cb: Either[Throwable, A] => Unit)(implicit s: Scheduler, opts: Task.Options): Unit = { val opts2 = opts.withSchedulerFeatures Local.bindCurrentIf(opts2.localContextPropagation) { - TaskRunLoop.startLight(this, s, opts2, Callback.fromAttempt(cb), isCancelable = false) + val _ = TaskRunLoop.startLight( + this, + s, + opts2, + Callback.fromAttempt(cb), + isCancelable = false + ) () } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala index 7ae9abb05..647e72c1f 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskApp.scala @@ -60,7 +60,6 @@ import monix.execution.Scheduler * * Works on top of JavaScript as well ;-) */ -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") trait TaskApp { // To implement ... def run(args: List[String]): Task[ExitCode] diff --git a/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala b/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala index f5ecf4667..adf824248 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/TaskLift.scala @@ -43,7 +43,6 @@ trait TaskLift[F[_]] extends (Task ~> F) { def apply[A](task: Task[A]): F[A] } -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") object TaskLift extends TaskLiftImplicits0 { /** * Returns the available [[TaskLift]] instance for `F`. @@ -82,7 +81,6 @@ object TaskLift extends TaskLiftImplicits0 { } } -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") private[eval] abstract class TaskLiftImplicits0 extends TaskLiftImplicits1 { /** * Instance for converting to any type implementing @@ -95,7 +93,6 @@ private[eval] abstract class TaskLiftImplicits0 extends TaskLiftImplicits1 { } } -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") private[eval] abstract class TaskLiftImplicits1 extends TaskLiftImplicits2 { /** * Instance for converting to any type implementing @@ -108,7 +105,6 @@ private[eval] abstract class TaskLiftImplicits1 extends TaskLiftImplicits2 { } } -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") private[eval] abstract class TaskLiftImplicits2 { /** * Instance for converting to any type implementing diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala index c085691fa..f5e6346b9 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalBracket.scala @@ -22,7 +22,6 @@ import cats.effect.ExitCase import monix.execution.internal.Platform import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object CoevalBracket { /** * Implementation for `Coeval.bracketE`. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala index b95f19b55..06cc78a6a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalRunLoop.scala @@ -26,7 +26,6 @@ import monix.eval.internal.TracingPlatform.{ enhancedExceptions, isStackTracing import scala.reflect.NameTransformer import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object CoevalRunLoop { private type Current = Coeval[Any] private type Bind = Any => Coeval[Any] @@ -150,7 +149,7 @@ private[eval] object CoevalRunLoop { val ref = bRest.pop() if (ref eq null) return null - else if (ref.isInstanceOf[StackFrame[_, _]]) + else if (ref.isInstanceOf[StackFrame[?, ?]]) return ref.asInstanceOf[StackFrame[Any, Coeval[Any]]] } // $COVERAGE-OFF$ @@ -161,7 +160,7 @@ private[eval] object CoevalRunLoop { } private def popNextBind(bFirst: Bind, bRest: CallStack): Bind = { - if ((bFirst ne null) && !bFirst.isInstanceOf[StackFrame.ErrorHandler[_, _]]) + if ((bFirst ne null) && !bFirst.isInstanceOf[StackFrame.ErrorHandler[?, ?]]) return bFirst if (bRest eq null) return null @@ -169,7 +168,7 @@ private[eval] object CoevalRunLoop { val next = bRest.pop() if (next eq null) { return null - } else if (!next.isInstanceOf[StackFrame.ErrorHandler[_, _]]) { + } else if (!next.isInstanceOf[StackFrame.ErrorHandler[?, ?]]) { return next } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala index b3517d033..cc5485790 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/CoevalTracing.scala @@ -26,7 +26,6 @@ import monix.eval.tracing.CoevalEvent /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ -@scala.annotation.nowarn private[eval] object CoevalTracing { def decorated[A](source: Coeval[A]): Coeval[A] = Trace(source, buildFrame()) @@ -34,10 +33,10 @@ private[eval] object CoevalTracing { def uncached(): CoevalEvent = buildFrame() - def cached(clazz: Class[_]): CoevalEvent = + def cached(clazz: Class[?]): CoevalEvent = buildCachedFrame(clazz) - private def buildCachedFrame(clazz: Class[_]): CoevalEvent = { + private def buildCachedFrame(clazz: Class[?]): CoevalEvent = { val currentFrame = frameCache.get(clazz) if (currentFrame eq null) { val newFrame = buildFrame() @@ -55,5 +54,5 @@ private[eval] object CoevalTracing { * Global cache for trace frames. Keys are references to lambda classes. * Should converge to the working set of traces very quickly for hot code paths. */ - private val frameCache: ConcurrentHashMap[Class[_], CoevalEvent] = new ConcurrentHashMap() + private val frameCache: ConcurrentHashMap[Class[?], CoevalEvent] = new ConcurrentHashMap() } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala index cb70d0e99..04c7324f7 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForkedRegister.scala @@ -37,15 +37,14 @@ private[eval] abstract class ForkedRegister[A] extends AbstractFunction2[Context def apply(context: Context, cb: Callback[Throwable, A]): Unit } -@scala.annotation.nowarn private[eval] object ForkedRegister { /** * Returns `true` if the given task is known to fork execution, * or `false` otherwise. */ - @tailrec def detect(task: Task[_], limit: Int = 8): Boolean = { + @tailrec def detect(task: Task[?], limit: Int = 8): Boolean = { if (limit > 0) task match { - case Async(_: ForkedRegister[_], _, _, _, _) => true + case Async(_: ForkedRegister[?], _, _, _, _) => true case FlatMap(other, _, _) => detect(other, limit - 1) case Map(other, _, _) => detect(other, limit - 1) case ContextSwitch(other, _, _) => detect(other, limit - 1) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala index 91ba9eb75..5ac2b8836 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/ForwardCancelable.scala @@ -75,8 +75,6 @@ final private[internal] class ForwardCancelable private () { } } -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=unused value of type") private[internal] object ForwardCancelable { /** * Builds reference. @@ -106,7 +104,7 @@ private[internal] object ForwardCancelable { private def execute(token: CancelToken[Task], stack: List[Callback[Throwable, Unit]])(implicit s: Scheduler): Unit = context.execute(() => { - token.runAsync { r => + val _ = token.runAsync { r => for (cb <- stack) try { cb(r) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala index c5615a114..bba5f8d96 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/FrameIndexRef.scala @@ -68,7 +68,6 @@ private[eval] sealed abstract class FrameIndexRef { def reset(): Unit } -@scala.annotation.nowarn private[eval] object FrameIndexRef { /** Builds a [[FrameIndexRef]]. */ def apply(em: ExecutionModel): FrameIndexRef = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala index b85013710..5b99bf957 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/LazyVal.scala @@ -69,7 +69,6 @@ private[eval] final class LazyVal[A] private (f: () => A, val cacheErrors: Boole } } -@scala.annotation.nowarn private[eval] object LazyVal { /** Builder. */ def apply[A](f: () => A, cacheErrors: Boolean): (() => Coeval.Eager[A]) = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala index 1ba1b3137..f85e1279a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/StackFrame.scala @@ -28,7 +28,6 @@ private[eval] abstract class StackFrame[-A, +R] extends (A => R) { self => def recover(e: Throwable): R } -@scala.annotation.nowarn private[eval] object StackFrame { /** [[StackFrame]] used in the implementation of `redeemWith`. */ final class RedeemWith[-A, +R](fe: Throwable => R, fa: A => R) extends StackFrame[A, R] { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala index 8d8eb4931..2356a10ee 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskBracket.scala @@ -27,8 +27,6 @@ import monix.execution.internal.Platform import scala.concurrent.Promise import scala.util.control.NonFatal -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=unused value of type") private[monix] object TaskBracket { // ----------------------------------------------------------------- // Task.guaranteeCase // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -295,7 +293,7 @@ private[monix] object TaskBracket { // ----------------------------------------- private val withConnectionUncancelable: Context => Context = _.withConnection(TaskConnection.uncancelable) private val disableUncancelableAndPop: (Any, Throwable, Context, Context) => Context = (_, _, old, _) => { - old.connection.pop() + val _ = old.connection.pop() old } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala index 9fc74060d..df93b60eb 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCancellation.scala @@ -24,7 +24,6 @@ import monix.execution.{ Callback, Scheduler } import monix.execution.atomic.{ Atomic, AtomicBoolean } import monix.execution.schedulers.TrampolinedRunnable -@scala.annotation.nowarn private[eval] object TaskCancellation { /** * Implementation for `Task.uncancelable`. @@ -72,14 +71,14 @@ private[eval] object TaskCancellation { def onSuccess(value: A): Unit = if (waitsForResult.getAndSet(false)) { - conn.pop() + val _ = conn.pop() this.value = value s.execute(this) } def onError(e: Throwable): Unit = if (waitsForResult.getAndSet(false)) { - conn.pop() + val _ = conn.pop() this.error = e s.execute(this) } else { @@ -94,11 +93,10 @@ private[eval] object TaskCancellation { cb: Callback[Throwable, A], e: Throwable ): CancelToken[Task] = { - Task.suspend { if (waitsForResult.getAndSet(false)) conn2.cancel.map { _ => - conn.tryReactivate() + val _ = conn.tryReactivate() cb.onError(e) } else diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala index 36f809620..0a0d0fd97 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnection.scala @@ -117,7 +117,6 @@ private[eval] sealed abstract class TaskConnection extends CancelableF[Task] { def toCancelable(implicit s: Scheduler): Cancelable } -@scala.annotation.nowarn private[eval] object TaskConnection { /** Builder for [[TaskConnection]]. */ def apply(): TaskConnection = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala index d493cd028..bfcdcfc0d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionComposite.scala @@ -143,13 +143,12 @@ private[eval] final class TaskConnectionComposite private (stateRef: AtomicAny[S } } -@scala.annotation.nowarn private[eval] object TaskConnectionComposite { /** * Builder for [[TaskConnectionComposite]]. */ def apply(initial: CancelToken[Task]*): TaskConnectionComposite = - new TaskConnectionComposite(Atomic.withPadding(Active(Set(initial: _*)): State, LeftRight128)) + new TaskConnectionComposite(Atomic.withPadding(Active(Set(initial*)): State, LeftRight128)) private sealed abstract class State private final case class Active(set: Set[AnyRef /* CancelToken[Task] | CancelableF[Task] | Cancelable */ ]) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala index a5367345c..4487e2b34 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConnectionRef.scala @@ -95,7 +95,6 @@ private[eval] final class TaskConnectionRef extends CancelableF[Task] { private val state = Atomic(Empty: State) } -@scala.annotation.nowarn private[eval] object TaskConnectionRef { /** * Returns a new `TaskForwardConnection` reference. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala index a1746f152..e59d21677 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskConversions.scala @@ -28,7 +28,6 @@ import monix.execution.rstreams.SingleAssignSubscription import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object TaskConversions { /** * Implementation for `Task#toIO`. @@ -185,7 +184,9 @@ private[eval] object TaskConversions { def run(): Unit = { if (canCall) { canCall = false - if (conn ne null) conn.pop() + if (conn ne null) { + val _ = conn.pop() + } cb(value) value = null } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala index d9cccd236..fd6feb770 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala @@ -30,7 +30,6 @@ import monix.execution.{ Callback, Cancelable, Scheduler, UncaughtExceptionRepor import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object TaskCreate { /** * Implementation for `cats.effect.Concurrent#cancelable`. @@ -167,7 +166,7 @@ private[eval] object TaskCreate { } } - private final class ForwardErrorCallback(cb: Callback[Throwable, _])(implicit r: UncaughtExceptionReporter) + private final class ForwardErrorCallback(cb: Callback[Throwable, ?])(implicit r: UncaughtExceptionReporter) extends Callback[Throwable, Unit] { override def onSuccess(value: Unit): Unit = () @@ -220,7 +219,9 @@ private[eval] object TaskCreate { private def startExecution(): Unit = { // Cleanup of the current finalizer - if (shouldPop) ctx.connection.pop() + if (shouldPop) { + val _ = ctx.connection.pop() + } // Optimization — if the callback was called on the same thread // where it was created, then we are not going to fork // This is not safe to do when localContextPropagation enabled diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala index a70bb01a8..1b9650299 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala @@ -23,7 +23,6 @@ import monix.eval.Task.Context import monix.execution.Scheduler import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object TaskDeferAction { /** Implementation for `Task.deferAction`. */ def apply[A](f: Scheduler => Task[A]): Task[A] = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala index 3c7e419a1..f807c47b3 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeprecated.scala @@ -27,7 +27,6 @@ import monix.execution.{ Callback, Cancelable, CancelableFuture, Scheduler } import scala.annotation.unchecked.uncheckedVariance import scala.util.{ Failure, Success, Try } -@scala.annotation.nowarn private[eval] object TaskDeprecated { /** * BinCompat trait describing deprecated `Task` operations. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala index 60fca9b25..9107f97e6 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskDoOnCancel.scala @@ -23,7 +23,6 @@ import monix.eval.Task import monix.execution.exceptions.CallbackCalledMultipleTimesException import monix.execution.schedulers.TrampolinedRunnable -@scala.annotation.nowarn private[eval] object TaskDoOnCancel { /** * Implementation for `Task.doOnCancel` @@ -61,7 +60,7 @@ private[eval] object TaskDoOnCancel { override def tryOnSuccess(value: A): Boolean = { if (isActive) { isActive = false - ctx.connection.pop() + val _ = ctx.connection.pop() this.value = value ctx.scheduler.execute(this) true @@ -73,7 +72,7 @@ private[eval] object TaskDoOnCancel { override def tryOnError(e: Throwable): Boolean = { if (isActive) { isActive = false - ctx.connection.pop() + val _ = ctx.connection.pop() this.error = e ctx.scheduler.execute(this) true diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala index 4432bcf13..0e4bbd1e4 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEffect.scala @@ -29,7 +29,6 @@ import scala.util.control.NonFatal * `Task` integration utilities for the `cats.effect.ConcurrentEffect` * instance, provided in `monix.eval.instances`. */ -@scala.annotation.nowarn private[eval] object TaskEffect { /** * `cats.effect.Effect#runAsync` @@ -39,7 +38,7 @@ private[eval] object TaskEffect { s: Scheduler, opts: Task.Options ): SyncIO[Unit] = SyncIO { - execute(fa, cb) + val _ = execute(fa, cb) () } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala index 0cec68d31..7fc25b950 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskEvalAsync.scala @@ -21,7 +21,6 @@ import monix.execution.Callback import monix.eval.Task import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object TaskEvalAsync { /** * Implementation for `Task.evalAsync`. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala index 0989c4afc..5985cd7b7 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteOn.scala @@ -23,7 +23,6 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.Scheduler -@scala.annotation.nowarn private[eval] object TaskExecuteOn { /** * Implementation for `Task.executeOn`. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala index b4622b57e..d958bbce1 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithModel.scala @@ -23,7 +23,6 @@ import monix.eval.Task.{ Async, Context } import monix.execution.ExecutionModel import monix.execution.ExecutionModel.{ AlwaysAsyncExecution, BatchedExecution, SynchronousExecution } -@scala.annotation.nowarn private[eval] object TaskExecuteWithModel { /** * Implementation for `Task.executeWithModel` diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala index 4e6d3d37a..8dbfdbc12 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskExecuteWithOptions.scala @@ -20,7 +20,6 @@ package monix.eval.internal import monix.eval.Task import monix.eval.Task.{ Context, ContextSwitch, Options } -@scala.annotation.nowarn private[eval] object TaskExecuteWithOptions { /** * Implementation for `Task.executeWithOptions` diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala index 7644576f5..bc08ef6da 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskFromFuture.scala @@ -26,7 +26,6 @@ import monix.execution.schedulers.TrampolinedRunnable import scala.concurrent.{ ExecutionContext, Future } import scala.util.Try -@scala.annotation.nowarn private[eval] object TaskFromFuture { /** Implementation for `Task.fromFuture`. */ def strict[A](f: Future[A]): Task[A] = { @@ -78,7 +77,7 @@ private[eval] object TaskFromFuture { val start: Start[A] = (ctx, cb) => { implicit val ec = ctx.scheduler if (p.isCompleted) { - p.subscribe(trampolinedCB(cb, null)) + val _ = p.subscribe(trampolinedCB(cb, null)) () } else { val conn = ctx.connection @@ -128,7 +127,7 @@ private[eval] object TaskFromFuture { conn.push(c)(ctx.scheduler) // Async boundary f.onComplete { result => - conn.pop() + val _ = conn.pop() cb(result) }(ctx.scheduler) } @@ -147,7 +146,9 @@ private[eval] object TaskFromFuture { } def run(): Unit = { - if (conn ne null) conn.pop() + if (conn ne null) { + val _ = conn.pop() + } val v = value value = null cb(v) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala index 5d17838bd..c829106d5 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMapBoth.scala @@ -28,7 +28,6 @@ import monix.execution.internal.exceptions.matchError import scala.annotation.tailrec import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object TaskMapBoth { /** * Implementation for `Task.mapBoth`. @@ -56,13 +55,13 @@ private[eval] object TaskMapBoth { try { val r = f(a1, a2) streamErrors = false - mainConn.pop() + val _ = mainConn.pop() cb.onSuccess(r) } catch { case NonFatal(ex) if streamErrors => // Both tasks completed by this point, so we don't need // to worry about the `state` being a `Stop` - mainConn.pop() + val _ = mainConn.pop() cb.onError(ex) } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala index a3a5d014e..6bbd11aaa 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskMemoize.scala @@ -28,7 +28,6 @@ import scala.annotation.tailrec import scala.concurrent.{ ExecutionContext, Promise } import scala.util.{ Failure, Success, Try } -@scala.annotation.nowarn private[eval] object TaskMemoize { /** * Implementation for `.memoize` and `.memoizeOnSuccess`. @@ -93,7 +92,7 @@ private[eval] object TaskMemoize { // Resetting the state to `null` will trigger the // execution again on next `runAsync` if (state.compareAndSet(p, null)) { - p.tryComplete(value) + val _ = p.tryComplete(value) () } else { // Race condition, retry diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala index 3bf254e84..280f8ed84 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequence.scala @@ -26,7 +26,6 @@ import scala.util.control.NonFatal import scala.collection.mutable import scala.collection.mutable.ListBuffer -@scala.annotation.nowarn private[eval] object TaskParSequence { /** * Implementation for [[Task.parSequence]] @@ -70,7 +69,7 @@ private[eval] object TaskParSequence { completed += 1 if (completed >= tasksCount) { isActive = false - mainConn.pop() + val _ = mainConn.pop() val builder = makeBuilder() var idx = 0 diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala index 5705c10d7..ea0e6c056 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceN.scala @@ -23,7 +23,6 @@ import monix.catnap.ConcurrentQueue import monix.eval.Task import monix.execution.{ BufferCapacity, ChannelType } -@scala.annotation.nowarn private[eval] object TaskParSequenceN { /** * Implementation for [[Task.parSequenceN]] diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala index bc1feee10..473d06a8a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskParSequenceUnordered.scala @@ -30,7 +30,6 @@ import scala.util.control.NonFatal import scala.annotation.tailrec import scala.collection.mutable.ListBuffer -@scala.annotation.nowarn private[eval] object TaskParSequenceUnordered { /** * Implementation for [[Task.parSequenceUnordered]] @@ -61,7 +60,7 @@ private[eval] object TaskParSequenceUnordered { currentState match { case State.Active(list, 0) => ref.lazySet(State.Complete) - mainConn.pop() + val _ = mainConn.pop() if (list ne Nil) finalCallback.onSuccess(list) else { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala index be1f45363..8b0f5a069 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRace.scala @@ -21,7 +21,6 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.atomic.Atomic -@scala.annotation.nowarn private[eval] object TaskRace { /** * Implementation for `Task.race`. @@ -60,7 +59,7 @@ private[eval] object TaskRace { def onSuccess(valueA: A): Unit = if (isActive.getAndSet(false)) { connB.cancel.map { _ => - conn.pop() + val _ = conn.pop() cb.onSuccess(Left(valueA)) }.runAsyncAndForget } @@ -68,7 +67,7 @@ private[eval] object TaskRace { def onError(ex: Throwable): Unit = if (isActive.getAndSet(false)) { connB.cancel.map { _ => - conn.pop() + val _ = conn.pop() cb.onError(ex) }.runAsyncAndForget } else { @@ -85,7 +84,7 @@ private[eval] object TaskRace { def onSuccess(valueB: B): Unit = if (isActive.getAndSet(false)) { connA.cancel.map { _ => - conn.pop() + val _ = conn.pop() cb.onSuccess(Right(valueB)) }.runAsyncAndForget } @@ -93,7 +92,7 @@ private[eval] object TaskRace { def onError(ex: Throwable): Unit = if (isActive.getAndSet(false)) { connA.cancel.map { _ => - conn.pop() + val _ = conn.pop() cb.onError(ex) }.runAsyncAndForget } else { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala index 3a7c7a456..9ab0b091d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRaceList.scala @@ -23,7 +23,6 @@ import monix.execution.Callback import monix.eval.Task import monix.execution.atomic.{ Atomic, PaddingStrategy } -@scala.annotation.nowarn private[eval] object TaskRaceList { /** * Implementation for `Task.raceList` @@ -45,7 +44,7 @@ private[eval] object TaskRaceList { val isActive = Atomic.withPadding(true, PaddingStrategy.LeftRight128) val taskArray = tasks.toArray val cancelableArray = buildCancelableArray(taskArray.length) - conn.pushConnections(cancelableArray.toIndexedSeq: _*) + conn.pushConnections(cancelableArray.toIndexedSeq*) var index = 0 while (index < taskArray.length) { @@ -59,12 +58,12 @@ private[eval] object TaskRaceList { taskContext, new Callback[Throwable, A] { private def popAndCancelRest(): CancelToken[Task] = { - conn.pop() + val _ = conn.pop() val arr2 = cancelableArray.collect { case cc if cc ne taskCancelable => cc.cancel } - CancelableF.cancelAllTokens[Task](arr2.toIndexedSeq: _*) + CancelableF.cancelAllTokens[Task](arr2.toIndexedSeq*) } def onSuccess(value: A): Unit = diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala index c1cf64f16..1c8fbd477 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRacePair.scala @@ -23,7 +23,6 @@ import monix.execution.atomic.Atomic import scala.concurrent.Promise -@scala.annotation.nowarn private[eval] object TaskRacePair { // Type aliasing the result only b/c it's a mouthful type RaceEither[A, B] = Either[(A, Fiber[B]), (Fiber[A], B)] @@ -67,7 +66,7 @@ private[eval] object TaskRacePair { // Type aliasing the result only b/c it's a def onSuccess(valueA: A): Unit = if (isActive.getAndSet(false)) { val fiberB = Fiber(TaskFromFuture.strict(pb.future), connB.cancel) - conn.pop() + val _ = conn.pop() cb.onSuccess(Left((valueA, fiberB))) } else { pa.success(valueA) @@ -77,7 +76,7 @@ private[eval] object TaskRacePair { // Type aliasing the result only b/c it's a def onError(ex: Throwable): Unit = if (isActive.getAndSet(false)) { connB.cancel.map { _ => - conn.pop() + val _ = conn.pop() cb.onError(ex) }.runAsyncAndForget } else { @@ -95,7 +94,7 @@ private[eval] object TaskRacePair { // Type aliasing the result only b/c it's a def onSuccess(valueB: B): Unit = if (isActive.getAndSet(false)) { val fiberA = Fiber(TaskFromFuture.strict(pa.future), connA.cancel) - conn.pop() + val _ = conn.pop() cb.onSuccess(Right((fiberA, valueB))) } else { pb.success(valueB) @@ -105,7 +104,7 @@ private[eval] object TaskRacePair { // Type aliasing the result only b/c it's a def onError(ex: Throwable): Unit = if (isActive.getAndSet(false)) { connA.cancel.map { _ => - conn.pop() + val _ = conn.pop() cb.onError(ex) }.runAsyncAndForget } else { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala index 64c5f178d..07443ba3a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRestartCallback.scala @@ -91,8 +91,7 @@ private[internal] abstract class TaskRestartCallback(contextInit: Context, callb // $COVERAGE-ON$ } - @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") - protected def prepareStart(@unused task: Task.Async[_]): Unit = () + protected def prepareStart(@unused task: Task.Async[?]): Unit = () protected def prepareCallback: Callback[Throwable, Any] = callback private val wrappedCallback = prepareCallback @@ -131,8 +130,6 @@ private[internal] abstract class TaskRestartCallback(contextInit: Context, callb } } -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=unused value of type") private[internal] object TaskRestartCallback { /** Builder for [[TaskRestartCallback]], returning a specific instance * optimized for the passed in `Task.Options`. @@ -155,8 +152,7 @@ private[internal] object TaskRestartCallback { private var preparedLocals: Local.Context = null.asInstanceOf[Local.Context] private var previousLocals: Local.Context = null.asInstanceOf[Local.Context] - @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") - override protected def prepareStart(task: Task.Async[_]): Unit = { + override protected def prepareStart(task: Task.Async[?]): Unit = { preparedLocals = if (task.restoreLocals) Local.getContext() else null } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala index 46782ffde..54f28df9f 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunLoop.scala @@ -31,7 +31,6 @@ import monix.eval.tracing.{ TaskEvent, TaskTrace } import scala.reflect.NameTransformer -@scala.annotation.nowarn private[eval] object TaskRunLoop { type Current = Task[Any] type Bind = Any => Task[Any] @@ -842,7 +841,7 @@ private[eval] object TaskRunLoop { val ref = bRest.pop() if (ref eq null) return null - else if (ref.isInstanceOf[StackFrame[_, _]]) + else if (ref.isInstanceOf[StackFrame[?, ?]]) return ref.asInstanceOf[StackFrame[Any, Task[Any]]] } // $COVERAGE-OFF$ @@ -853,7 +852,7 @@ private[eval] object TaskRunLoop { } private[internal] def popNextBind(bFirst: Bind, bRest: CallStack): Bind = { - if ((bFirst ne null) && !bFirst.isInstanceOf[StackFrame.ErrorHandler[_, _]]) + if ((bFirst ne null) && !bFirst.isInstanceOf[StackFrame.ErrorHandler[?, ?]]) return bFirst if (bRest eq null) return null @@ -861,7 +860,7 @@ private[eval] object TaskRunLoop { val next = bRest.pop() if (next eq null) { return null - } else if (!next.isInstanceOf[StackFrame.ErrorHandler[_, _]]) { + } else if (!next.isInstanceOf[StackFrame.ErrorHandler[?, ?]]) { return next } } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala index 3bb5bfbb8..04b9759c2 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskRunToFutureWithLocal.scala @@ -29,7 +29,6 @@ import monix.execution.{ Callback, CancelableFuture, Scheduler } import scala.concurrent.Promise import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object TaskRunToFutureWithLocal { /** A run-loop that attempts to complete a `CancelableFuture` * synchronously falling back to [[startFull]] and actual diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala index c2bb59e65..1ac181261 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSequence.scala @@ -22,7 +22,6 @@ import monix.execution.compat.BuildFrom import monix.execution.compat.internal._ import scala.collection.mutable -@scala.annotation.nowarn private[eval] object TaskSequence { /** Implementation for `Task.sequence`. */ def list[A, M[X] <: Iterable[X]](in: M[Task[A]])(implicit bf: BuildFrom[M[Task[A]], A, M[A]]): Task[M[A]] = { diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala index 4bd07674d..5f62e745c 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskShift.scala @@ -24,7 +24,6 @@ import monix.execution.schedulers.TracingScheduler import monix.execution.{ Callback, Scheduler } import scala.concurrent.ExecutionContext -@scala.annotation.nowarn private[eval] object TaskShift { /** * Implementation for `Task.shift` diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala index 8f06c305b..331b036eb 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskSleep.scala @@ -25,7 +25,6 @@ import monix.eval.Task import scala.concurrent.duration.Duration -@scala.annotation.nowarn private[eval] object TaskSleep { /** Implementation for `Task.sleep`. */ def apply(timespan: Duration): Task[Unit] = @@ -66,7 +65,7 @@ private[eval] object TaskSleep { // a full async boundary! private final class SleepRunnable(ctx: Context, cb: Callback[Throwable, Unit]) extends Runnable { def run(): Unit = { - ctx.connection.pop() + val _ = ctx.connection.pop() // We had an async boundary, as we must reset the frame ctx.frameRef.reset() cb.onSuccess(()) diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala index 0c1fabbda..92c964a9e 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStart.scala @@ -21,7 +21,6 @@ package internal import monix.eval.Task.{ Async, Context } import monix.execution.{ Callback, CancelablePromise } -@scala.annotation.nowarn private[eval] object TaskStart { /** * Implementation for `Task.fork`. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala index a4d1420d5..1e516dcd9 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskStartAndForget.scala @@ -21,7 +21,6 @@ package internal import monix.execution.Callback import monix.eval.Task.Context -@scala.annotation.nowarn private[eval] object TaskStartAndForget { /** * Implementation for `Task.startAndForget`. diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala index 07a5f34de..800d1221a 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskToReactivePublisher.scala @@ -22,14 +22,13 @@ import monix.execution.rstreams.Subscription import monix.execution.{ Callback, Scheduler, UncaughtExceptionReporter } import org.reactivestreams.Subscriber -@scala.annotation.nowarn private[eval] object TaskToReactivePublisher { /** * Implementation for `Task.toReactivePublisher` */ def apply[A](self: Task[A])(implicit s: Scheduler): org.reactivestreams.Publisher[A] = new org.reactivestreams.Publisher[A] { - def subscribe(out: Subscriber[_ >: A]): Unit = { + def subscribe(out: Subscriber[? >: A]): Unit = { out.onSubscribe(new Subscription { private var isActive = true private val conn = TaskConnection() @@ -50,7 +49,7 @@ private[eval] object TaskToReactivePublisher { } } - private final class PublisherCallback[A](out: Subscriber[_ >: A])(implicit s: UncaughtExceptionReporter) + private final class PublisherCallback[A](out: Subscriber[? >: A])(implicit s: UncaughtExceptionReporter) extends Callback[Throwable, A] { private var isActive = true diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala index d0f0afcb8..4ed9d721f 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TaskTracing.scala @@ -26,7 +26,6 @@ import monix.eval.tracing.TaskEvent /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ -@scala.annotation.nowarn private[eval] object TaskTracing { def decorated[A](source: Task[A]): Task[A] = Trace(source, buildFrame()) @@ -34,10 +33,10 @@ private[eval] object TaskTracing { def uncached(): TaskEvent = buildFrame() - def cached(clazz: Class[_]): TaskEvent = + def cached(clazz: Class[?]): TaskEvent = buildCachedFrame(clazz) - private def buildCachedFrame(clazz: Class[_]): TaskEvent = { + private def buildCachedFrame(clazz: Class[?]): TaskEvent = { val currentFrame = frameCache.get(clazz) if (currentFrame eq null) { val newFrame = buildFrame() @@ -55,5 +54,5 @@ private[eval] object TaskTracing { * Global cache for trace frames. Keys are references to lambda classes. * Should converge to the working set of traces very quickly for hot code paths. */ - private val frameCache: ConcurrentHashMap[Class[_], TaskEvent] = new ConcurrentHashMap() + private val frameCache: ConcurrentHashMap[Class[?], TaskEvent] = new ConcurrentHashMap() } diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala index 13e185882..a693764d8 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/TracedAsync.scala @@ -24,7 +24,6 @@ import monix.execution.Callback /** * All Credits to https://github.com/typelevel/cats-effect and https://github.com/RaasAhsan */ -@scala.annotation.nowarn private[eval] object TracedAsync { // Convenience function for internal Async calls that intend // to opt into tracing so the following code isn't repeated. def apply[A]( diff --git a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala index 5759c7efd..c144e7b6d 100644 --- a/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala +++ b/monix-eval/shared/src/main/scala/monix/eval/internal/UnsafeCancelUtils.scala @@ -26,7 +26,6 @@ import monix.execution.internal.Platform import scala.collection.mutable.ListBuffer import scala.util.control.NonFatal -@scala.annotation.nowarn private[eval] object UnsafeCancelUtils { /** * Internal API. @@ -151,7 +150,7 @@ private[eval] object UnsafeCancelUtils { case Nil => Task.unit case first :: rest => - Task.raiseError(Platform.composeErrors(first, rest: _*)) + Task.raiseError(Platform.composeErrors(first, rest*)) } } } diff --git a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala index cc05f55f2..e0fc6d2c0 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/CoevalSequenceSuite.scala @@ -39,7 +39,7 @@ object CoevalSequenceSuite extends BaseTestSuite { test("Coeval.zipList") { _ => check1 { (numbers: List[Int]) => - val coeval = Coeval.zipList(numbers.map(x => Coeval(x)): _*) + val coeval = Coeval.zipList(numbers.map(x => Coeval(x))*) coeval <-> Coeval(numbers) } } diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala index 7d73cd4dd..c4b73cd75 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConnectionSuite.scala @@ -209,7 +209,7 @@ object TaskConnectionSuite extends BaseTestSuite { val tasks = (0 until count).map(_ => Task { effect += 1 }) val sc = TaskConnection() - sc.pushConnections(connections1: _*) + sc.pushConnections(connections1*) for (bc <- cancelables) sc.push(bc) for (tk <- tasks) sc.push(tk) for (cn <- connections2) sc.push(cn) @@ -243,7 +243,7 @@ object TaskConnectionSuite extends BaseTestSuite { for (r <- connections2) assert(!r.isCanceled, "r.isCanceled") assertEquals(effect, 0) - sc.pushConnections(connections1: _*) + sc.pushConnections(connections1*) for (bc <- cancelables) sc.push(bc) for (tk <- tasks) sc.push(tk) for (cn <- connections2) sc.push(cn) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala index 85864eb7b..6bef8111d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala @@ -386,7 +386,7 @@ object TaskConversionsSuite extends BaseTestSuite { val dummy = DummyException("dummy") val pub = new Publisher[Int] { - def subscribe(s: Subscriber[_ >: Int]): Unit = { + def subscribe(s: Subscriber[? >: Int]): Unit = { s.onSubscribe(new Subscription { def request(n: Long): Unit = throw dummy def cancel(): Unit = throw dummy @@ -399,7 +399,7 @@ object TaskConversionsSuite extends BaseTestSuite { test("Task.fromReactivePublisher yields expected input") { implicit s => val pub = new Publisher[Int] { - def subscribe(s: Subscriber[_ >: Int]): Unit = { + def subscribe(s: Subscriber[? >: Int]): Unit = { s.onSubscribe(new Subscription { var isActive = true def request(n: Long): Unit = { diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala index 862437e57..33ef8cc22 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskFromEitherSuite.scala @@ -28,7 +28,7 @@ import scala.util.{ Failure, Success } object TaskFromEitherSuite extends BaseTestSuite { test("Task.fromEither (`E <: Throwable` version) should returns a Now with a Right") { _ => val t = Task.fromEither(Right(10)) - assert(t.isInstanceOf[Now[_]]) + assert(t.isInstanceOf[Now[?]]) } test("Task.fromEither (`E <: Throwable` version) should succeed with a Right") { implicit s => @@ -40,7 +40,7 @@ object TaskFromEitherSuite extends BaseTestSuite { test("Task.fromEither (`E <: Throwable` version) should returns an Error with a Left") { _ => val dummy = DummyException("dummy") val t = Task.fromEither(Left(dummy)) - assert(t.isInstanceOf[Error[_]]) + assert(t.isInstanceOf[Error[?]]) } test("Task.fromEither (`E <: Throwable` version) should fail with a Left") { implicit s => @@ -66,7 +66,7 @@ object TaskFromEitherSuite extends BaseTestSuite { test("Task.fromEither (free `E` version) should returns a Now with a Right") { _ => val t = Task.fromEither(DummyException(_))(Right(10)) - assert(t.isInstanceOf[Now[_]]) + assert(t.isInstanceOf[Now[?]]) } test("Task.fromEither (free `E` version) should succeed with a Right") { implicit s => @@ -77,7 +77,7 @@ object TaskFromEitherSuite extends BaseTestSuite { test("Task.fromEither (free `E` version) should returns an Error with a Left") { _ => val t = Task.fromEither(DummyException(_))(Left("dummy")) - assert(t.isInstanceOf[Error[_]]) + assert(t.isInstanceOf[Error[?]]) } test("Task.fromEither (free `E` version) should fail with a Left") { implicit s => diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala index 05073acda..832f8763d 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskLocalSuite.scala @@ -277,7 +277,7 @@ object TaskLocalSuite extends SimpleTestSuite { l: TaskLocal[String], ch: ConcurrentChannel[Task, Unit, Int] ) { - private[this] def produceLoop(n: Int): Task[Unit] = if (n == 0) Task.unit + private def produceLoop(n: Int): Task[Unit] = if (n == 0) Task.unit else ch.push(n) >> l.read.flatMap { s => Task(assertEquals(s, "producer")) diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala index 73f1bd30c..af40bece1 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParSequenceUnorderedSuite.scala @@ -102,7 +102,7 @@ object TaskParSequenceUnorderedSuite extends BaseTestSuite { def fold[A, B](ta: Task[ListBuffer[A]], tb: Task[A]): Task[ListBuffer[A]] = Task.parSequenceUnordered(List(ta, tb)).map { case a :: b :: Nil => - val (accR, valueR) = if (a.isInstanceOf[ListBuffer[_]]) (a, b) else (b, a) + val (accR, valueR) = if (a.isInstanceOf[ListBuffer[?]]) (a, b) else (b, a) val acc = accR.asInstanceOf[ListBuffer[A]] val value = valueR.asInstanceOf[A] acc += value diff --git a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala index c7b235109..1a9702f3c 100644 --- a/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala +++ b/monix-eval/shared/src/test/scala/monix/eval/TaskParTraverseUnorderedSuite.scala @@ -107,7 +107,7 @@ object TaskParTraverseUnorderedSuite extends BaseTestSuite { } }.map { case a :: b :: Nil => - val (accR, valueR) = if (a.isInstanceOf[ListBuffer[_]]) (a, b) else (b, a) + val (accR, valueR) = if (a.isInstanceOf[ListBuffer[?]]) (a, b) else (b, a) val acc = accR.asInstanceOf[ListBuffer[A]] val value = valueR.asInstanceOf[A] acc += value diff --git a/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/HygieneUtilMacros.scala b/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/HygieneUtilMacros.scala index 31f2c2904..1e444a13d 100644 --- a/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/HygieneUtilMacros.scala +++ b/monix-execution/atomic/shared/src/main/scala-2/monix/execution/internal/HygieneUtilMacros.scala @@ -35,7 +35,7 @@ private[atomic] trait HygieneUtilMacros { /** Returns true if the given expressions are either * stable symbols or clean functions, false otherwise. */ - def isClean(es: c.Expr[_]*): Boolean = + def isClean(es: c.Expr[?]*): Boolean = es.forall { _.tree match { case t @ Ident(_: TermName) if t.symbol.asTerm.isStable => true diff --git a/monix-execution/atomic/shared/src/test/scala-2/monix/execution/atomic/internal/InlineMacrosTest.scala b/monix-execution/atomic/shared/src/test/scala-2/monix/execution/atomic/internal/InlineMacrosTest.scala index 3b2779dfd..47cb9f0d1 100644 --- a/monix-execution/atomic/shared/src/test/scala-2/monix/execution/atomic/internal/InlineMacrosTest.scala +++ b/monix-execution/atomic/shared/src/test/scala-2/monix/execution/atomic/internal/InlineMacrosTest.scala @@ -92,7 +92,7 @@ object InlineMacrosTest extends SimpleTestSuite { val box = TestBox(1) val mapped = box.map { def incr = 1 - x: Int => x + incr + (x: Int) => x + incr } assertEquals(mapped, TestBox(2)) diff --git a/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala b/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala index 509d0d879..e34704734 100644 --- a/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala +++ b/monix-execution/js/src/main/scala/org/reactivestreams/Publisher.scala @@ -17,8 +17,6 @@ package org.reactivestreams -import scala.annotation.nowarn - /** * Mirrors the `Publisher` interface from the * [[http://www.reactive-streams.org/ Reactive Streams]] project. @@ -45,6 +43,5 @@ trait Publisher[T] extends Any { * @param subscriber the [[Subscriber]] that will consume signals * from this [[Publisher]] */ - @nowarn("msg=.*") - def subscribe(subscriber: Subscriber[_ >: T]): Unit + def subscribe(subscriber: Subscriber[? >: T]): Unit } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala index 11815aadd..cf54ca967 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/cancelables/ChainedCancelable.scala @@ -107,7 +107,7 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext state.getAndSet(Canceled) match { case null | Canceled => () case ref: Cancelable => ref.cancel() - case wr: WeakReference[_] => + case wr: WeakReference[?] => val cc = wr.get.asInstanceOf[CC] if (cc != null) cc.cancel() case other => @@ -125,7 +125,7 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext case Canceled => value.cancel() return - case wr: WeakReference[_] => + case wr: WeakReference[?] => val cc = wr.get.asInstanceOf[CC] if (cc != null) cc.update(value) return @@ -178,7 +178,7 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext // Short-circuit if we discover a cycle if (cursor eq this) return cursor.state.get() match { - case ref2: WeakReference[_] => + case ref2: WeakReference[?] => cursor = ref2.get.asInstanceOf[CC] if (cursor eq null) { cursor = null @@ -202,7 +202,7 @@ final class ChainedCancelable private (private val state: AtomicAny[AnyRef]) ext case null => () case Canceled => cancel() case _: IsDummy => () - case w: WeakReference[_] => + case w: WeakReference[?] => val cc = w.get if (cc != null) cc.asInstanceOf[CC].update(newRoot) case prev: Cancelable => diff --git a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala index a34168216..077d13e08 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/FutureUtilsJVMSuite.scala @@ -23,7 +23,6 @@ import java.util.concurrent.atomic.AtomicLong import minitest.TestSuite import monix.execution.FutureUtils.extensions._ import monix.execution.schedulers.TestScheduler -import scala.annotation.nowarn import scala.concurrent.Future import scala.concurrent.duration._ @@ -48,7 +47,6 @@ object FutureUtilsJVMSuite extends TestSuite[TestScheduler] { val originalTimeout = 50.millis - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def runFuture(timeout: FiniteDuration): Future[Unit] = { total.incrementAndGet() diff --git a/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala b/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala index a3c3957a0..0fe1c34c0 100644 --- a/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala +++ b/monix-execution/shared/src/main/scala-2/monix/execution/misc/Local.scala @@ -59,7 +59,7 @@ object Local extends LocalCompanionDeprecated { def newContext(): Context = new Unbound(AtomicAny(Map())) /** Current [[Context]] kept in a `ThreadLocal`. */ - private[this] val localContext: ThreadLocal[Context] = + private val localContext: ThreadLocal[Context] = ThreadLocal(newContext()) /** Return the state of the current Local state. */ @@ -122,7 +122,7 @@ object Local extends LocalCompanionDeprecated { localContext.get().set(key, null, isPresent = false) } - private def restoreKey(key: Key, value: Option[_]): Unit = + private def restoreKey(key: Key, value: Option[?]): Unit = value match { case None => clearKey(key) case Some(v) => saveKey(key, v) diff --git a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala index 56c5b72f5..4cccb87dc 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Ack.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Ack.scala @@ -19,7 +19,6 @@ package monix.execution import scala.util.control.NonFatal import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.annotation.nowarn import scala.concurrent.duration.Duration import scala.concurrent.{ CanAwait, ExecutionContext, Future, Promise } import scala.util.{ Failure, Success, Try } @@ -104,7 +103,6 @@ object Ack { * Use with great care as an optimization. Don't use * it in tail-recursive loops! */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") implicit class AckExtensions[Self <: Future[Ack]](val source: Self) extends AnyVal { /** Returns `true` if self is a direct reference to * `Continue` or `Stop`, `false` otherwise. diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index 306a88441..4cf70a712 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -22,7 +22,6 @@ import monix.execution.schedulers.{ TrampolineExecutionContext, TrampolinedRunna import scala.concurrent.{ ExecutionContext, Promise } import scala.util.control.NonFatal import scala.util.{ Failure, Success, Try } -import scala.annotation.nowarn /** Represents a callback that should be called asynchronously * with the result of a computation. @@ -335,11 +334,9 @@ object Callback { private[monix] def signalErrorTrampolined[E, A](cb: Callback[E, A], e: E): Unit = TrampolineExecutionContext.immediate.execute(() => cb.onError(e)) - @nowarn("msg=Implicit parameters should be provided with a `using` clause") private final class AsyncFork[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) - @nowarn("msg=Implicit parameters should be provided with a `using` clause") private final class TrampolinedCallback[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) with TrampolinedRunnable diff --git a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala index 3f26e3ad3..6c783af72 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/CancelableFuture.scala @@ -23,7 +23,6 @@ import monix.execution.cancelables.{ ChainedCancelable, SingleAssignCancelable } import monix.execution.misc.Local import monix.execution.schedulers.TrampolinedRunnable import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.annotation.nowarn import scala.concurrent._ import scala.concurrent.duration.Duration import scala.reflect.ClassTag @@ -173,7 +172,7 @@ sealed abstract class CancelableFuture[+A] extends Future[A] with Cancelable { s // future, in which case we need to chain the cancelable // reference in order to not create a memory leak nextRef match { - case ref: CancelableFuture[_] if ref ne Never => + case ref: CancelableFuture[?] if ref ne Never => val cf = ref.asInstanceOf[CancelableFuture[S]] // If the resulting Future is completed, there's no reason // to chain cancelable tokens @@ -372,7 +371,6 @@ object CancelableFuture extends internal.CancelableFutureForPlatform { } /** An actual [[CancelableFuture]] implementation; internal. */ - @nowarn("msg=Implicit parameters should be provided with a `using` clause") private[execution] final case class Async[+A]( underlying: Future[A], cancelable: Cancelable, diff --git a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala index 3c7d36d7a..10c1ed7fa 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/cancelables/CompositeCancelable.scala @@ -223,7 +223,7 @@ final class CompositeCancelable private (stateRef: AtomicAny[CompositeCancelable } that match { - case ref: Set[_] => + case ref: Set[?] => loop(ref.asInstanceOf[Set[Cancelable]]) case _ => loop(that.toSet[Cancelable]) diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala index e89ba3ff2..e83a059c6 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/CanBindLocals.scala @@ -22,7 +22,6 @@ import monix.execution.{ CancelableFuture, FutureUtils } import monix.execution.schedulers.TrampolineExecutionContext import scala.annotation.implicitNotFound -import scala.annotation.nowarn import scala.concurrent.Future import scala.annotation.unused @@ -121,7 +120,6 @@ private[misc] abstract class CanIsolateInstancesLevel0 { /** Implementation for [[CanBindLocals.cancelableFuture]]. */ protected object CancelableFutureInstance extends CanBindLocals[CancelableFuture[Any]] { - @nowarn("msg=Implicit parameters should be provided with a `using` clause") override def bindContext(ctx: Local.Context)(f: => CancelableFuture[Any]): CancelableFuture[Any] = { val prev = Local.getContext() Local.setContext(ctx) @@ -139,7 +137,6 @@ private[misc] abstract class CanIsolateInstancesLevel0 { /** Implementation for [[CanBindLocals.future]]. */ protected object FutureInstance extends CanBindLocals[Future[Any]] { - @nowarn("msg=Implicit parameters should be provided with a `using` clause") override def bindContext(ctx: Local.Context)(f: => Future[Any]): Future[Any] = { val prev = Local.getContext() Local.setContext(ctx) diff --git a/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala b/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala index 72fed5983..4d403e472 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/misc/LocalDeprecated.scala @@ -18,7 +18,6 @@ package monix.execution.misc import monix.execution.atomic.AtomicAny -import scala.annotation.nowarn private[execution] trait LocalDeprecated[A] { self: Local[A] => /** @@ -58,7 +57,6 @@ private[execution] trait LocalCompanionDeprecated { self: Local.type => * DEPRECATED — switch to `local.closed[R: CanIsolate]`. */ @deprecated("Switch to local.closed[R: CanIsolate]", since = "3.0.0") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def closed[R](fn: () => R): () => R = { // $COVERAGE-OFF$ import CanBindLocals.Implicits.synchronousAsDefault diff --git a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala index 66b901ba1..58792a87c 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/schedulers/SchedulerService.scala @@ -20,7 +20,6 @@ package monix.execution.schedulers import monix.execution.{ ExecutionModel => ExecModel, Scheduler, UncaughtExceptionReporter } import monix.execution.internal.Platform import monix.execution.schedulers.TrampolineExecutionContext.immediate -import scala.annotation.nowarn import scala.concurrent.{ ExecutionContext, Future } import scala.concurrent.duration.{ FiniteDuration, TimeUnit } @@ -125,7 +124,6 @@ object SchedulerService { self.awaitTermination(timeout, awaitOn) @deprecated("Extension methods are now implemented on `SchedulerService` directly", "3.4.0") - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def awaitTermination(timeout: FiniteDuration)(implicit permit: CanBlock): Boolean = self.awaitTermination(timeout)(permit) } diff --git a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala index ea80a8c75..9f9e78bfb 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/CancelableSuite.scala @@ -56,7 +56,7 @@ object CancelableSuite extends SimpleTestSuite { test("Cancelable.collection(refs)") { var effect = 0 - val c = Cancelable.collection((0 until 100).map(_ => Cancelable(() => effect += 1)): _*) + val c = Cancelable.collection((0 until 100).map(_ => Cancelable(() => effect += 1))*) assertEquals(effect, 0) c.cancel() @@ -102,7 +102,7 @@ object CancelableSuite extends SimpleTestSuite { test("Cancelable.trampolined(refs)") { implicit val sc = TestScheduler() var effect = 0 - val c = Cancelable.trampolined((0 until 100).map(_ => Cancelable(() => effect += 1)): _*) + val c = Cancelable.trampolined((0 until 100).map(_ => Cancelable(() => effect += 1))*) assertEquals(effect, 0) c.cancel() diff --git a/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala index 8a75a4293..18123da90 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/cancelables/CompositeCancelableSuite.scala @@ -146,7 +146,7 @@ object CompositeCancelableSuite extends SimpleTestSuite with Checkers { test("reset") { val seq = for (_ <- 0 until 10) yield BooleanCancelable() - val cc = CompositeCancelable(seq: _*) + val cc = CompositeCancelable(seq*) cc.reset() cc.cancel() diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala index 66f1963b4..4e845309a 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropAllOnOverflowQueueSuite.scala @@ -93,10 +93,10 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { assertEquals(q.offer(0), 0) assertEquals(q.poll(), 0) - assertEquals(q.offerMany(1 to 7: _*), 0) + assertEquals(q.offerMany((1 to 7)*), 0) assertEquals(q.offer(8), 7) - assertEquals(q.offerMany(9 to 14: _*), 0) + assertEquals(q.offerMany((9 to 14)*), 0) val buffer = ListBuffer.empty[Int] assertEquals(q.drainToBuffer(buffer, 3), 3) @@ -105,7 +105,7 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { assertEquals(q.drainToArray(array), 4) assertEquals(array.toList.take(4), List(11, 12, 13, 14)) - assertEquals(q.offerMany(15 until 29: _*), 7) + assertEquals(q.offerMany((15 until 29)*), 7) assertEquals(q.drainToArray(array), 7) assertEquals(array.toList, (22 until 29).toList) @@ -178,7 +178,7 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { test("iterable") { val q = DropAllOnOverflowQueue[Int](127) - val _ = q.offerMany(0 until 200: _*) + val _ = q.offerMany((0 until 200)*) assertEquals(q.toList, 127 until 200) } @@ -186,15 +186,15 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { val q = DropAllOnOverflowQueue[Int](1) assert(q.isEmpty) - val _ = q.offerMany(0 until 10: _*) + val _ = q.offerMany((0 until 10)*) assertEquals(q.head, 9) assertEquals(q.length, 1) - val _ = q.offerMany(10 until 20: _*) + val _ = q.offerMany((10 until 20)*) assertEquals(q.head, 19) assertEquals(q.length, 1) - val _ = q.offerMany(20 until 30: _*) + val _ = q.offerMany((20 until 30)*) assertEquals(q.head, 29) assertEquals(q.length, 1) assertEquals(q.poll(), 29) @@ -203,7 +203,7 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { test("should iterate with fixed capacity") { val q = DropAllOnOverflowQueue[Int](10) - val _ = q.offerMany(0 until 15: _*) + val _ = q.offerMany((0 until 15)*) val list1 = q.iterator(exactSize = false).toList assertEquals(list1.length, 15) @@ -226,7 +226,7 @@ object DropAllOnOverflowQueueSuite extends SimpleTestSuite { test("should box") { val q = DropAllOnOverflowQueue.boxed[Int](10) - val _ = q.offerMany(0 until 15: _*) + val _ = q.offerMany((0 until 15)*) assertEquals(q.toList, (0 until 15).toList) } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala index 7c0ca6a6f..d3eb8c1e4 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/internal/collection/DropHeadOnOverflowQueueSuite.scala @@ -93,7 +93,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { assertEquals(q.offer(0), 0) assertEquals(q.poll(), 0) - assertEquals(q.offerMany(1 to 7: _*), 0) + assertEquals(q.offerMany((1 to 7)*), 0) assertEquals(q.offer(8), 1) assertEquals(q.offer(9), 1) @@ -110,7 +110,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { assertEquals(q.drainToArray(array), 4) assertEquals(array.toList.take(4), List(11, 12, 13, 14)) - assertEquals(q.offerMany(15 until 29: _*), 7) + assertEquals(q.offerMany((15 until 29)*), 7) assertEquals(q.drainToArray(array), 7) assertEquals(array.toList, (22 until 29).toList) @@ -179,7 +179,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { val q = DropHeadOnOverflowQueue[Int](127) assertEquals(q.capacity, 127) - val _ = q.offerMany(0 until 200: _*) + val _ = q.offerMany((0 until 200)*) assertEquals(q.toList, 73 until 200) } @@ -187,15 +187,15 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { val q = DropHeadOnOverflowQueue[Int](1) assert(q.isEmpty) - val _ = q.offerMany(0 until 10: _*) + val _ = q.offerMany((0 until 10)*) assertEquals(q.head, 9) assertEquals(q.length, 1) - val _ = q.offerMany(10 until 20: _*) + val _ = q.offerMany((10 until 20)*) assertEquals(q.head, 19) assertEquals(q.length, 1) - val _ = q.offerMany(20 until 30: _*) + val _ = q.offerMany((20 until 30)*) assertEquals(q.head, 29) assertEquals(q.length, 1) assertEquals(q.poll(), 29) @@ -204,7 +204,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { test("should iterate with fixed capacity") { val q = DropHeadOnOverflowQueue[Int](10) - val _ = q.offerMany(0 to 200: _*) + val _ = q.offerMany((0 to 200)*) val list1 = q.iterator(exactSize = false).toList assertEquals(list1.length, 15) @@ -227,7 +227,7 @@ object DropHeadOnOverflowQueueSuite extends SimpleTestSuite { test("should box") { val q = DropHeadOnOverflowQueue.boxed[Int](10) - val _ = q.offerMany(0 until 15: _*) + val _ = q.offerMany((0 until 15)*) assertEquals(q.toList, (0 until 15).toList) } } diff --git a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala index 4a8283fdc..cad338cb2 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/schedulers/UncaughtExceptionReporterSuite.scala @@ -19,7 +19,6 @@ package monix.execution.schedulers import scala.concurrent.{ ExecutionContext, Promise } import scala.concurrent.duration._ -import scala.annotation.nowarn import minitest.TestSuite import monix.execution.{ ExecutionModel, FutureUtils, Scheduler, UncaughtExceptionReporter } @@ -37,7 +36,6 @@ class UncaughtExceptionReporterBaseSuite extends TestSuite[Promise[Throwable]] { () } - @nowarn("msg=Implicit parameters should be provided with a `using` clause") def testReports(name: String)(f: UncaughtExceptionReporter => Scheduler) = { testAsync(name) { p => f(reporter(p)).execute(throwRunnable) diff --git a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala index 021254260..9c7e9fad7 100644 --- a/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala +++ b/monix-reactive/jvm/src/main/scala/monix/reactive/observers/buffers/EvictingBufferedSubscriber.scala @@ -24,7 +24,6 @@ import monix.execution.Scheduler import monix.execution.atomic.PaddingStrategy.{ LeftRight128, LeftRight256 } import monix.execution.atomic.{ Atomic, AtomicAny, AtomicInt } import monix.execution.internal.math -import scala.annotation.nowarn import scala.util.control.NonFatal import monix.reactive.OverflowStrategy._ import monix.reactive.observers.buffers.AbstractEvictingBufferedSubscriber._ @@ -34,6 +33,7 @@ import scala.annotation.tailrec import scala.collection.immutable.Queue import scala.concurrent.Future import scala.util.{ Failure, Success } +import scala.annotation.unchecked.uncheckedVariance /** A [[BufferedSubscriber]] implementation for the * [[monix.reactive.OverflowStrategy.DropOld DropOld]] @@ -107,7 +107,6 @@ private[observers] object EvictingBufferedSubscriber { } } -@nowarn("msg=The syntax") private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( out: Subscriber[A], strategy: Evicted[Nothing], @@ -125,8 +124,8 @@ private[observers] abstract class AbstractEvictingBufferedSubscriber[-A]( private val itemsToPush = Atomic.withPadding(0, LeftRight256) - private[this] val queue = - new ConcurrentBuffer[A](strategy) + private val queue: ConcurrentBuffer[A @uncheckedVariance] = + new ConcurrentBuffer(strategy) def onNext(elem: A): Ack = { if (upstreamIsComplete || downstreamIsComplete) Stop diff --git a/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala b/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala index 181744ed1..366677777 100644 --- a/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala +++ b/monix-reactive/jvm/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerConcurrencySuite.scala @@ -53,7 +53,7 @@ object LoadBalanceConsumerConcurrencySuite extends BaseConcurrencySuite { val justOne = Consumer.headOption[Int].map(_.getOrElse(0).toLong) val allConsumers = for (i <- 0 until parallelism) yield if (i % 2 == 0) fold else justOne - val consumer = Consumer.loadBalance(allConsumers: _*) + val consumer = Consumer.loadBalance(allConsumers*) val task1 = source.foldLeft(0L)(_ + _).firstL val task2 = source.consumeWith(consumer).map(_.sum) task1 <-> task2 diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala index 29c8b3e1c..2b7501dca 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observable.scala @@ -17,7 +17,6 @@ package monix.reactive -import scala.annotation.nowarn import java.io.{ BufferedReader, InputStream, PrintStream, Reader } import cats.{ @@ -278,10 +277,6 @@ import scala.util.{ Failure, Success, Try } * Eq.fromUniversalEquals * }}} */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=The syntax ` _` is no longer supported;") -@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") abstract class Observable[+A] extends Serializable { self => // ----------------------------------------------------------------------- @@ -2720,7 +2715,7 @@ abstract class Observable[+A] extends Serializable { self => * throws an error. */ final def onErrorRecover[B >: A](pf: PartialFunction[Throwable, B]): Observable[B] = - onErrorHandleWith(ex => (pf.andThen(b => Observable.now(b)).applyOrElse(ex, Observable.raiseError _))) + onErrorHandleWith(ex => (pf.andThen(b => Observable.now(b)).applyOrElse(ex, Observable.raiseError))) /** Returns an Observable that mirrors the behavior of the source, * unless the source is terminated with an `onError`, in which case @@ -2739,7 +2734,7 @@ abstract class Observable[+A] extends Serializable { self => * throws an error. */ final def onErrorRecoverWith[B >: A](pf: PartialFunction[Throwable, Observable[B]]): Observable[B] = - onErrorHandleWith(ex => pf.applyOrElse(ex, Observable.raiseError _)) + onErrorHandleWith(ex => pf.applyOrElse(ex, Observable.raiseError)) /** Returns an Observable that mirrors the behavior of the source, * unless the source is terminated with an `onError`, in which case @@ -4845,10 +4840,6 @@ abstract class Observable[+A] extends Serializable { self => * [[monix.execution.Scheduler.withExecutionModel Scheduler.withExecutionModel]], * or per `Observable`, see [[Observable.executeWithModel]]. */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=The syntax ` _` is no longer supported;") -@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") object Observable extends ObservableDeprecatedBuilders { /** An `Operator` is a function for transforming observers, * that can be used for lifting observables. @@ -5642,9 +5633,8 @@ object Observable extends ObservableDeprecatedBuilders { /** Creates an Observable that continuously emits the given ''item'' repeatedly. */ - @nowarn("msg=The syntax") def repeat[A](elems: A*): Observable[A] = - new builders.RepeatObservable(elems: _*) + new builders.RepeatObservable(elems*) /** Repeats the execution of the given `task`, emitting * the results indefinitely. @@ -6348,9 +6338,8 @@ object Observable extends ObservableDeprecatedBuilders { * result: - - 1 1 1 - 1 - 1 - - * */ - @nowarn("msg=The syntax") def firstStartedOf[A](source: Observable[A]*): Observable[A] = - new builders.FirstStartedObservable(source: _*) + new builders.FirstStartedObservable(source*) /** Implicit type class instances for [[Observable]]. */ implicit val catsInstances: CatsInstances = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala index 6054712d7..e9204c1f1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Observer.scala @@ -17,7 +17,6 @@ package monix.reactive -import scala.annotation.nowarn import java.io.PrintStream import monix.execution.Ack.{ Continue, Stop } @@ -44,7 +43,6 @@ import scala.util.control.NonFatal * and after onComplete or onError, a well behaved `Observable` * implementation shouldn't send any more onNext events. */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") trait Observer[-A] extends Any with Serializable { def onNext(elem: A): Future[Ack] @@ -69,7 +67,6 @@ trait Observer[-A] extends Any with Serializable { * asynchronous boundaries, and when it is seen as being `isCanceled`, * streaming is stopped */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") object Observer { /** An `Observer.Sync` is an [[Observer]] that signals demand * to upstream synchronously (i.e. the upstream observable doesn't need to diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala index cf4f8ed13..977fb3b0e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/Pipe.scala @@ -17,7 +17,6 @@ package monix.reactive -import scala.annotation.nowarn import monix.execution.ChannelType.MultiProducer import monix.execution.{ ChannelType, Scheduler } @@ -31,8 +30,6 @@ import monix.reactive.subjects._ /** Represents a factory for an input/output channel for * broadcasting input to multiple subscribers. */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=unused value of type") abstract class Pipe[I, +O] extends Serializable { /** Returns an input/output pair that can be used to * push input to a single subscriber. @@ -51,7 +48,7 @@ abstract class Pipe[I, +O] extends Serializable { def multicast(implicit s: Scheduler): (Observer[I], Observable[O]) = { val (in, out) = unicast val proc = PublishSubject[O]() - out.unsafeSubscribeFn(Subscriber(proc, s)) + val _ = out.unsafeSubscribeFn(Subscriber(proc, s)) (in, proc) } @@ -102,7 +99,6 @@ abstract class Pipe[I, +O] extends Serializable { new TransformedPipe(this, f) } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") object Pipe { /** Given a [[MulticastStrategy]] returns the corresponding [[Pipe]]. */ def apply[A](strategy: MulticastStrategy[A]): Pipe[A, A] = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala index d5108b5ba..59cdac73a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/BufferedIteratorAsObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.cancelables.BooleanCancelable @@ -32,7 +31,6 @@ import scala.concurrent.Future import scala.util.control.NonFatal import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class BufferedIteratorAsObservable[A](iterator: Iterator[A], bufferSize: Int) extends Observable[Seq[A]] { require(bufferSize > 0, "bufferSize must be strictly positive") diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala index ac18d0886..905de3666 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/CharsReaderObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import java.io.Reader import java.util @@ -36,7 +35,6 @@ import scala.annotation.tailrec import scala.concurrent.{ blocking, Future } import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class CharsReaderObservable(in: Reader, chunkSize: Int) extends Observable[Array[Char]] { require(chunkSize > 0, "chunkSize > 0") diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala index 3f73aca48..f9be89d83 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ConsObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Cancelable import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable, SingleAssignCancelable } import monix.reactive.Observable @@ -25,24 +24,20 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") -@nowarn("msg=unused value of type") private[reactive] final class ConsObservable[+A](head: A, tail: Observable[A]) extends ChainedObservable[A] { def unsafeSubscribeFn(conn: AssignableCancelable.Multi, out: Subscriber[A]): Unit = { - import out.{ scheduler => s } - out.onNext(head).syncOnContinue(chain(tail, conn, out))(s) + import out.scheduler + val _ = out.onNext(head).syncOnContinue(chain(tail, conn, out)) () } private def simpleSubscribe(conn: SingleAssignCancelable, out: Subscriber[A]): Unit = { import out.scheduler - out.onNext(head).syncOnContinue { + val _ = out.onNext(head).syncOnContinue { conn := tail.unsafeSubscribeFn(out) () } - () } override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala index 3b340ef5a..e1c3ad16c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/DeferObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Cancelable import monix.execution.cancelables.{ AssignableCancelable, MultiAssignCancelable } import scala.util.control.NonFatal @@ -26,9 +25,7 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observables.ChainedObservable.{ subscribe => chain } import monix.reactive.observers.Subscriber -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") private[reactive] final class DeferObservable[+A](factory: () => Observable[A]) extends ChainedObservable[A] { - override def unsafeSubscribeFn(out: Subscriber[A]): Cancelable = { val fa = try factory() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala index 2be50fc0f..8622a2cd6 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/FutureAsObservable.scala @@ -56,7 +56,7 @@ private[reactive] final class FutureAsObservable[A](factory: => Future[A]) exten } evaluated match { - case c: CancelableFuture[_] => c + case c: CancelableFuture[?] => c case _ => Cancelable.empty } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala index ab60b8c76..6a9e34c52 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/InputStreamObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import java.io.InputStream import java.util @@ -35,7 +34,6 @@ import scala.concurrent.{ blocking, Future } import scala.util.control.NonFatal import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class InputStreamObservable(in: InputStream, chunkSize: Int) extends Observable[Array[Byte]] { require(chunkSize > 0, "chunkSize > 0") diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala index 158519f12..1b238e791 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IntervalFixedDelayObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.cancelables.MultiAssignCancelable import monix.execution.{ Ack, Cancelable } import monix.execution.Ack.{ Continue, Stop } @@ -27,8 +26,6 @@ import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration import scala.util.{ Failure, Success } -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=unused value of type") private[reactive] final class IntervalFixedDelayObservable(initialDelay: FiniteDuration, delay: FiniteDuration) extends Observable[Long] { @@ -51,7 +48,7 @@ private[reactive] final class IntervalFixedDelayObservable(initialDelay: FiniteD def asyncScheduleNext(r: Future[Ack]): Unit = r.onComplete { case Success(ack) => - if (ack == Continue) scheduleNext() + if (ack == Continue) { val _ = scheduleNext() } case Failure(ex) => s.reportFailure(ex) } @@ -59,8 +56,7 @@ private[reactive] final class IntervalFixedDelayObservable(initialDelay: FiniteD def run(): Unit = { val ack = o.onNext(counter) if (ack == Continue) { - scheduleNext() - () + val _ = scheduleNext() } else if (ack != Stop) { asyncScheduleNext(ack) } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala index f8eac0ca3..ed094075e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/IteratorAsObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ @@ -31,7 +30,6 @@ import scala.concurrent.Future import scala.util.{ Failure, Success } /** Converts any `Iterator` into an observable */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class IteratorAsObservable[A](iterator: Iterator[A]) extends Observable[A] { private val wasSubscribed = Atomic(false) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala index a9464e2d9..242b3e2cc 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/LinesReaderObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import java.io.{ BufferedReader, Reader } import monix.execution.Ack.{ Continue, Stop } @@ -34,7 +33,6 @@ import scala.annotation.tailrec import scala.concurrent.{ blocking, Future } import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class LinesReaderObservable(reader: Reader) extends Observable[String] { self => private val in: BufferedReader = diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala index ab82d8f71..672e3ae69 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/MergePrioritizedListObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.CompositeCancelable import monix.execution.{ Ack, Cancelable, Scheduler } @@ -44,8 +43,6 @@ import scala.util.Success * same order as received from the source, and at most a single item from a * given source will be in flight at a time. */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=unused value of type") private[reactive] final class MergePrioritizedListObservable[A]( sources: Seq[(Int, Observable[A])] ) extends Observable[A] { @@ -164,7 +161,7 @@ private[reactive] final class MergePrioritizedListObservable[A]( } else { val p = Promise[Ack]() pq.enqueue(PQElem(elem, p, pri)) - signalOnNext() + val _ = signalOnNext() p.future } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala index 583423596..5041bf896 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } @@ -29,7 +28,6 @@ import scala.concurrent.Future import scala.util.{ Failure, Success } /** Generates ranges */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class RangeObservable(from: Long, until: Long, step: Long = 1) extends Observable[Long] { require(step != 0, "step != 0") diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala index 40a8d353f..85c9d0649 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatEvalObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution._ @@ -29,7 +28,6 @@ import scala.annotation.tailrec import scala.concurrent.Future import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class RepeatEvalObservable[+A](eval: => A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala index f89cb8faf..d75199759 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RepeatOneObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.builders -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable import monix.execution.{ Ack, Cancelable, ExecutionModel, Scheduler } @@ -28,7 +27,6 @@ import scala.annotation.tailrec import scala.concurrent.Future import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class RepeatOneObservable[A](elem: A) extends Observable[A] { def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { val s = subscriber.scheduler diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala index 1c8b3b68d..a9f5b3cb1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/ResourceCaseObservable.scala @@ -19,8 +19,6 @@ package monix.reactive package internal package builders -import scala.annotation.nowarn - import cats.effect.ExitCase import monix.execution.Callback import monix.eval.Task @@ -31,7 +29,6 @@ import monix.reactive.observables.ChainedObservable import monix.reactive.observers.Subscriber import scala.util.Success -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class ResourceCaseObservable[A]( acquire: Task[A], release: (A, ExitCase[Throwable]) => Task[Unit] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ConcurrentSubjectDeprecatedBuilders.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ConcurrentSubjectDeprecatedBuilders.scala new file mode 100644 index 000000000..100e85acf --- /dev/null +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ConcurrentSubjectDeprecatedBuilders.scala @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.reactive.internal.deprecated + +import monix.execution.Scheduler +import monix.reactive.subjects.ConcurrentSubject + +/** Binary-compatibility shims for [[monix.reactive.subjects.ConcurrentSubject]]. + * + * These methods preserve the binary interface of `ConcurrentSubject` from 3.4.0. + * They are package-private and must not be called by user code. + */ +private[monix] trait ConcurrentSubjectDeprecatedBuilders extends Any { + + /** Binary-compatibility shim — the `Scheduler` parameter is no longer needed. + * + * In 3.4.0, `async` required an implicit `Scheduler`; in 3.5.0 it does not. + * This overload preserves the old JVM bytecode descriptor so that pre-compiled + * 3.4.0 call-sites remain link-compatible at runtime. + * + * @deprecated Use [[ConcurrentSubject.async[A]:* ConcurrentSubject.async]] instead. + */ + @deprecated("The Scheduler parameter is no longer needed; use ConcurrentSubject.async without it.", "3.5.0") + private[deprecated] def async[A](implicit s: Scheduler): ConcurrentSubject[A, A] = + // $COVERAGE-OFF$ + ConcurrentSubject.async[A] + // $COVERAGE-ON$ +} diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala index e8d3632ae..6f97ac672 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedBuilders.scala @@ -17,13 +17,11 @@ package monix.reactive.internal.deprecated -import scala.annotation.nowarn import cats.Eval import cats.effect.IO import monix.execution.Scheduler import monix.reactive.{ Observable, OverflowStrategy } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] trait ObservableDeprecatedBuilders extends Any { /** DEPRECATED — please use [[Observable!.executeAsync .executeAsync]]. * diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala index 659727549..8247dcf38 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/deprecated/ObservableDeprecatedMethods.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.deprecated -import scala.annotation.nowarn import cats.effect.{ Effect, ExitCase } import cats.{ Monoid, Order } import monix.eval.{ Task, TaskLike } @@ -28,7 +27,6 @@ import monix.reactive.internal.operators.DoOnTerminateOperator import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] trait ObservableDeprecatedMethods[+A] extends Any { def self: Observable[A] diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala index 7d8e11c6f..094df6b34 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/BufferTimedObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -30,8 +29,6 @@ import scala.collection.mutable.ListBuffer import scala.concurrent.Future import scala.concurrent.duration.{ Duration, FiniteDuration, MILLISECONDS } -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=unused value of type") private[reactive] final class BufferTimedObservable[+A](source: Observable[A], timespan: FiniteDuration, maxCount: Int) extends Observable[Seq[A]] { @@ -54,7 +51,7 @@ private[reactive] final class BufferTimedObservable[+A](source: Observable[A], t locally { // Scheduling the first tick, in the constructor - periodicTask := out.scheduler.scheduleOnce(timespanMillis, TimeUnit.MILLISECONDS, self) + val _ = periodicTask := out.scheduler.scheduleOnce(timespanMillis, TimeUnit.MILLISECONDS, self) } // Runs periodically, every `timespan` @@ -66,17 +63,16 @@ private[reactive] final class BufferTimedObservable[+A](source: Observable[A], t // problem, or we rushed to signaling the bundle upon reaching // the maximum size in onNext. So we sleep some more. val remaining = expiresAt - now - periodicTask := scheduler.scheduleOnce(remaining, TimeUnit.MILLISECONDS, self) + val _ = periodicTask := scheduler.scheduleOnce(remaining, TimeUnit.MILLISECONDS, self) } else if (buffer != null) { // The timespan has passed since the last signal so we need // to send the current bundle - sendNextAndReset(now).syncOnContinue( + val _ = sendNextAndReset(now).syncOnContinue( // Schedule the next tick, but only after we are done // sending the bundle run() ) } - () } // Must be synchronized by `self` @@ -118,8 +114,8 @@ private[reactive] final class BufferTimedObservable[+A](source: Observable[A], t // In case the last onNext isn't finished, then // we need to apply back-pressure, otherwise this // onNext will break the contract. - ack.syncOnContinue { - out.onNext(bundleToSend) + val _ = ack.syncOnContinue { + val _ = out.onNext(bundleToSend) out.onComplete() } } else { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala index eab41b069..22700024c 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DebounceObservable.scala @@ -98,7 +98,6 @@ private[reactive] final class DebounceObservable[A](source: Observable[A], timeo } } } - () } def onNext(elem: A): Ack = self.synchronized { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala index b230a2a5b..9279c3ee8 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayByTimespanObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import java.util.concurrent.TimeUnit import monix.execution.Ack.{ Continue, Stop } @@ -30,8 +29,6 @@ import monix.execution.atomic.Atomic import scala.concurrent.duration.FiniteDuration import scala.concurrent.{ Future, Promise } -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=unused value of type") private[reactive] final class DelayByTimespanObservable[A](source: Observable[A], delay: FiniteDuration) extends Observable[A] { @@ -62,11 +59,9 @@ private[reactive] final class DelayByTimespanObservable[A](source: Observable[A] def onComplete(): Unit = { completeTriggered = true val lastAck = if (ack eq null) Continue else ack.future - - lastAck.syncTryFlatten.syncOnContinue { + val _ = lastAck.syncTryFlatten.syncOnContinue { if (!isDone.getAndSet(true)) out.onComplete() } - () } // Method `onError` is concurrent with run(), so we need to synchronize @@ -77,7 +72,7 @@ private[reactive] final class DelayByTimespanObservable[A](source: Observable[A] hasError = true try out.onError(ex) finally { - if (ack != null) ack.trySuccess(Stop) + if (ack != null) { val _ = ack.trySuccess(Stop) } task.cancel() } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala index 18350b1b6..551193c53 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DelayExecutionWithTriggerObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Ack.Stop import monix.execution.Scheduler import monix.execution.cancelables.OrderedCancelable @@ -26,7 +25,6 @@ import monix.reactive.Observable import monix.reactive.observers.Subscriber import scala.concurrent.Future -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") private[reactive] final class DelayExecutionWithTriggerObservable[A](source: Observable[A], trigger: Observable[?]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala index d2bf24b7e..312b80ba1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscribeObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop @@ -32,8 +31,6 @@ import monix.reactive.observers.Subscriber import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=unused value of type") private[reactive] object DoOnSubscribeObservable { // Implementation for doBeforeSubscribe final class Before[+A](source: Observable[A], task: Task[Unit]) extends Observable[A] { @@ -115,12 +112,12 @@ private[reactive] object DoOnSubscribeObservable { ref := task.runAsync(new Callback[Throwable, Unit] { def onSuccess(value: Unit): Unit = { - conn.pop() + val _ = conn.pop() p.success(()) () } def onError(ex: Throwable): Unit = { - conn.pop() + val _ = conn.pop() p.failure(ex) () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala index 92dbc5607..7979b40d1 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnSubscriptionCancelObservable.scala @@ -17,13 +17,11 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.eval.Task import monix.execution.Cancelable import monix.reactive.Observable import monix.reactive.observers.Subscriber -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class DoOnSubscriptionCancelObservable[+A](source: Observable[A], task: Task[Unit]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala index 0c61acf14..1011c379f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/GuaranteeCaseObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import cats.effect.ExitCase import monix.execution.Callback import monix.eval.Task @@ -33,7 +32,6 @@ import scala.concurrent.Future import scala.util.control.NonFatal import scala.util.{ Failure, Success, Try } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] class GuaranteeCaseObservable[A](source: Observable[A], f: ExitCase[Throwable] => Task[Unit]) extends Observable[A] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala index 173497fa6..12a36e028 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/IntersperseObservable.scala @@ -17,16 +17,12 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Ack.Continue import monix.execution.{ Ack, Cancelable, Scheduler } import monix.reactive.Observable import monix.reactive.observers.Subscriber - import scala.concurrent.Future -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=unused value of type") private[reactive] final class IntersperseObservable[+A]( source: Observable[A], start: Option[A], @@ -58,16 +54,16 @@ private[reactive] final class IntersperseObservable[+A]( } def onError(ex: Throwable) = { - downstreamAck.syncOnContinue(out.onError(ex)) - () + val _ = downstreamAck.syncOnContinue(out.onError(ex)) } def onComplete() = { - downstreamAck.syncOnContinue { - if (atLeastOne && end.nonEmpty) out.onNext(end.get) + val _ = downstreamAck.syncOnContinue { + if (atLeastOne && end.nonEmpty) { + val _ = out.onNext(end.get) + } out.onComplete() } - () } }) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala index 597122e00..5e9ccb96e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ReduceOperator.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler @@ -26,7 +25,6 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future -@nowarn("msg=discarded non-Unit value") private[reactive] final class ReduceOperator[A](op: (A, A) => A) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = @@ -57,7 +55,7 @@ private[reactive] final class ReduceOperator[A](op: (A, A) => A) extends Operato def onComplete(): Unit = if (!isDone) { isDone = true - if (!isFirst) out.onNext(state) + if (!isFirst) { val _ = out.onNext(state) } out.onComplete() } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala index db4f1dbab..60c47ce81 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ScanTaskObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Callback import monix.eval.Task import monix.execution.Ack.Stop @@ -38,7 +37,6 @@ import scala.concurrent.Future * * Tricky concurrency handling within, here be dragons! */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") private[reactive] final class ScanTaskObservable[A, S](source: Observable[A], seed: Task[S], op: (S, A) => Task[S]) extends Observable[S] { diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala index 91080aced..82fb47189 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/TakeByPredicateOperator.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.Stop import monix.execution.Scheduler @@ -26,7 +25,6 @@ import monix.reactive.Observable.Operator import monix.reactive.observers.Subscriber import scala.concurrent.Future -@nowarn("msg=discarded non-Unit value") private[reactive] final class TakeByPredicateOperator[A](p: A => Boolean, inclusive: Boolean) extends Operator[A, A] { def apply(out: Subscriber[A]): Subscriber[A] = @@ -48,7 +46,7 @@ private[reactive] final class TakeByPredicateOperator[A](p: A => Boolean, inclus } else { isActive = false if (inclusive) { - out.onNext(elem) + val _ = out.onNext(elem) } out.onComplete() Stop diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala index 9df9a1235..810a1365f 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLatestObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.operators -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.Scheduler import monix.execution.cancelables.{ CompositeCancelable, MultiAssignCancelable, SingleAssignCancelable } @@ -29,8 +28,6 @@ import java.util.concurrent.TimeUnit import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=unused value of type") private[reactive] final class ThrottleLatestObservable[A]( source: Observable[A], duration: FiniteDuration, @@ -66,7 +63,7 @@ private[reactive] final class ThrottleLatestObservable[A]( hasValue = false val now = scheduler.clockMonotonic(TimeUnit.MILLISECONDS) ack = out.onNext(lastEvent) - ack.syncFlatMap { + val _ = ack.syncFlatMap { case Continue => val elapsed = scheduler.clockMonotonic(TimeUnit.MILLISECONDS) - now val delay = @@ -82,7 +79,6 @@ private[reactive] final class ThrottleLatestObservable[A]( } Stop } - () } else { shouldEmitNext = true } @@ -118,14 +114,13 @@ private[reactive] final class ThrottleLatestObservable[A]( override def onComplete(): Unit = self.synchronized { if (!isDone) { val lastAck = if (ack == null) Continue else ack - lastAck.syncTryFlatten.syncOnContinue { signalOnComplete() } + val _ = lastAck.syncTryFlatten.syncOnContinue { signalOnComplete() } } - () } private def signalOnComplete(): Unit = { if (emitLast && hasValue) { - out.onNext(lastEvent).syncTryFlatten.syncOnContinue { + val _ = out.onNext(lastEvent).syncTryFlatten.syncOnContinue { isDone = true out.onComplete() task.cancel() @@ -135,7 +130,6 @@ private[reactive] final class ThrottleLatestObservable[A]( out.onComplete() task.cancel() } - () } }) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala index 267e9e6db..edaef1a3e 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/internal/rstreams/SubscriberAsReactiveSubscriber.scala @@ -17,7 +17,6 @@ package monix.reactive.internal.rstreams -import scala.annotation.nowarn import monix.execution.Ack import monix.execution.Ack.{ Continue, Stop } import monix.execution.ChannelType.SingleProducer @@ -29,8 +28,6 @@ import monix.reactive.observers.{ BufferedSubscriber, Subscriber } import org.reactivestreams.{ Subscriber => RSubscriber, Subscription => RSubscription } import scala.concurrent.Future -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=unused value of type") private[reactive] object SubscriberAsReactiveSubscriber { /** Wraps a [[monix.reactive.Observer Observer]] instance into a * `org.reactiveSubscriber` instance. The resulting subscriber respects @@ -68,7 +65,7 @@ private[reactive] object SubscriberAsReactiveSubscriber { */ def apply[A](subscriber: Subscriber[A], requestCount: Int = 128): RSubscriber[A] = subscriber match { - case _: Subscriber.Sync[_] => + case _: Subscriber.Sync[?] => new SyncSubscriberAsReactiveSubscriber[A](subscriber.asInstanceOf[Subscriber.Sync[A]], requestCount) case _ => new AsyncSubscriberAsReactiveSubscriber[A](subscriber, requestCount) @@ -123,7 +120,6 @@ private[reactive] final class AsyncSubscriberAsReactiveSubscriber[A](target: Sub Stop } - @nowarn("msg=Implicit parameters should be provided with a `using` clause") private def finiteOnNext(elem: A): Future[Ack] = target.onNext(elem).syncTryFlatten match { case Continue => continue() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala index c4aaa1505..f788f3e89 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/CachedObservable.scala @@ -17,12 +17,12 @@ package monix.reactive.observables -import scala.annotation.nowarn import monix.execution.Cancelable import monix.reactive.Observable import monix.reactive.subjects.ReplaySubject import monix.reactive.observers.Subscriber import monix.execution.atomic.Atomic +import scala.annotation.unchecked.uncheckedVariance /** A `CachedObservable` is an observable that wraps a regular * [[Observable]], initiating the connection on the first @@ -35,12 +35,10 @@ import monix.execution.atomic.Atomic * @param source - the observable we are wrapping * @param maxCapacity - the buffer capacity, or 0 for usage of an unbounded buffer */ -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=The syntax") final class CachedObservable[+A] private (source: Observable[A], maxCapacity: Int) extends Observable[A] { private val isStarted = Atomic(false) - private[this] val subject = { + private val subject: ReplaySubject[A @uncheckedVariance] = { if (maxCapacity > 0) ReplaySubject.createLimited[A](maxCapacity) else ReplaySubject[A]() @@ -48,8 +46,9 @@ final class CachedObservable[+A] private (source: Observable[A], maxCapacity: In def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable = { import subscriber.scheduler - if (isStarted.compareAndSet(expect = false, update = true)) - source.unsafeSubscribeFn(Subscriber(subject, scheduler)) + if (isStarted.compareAndSet(expect = false, update = true)) { + val _ = source.unsafeSubscribeFn(Subscriber(subject, scheduler)) + } subject.unsafeSubscribeFn(subscriber) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala index 12f509504..d5800db38 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ChainedObservable.scala @@ -68,7 +68,7 @@ object ChainedObservable { // to delay it and force ordering; plus it protects from stack overflows out.scheduler.executeTrampolined { () => source match { - case _: ChainedObservable[_] => + case _: ChainedObservable[?] => source.asInstanceOf[ChainedObservable[A]].unsafeSubscribeFn(conn, out) case _ => conn := source.unsafeSubscribeFn(out) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala index a7606e757..6cc82072b 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/ConnectableObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.observables -import scala.annotation.nowarn import monix.execution.annotations.{ UnsafeBecauseImpure, UnsafeProtocol } import monix.execution.{ Cancelable, Scheduler } import monix.reactive.observers.{ CacheUntilConnectSubscriber, Subscriber } @@ -32,7 +31,6 @@ import monix.reactive.{ Observable, Pipe } * to multiple subscribers). */ @UnsafeBecauseImpure -@nowarn("msg=Implicit parameters should be provided with a `using` clause") abstract class ConnectableObservable[+A] extends Observable[A] { self => /** Starts emitting events to subscribers. */ def connect(): Cancelable @@ -46,7 +44,6 @@ abstract class ConnectableObservable[+A] extends Observable[A] { self => } } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") object ConnectableObservable { /** Builds a [[ConnectableObservable]] for the given observable source * and a given [[monix.reactive.subjects.Subject Subject]]. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala index d1f6999bc..eb54b689a 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observables/RefCountObservable.scala @@ -17,7 +17,6 @@ package monix.reactive.observables -import scala.annotation.nowarn import monix.execution.{ Ack, Cancelable } import monix.execution.Scheduler import monix.reactive.Observable @@ -33,7 +32,6 @@ import scala.concurrent.Future * * @param source - the connectable observable we are wrapping */ -@nowarn("msg=discarded non-Unit value") final class RefCountObservable[+A] private (source: ConnectableObservable[A]) extends Observable[A] { private val refs = Atomic(-1) @@ -60,7 +58,7 @@ final class RefCountObservable[+A] private (source: ConnectableObservable[A]) ex val countdown = Cancelable(() => countDownToConnectionCancel()) // Subscribing and triggering connect() if this is the first subscription val ret = source.unsafeSubscribeFn(wrap(subscriber, countdown)) - if (current == -1) connection // triggers connect() + if (current == -1) { val _ = connection } // triggers connect() // A composite that both cancels this subscription and does the countdown Cancelable { () => try ret.cancel() diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala index 14f0e2ba1..13d6631ff 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/CacheUntilConnectSubscriber.scala @@ -17,7 +17,6 @@ package monix.reactive.observers -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, CancelableFuture } import monix.execution.Scheduler @@ -25,18 +24,17 @@ import monix.reactive.Observable import scala.collection.mutable import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success } +import scala.annotation.unchecked.uncheckedVariance /** Wraps an `underlying` [[Subscriber]] into an implementation that caches * all events until the call to `connect()` happens. After being connected, * the buffer is drained into the `underlying` observer, after which all * subsequent events are pushed directly. */ -@nowarn("msg=unused value of type") -@nowarn("msg=The syntax") final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) extends Subscriber[A] { self => implicit val scheduler: Scheduler = downstream.scheduler // MUST BE synchronized by `self`, only available if isConnected == false - private[this] var queue = mutable.ArrayBuffer.empty[A] + private var queue: mutable.ArrayBuffer[A @uncheckedVariance] = mutable.ArrayBuffer.empty // MUST BE synchronized by `self` private var isConnectionStarted = false // MUST BE synchronized by `self`, as long as isConnected == false @@ -121,11 +119,9 @@ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) def onComplete(): Unit = { // Applying back-pressure, otherwise the next onNext might // break the back-pressure contract. - ack.syncOnContinue { - bufferWasDrained.trySuccess(Continue) - () + val _ = ack.syncOnContinue { + val _ = bufferWasDrained.trySuccess(Continue) } - () } def onError(ex: Throwable): Unit = { @@ -186,7 +182,8 @@ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) */ def onComplete(): Unit = { // we cannot take a fast path here - connectedFuture.syncTryFlatten + val _ = connectedFuture + .syncTryFlatten .syncOnContinue(downstream.onComplete()) () } @@ -199,7 +196,8 @@ final class CacheUntilConnectSubscriber[-A] private (downstream: Subscriber[A]) */ def onError(ex: Throwable): Unit = { // we cannot take a fast path here - connectedFuture.syncTryFlatten + val _ = connectedFuture + .syncTryFlatten .syncOnContinue(downstream.onError(ex)) () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala index 7acf8fe4c..4f7a5af33 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/ConnectableSubscriber.scala @@ -17,7 +17,6 @@ package monix.reactive.observers -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, CancelableFuture, Scheduler } import monix.reactive.Observable @@ -25,6 +24,7 @@ import monix.reactive.Observable import scala.collection.mutable import scala.concurrent.{ Future, Promise } import scala.util.{ Failure, Success } +import scala.annotation.unchecked.uncheckedVariance /** Wraps a [[Subscriber]] into an implementation that abstains from emitting items until the call * to `connect()` happens. Prior to `connect()` you can enqueue @@ -81,15 +81,11 @@ import scala.util.{ Failure, Success } * // NOTE: that onNext("c") never happens * }}} */ -@nowarn("msg=unused value of type") -@nowarn("msg=The syntax") final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extends Subscriber[A] { self => - - implicit val scheduler: Scheduler = - underlying.scheduler + implicit val scheduler: Scheduler = underlying.scheduler // MUST BE synchronized by `self`, only available if isConnected == false - private[this] var queue = mutable.ArrayBuffer.empty[A] + private var queue = mutable.ArrayBuffer.empty[A @uncheckedVariance] // MUST BE synchronized by `self`, only available if isConnected == false private var scheduledDone = false // MUST BE synchronized by `self`, only available if isConnected == false @@ -172,7 +168,9 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend def onComplete(): Unit = { if (!scheduledDone) { - val _ = ack.syncOnContinue { bufferWasDrained.trySuccess(Continue); () } + val _ = ack.syncOnContinue { + val _ = bufferWasDrained.trySuccess(Continue) + } } else if (scheduledError ne null) { if (bufferWasDrained.trySuccess(Stop)) underlying.onError(scheduledError) @@ -310,7 +308,8 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend */ def onComplete(): Unit = { // we cannot take a fast path here - connectedFuture.syncTryFlatten + val _ = connectedFuture + .syncTryFlatten .syncOnContinue(underlying.onComplete()) () } @@ -323,7 +322,8 @@ final class ConnectableSubscriber[-A] private (underlying: Subscriber[A]) extend */ def onError(ex: Throwable): Unit = { // we cannot take a fast path here - connectedFuture.syncTryFlatten + val _ = connectedFuture + .syncTryFlatten .syncOnContinue(underlying.onError(ex)) () } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala index 1410fdfae..bcf643da2 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/SafeSubscriber.scala @@ -124,7 +124,7 @@ object SafeSubscriber { */ def apply[A](subscriber: Subscriber[A]): SafeSubscriber[A] = subscriber match { - case ref: SafeSubscriber[_] => ref.asInstanceOf[SafeSubscriber[A]] + case ref: SafeSubscriber[?] => ref.asInstanceOf[SafeSubscriber[A]] case _ => new SafeSubscriber[A](subscriber) } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala index aea77f28b..0d713a310 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/observers/Subscriber.scala @@ -17,7 +17,6 @@ package monix.reactive.observers -import scala.annotation.nowarn import java.io.PrintStream import monix.execution.Ack.{ Continue, Stop } import monix.execution.cancelables.BooleanCancelable @@ -33,19 +32,17 @@ import scala.util.control.NonFatal * A `Subscriber` can be seen as an address that the data source needs * in order to send events, along with an execution context. */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") trait Subscriber[-A] extends Observer[A] { implicit def scheduler: Scheduler } -@nowarn("msg=Implicit parameters should be provided with a `using` clause") object Subscriber { /** Subscriber builder */ def apply[A](observer: Observer[A], scheduler: Scheduler): Subscriber[A] = observer match { - case ref: Subscriber[_] if ref.scheduler == scheduler => + case ref: Subscriber[?] if ref.scheduler == scheduler => ref.asInstanceOf[Subscriber[A]] - case ref: Observer.Sync[_] => + case ref: Observer.Sync[?] => Subscriber.Sync(ref.asInstanceOf[Observer.Sync[A]], scheduler) case _ => new Implementation[A](observer, scheduler) @@ -62,7 +59,7 @@ object Subscriber { /** `Subscriber.Sync` builder */ def apply[A](observer: Observer.Sync[A], scheduler: Scheduler): Subscriber.Sync[A] = observer match { - case ref: Subscriber.Sync[_] if ref.scheduler == scheduler => + case ref: Subscriber.Sync[?] if ref.scheduler == scheduler => ref.asInstanceOf[Subscriber.Sync[A]] case _ => new SyncImplementation[A](observer, scheduler) diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala index f15584887..ddb0626c4 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ConcurrentSubject.scala @@ -17,7 +17,6 @@ package monix.reactive.subjects -import scala.annotation.nowarn import monix.execution.ChannelType.MultiProducer import monix.execution.cancelables.SingleAssignCancelable import monix.execution.{ Ack, Cancelable, ChannelType, Scheduler } @@ -33,15 +32,9 @@ import org.reactivestreams.{ Processor => RProcessor, Subscriber => RSubscriber, * * (onNext)* (onComplete | onError) */ -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") abstract class ConcurrentSubject[I, +O] extends Subject[I, O] with Observer.Sync[I] -@nowarn("msg=Implicit parameters should be provided with a `using` clause") -@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") -object ConcurrentSubject { +object ConcurrentSubject extends monix.reactive.internal.deprecated.ConcurrentSubjectDeprecatedBuilders { def apply[A](multicast: MulticastStrategy[A])(implicit s: Scheduler): ConcurrentSubject[A, A] = apply(multicast, Unbounded)(s) @@ -148,9 +141,8 @@ object ConcurrentSubject { * @param initial is an initial sequence of elements that will be pushed * to subscribers before any elements emitted by the source. */ - @nowarn("msg=The syntax") def replay[A](initial: Seq[A])(implicit s: Scheduler): ConcurrentSubject[A, A] = - from(ReplaySubject[A](initial: _*), Unbounded) + from(ReplaySubject[A](initial*), Unbounded) /** Subject recipe for building [[ReplaySubject replay]] subjects. * @@ -160,9 +152,8 @@ object ConcurrentSubject { * used for buffering, which specifies what to do in case * we're dealing with slow consumers. */ - @nowarn("msg=The syntax") def replay[A](initial: Seq[A], strategy: Synchronous[A])(implicit s: Scheduler): ConcurrentSubject[A, A] = - from(ReplaySubject[A](initial: _*), strategy) + from(ReplaySubject[A](initial*), strategy) /** Subject recipe for building [[ReplaySubject replay]] subjects. * This variant creates a size-bounded replay subject. diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala index 8ec573e0c..e04093318 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/PublishSubject.scala @@ -17,7 +17,6 @@ package monix.reactive.subjects -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.atomic.Atomic import monix.execution.atomic.PaddingStrategy.LeftRight128 @@ -39,8 +38,6 @@ import scala.concurrent.Future * * @see [[Subject]] */ -@nowarn("msg=discarded non-Unit value") -@nowarn("msg=unused value of type") final class PublishSubject[A] private () extends Subject[A, A] { self => /* * NOTE: the stored vector value can be null and if it is, then @@ -81,7 +78,9 @@ final class PublishSubject[A] private () extends Subject[A, A] { self => if (!stateRef.compareAndSet(state, update)) unsafeSubscribeFn(subscriber) // repeat else - Cancelable { () => unsubscribe(subscriber); () } + Cancelable { () => + val _ = unsubscribe(subscriber) + } } } @@ -96,7 +95,7 @@ final class PublishSubject[A] private () extends Subject[A, A] { self => val update = state.refresh // If CAS fails, it means we have new subscribers; // not bothering to recreate the cache for now - stateRef.compareAndSet(state, update) + val _ = stateRef.compareAndSet(state, update) sendOnNextToAll(update.cache, elem) } } else { @@ -128,20 +127,21 @@ final class PublishSubject[A] private () extends Subject[A, A] { self => // if execution is synchronous, takes the fast-path if (ack.isCompleted) { // subscriber canceled or triggered an error? Then remove! - if (ack != Continue && ack.value.get != Continue.AsSuccess) - unsubscribe(subscriber) + if (ack != Continue && ack.value.get != Continue.AsSuccess) { + val _ = unsubscribe(subscriber) + } } else { // going async, so we've got to count active futures for final Ack // the counter starts from 1 because zero implies isCompleted if (result == null) result = PromiseCounter(Continue, 1) result.acquire() - ack.onComplete { + val _ = ack.onComplete { case Continue.AsSuccess => result.countdown() case _ => // subscriber canceled or triggered an error? then remove - unsubscribe(subscriber) + val _ = unsubscribe(subscriber) result.countdown() } } diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala index ab953e85a..8011ab083 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/ReplaySubject.scala @@ -17,7 +17,6 @@ package monix.reactive.subjects -import scala.annotation.nowarn import monix.execution.Ack.{ Continue, Stop } import monix.execution.{ Ack, Cancelable } import monix.execution.Scheduler @@ -34,8 +33,6 @@ import scala.concurrent.Future /** `ReplaySubject` emits to any observer all of the items that were emitted * by the source, regardless of when the observer subscribes. */ -@nowarn("msg=The syntax `x: _*` is no longer supported for vararg splices; use `x*` instead") -@nowarn("msg=unused value of type") final class ReplaySubject[A] private (initialState: ReplaySubject.State[A]) extends Subject[A, A] { self => private val stateRef = Atomic(initialState) @@ -78,7 +75,7 @@ final class ReplaySubject[A] private (initialState: ReplaySubject.State[A]) exte import subscriber.scheduler val connecting = c.connect() - connecting.syncOnStopOrFailure(_ => removeSubscriber(c)) + val _ = connecting.syncOnStopOrFailure(_ => removeSubscriber(c)) Cancelable { () => try removeSubscriber(c) @@ -216,11 +213,10 @@ object ReplaySubject { * @param capacity is the maximum size of the internal buffer * @param initial is an initial sequence of elements to prepopulate the buffer */ - @nowarn("msg=The syntax") def createLimited[A](capacity: Int, initial: Seq[A]): ReplaySubject[A] = { require(capacity > 0, "capacity must be strictly positive") val elems = initial.takeRight(capacity) - new ReplaySubject[A](State[A](Queue(elems: _*), capacity)) + new ReplaySubject[A](State[A](Queue(elems*), capacity)) } /** Internal state for [[monix.reactive.subjects.ReplaySubject]] */ diff --git a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala index 42e5da163..593b8f674 100644 --- a/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala +++ b/monix-reactive/shared/src/main/scala/monix/reactive/subjects/Subject.scala @@ -17,7 +17,6 @@ package monix.reactive.subjects -import scala.annotation.nowarn import cats.arrow.Profunctor import monix.execution.Scheduler import monix.execution.cancelables.SingleAssignCancelable @@ -36,7 +35,6 @@ import org.reactivestreams.{ Processor => RProcessor, Subscriber => RSubscriber, * * Useful to build multicast Observables or reusable processing pipelines. */ -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") abstract class Subject[I, +O] extends Observable[O] with Observer[I] { self => /** Returns the number of connected subscribers. * @@ -55,7 +53,6 @@ abstract class Subject[I, +O] extends Observable[O] with Observer[I] { self => Subject.toReactiveProcessor(this, bufferSize) } -@nowarn("msg=`_` is deprecated for wildcard arguments of types: use `?` instead") object Subject { /** Transforms the source [[Subject]] into a `org.reactivestreams.Processor` * instance as defined by the [[http://www.reactive-streams.org/ Reactive Streams]] diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala index 11641d543..9e42503db 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/ObservableLikeConversionsSuite.scala @@ -279,7 +279,7 @@ object ObservableLikeConversionsSuite extends BaseTestSuite { test("Observable.from(ReactivePublisher)") { implicit s => val pub = new Publisher[Int] { - def subscribe(s: Subscriber[_ >: Int]): Unit = { + def subscribe(s: Subscriber[? >: Int]): Unit = { s.onSubscribe(new Subscription { var isActive = true def request(n: Long): Unit = { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala index 10bc3e0c0..ccb23857b 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/consumers/LoadBalanceConsumerSuite.scala @@ -80,7 +80,7 @@ object LoadBalanceConsumerSuite extends BaseTestSuite { val justOne = Consumer.headOption[Int].map(_.getOrElse(0).toLong) val allConsumers = for (i <- 0 until parallelism) yield if (i % 2 == 0) fold else justOne - val consumer = Consumer.loadBalance(allConsumers: _*) + val consumer = Consumer.loadBalance(allConsumers*) val task1 = source.foldLeft(0L)(_ + _).firstL val task2 = source.consumeWith(consumer).map(_.sum) task1 <-> task2 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala index 9984118c5..368cc65f9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/CharsReaderObservableSuite.scala @@ -331,7 +331,7 @@ object CharsReaderObservableSuite extends SimpleTestSuite with Checkers { def inputWithError(ex: Throwable, whenToThrow: Int, onFinish: () => Unit): Reader = new Reader { - private[this] var callIdx = 0 + private var callIdx = 0 def read(cbuf: Array[Char], off: Int, len: Int): Int = { callIdx += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala index 3bb2934f4..77568ec30 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/InputStreamObservableSuite.scala @@ -291,7 +291,7 @@ object InputStreamObservableSuite extends SimpleTestSuite with Checkers { def inputWithError(ex: Throwable, whenToThrow: Int, onFinish: () => Unit): InputStream = new InputStream { - private[this] var callIdx = 0 + private var callIdx = 0 def read(): Int = { callIdx += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala index ca5c909ad..3af88ea40 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/builders/LinesReaderObservableSuite.scala @@ -203,7 +203,7 @@ object LinesReaderObservableSuite extends SimpleTestSuite { def inputWithError(ex: Throwable, whenToThrow: Int, onFinish: () => Unit): BufferedReader = { val reader = new Reader { - private[this] var callIdx = 0 + private var callIdx = 0 def read(cbuf: Array[Char], off: Int, len: Int): Int = { callIdx += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala index ad449d9fb..50669b21d 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BaseOperatorSuite.scala @@ -116,7 +116,7 @@ abstract class BaseOperatorSuite extends BaseTestSuite { case None => ignore() case Some(Sample(obs, count, sum, waitForFirst, waitForNext)) => obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long): Ack = { received += 1 @@ -145,8 +145,8 @@ abstract class BaseOperatorSuite extends BaseTestSuite { case None => ignore() case Some(Sample(obs, count, sum, waitForFirst, waitForNext)) => obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L - private[this] var ack: Future[Ack] = Continue + private var sum = 0L + private var ack: Future[Ack] = Continue def onNext(elem: Long): Future[Ack] = { assert(ack.isCompleted, s"Contact breach at elem $elem of $sourceCount, last ack is not completed") diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala index 926daf30b..969b0335c 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/BufferIntrospectiveSuite.scala @@ -73,7 +73,7 @@ object BufferIntrospectiveSuite extends TestSuite[TestScheduler] { s.tick() assertEquals(sum, 6) - for (i <- 0 until 10) subject.onNext(1) + for (_ <- 0 until 10) subject.onNext(1) s.tick() assertEquals(sum, 6) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala index e4c0b0d8f..038902f8f 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/CombineLatestListSuite.scala @@ -30,7 +30,7 @@ object CombineLatestListSuite extends BaseOperatorSuite { val source = Observable.range(0L, sourceCount.toLong) val sources = (1 to NumberOfObservables).map(_ => Observable.now(1L)) val o: Observable[Long] = - Observable.combineLatestList((sources :+ source): _*).map { seq => + Observable.combineLatestList((sources :+ source)*).map { seq => seq.sum } @@ -45,7 +45,7 @@ object CombineLatestListSuite extends BaseOperatorSuite { val sample1 = { val sources = (0 until NumberOfObservables).map(_ => Observable.range(0, 10).delayOnNext(1.second)) - Observable.combineLatestList(sources: _*).map { seq => + Observable.combineLatestList(sources*).map { seq => seq.sum } } diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala index 450403f0e..e16ff8cc9 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ConcatOneSuite.scala @@ -100,7 +100,7 @@ object ConcatOneSuite extends BaseOperatorSuite { createObservable(sourceCount) match { case Some(Sample(obs, count, sum, _, _)) => obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long): Ack = { received += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala index c746e704b..ac77788a3 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelOrderedSuite.scala @@ -115,7 +115,7 @@ object MapParallelOrderedSuite extends BaseOperatorSuite { val obs = Observable.range(0L, sourceCount.toLong).mapParallelOrdered(parallelism = 4)(x => Task.now(x)) obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long) = { received += 1 @@ -145,7 +145,7 @@ object MapParallelOrderedSuite extends BaseOperatorSuite { val obs = Observable.range(0L, sourceCount.toLong).mapParallelOrdered(parallelism = 4)(x => Task(x)) obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long) = { received += 1 @@ -307,7 +307,7 @@ object MapParallelOrderedSuite extends BaseOperatorSuite { val p = Promise[Int]() val tasks = List.fill(8)(Task.fromFuture(p.future)) - Observable(tasks: _*) + Observable(tasks*) .doOnNext(_ => Task(initiated += 1)) .mapParallelOrdered(parallelism = 4)(x => x) .unsafeSubscribeFn(new Observer[Int] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala index 49777fb1b..e72f474d1 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapParallelUnorderedSuite.scala @@ -73,7 +73,7 @@ object MapParallelUnorderedSuite extends BaseOperatorSuite { val obs = Observable.range(0L, sourceCount.toLong).mapParallelUnordered(parallelism = 4)(x => Task.now(x)) obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long) = { received += 1 @@ -102,7 +102,7 @@ object MapParallelUnorderedSuite extends BaseOperatorSuite { val obs = Observable.range(0L, sourceCount.toLong).mapParallelUnordered(parallelism = 4)(x => Task.evalAsync(x)) obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long) = { received += 1 @@ -263,7 +263,7 @@ object MapParallelUnorderedSuite extends BaseOperatorSuite { val p = Promise[Int]() val tasks = List.fill(8)(Task.fromFuture(p.future)) - Observable(tasks: _*) + Observable(tasks*) .doOnNext(_ => Task { initiated += 1 }) .mapParallelUnordered(parallelism = 4)(x => x) .unsafeSubscribeFn(new Observer[Int] { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala index c41c62dcb..2ca374a1a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MapTaskSuite.scala @@ -98,7 +98,7 @@ object MapTaskSuite extends BaseOperatorSuite { val obs = Observable.range(0L, sourceCount.toLong).mapEval(x => Task.now(x)) obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long): Ack = { received += 1 @@ -121,7 +121,7 @@ object MapTaskSuite extends BaseOperatorSuite { val obs = Observable.range(0L, sourceCount.toLong).mapEval(x => Task.evalAsync(x)) obs.unsafeSubscribeFn(new Observer[Long] { - private[this] var sum = 0L + private var sum = 0L def onNext(elem: Long): Ack = { received += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala index a22ee03b1..0abefb0a4 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/MergePrioritizedListSuite.scala @@ -31,7 +31,7 @@ object MergePrioritizedListSuite extends BaseOperatorSuite { def createObservable(sourceCount: Int) = Some { val sources = (1 to sourceCount).map(i => (i, Observable.fromIterable(Seq.fill(4)(i.toLong)))) - val o = Observable.mergePrioritizedList(sources: _*) + val o = Observable.mergePrioritizedList(sources*) Sample(o, count(sourceCount), sum(sourceCount), Zero, Zero) } @@ -51,7 +51,7 @@ object MergePrioritizedListSuite extends BaseOperatorSuite { override def cancelableObservables(): Seq[Sample] = { val sources1 = (1 to 100).map(i => (i, Observable.range(0, 100).delayExecution(2.second))) - val sample1 = Observable.mergePrioritizedList(sources1: _*) + val sample1 = Observable.mergePrioritizedList(sources1*) Seq( Sample(sample1, 0, 0, 0.seconds, 0.seconds), Sample(sample1, 0, 0, 1.seconds, 0.seconds) @@ -64,7 +64,7 @@ object MergePrioritizedListSuite extends BaseOperatorSuite { test("should pick items in priority order") { implicit s => val sources = (1 to 10).map(i => (i, Observable.now(i * 1L))) - val source = Observable.mergePrioritizedList(sources: _*) + val source = Observable.mergePrioritizedList(sources*) var last = 0L source.unsafeSubscribeFn(new Observer[Long] { def onNext(elem: Long): Future[Ack] = { @@ -116,7 +116,7 @@ object MergePrioritizedListSuite extends BaseOperatorSuite { test("should complete all upstream onNext promises when downstream stops early") { implicit s => val sources = (1 to 10).map(i => (i, new OnNextExposingObservable(i * 1L))) - val source = Observable.mergePrioritizedList(sources: _*) + val source = Observable.mergePrioritizedList(sources*) source.unsafeSubscribeFn(new Observer[Long] { def onNext(elem: Long): Future[Ack] = { @@ -137,7 +137,7 @@ object MergePrioritizedListSuite extends BaseOperatorSuite { test("should complete all upstream onNext promises when downstream errors early") { implicit s => val sources = (1 to 10).map(i => (i, new OnNextExposingObservable(i * 1L))) - val source = Observable.mergePrioritizedList(sources: _*) + val source = Observable.mergePrioritizedList(sources*) source.unsafeSubscribeFn(new Observer[Long] { def onNext(elem: Long): Future[Ack] = { diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala index 54271d7c7..e1cb4d2fb 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/MonixSubscriberAsReactiveSuite.scala @@ -236,7 +236,7 @@ object MonixSubscriberAsReactiveSuite extends TestSuite[TestScheduler] { var sum = 0L val observer = new Observer[Long] { - private[this] var received = 0 + private var received = 0 def onNext(elem: Long) = Future { received += 1 @@ -273,12 +273,12 @@ object MonixSubscriberAsReactiveSuite extends TestSuite[TestScheduler] { } test("should cancel precisely with requests of size 1") { implicit s => - for (i <- 0 until 100) { + for (_ <- 0 until 100) { var completed = 0 var sum = 0L val observer = new Observer[Long] { - private[this] var received = 0 + private var received = 0 def onNext(elem: Long) = Future { received += 1 @@ -320,7 +320,7 @@ object MonixSubscriberAsReactiveSuite extends TestSuite[TestScheduler] { var sum = 0L val observer = new Observer[Long] { - private[this] var received = 0 + private var received = 0 def onNext(elem: Long) = Future { received += 1 @@ -353,7 +353,7 @@ object MonixSubscriberAsReactiveSuite extends TestSuite[TestScheduler] { var sum = 0L val observer = new Observer[Long] { - private[this] var received = 0 + private var received = 0 def onNext(elem: Long) = Future { received += 1 diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala index 9e7e8b66e..6dd67ad08 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/ObservableIsPublisherSuite.scala @@ -47,7 +47,7 @@ object ObservableIsPublisherSuite extends TestSuite[TestScheduler] { .range(0, 10000) .toReactivePublisher .subscribe(new Subscriber[Long] { - private[this] var s = null: Subscription + private var s = null: Subscription def onSubscribe(s: Subscription): Unit = { this.s = s @@ -150,8 +150,8 @@ object ObservableIsPublisherSuite extends TestSuite[TestScheduler] { .range(0, range) .toReactivePublisher .subscribe(new Subscriber[Long] { - private[this] var s = null: Subscription - private[this] var requested = chunkSize + private var s = null: Subscription + private var requested = chunkSize def onSubscribe(s: Subscription): Unit = { this.s = s @@ -193,8 +193,8 @@ object ObservableIsPublisherSuite extends TestSuite[TestScheduler] { .range(0, range) .toReactivePublisher .subscribe(new Subscriber[Long] { - private[this] var s = null: Subscription - private[this] var requested = chunkSize + private var s = null: Subscription + private var requested = chunkSize def onSubscribe(s: Subscription): Unit = { this.s = s diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala index 0c29ff9f5..2b37e3777 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/internal/rstreams/PublisherIsObservableSuite.scala @@ -138,7 +138,7 @@ object PublisherIsObservableSuite extends TestSuite[TestScheduler] { ): Publisher[Long] = { new Publisher[Long] { - override def subscribe(subscriber: Subscriber[_ >: Long]): Unit = + override def subscribe(subscriber: Subscriber[? >: Long]): Unit = subscriber.onSubscribe(new Subscription { override def cancel(): Unit = isPublisherActive.set(false) diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala index d19324ea7..d0072fd50 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/BehaviorSubjectSuite.scala @@ -41,7 +41,7 @@ object BehaviorSubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int): Future[Ack] = { received += elem @@ -67,7 +67,7 @@ object BehaviorSubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int) = Future { received += elem diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala index 80b02f020..7460a02e8 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala @@ -44,7 +44,7 @@ object ProfunctorSubjectSuite extends BaseSubjectSuite { var wasCompleted = 0 var errorThrown: Throwable = null - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int): Future[Ack] = { received += elem @@ -71,7 +71,7 @@ object ProfunctorSubjectSuite extends BaseSubjectSuite { var wasCompleted = 0 var errorThrown: Throwable = null - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int): Future[Ack] = { received += elem @@ -98,7 +98,7 @@ object ProfunctorSubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int): Future[Ack] = { received += elem @@ -124,7 +124,7 @@ object ProfunctorSubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int) = Future { received += elem diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala index 05e55a5d7..bae6a7328 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/PublishSubjectSuite.scala @@ -94,7 +94,7 @@ object PublishSubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int): Future[Ack] = { received += elem @@ -119,7 +119,7 @@ object PublishSubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int) = Future { received += elem diff --git a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala index 89bc62f4d..7748eb09a 100644 --- a/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala +++ b/monix-reactive/shared/src/test/scala/monix/reactive/subjects/ReplaySubjectSuite.scala @@ -77,7 +77,7 @@ object ReplaySubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int): Future[Ack] = { received += elem @@ -104,7 +104,7 @@ object ReplaySubjectSuite extends BaseSubjectSuite { var received = 0 var wasCompleted = 0 - for (i <- 0 until 10) + for (_ <- 0 until 10) subject.unsafeSubscribeFn(new Observer[Int] { def onNext(elem: Int) = Future { received += elem diff --git a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala index b47bf8d9d..740723860 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/Iterant.scala @@ -217,9 +217,6 @@ import scala.concurrent.duration.{ Duration, FiniteDuration } * Eq.fromUniversalEquals * }}} */ -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") -@scala.annotation.nowarn sealed abstract class Iterant[F[_], A] extends Product with Serializable { self => @@ -1906,8 +1903,8 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { * val sub = SingleAssignSubscription() * * source.subscribe(new Subscriber[Int] { - * private[this] var requested = 0L - * private[this] var sum = 0L + * private var requested = 0L + * private var sum = 0L * * def onSubscribe(s: Subscription): Unit = { * sub := s @@ -2370,9 +2367,6 @@ sealed abstract class Iterant[F[_], A] extends Product with Serializable { * `period` of time. The given `period` of time acts as a * fixed delay between successive events. */ -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") -@scala.annotation.nowarn object Iterant extends IterantInstances { /** * Alias for [[monix.catnap.ConsumerF]], using `Option[Throwable]` as @@ -2578,9 +2572,9 @@ object Iterant extends IterantInstances { /** Converts any `scala.collection.Seq` into a stream. */ def fromSeq[F[_], A](xs: Seq[A])(implicit F: Applicative[F]): Iterant[F, A] = xs match { - case ref: LinearSeq[_] => + case ref: LinearSeq[?] => fromList[F, A](ref.asInstanceOf[LinearSeq[A]])(F) - case ref: IndexedSeq[_] => + case ref: IndexedSeq[?] => fromIndexedSeq[F, A](ref.asInstanceOf[IndexedSeq[A]])(F) case _ => fromIterable(xs)(F) @@ -2895,7 +2889,7 @@ object Iterant extends IterantInstances { result case _ => var result: Iterant[F, A] = null - result = NextBatch(Batch(elems: _*), F.delay(result)) + result = NextBatch(Batch(elems*), F.delay(result)) result } @@ -3221,7 +3215,6 @@ private[tail] trait IterantInstances { new CatsSyncInstances[F]() /** Provides the `cats.effect.Sync` instance for [[Iterant]]. */ - @scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") class CatsSyncInstances[F[_]](implicit F: Sync[F]) extends StackSafeMonad[Iterant[F, *]] with MonadError[Iterant[F, *], Throwable] with Defer[Iterant[F, *]] with MonoidK[Iterant[F, *]] with CoflatMap[Iterant[F, *]] with FunctorFilter[Iterant[F, *]] { diff --git a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala index 4ee5a71d5..8b3d917a6 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/IterantBuilders.scala @@ -26,6 +26,7 @@ import monix.execution.internal.Platform.recommendedBufferChunkSize import monix.execution.{ BufferCapacity, ChannelType } import monix.tail.Iterant.Channel import monix.tail.batches.{ Batch, BatchCursor } +import monix.tail.internal.deprecated.IterantDeprecatedBuilders import org.reactivestreams.Publisher import scala.collection.immutable.LinearSeq @@ -51,9 +52,6 @@ import scala.concurrent.duration.FiniteDuration * Iterant[Task].pure(1) * }}} */ -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=The syntax `x: _\\*` is no longer supported for vararg splices; use `x\\*` instead") -@scala.annotation.nowarn object IterantBuilders { /** * See the description on [[IterantBuilders]] for the purpose of this class. @@ -61,7 +59,7 @@ object IterantBuilders { * Class defined inside object due to Scala's limitations on declaring * `AnyVal` classes. */ - final class Apply[F[_]](val v: Boolean = true) extends AnyVal { + final class Apply[F[_]](val v: Boolean = true) extends AnyVal with IterantDeprecatedBuilders[F] { /** Aliased builder, see documentation for [[Iterant.now]]. */ def now[A](a: A): Iterant[F, A] = Iterant.now(a) @@ -212,7 +210,7 @@ object IterantBuilders { /** Aliased builder, see documentation for [[Iterant.repeat]]. */ def repeat[A](elems: A*)(implicit F: Sync[F]): Iterant[F, A] = - Iterant.repeat(elems: _*) + Iterant.repeat(elems*) /** Aliased builder, see documentation for [[Iterant.repeatEval]]. */ def repeatEval[A](thunk: => A)(implicit F: Sync[F]): Iterant[F, A] = diff --git a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala index e2c47e93d..df3092a77 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/batches/BatchCursor.scala @@ -329,16 +329,14 @@ object BatchCursor { * @param offset $paramArrayOffset * @param length $paramArrayLength */ - @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") - def fromAnyArray[A](array: Array[_], offset: Int, length: Int): ArrayCursor[A] = + def fromAnyArray[A](array: Array[?], offset: Int, length: Int): ArrayCursor[A] = fromArray(array, offset, length).asInstanceOf[ArrayCursor[A]] /** $fromAnyArrayDesc * * @param array $paramArray */ - @scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") - def fromAnyArray[A](array: Array[_]): ArrayCursor[A] = + def fromAnyArray[A](array: Array[?]): ArrayCursor[A] = fromAnyArray(array, 0, array.length) /** Builds a [[BatchCursor]] from a Scala `Seq`, with lazy diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecatedBuilders.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecatedBuilders.scala new file mode 100644 index 000000000..c73fa45d6 --- /dev/null +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantDeprecatedBuilders.scala @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2014-2022 Monix Contributors. + * See the project homepage at: https://monix.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package monix.tail +package internal +package deprecated + +import cats.Applicative + +private[tail] trait IterantDeprecatedBuilders[F[_]] extends Any { + self: IterantBuilders.Apply[F] => + + /** Binary-compatibility shim — the `Applicative[F]` constraint is no longer needed. + * + * In 3.4.0, `suspend(rest)` required an implicit `Applicative[F]`; in 3.5.0 it does not. + * This overload preserves the old JVM bytecode descriptor so that pre-compiled + * 3.4.0 call-sites remain link-compatible at runtime. + * + * @deprecated Use Iterant.suspend without the implicit instead. + */ + @deprecated("The Applicative[F] constraint is no longer needed; use suspend without it.", "3.5.0") + private[deprecated] def suspend[A](rest: F[Iterant[F, A]])(implicit F: Applicative[F]): Iterant[F, A] = { + // $COVERAGE-OFF$ + Iterant.suspend(rest) + // $COVERAGE-ON$ + } +} diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala index 9c9dc9820..8fcac8fc1 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantToReactivePublisher.scala @@ -34,9 +34,6 @@ import org.reactivestreams.{ Publisher, Subscriber } import scala.annotation.tailrec import scala.util.control.NonFatal -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn("msg=`_` is deprecated for wildcard arguments of types: use `\\?` instead") -@scala.annotation.nowarn private[tail] object IterantToReactivePublisher { /** * Implementation for `toReactivePublisher` @@ -48,7 +45,7 @@ private[tail] object IterantToReactivePublisher { private final class IterantPublisher[F[_], A](source: Iterant[F, A])(implicit F: Effect[F]) extends Publisher[A] { - def subscribe(out: Subscriber[_ >: A]): Unit = { + def subscribe(out: Subscriber[? >: A]): Unit = { // Reactive Streams requirement if (out == null) throw null @@ -68,7 +65,7 @@ private[tail] object IterantToReactivePublisher { } } - private final class IterantSubscription[F[_], A](source: Iterant[F, A], out: Subscriber[_ >: A])( + private final class IterantSubscription[F[_], A](source: Iterant[F, A], out: Subscriber[? >: A])( implicit F: Effect[F] ) extends Subscription { parent => diff --git a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala index 781de83f8..bbbe2b2ad 100644 --- a/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala +++ b/monix-tail/shared/src/main/scala/monix/tail/internal/IterantZipMap.scala @@ -26,11 +26,8 @@ import monix.execution.internal.collection.ChunkedArrayStack import monix.tail.Iterant import monix.tail.Iterant.{ Concat, Halt, Last, Next, NextBatch, NextCursor, Scope, Suspend } import monix.tail.batches.{ Batch, BatchCursor } - import scala.collection.mutable.ArrayBuffer -@scala.annotation.nowarn("msg=Implicit parameters should be provided with a `using` clause") -@scala.annotation.nowarn private[tail] object IterantZipMap { /** * Implementation for `Iterant#zipMap` diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala index e2ed965dc..75a0192cd 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorBuildersSuite.scala @@ -22,7 +22,7 @@ import monix.tail.batches.BatchCursor object BatchCursorBuildersSuite extends BaseTestSuite { test("apply") { _ => check1 { (list: List[Int]) => - list == BatchCursor(list: _*).toList && + list == BatchCursor(list*).toList && list == BatchCursor.fromSeq(list).toList && list == BatchCursor.fromIndexedSeq(list.toIndexedSeq).toList } diff --git a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala index d135ed787..fc8711ca1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/BatchCursorSuite.scala @@ -220,7 +220,7 @@ object GenericCursorSuite extends BatchCursorSuite[Int] { override def fromList(list: List[Int]): Cursor = new GenericCursor[Int] { - private[this] val iter = list.iterator + private val iter = list.iterator def hasNext(): Boolean = iter.hasNext def next(): Int = iter.next() diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala index d14c1b6da..f3d33eb62 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantConcatSuite.scala @@ -65,7 +65,7 @@ object IterantConcatSuite extends BaseTestSuite { test("Iterant.concat(Iterant*)") { implicit s => check1 { (ll: List[List[Int]]) => val li = ll.map(Iterant[Coeval].fromList) - val concat = Iterant.concat(li: _*) + val concat = Iterant.concat(li*) val expected = Iterant[Coeval].fromList(ll.flatten) concat <-> expected } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala index 888ed5b0f..35b2297a9 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactivePublisherSuite.scala @@ -112,7 +112,7 @@ object IterantFromReactivePublisherSuite extends BaseTestSuite { test("fromReactivePublisher handles immediate completion") { implicit s => val publisher = new Publisher[Unit] { - def subscribe(subscriber: Subscriber[_ >: Unit]): Unit = { + def subscribe(subscriber: Subscriber[? >: Unit]): Unit = { subscriber.onComplete() } } @@ -132,11 +132,11 @@ object IterantFromReactivePublisherSuite extends BaseTestSuite { def this(range: Range, finish: Option[Throwable], onCancel: Promise[Unit])(implicit sc: Scheduler) = this(range.start, range.end, range.step, finish, onCancel) - def subscribe(s: Subscriber[_ >: Int]): Unit = { + def subscribe(s: Subscriber[? >: Int]): Unit = { s.onSubscribe(new Subscription { self => - private[this] val cancelled = Atomic(false) - private[this] val requested = Atomic(0L) - private[this] var index = from + private val cancelled = Atomic(false) + private val requested = Atomic(0L) + private var index = from def isInRange(x: Long, until: Long, step: Long): Boolean = { (step > 0 && x < until) || (step < 0 && x > until) diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala index 3ffea2724..9a5a86241 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromReactiveStreamAsyncSuite.scala @@ -190,12 +190,12 @@ object IterantFromReactiveStreamAsyncSuite extends TestSuite[Scheduler] { def this(range: Range, finish: Option[Throwable], onCancel: Promise[Unit])(implicit sc: Scheduler) = this(range.start, range.end, range.step, finish, onCancel) - def subscribe(s: Subscriber[_ >: Int]): Unit = { + def subscribe(s: Subscriber[? >: Int]): Unit = { s.onSubscribe(new Subscription { self => - private[this] val finished = Atomic(false) - private[this] val cancelled = Atomic(false) - private[this] val requested = Atomic(0L) - private[this] var index = from + private val finished = Atomic(false) + private val cancelled = Atomic(false) + private val requested = Atomic(0L) + private var index = from def isInRange(x: Long, until: Long, step: Long): Boolean = { (step > 0 && x < until) || (step < 0 && x > until) diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala index 896254e6a..fab92e480 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantFromSeqSuite.scala @@ -39,7 +39,7 @@ object IterantFromSeqSuite extends BaseTestSuite { test("Iterant[Task].fromSeq(iterable)") { implicit s => check1 { (list: List[Int]) => - val result = Iterant[Task].fromSeq(ListBuffer(list: _*).toSeq).toListL + val result = Iterant[Task].fromSeq(ListBuffer(list*).toSeq).toListL result <-> Task.now(list) } } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala index 873a5b9a6..a4db008f1 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantHeadOptionSuite.scala @@ -43,10 +43,10 @@ object IterantHeadOptionSuite extends BaseTestSuite { test("Iterant.headOption suspends execution for NextCursor or NextBatch") { _ => check1 { (list: List[Int]) => - val iter1 = Iterant[Coeval].nextBatchS(Batch(list: _*), Coeval.now(Iterant[Coeval].empty[Int])) + val iter1 = Iterant[Coeval].nextBatchS(Batch(list*), Coeval.now(Iterant[Coeval].empty[Int])) iter1.headOptionL <-> Coeval.suspend(Coeval.now(list.headOption)) - val iter2 = Iterant[Coeval].nextCursorS(BatchCursor(list: _*), Coeval.now(Iterant[Coeval].empty[Int])) + val iter2 = Iterant[Coeval].nextCursorS(BatchCursor(list*), Coeval.now(Iterant[Coeval].empty[Int])) iter2.headOptionL <-> Coeval.suspend(Coeval.now(list.headOption)) } } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala index ce57c9c61..99481fc80 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantLastOptionSuite.scala @@ -43,10 +43,10 @@ object IterantLastOptionSuite extends BaseTestSuite { test("Iterant.lastOption suspends execution for NextCursor or NextBatch") { _ => check1 { (list: List[Int]) => - val iter1 = Iterant[Coeval].nextBatchS(Batch(list: _*), Coeval.now(Iterant[Coeval].empty[Int])) + val iter1 = Iterant[Coeval].nextBatchS(Batch(list*), Coeval.now(Iterant[Coeval].empty[Int])) iter1.lastOptionL <-> Coeval.suspend(Coeval.now(list.lastOption)) - val iter2 = Iterant[Coeval].nextCursorS(BatchCursor(list: _*), Coeval.now(Iterant[Coeval].empty[Int])) + val iter2 = Iterant[Coeval].nextCursorS(BatchCursor(list*), Coeval.now(Iterant[Coeval].empty[Int])) iter2.lastOptionL <-> Coeval.suspend(Coeval.now(list.lastOption)) } } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala index 7d61bf5ff..c7a0e90ad 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantOnErrorSuite.scala @@ -63,7 +63,7 @@ object IterantOnErrorSuite extends BaseTestSuite { test("fa.onErrorHandleWith(_ => fb) <-> fa for successful streams") { _ => check1 { (list: List[Int]) => - val iter = Iterant[Coeval].of(list: _*) + val iter = Iterant[Coeval].of(list*) iter.onErrorHandleWith(_ => Iterant[Coeval].empty[Int]) <-> iter } diff --git a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala index 3cf736fbf..1b42c1849 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala @@ -344,9 +344,9 @@ object IterantToReactivePublisherSuite extends BaseTestSuite { val subscription = SingleAssignSubscription() stream.toReactivePublisher.subscribe(new Subscriber[Int] { - private[this] var s: Subscription = _ - private[this] var requested = 0L - private[this] var sum = 0L + private var s: Subscription = _ + private var requested = 0L + private var sum = 0L def onSubscribe(s: Subscription): Unit = { this.s = s diff --git a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala index 035012e01..3ed079235 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionBatch.scala @@ -23,7 +23,7 @@ import monix.tail.batches.{ BatchCursor, GenericBatch } /** Batch that throws exception on access. */ final class ThrowExceptionBatch[A](ex: Throwable) extends GenericBatch[A] { - private[this] val triggered = Atomic(false) + private val triggered = Atomic(false) def isTriggered: Boolean = triggered.get() override def cursor(): BatchCursor[A] = { diff --git a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala index 692cf79b0..518cdf8f5 100644 --- a/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala +++ b/monix-tail/shared/src/test/scala/monix/tail/ThrowExceptionCursor.scala @@ -22,7 +22,7 @@ import monix.tail.batches.BatchCursor /** BatchCursor that throws exception on access. */ final class ThrowExceptionCursor[A](ex: Throwable) extends BatchCursor[A] { self => - private[this] val triggered = Atomic(false) + private val triggered = Atomic(false) def isTriggered: Boolean = triggered.get() private def triggerError(): Nothing = { diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 0bd426712..6b86ceb5d 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -108,13 +108,214 @@ object MimaFilters { ) lazy val changesFor_3_5_0 = Seq( - // Java 7 boxed internals were removed after the JDK 17 / VarHandle migration; these were internal implementation classes. - exclude[MissingClassProblem]("monix.execution.atomic.internal.*Java7Boxed*"), - // JDK8-era boxed internals were removed for the same migration; routing now goes directly to JavaX VarHandle implementations. - exclude[MissingClassProblem]("monix.execution.atomic.internal.*Java8Boxed*"), - // Legacy queue adapter kept only for Java 7 was removed because full-fence support now assumes JDK 17+. - exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java7"), - // MessagePassingQueue Java 7 adapter was removed as part of the same support-policy cleanup. - exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue#Java7") + // Callback#Builders was internal scaffolding for builder DSL; apply()Boolean was its companion helper — both removed in Callback cleanup. + exclude[DirectMissingMethodProblem]("monix.execution.Callback.apply"), + exclude[MissingClassProblem]("monix.execution.Callback$Builders"), + exclude[MissingClassProblem]("monix.execution.Callback$Builders$"), + + // Atomic API classes moved to monix-execution-atomic sub-artifact (3.5.0 modularisation); + // monix-execution declares monix-execution-atomic as a compile dependency so all consumers receive + // the classes transitively — no actual binary break for downstream code. + exclude[MissingClassProblem]("monix.execution.atomic.Atomic"), + exclude[MissingClassProblem]("monix.execution.atomic.Atomic$"), + exclude[MissingClassProblem]("monix.execution.atomic.Atomic$Macros"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicAny"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicAny$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBoolean"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBoolean$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicBooleanBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicByteBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicCharBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicDoubleBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicFloatBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicIntBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicLongBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicShortBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicByte"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicByte$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicChar"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicChar$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicDouble"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicDouble$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicFloat"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicFloat$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicInt"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicInt$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicLong"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicLong$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumber"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumberAny"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumberAny$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicShort"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicShort$"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits$"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits$Level1"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits$Level2"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Left128$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Left64$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$LeftRight128$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$LeftRight256$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$NoPadding$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Right128$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Right64$"), + exclude[MissingClassProblem]("monix.execution.atomic.package"), + exclude[MissingClassProblem]("monix.execution.atomic.package$"), + + // Internal atomic implementation helpers replaced by JDK 17 / VarHandle equivalents; + // these classes were explicitly marked @InternalApi and never part of the public contract. + exclude[MissingClassProblem]("monix.execution.internal.InternalApi"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxPaddingStrategy"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedInt"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedLong"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedObject"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.Factory"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.UnsafeAccess"), + exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromCircularQueue$Java7"), + exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue$Java7"), + + // Macro implementation helpers moved from monix.execution.misc to monix.execution.atomic.internal + // as part of the atomic sub-module extraction; all were private macro infrastructure. + exclude[MissingClassProblem]("monix.execution.misc.HygieneUtilMacros"), + exclude[MissingClassProblem]("monix.execution.misc.HygieneUtilMacros$util$"), + exclude[MissingClassProblem]("monix.execution.misc.InlineMacros"), + exclude[MissingClassProblem]("monix.execution.misc.Local$Macros"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestBox"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestBox$"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestBox$Macros"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros$"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros$Macros"), + + // ConcurrentChannel's private inner classes ChanProducer and ChanConsumer used AtomicAny in their + // constructor signatures; AtomicAny was moved to monix-execution-atomic sub-artifact in 3.5.0. + // Both classes are declared `private final class` inside ConcurrentChannel — not accessible to + // external code. The constructor-signature mismatch is a side-effect of the atomic module split. + exclude[DirectMissingMethodProblem]("monix.catnap.ConcurrentChannel#ChanConsumer.this"), + exclude[DirectMissingMethodProblem]("monix.catnap.ConcurrentChannel#ChanProducer.this"), + + // TaskMapBoth#Register is a `private final class` inside `private[eval] object TaskMapBoth` + // (package monix.eval.internal). sendSignal took Callback as parameter; Callback scaffolding was + // removed in 3.5.0 (same cleanup already filtered above). Purely internal, not public API. + exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskMapBoth#Register.sendSignal"), + + // IterantZipMap#Loop is a private inner implementation class inside monix.tail.internal. + // processOneASeqB changed signature due to internal Cats-Effect API alignment. + exclude[DirectMissingMethodProblem]("monix.tail.internal.IterantZipMap#Loop.processOneASeqB"), + + // ConcurrentSubject.async(Scheduler) remains available to Scala call-sites via the companion-module + // method on ConcurrentSubject$. The package-qualified source shim no longer gets a Java static + // forwarder on the outer ConcurrentSubject class, so MiMa reports only that Java-facing forwarder. + exclude[DirectMissingMethodProblem]("monix.reactive.subjects.ConcurrentSubject.async"), + + // CollectWhileOperator is private[reactive] — inaccessible outside the reactive package. + exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator"), + exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator$"), + + // Scala 3-specific: Callback.Builders was a synthetic static field in the Scala 3 encoding of + // the nested Builders class/object inside Callback companion; already filtered as MissingClassProblem + // above, but Scala 3 Mima also surfaces it as a MissingFieldProblem for the static field accessor. + exclude[MissingFieldProblem]("monix.execution.Callback.Builders"), + + // Scala 3-specific: AsyncQueue constructor is private[monix] — external code cannot call it. + // The synthetic default accessor for the 3rd constructor parameter ($default$3) is exposed + // differently across Scala 3 versions; this is not callable by downstream users. + exclude[DirectMissingMethodProblem]("monix.execution.AsyncQueue.$default$3"), + + // Scala 3-specific: IncompatibleResultTypeProblem for alreadyCanceled() in the four cancelable + // companions is a Scala 3 Mima encoding artifact. In 3.4.0 the Scala 3 compiler encoded the + // return type as the parent trait Cancelable#Empty; in 3.5.0 it encodes it as the concrete subtype + // (Bool or BooleanCancelable / BooleanCancelableF). The semantics are identical — the value IS + // a subtype, so callers see a strictly more specific type, which is binary-compatible. + exclude[IncompatibleResultTypeProblem]("monix.execution.cancelables.AssignableCancelable.alreadyCanceled"), + exclude[IncompatibleResultTypeProblem]("monix.execution.cancelables.BooleanCancelable.alreadyCanceled"), + exclude[IncompatibleResultTypeProblem]("monix.catnap.cancelables.AssignableCancelableF.alreadyCanceled"), + exclude[IncompatibleResultTypeProblem]("monix.catnap.cancelables.BooleanCancelableF.alreadyCanceled"), + + // Scala 2.13.17+ stopped emitting scala.runtime.AbstractFunctionN as a mixin on case-class + // companion objects. MiMa surfaces this as MissingTypesProblem on the companion ($) class. + // This is a pure encoding artifact — no actual binary break for downstream code. + + // monix-execution: Ack.Continue / Ack.Stop are case objects extending Future; their value() + // and result() methods shift encoding when AbstractFunctionN mixin is removed. + exclude[DirectMissingMethodProblem]("monix.execution.Ack#Continue.value"), + exclude[IncompatibleResultTypeProblem]("monix.execution.Ack#Continue.result"), + exclude[DirectMissingMethodProblem]("monix.execution.Ack#Stop.value"), + exclude[IncompatibleResultTypeProblem]("monix.execution.Ack#Stop.result"), + + // monix-reactive: AbstractFunctionN encoding artifact on case-class companions + exclude[MissingTypesProblem]("monix.reactive.Notification$OnError$"), + exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$BackPressure$"), + exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$ClearBuffer$"), + exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$DropNew$"), + exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$DropOld$"), + exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$Fail$"), + exclude[MissingTypesProblem]("monix.reactive.internal.operators.ConcatMapObservable$FlatMapState$Active$"), + exclude[MissingTypesProblem]("monix.reactive.internal.operators.ConcatMapObservable$FlatMapState$WaitComplete$"), + exclude[MissingTypesProblem]("monix.reactive.internal.operators.ConcatMapObservable$FlatMapState$WaitOnNextChild$"), + exclude[MissingTypesProblem]("monix.reactive.internal.operators.MapTaskObservable$MapTaskState$Active$"), + exclude[MissingTypesProblem]("monix.reactive.internal.operators.MapTaskObservable$MapTaskState$WaitComplete$"), + exclude[MissingTypesProblem]( + "monix.reactive.internal.rstreams.ReactiveSubscriberAsMonixSubscriber$RequestsQueue$ActiveState$" + ), + exclude[MissingTypesProblem]("monix.execution.BufferCapacity$Bounded$"), + exclude[MissingTypesProblem]("monix.execution.BufferCapacity$Unbounded$"), + exclude[MissingTypesProblem]("monix.execution.ExecutionModel$BatchedExecution$"), + exclude[MissingTypesProblem]("monix.execution.cancelables.CompositeCancelable$Active$"), + exclude[MissingTypesProblem]("monix.execution.cancelables.OrderedCancelable$Active$"), + exclude[MissingTypesProblem]("monix.execution.cancelables.RefCountCancelable$State$"), + exclude[MissingTypesProblem]("monix.execution.cancelables.SingleAssignCancelable$State$IsActive$"), + exclude[MissingTypesProblem]("monix.execution.exceptions.DummyException$"), + // DummyException extends Exception which extends Function1 in 3.4.0 encoding; andThen/compose + // were inherited from AbstractFunction1 which is no longer mixed in as of Scala 2.13.17+. + exclude[DirectMissingMethodProblem]("monix.execution.exceptions.DummyException.andThen"), + exclude[DirectMissingMethodProblem]("monix.execution.exceptions.DummyException.compose"), + exclude[MissingTypesProblem]("monix.execution.internal.GenericSemaphore$State$"), + exclude[MissingTypesProblem]("monix.execution.rstreams.ReactivePullStrategy$FixedWindow$"), + exclude[MissingTypesProblem]("monix.execution.rstreams.SingleAssignSubscription$State$EmptyRequest$"), + exclude[MissingTypesProblem]("monix.execution.rstreams.SingleAssignSubscription$State$WithSubscription$"), + exclude[MissingTypesProblem]("monix.execution.schedulers.ReferenceScheduler$WrappedScheduler$"), + // StartAsyncBatchRunnable$ companion lost AbstractFunctionN mixin; tupled/curried were + // inherited from AbstractFunction2 which is no longer mixed in as of Scala 2.13.17+. + exclude[MissingTypesProblem]("monix.execution.schedulers.StartAsyncBatchRunnable$"), + exclude[DirectMissingMethodProblem]("monix.execution.schedulers.StartAsyncBatchRunnable.tupled"), + exclude[DirectMissingMethodProblem]("monix.execution.schedulers.StartAsyncBatchRunnable.curried"), + exclude[MissingTypesProblem]("monix.execution.schedulers.TestScheduler$State$"), + exclude[MissingTypesProblem]("monix.catnap.CircuitBreaker$Closed$"), + exclude[MissingTypesProblem]("monix.eval.Coeval$Error$"), + exclude[MissingTypesProblem]("monix.eval.Task$Options$"), + exclude[MissingTypesProblem]("monix.eval.internal.ForwardCancelable$Active$"), + exclude[MissingTypesProblem]("monix.eval.internal.ForwardCancelable$Empty$"), + // makeReleaseFrame is a method on private inner classes inside monix.eval.internal.TaskBracket; + // the companion lost AbstractFunctionN mixin, causing the method signature to shift. + exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskBracket#StartCase.makeReleaseFrame"), + exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskBracket#StartE.makeReleaseFrame"), + exclude[MissingTypesProblem]("monix.eval.internal.TaskConnectionComposite$Active$"), + exclude[MissingTypesProblem]("monix.eval.internal.TaskConnectionRef$IsActive$"), + exclude[MissingTypesProblem]("monix.eval.tracing.CoevalEvent$StackTrace$"), + // PrintingOptions is a case class; its companion lost AbstractFunctionN mixin so + // apply/copy/copy$default$N static forwarders are no longer emitted by scalac 2.13.17+. + exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.apply"), + exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy"), + exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy$default$1"), + exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy$default$2"), + exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy$default$3"), + exclude[MissingTypesProblem]("monix.eval.tracing.TaskEvent$StackTrace$"), + exclude[MissingTypesProblem]("monix.tail.internal.IterantToReactivePublisher$Await$"), + exclude[MissingTypesProblem]("monix.tail.internal.IterantToReactivePublisher$Interrupt$"), + exclude[MissingTypesProblem]("monix.tail.internal.IterantToReactivePublisher$Request$"), + + // EmptyBatch.cursor return type widened from EmptyCursor to BatchCursor (covariant widening). + // MiMa reports both IncompatibleResultTypeProblem (type change) and DirectMissingMethodProblem + // (old bridge method absent). Safe: widening is covariant and EmptyCursor extends BatchCursor. + exclude[IncompatibleResultTypeProblem]("monix.tail.batches.EmptyBatch.cursor"), + exclude[DirectMissingMethodProblem]("monix.tail.batches.EmptyBatch.cursor"), + + // BREAKAGE — unfortunately it's something we must live with + exclude[DirectMissingMethodProblem]("monix.tail.IterantBuilders#Apply.suspend$extension"), ) } diff --git a/project/MonixBuildUtils.scala b/project/MonixBuildUtils.scala index 0b96be4ad..9c7a30f5f 100644 --- a/project/MonixBuildUtils.scala +++ b/project/MonixBuildUtils.scala @@ -51,8 +51,8 @@ object MonixBuildUtils { /** Applies [[filterOutDependencyFromGeneratedPomXml]] to a list of multiple dependencies. */ def filterOutMultipleDependenciesFromGeneratedPomXml(list: List[(String, Regex)]*) = - list.foldLeft(List.empty[Def.Setting[_]]) { (acc, elem) => - acc ++ filterOutDependencyFromGeneratedPomXml(elem: _*) + list.foldLeft(List.empty[Def.Setting[?]]) { (acc, elem) => + acc ++ filterOutDependencyFromGeneratedPomXml(elem*) } /** Filter out dependencies from the generated `pom.xml`. @@ -121,7 +121,7 @@ object MonixBuildUtils { .toSeq assert(scalaVersions.nonEmpty, "build.yml is corrupt, suitable scala_version_* keys missing") - SortedSet(scalaVersions: _*) + SortedSet(scalaVersions*) } } } diff --git a/project/build.properties b/project/build.properties index e8bca9979..2566b02e0 100644 --- a/project/build.properties +++ b/project/build.properties @@ -15,4 +15,4 @@ # limitations under the License. # -sbt.version=1.12.0 +sbt.version=1.12.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index 2e5fd388b..cff20dc57 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,17 +1,16 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2") -addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") -addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") -addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.32") -addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") -addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") -addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.2") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.6.1") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") +addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.32") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") +addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") libraryDependencies += "org.typelevel" %% "scalac-options" % "0.1.9" From 3e747529a60f1a442ef0316817f732ea5446e3fc Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Mon, 6 Apr 2026 20:18:03 +0300 Subject: [PATCH 64/69] Restore Callback`s API (#2021) --- .../scala-2.13/monix/execution/compat.scala | 7 +++ .../main/scala-3/monix/execution/compat.scala | 8 +++ .../main/scala/monix/execution/Callback.scala | 58 +++++++++++++++++-- project/MimaFilters.scala | 10 ---- 4 files changed, 67 insertions(+), 16 deletions(-) diff --git a/monix-execution/shared/src/main/scala-2.13/monix/execution/compat.scala b/monix-execution/shared/src/main/scala-2.13/monix/execution/compat.scala index 26680a630..5907d5be5 100644 --- a/monix-execution/shared/src/main/scala-2.13/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala-2.13/monix/execution/compat.scala @@ -40,4 +40,11 @@ object compat { type Flags <: Long with monix.execution.Features.FlagsTag } + + def uninitialized[@specialized T]: T = + new Uninitialized[T].value + + private final class Uninitialized[@specialized T] { + var value: T = _ + } } diff --git a/monix-execution/shared/src/main/scala-3/monix/execution/compat.scala b/monix-execution/shared/src/main/scala-3/monix/execution/compat.scala index be3e4264a..acab01fc9 100644 --- a/monix-execution/shared/src/main/scala-3/monix/execution/compat.scala +++ b/monix-execution/shared/src/main/scala-3/monix/execution/compat.scala @@ -68,4 +68,12 @@ object compat { def |(y: Flag): Long = x | y } } + + def uninitialized[@specialized T]: T = { + new Uninitialized[T].value + } + + private final class Uninitialized[@specialized T] { + var value: T = scala.compiletime.uninitialized + } } diff --git a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala index 4cf70a712..79b9145a0 100644 --- a/monix-execution/shared/src/main/scala/monix/execution/Callback.scala +++ b/monix-execution/shared/src/main/scala/monix/execution/Callback.scala @@ -19,6 +19,7 @@ package monix.execution import monix.execution.exceptions.{ CallbackCalledMultipleTimesException, UncaughtErrorException } import monix.execution.schedulers.{ TrampolineExecutionContext, TrampolinedRunnable } +import monix.execution.compat.uninitialized import scala.concurrent.{ ExecutionContext, Promise } import scala.util.control.NonFatal import scala.util.{ Failure, Success, Try } @@ -182,6 +183,17 @@ abstract class Callback[-E, -A] extends (Either[E, A] => Unit) { * [[monix.execution.exceptions.CallbackCalledMultipleTimesException CallbackCalledMultipleTimesException]]. */ object Callback { + /** + * For building [[Callback]] objects using the + * [[https://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially-Applied Type]] + * technique. + * + * For example these are Equivalent: + * + * `Callback[Throwable].empty[String] <-> Callback.empty[Throwable, String]` + */ + def apply[E]: Builders[E] = new Builders[E] + /** Wraps any [[Callback]] into a safer implementation that * protects against protocol violations (e.g. `onSuccess` or `onError` * must be called at most once). @@ -332,10 +344,43 @@ object Callback { } private[monix] def signalErrorTrampolined[E, A](cb: Callback[E, A], e: E): Unit = - TrampolineExecutionContext.immediate.execute(() => cb.onError(e)) + TrampolineExecutionContext.immediate.execute(new Runnable { + override def run(): Unit = + cb.onError(e) + }) + + /** Functions exposed via [[apply]]. */ + final class Builders[E](val ev: Boolean = true) extends AnyVal { + /** See [[Callback.safe]]. */ + def safe[A](cb: Callback[E, A])(implicit r: UncaughtExceptionReporter): Callback[E, A] = + Callback.safe(cb) + + /** See [[Callback.empty]]. */ + def empty[A](implicit r: UncaughtExceptionReporter): Callback[E, A] = + Callback.empty + + /** See [[Callback.fromPromise]]. */ + def fromPromise[A](p: Promise[A])(implicit ev: Throwable <:< E): Callback[Throwable, A] = + Callback.fromPromise(p) + + /** See [[Callback.forked]]. */ + def forked[A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A] = + Callback.forked(cb) + + /** See [[Callback.trampolined]]. */ + def trampolined[A](cb: Callback[E, A])(implicit ec: ExecutionContext): Callback[E, A] = + Callback.trampolined(cb) + + /** See [[Callback.fromAttempt]]. */ + def fromAttempt[A](cb: Either[E, A] => Unit): Callback[E, A] = + Callback.fromAttempt(cb) + + /** See [[Callback.fromTry]]. */ + def fromTry[A](cb: Try[A] => Unit)(implicit ev: Throwable <:< E): Callback[Throwable, A] = + Callback.fromTry(cb) + } - private final class AsyncFork[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) - extends Base[E, A](cb)(ec) + private final class AsyncFork[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) private final class TrampolinedCallback[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Base[E, A](cb)(ec) with TrampolinedRunnable @@ -343,8 +388,8 @@ object Callback { /** Base implementation for `trampolined` and `forked`. */ private class Base[E, A](cb: Callback[E, A])(implicit ec: ExecutionContext) extends Callback[E, A] with Runnable { private val state = monix.execution.atomic.AtomicInt(0) - private var value: A = null.asInstanceOf[A] - private var error: E = null.asInstanceOf[E] + private var value: A = uninitialized[A] + private var error: E = uninitialized[E] override final def onSuccess(value: A): Unit = if (!tryOnSuccess(value)) { @@ -408,7 +453,8 @@ object Callback { private final class Safe[-E, -A](underlying: Callback[E, A])(implicit r: UncaughtExceptionReporter) extends Callback[E, A] { - private val isActive = monix.execution.atomic.AtomicBoolean(true) + private val isActive = + monix.execution.atomic.AtomicBoolean(true) override def onSuccess(value: A): Unit = { if (isActive.compareAndSet(true, false)) diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 6b86ceb5d..a949825cd 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -108,11 +108,6 @@ object MimaFilters { ) lazy val changesFor_3_5_0 = Seq( - // Callback#Builders was internal scaffolding for builder DSL; apply()Boolean was its companion helper — both removed in Callback cleanup. - exclude[DirectMissingMethodProblem]("monix.execution.Callback.apply"), - exclude[MissingClassProblem]("monix.execution.Callback$Builders"), - exclude[MissingClassProblem]("monix.execution.Callback$Builders$"), - // Atomic API classes moved to monix-execution-atomic sub-artifact (3.5.0 modularisation); // monix-execution declares monix-execution-atomic as a compile dependency so all consumers receive // the classes transitively — no actual binary break for downstream code. @@ -216,11 +211,6 @@ object MimaFilters { exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator"), exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator$"), - // Scala 3-specific: Callback.Builders was a synthetic static field in the Scala 3 encoding of - // the nested Builders class/object inside Callback companion; already filtered as MissingClassProblem - // above, but Scala 3 Mima also surfaces it as a MissingFieldProblem for the static field accessor. - exclude[MissingFieldProblem]("monix.execution.Callback.Builders"), - // Scala 3-specific: AsyncQueue constructor is private[monix] — external code cannot call it. // The synthetic default accessor for the 3rd constructor parameter ($default$3) is exposed // differently across Scala 3 versions; this is not callable by downstream users. From 240ec65bbce0a08fada88249c9c3c3206e723127 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Tue, 7 Apr 2026 18:16:02 +0300 Subject: [PATCH 65/69] Mima refactoring (#2022) --- build.sbt | 73 +++-- project/MimaFilters.scala | 551 +++++++++++++++++--------------------- 2 files changed, 290 insertions(+), 334 deletions(-) diff --git a/build.sbt b/build.sbt index c5318d54a..b4f547e3d 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,7 @@ import sbt.Keys.version import sbt.{ Def, Global, Tags } import com.github.sbt.git.SbtGit.GitKeys.useConsoleForROGit +import com.typesafe.tools.mima.core.ProblemFilter import org.typelevel.scalacoptions.ScalacOptions import scala.collection.immutable.SortedSet @@ -195,9 +196,14 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( Seq( "-Xfatal-warnings", "-Xsource:3-cross", + // These break binary backwards compatibility, enabled by -Xsource:3, so disabling them + "-Xsource-features:-case-apply-copy-access,-case-companion-function,-infer-override", // Silence various warnings that are false positives or intentional patterns - "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent,any:warning-verbose", - "-Wconf:cat=unused-nowarn:s" + // "-Wconf:cat=other-pure-statement:silent,cat=lint-constant:silent,cat=unused-privates:silent,cat=unused-locals:silent,cat=unused-params:silent,cat=unused-imports:silent,cat=w-flag-numeric-widen:silent,any:warning-verbose", + // @nowarn statements for Scala 3 will generate unused-nowarn for Scala 2.13 + "-Wconf:cat=unused-nowarn:s", + // Disabling via -Xsource-features will generate these warnings + "-Wconf:cat=scala3-migration:s", ) case Some((3, _)) => Seq( @@ -434,14 +440,10 @@ lazy val sharedJSSettings = Seq( } ) -def mimaSettings(projectName: String) = Seq( +def mimaSettings(projectName: String, exclusions: Seq[ProblemFilter]) = Seq( ThisBuild / mimaFailOnNoPrevious := false, mimaPreviousArtifacts := Set("io.monix" %% projectName % monixSeries), - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_0_1, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_2_0, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_3_0, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_5_0 + mimaBinaryIssueFilters ++= exclusions ) // ------------------------------------------------------------------------------------------------ @@ -478,13 +480,13 @@ def monixSubModule( def jvmModule( projectName: String, - withMimaChecks: Boolean, - publishArtifacts: Boolean + publishArtifacts: Boolean, + withMimaChecks: Option[Seq[ProblemFilter]] ): Project => Project = pr => { pr.configure(monixSubModule(projectName, publishArtifacts = publishArtifacts)) .settings(testDependencies) - .settings(if (withMimaChecks) mimaSettings(projectName) else Seq.empty) + .settings(withMimaChecks.toSeq.flatMap(mimaSettings(projectName, _))) } def jsProfile(projectName: String, publishArtifacts: Boolean): Project => Project = @@ -497,16 +499,16 @@ def jsProfile(projectName: String, publishArtifacts: Boolean): Project => Projec def crossModule( projectName: String, - withMimaChecks: Boolean = true, - publishArtifacts: Boolean = true, - crossSettings: Seq[sbt.Def.SettingsDefinition] = Nil + withMimaChecks: Option[Seq[ProblemFilter]], + publishArtifacts: Boolean, + crossSettings: Seq[sbt.Def.SettingsDefinition] ): MonixCrossModule = { MonixCrossModule( jvm = jvmModule( projectName = projectName, - withMimaChecks = withMimaChecks, - publishArtifacts = publishArtifacts + publishArtifacts = publishArtifacts, + withMimaChecks = withMimaChecks ).andThen(_.settings(crossSettings: _*)), js = jsProfile( projectName = projectName, @@ -558,8 +560,9 @@ lazy val monix = project lazy val coreProfile = crossModule( - projectName = "monix", - withMimaChecks = false, + projectName = "monix", + withMimaChecks = None, + publishArtifacts = true, crossSettings = Seq( description := "Root project for Monix, a library for asynchronous programming in Scala. See: https://monix.io" ) @@ -585,8 +588,8 @@ lazy val executionShadedJCTools = project .configure( jvmModule( projectName = "monix-internal-jctools", - withMimaChecks = false, - publishArtifacts = true + publishArtifacts = true, + withMimaChecks = None ) ) .settings(assemblyShadeSettings) @@ -607,8 +610,9 @@ lazy val executionShadedJCTools = project lazy val executionAtomicProfile = crossModule( - projectName = "monix-execution-atomic", - withMimaChecks = false, + projectName = "monix-execution-atomic", + withMimaChecks = None, + publishArtifacts = true, crossSettings = Seq( description := "Sub-module of Monix, exposing low-level atomic references. See: https://monix.io", ) @@ -627,7 +631,9 @@ lazy val executionAtomicJS = project.in(file("monix-execution/atomic/js")) lazy val executionProfile = crossModule( - projectName = "monix-execution", + projectName = "monix-execution", + withMimaChecks = Some(MimaFilters.MonixExecution.all), + publishArtifacts = true, crossSettings = Seq( description := "Sub-module of Monix, exposing low-level primitives for dealing with async execution. See: https://monix.io", libraryDependencies += implicitBoxLib.value @@ -654,7 +660,9 @@ lazy val executionJS = project lazy val catnapProfile = crossModule( - projectName = "monix-catnap", + projectName = "monix-catnap", + withMimaChecks = Some(MimaFilters.MonixCatnap.all), + publishArtifacts = true, crossSettings = Seq( description := "Sub-module of Monix, exposing pure abstractions built on top of the Cats-Effect type classes. See: https://monix.io", libraryDependencies += catsEffectLib.value @@ -676,7 +684,9 @@ lazy val catnapJS = project lazy val evalProfile = crossModule( - projectName = "monix-eval", + projectName = "monix-eval", + withMimaChecks = Some(MimaFilters.MonixEval.all), + publishArtifacts = true, crossSettings = Seq( description := "Sub-module of Monix, exposing Task and Coeval, for suspending side-effects. See: https://monix.io" ) @@ -699,7 +709,9 @@ lazy val evalJS = project lazy val tailProfile = crossModule( - projectName = "monix-tail", + projectName = "monix-tail", + withMimaChecks = Some(MimaFilters.MonixTail.all), + publishArtifacts = true, crossSettings = Seq( description := "Sub-module of Monix, exposing Iterant for purely functional pull based streaming. See: https://monix.io" ) @@ -722,7 +734,9 @@ lazy val tailJS = project lazy val reactiveProfile = crossModule( - projectName = "monix-reactive", + projectName = "monix-reactive", + withMimaChecks = Some(MimaFilters.MonixReactive.all), + publishArtifacts = true, crossSettings = Seq( description := "Sub-module of Monix, exposing the Observable pattern for modeling of reactive streams. See: https://monix.io" ) @@ -744,12 +758,13 @@ lazy val reactiveJS = project lazy val javaJVM = project .in(file("monix-java")) .configure( - jvmModule( + monixSubModule( projectName = "monix-java", - withMimaChecks = true, publishArtifacts = true ) ) + .settings(testDependencies) + .settings(mimaSettings("monix-java", MimaFilters.MonixJava.all)) .dependsOn(executionJVM % "provided->compile; test->test") .dependsOn(evalJVM % "provided->compile; test->test") diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index a949825cd..64f09f150 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -2,310 +2,251 @@ import com.typesafe.tools.mima.core.ProblemFilters.exclude import com.typesafe.tools.mima.core._ object MimaFilters { - lazy val changesFor_3_2_0: Seq[ProblemFilter] = Seq( - // Signature change in internal instance - exclude[IncompatibleResultTypeProblem]("monix.catnap.internal.ParallelApplicative.apply"), - exclude[MissingClassProblem]("monix.eval.internal.TaskGather*") - ) - lazy val changesFor_3_0_1: Seq[ProblemFilter] = Seq( - // Signature changes in internal classes - exclude[DirectMissingMethodProblem]("monix.execution.internal.Trampoline.*"), - exclude[DirectMissingMethodProblem]("monix.execution.schedulers.TrampolineExecutionContext#JVMNormalTrampoline.*"), - exclude[DirectMissingMethodProblem]("monix.execution.schedulers.TrampolineExecutionContext#JVMOptimalTrampoline.*") - ) - - lazy val changesFor_3_3_0 = Seq( - // Upgraded JCTools to 3.0.0 - exclude[IncompatibleMethTypeProblem]( - "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPMC.this" - ), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java7.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#MPMC.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java8SPSC.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.apply"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.this"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.apply"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.this"), - exclude[IncompatibleMethTypeProblem]( - "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPSC.this" - ), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.apply"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.apply"), - exclude[IncompatibleMethTypeProblem]( - "monix.execution.internal.collection.queues.FromMessagePassingQueue#MPMC.this" - ), - exclude[MissingTypesProblem]("monix.execution.internal.collection.queues.QueueDrain"), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java8MPSC.this"), - exclude[IncompatibleMethTypeProblem]( - "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8MPSC.this" - ), - exclude[IncompatibleMethTypeProblem]( - "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java7.this" - ), - exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java8SPMC.this"), - exclude[IncompatibleMethTypeProblem]( - "monix.reactive.observers.buffers.ConcurrentQueue#FromMessagePassingQueue.this" - ), - // Fixed annoying incremental compilation error with Coeval deprecations - exclude[MissingTypesProblem]("monix.eval.CoevalInstancesLevel0"), - exclude[MissingTypesProblem]("monix.eval.Coeval$DeprecatedExtensions"), - exclude[MissingTypesProblem]("monix.eval.Coeval$"), - exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$Companion"), - exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$Extensions"), - exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated"), - exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$"), - // Fixed observable.takeLast, replaced with TakeLastObservable - exclude[MissingClassProblem]("monix.reactive.internal.operators.TakeLastOperator"), - // Dropped Scala 2.11 support - exclude[MissingTypesProblem]("monix.execution.Scheduler$Extensions"), - exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package"), - exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$"), - exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$ForkJoinPool$"), - exclude[MissingClassProblem]("monix.execution.schedulers.ExecuteExtensions"), - // Changes in Task model due to Asynchronous Stack Traces - exclude[DirectMissingMethodProblem]("monix.eval.Task#Context.copy"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#Context.this"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Context.apply"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#Context.apply"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Map.apply"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Map.this"), - exclude[IncompatibleResultTypeProblem]("monix.eval.Task#Map.copy$default$3"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#Map.index"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Map.copy"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#FlatMap.apply"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#FlatMap.this"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#FlatMap.copy"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#Async.apply"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#Async.copy"), - exclude[DirectMissingMethodProblem]("monix.eval.Task#Async.this"), - // Signature changes in internal classes - exclude[DirectMissingMethodProblem]("monix.execution.CancelableFuture#Async*"), - exclude[DirectMissingMethodProblem]("monix.execution.CancelableFuture#Pure*"), - // Changes in Coeval model due to Better Stack Traces - exclude[DirectMissingMethodProblem]("monix.eval.Coeval#FlatMap.copy"), - exclude[DirectMissingMethodProblem]("monix.eval.Coeval#FlatMap.this"), - exclude[DirectMissingMethodProblem]("monix.eval.Coeval#Map.index"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Coeval#Map.copy"), - exclude[IncompatibleResultTypeProblem]("monix.eval.Coeval#Map.copy$default$3"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Coeval#Map.this"), - exclude[IncompatibleMethTypeProblem]("monix.eval.Coeval#Map.apply"), - exclude[DirectMissingMethodProblem]("monix.eval.Coeval#FlatMap.apply"), - // Remove unused fusionMaxStackDepth - exclude[DirectMissingMethodProblem]("monix.execution.internal.Platform.fusionMaxStackDepth"), - exclude[DirectMissingMethodProblem]("monix.execution.internal.Platform.fusionMaxStackDepth") - ) - - lazy val changesFor_3_4_0 = Seq( - // Remove redundant private interfaces after Scala 2.11 removal - exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package"), - exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$"), - exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$ForkJoinPool$"), - exclude[MissingClassProblem]("monix.execution.misc.compat"), - exclude[MissingClassProblem]("monix.execution.misc.compat$"), - // Scala 3 / Dotty support - exclude[MissingClassProblem]("monix.execution.schedulers.AdaptedThreadPoolExecutorMixin") - ) - - lazy val changesFor_3_5_0 = Seq( - // Atomic API classes moved to monix-execution-atomic sub-artifact (3.5.0 modularisation); - // monix-execution declares monix-execution-atomic as a compile dependency so all consumers receive - // the classes transitively — no actual binary break for downstream code. - exclude[MissingClassProblem]("monix.execution.atomic.Atomic"), - exclude[MissingClassProblem]("monix.execution.atomic.Atomic$"), - exclude[MissingClassProblem]("monix.execution.atomic.Atomic$Macros"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicAny"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicAny$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBoolean"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBoolean$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicBooleanBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicByteBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicCharBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicDoubleBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicFloatBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicIntBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicLongBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicShortBuilder$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicByte"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicByte$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicChar"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicChar$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicDouble"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicDouble$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicFloat"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicFloat$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicInt"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicInt$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicLong"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicLong$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumber"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumberAny"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumberAny$"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicShort"), - exclude[MissingClassProblem]("monix.execution.atomic.AtomicShort$"), - exclude[MissingClassProblem]("monix.execution.atomic.Implicits"), - exclude[MissingClassProblem]("monix.execution.atomic.Implicits$"), - exclude[MissingClassProblem]("monix.execution.atomic.Implicits$Level1"), - exclude[MissingClassProblem]("monix.execution.atomic.Implicits$Level2"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Left128$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Left64$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$LeftRight128$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$LeftRight256$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$NoPadding$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Right128$"), - exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Right64$"), - exclude[MissingClassProblem]("monix.execution.atomic.package"), - exclude[MissingClassProblem]("monix.execution.atomic.package$"), - - // Internal atomic implementation helpers replaced by JDK 17 / VarHandle equivalents; - // these classes were explicitly marked @InternalApi and never part of the public contract. - exclude[MissingClassProblem]("monix.execution.internal.InternalApi"), - exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxPaddingStrategy"), - exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedInt"), - exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedLong"), - exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedObject"), - exclude[MissingClassProblem]("monix.execution.internal.atomic.Factory"), - exclude[MissingClassProblem]("monix.execution.internal.atomic.UnsafeAccess"), - exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromCircularQueue$Java7"), - exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue$Java7"), - - // Macro implementation helpers moved from monix.execution.misc to monix.execution.atomic.internal - // as part of the atomic sub-module extraction; all were private macro infrastructure. - exclude[MissingClassProblem]("monix.execution.misc.HygieneUtilMacros"), - exclude[MissingClassProblem]("monix.execution.misc.HygieneUtilMacros$util$"), - exclude[MissingClassProblem]("monix.execution.misc.InlineMacros"), - exclude[MissingClassProblem]("monix.execution.misc.Local$Macros"), - exclude[MissingClassProblem]("monix.execution.misc.test.TestBox"), - exclude[MissingClassProblem]("monix.execution.misc.test.TestBox$"), - exclude[MissingClassProblem]("monix.execution.misc.test.TestBox$Macros"), - exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros"), - exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros$"), - exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros$Macros"), - - // ConcurrentChannel's private inner classes ChanProducer and ChanConsumer used AtomicAny in their - // constructor signatures; AtomicAny was moved to monix-execution-atomic sub-artifact in 3.5.0. - // Both classes are declared `private final class` inside ConcurrentChannel — not accessible to - // external code. The constructor-signature mismatch is a side-effect of the atomic module split. - exclude[DirectMissingMethodProblem]("monix.catnap.ConcurrentChannel#ChanConsumer.this"), - exclude[DirectMissingMethodProblem]("monix.catnap.ConcurrentChannel#ChanProducer.this"), - - // TaskMapBoth#Register is a `private final class` inside `private[eval] object TaskMapBoth` - // (package monix.eval.internal). sendSignal took Callback as parameter; Callback scaffolding was - // removed in 3.5.0 (same cleanup already filtered above). Purely internal, not public API. - exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskMapBoth#Register.sendSignal"), - - // IterantZipMap#Loop is a private inner implementation class inside monix.tail.internal. - // processOneASeqB changed signature due to internal Cats-Effect API alignment. - exclude[DirectMissingMethodProblem]("monix.tail.internal.IterantZipMap#Loop.processOneASeqB"), - - // ConcurrentSubject.async(Scheduler) remains available to Scala call-sites via the companion-module - // method on ConcurrentSubject$. The package-qualified source shim no longer gets a Java static - // forwarder on the outer ConcurrentSubject class, so MiMa reports only that Java-facing forwarder. - exclude[DirectMissingMethodProblem]("monix.reactive.subjects.ConcurrentSubject.async"), - - // CollectWhileOperator is private[reactive] — inaccessible outside the reactive package. - exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator"), - exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator$"), - - // Scala 3-specific: AsyncQueue constructor is private[monix] — external code cannot call it. - // The synthetic default accessor for the 3rd constructor parameter ($default$3) is exposed - // differently across Scala 3 versions; this is not callable by downstream users. - exclude[DirectMissingMethodProblem]("monix.execution.AsyncQueue.$default$3"), - - // Scala 3-specific: IncompatibleResultTypeProblem for alreadyCanceled() in the four cancelable - // companions is a Scala 3 Mima encoding artifact. In 3.4.0 the Scala 3 compiler encoded the - // return type as the parent trait Cancelable#Empty; in 3.5.0 it encodes it as the concrete subtype - // (Bool or BooleanCancelable / BooleanCancelableF). The semantics are identical — the value IS - // a subtype, so callers see a strictly more specific type, which is binary-compatible. - exclude[IncompatibleResultTypeProblem]("monix.execution.cancelables.AssignableCancelable.alreadyCanceled"), - exclude[IncompatibleResultTypeProblem]("monix.execution.cancelables.BooleanCancelable.alreadyCanceled"), - exclude[IncompatibleResultTypeProblem]("monix.catnap.cancelables.AssignableCancelableF.alreadyCanceled"), - exclude[IncompatibleResultTypeProblem]("monix.catnap.cancelables.BooleanCancelableF.alreadyCanceled"), - - // Scala 2.13.17+ stopped emitting scala.runtime.AbstractFunctionN as a mixin on case-class - // companion objects. MiMa surfaces this as MissingTypesProblem on the companion ($) class. - // This is a pure encoding artifact — no actual binary break for downstream code. - - // monix-execution: Ack.Continue / Ack.Stop are case objects extending Future; their value() - // and result() methods shift encoding when AbstractFunctionN mixin is removed. - exclude[DirectMissingMethodProblem]("monix.execution.Ack#Continue.value"), - exclude[IncompatibleResultTypeProblem]("monix.execution.Ack#Continue.result"), - exclude[DirectMissingMethodProblem]("monix.execution.Ack#Stop.value"), - exclude[IncompatibleResultTypeProblem]("monix.execution.Ack#Stop.result"), - - // monix-reactive: AbstractFunctionN encoding artifact on case-class companions - exclude[MissingTypesProblem]("monix.reactive.Notification$OnError$"), - exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$BackPressure$"), - exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$ClearBuffer$"), - exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$DropNew$"), - exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$DropOld$"), - exclude[MissingTypesProblem]("monix.reactive.OverflowStrategy$Fail$"), - exclude[MissingTypesProblem]("monix.reactive.internal.operators.ConcatMapObservable$FlatMapState$Active$"), - exclude[MissingTypesProblem]("monix.reactive.internal.operators.ConcatMapObservable$FlatMapState$WaitComplete$"), - exclude[MissingTypesProblem]("monix.reactive.internal.operators.ConcatMapObservable$FlatMapState$WaitOnNextChild$"), - exclude[MissingTypesProblem]("monix.reactive.internal.operators.MapTaskObservable$MapTaskState$Active$"), - exclude[MissingTypesProblem]("monix.reactive.internal.operators.MapTaskObservable$MapTaskState$WaitComplete$"), - exclude[MissingTypesProblem]( - "monix.reactive.internal.rstreams.ReactiveSubscriberAsMonixSubscriber$RequestsQueue$ActiveState$" - ), - exclude[MissingTypesProblem]("monix.execution.BufferCapacity$Bounded$"), - exclude[MissingTypesProblem]("monix.execution.BufferCapacity$Unbounded$"), - exclude[MissingTypesProblem]("monix.execution.ExecutionModel$BatchedExecution$"), - exclude[MissingTypesProblem]("monix.execution.cancelables.CompositeCancelable$Active$"), - exclude[MissingTypesProblem]("monix.execution.cancelables.OrderedCancelable$Active$"), - exclude[MissingTypesProblem]("monix.execution.cancelables.RefCountCancelable$State$"), - exclude[MissingTypesProblem]("monix.execution.cancelables.SingleAssignCancelable$State$IsActive$"), - exclude[MissingTypesProblem]("monix.execution.exceptions.DummyException$"), - // DummyException extends Exception which extends Function1 in 3.4.0 encoding; andThen/compose - // were inherited from AbstractFunction1 which is no longer mixed in as of Scala 2.13.17+. - exclude[DirectMissingMethodProblem]("monix.execution.exceptions.DummyException.andThen"), - exclude[DirectMissingMethodProblem]("monix.execution.exceptions.DummyException.compose"), - exclude[MissingTypesProblem]("monix.execution.internal.GenericSemaphore$State$"), - exclude[MissingTypesProblem]("monix.execution.rstreams.ReactivePullStrategy$FixedWindow$"), - exclude[MissingTypesProblem]("monix.execution.rstreams.SingleAssignSubscription$State$EmptyRequest$"), - exclude[MissingTypesProblem]("monix.execution.rstreams.SingleAssignSubscription$State$WithSubscription$"), - exclude[MissingTypesProblem]("monix.execution.schedulers.ReferenceScheduler$WrappedScheduler$"), - // StartAsyncBatchRunnable$ companion lost AbstractFunctionN mixin; tupled/curried were - // inherited from AbstractFunction2 which is no longer mixed in as of Scala 2.13.17+. - exclude[MissingTypesProblem]("monix.execution.schedulers.StartAsyncBatchRunnable$"), - exclude[DirectMissingMethodProblem]("monix.execution.schedulers.StartAsyncBatchRunnable.tupled"), - exclude[DirectMissingMethodProblem]("monix.execution.schedulers.StartAsyncBatchRunnable.curried"), - exclude[MissingTypesProblem]("monix.execution.schedulers.TestScheduler$State$"), - exclude[MissingTypesProblem]("monix.catnap.CircuitBreaker$Closed$"), - exclude[MissingTypesProblem]("monix.eval.Coeval$Error$"), - exclude[MissingTypesProblem]("monix.eval.Task$Options$"), - exclude[MissingTypesProblem]("monix.eval.internal.ForwardCancelable$Active$"), - exclude[MissingTypesProblem]("monix.eval.internal.ForwardCancelable$Empty$"), - // makeReleaseFrame is a method on private inner classes inside monix.eval.internal.TaskBracket; - // the companion lost AbstractFunctionN mixin, causing the method signature to shift. - exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskBracket#StartCase.makeReleaseFrame"), - exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskBracket#StartE.makeReleaseFrame"), - exclude[MissingTypesProblem]("monix.eval.internal.TaskConnectionComposite$Active$"), - exclude[MissingTypesProblem]("monix.eval.internal.TaskConnectionRef$IsActive$"), - exclude[MissingTypesProblem]("monix.eval.tracing.CoevalEvent$StackTrace$"), - // PrintingOptions is a case class; its companion lost AbstractFunctionN mixin so - // apply/copy/copy$default$N static forwarders are no longer emitted by scalac 2.13.17+. - exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.apply"), - exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy"), - exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy$default$1"), - exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy$default$2"), - exclude[DirectMissingMethodProblem]("monix.eval.tracing.PrintingOptions.copy$default$3"), - exclude[MissingTypesProblem]("monix.eval.tracing.TaskEvent$StackTrace$"), - exclude[MissingTypesProblem]("monix.tail.internal.IterantToReactivePublisher$Await$"), - exclude[MissingTypesProblem]("monix.tail.internal.IterantToReactivePublisher$Interrupt$"), - exclude[MissingTypesProblem]("monix.tail.internal.IterantToReactivePublisher$Request$"), - - // EmptyBatch.cursor return type widened from EmptyCursor to BatchCursor (covariant widening). - // MiMa reports both IncompatibleResultTypeProblem (type change) and DirectMissingMethodProblem - // (old bridge method absent). Safe: widening is covariant and EmptyCursor extends BatchCursor. - exclude[IncompatibleResultTypeProblem]("monix.tail.batches.EmptyBatch.cursor"), - exclude[DirectMissingMethodProblem]("monix.tail.batches.EmptyBatch.cursor"), - - // BREAKAGE — unfortunately it's something we must live with - exclude[DirectMissingMethodProblem]("monix.tail.IterantBuilders#Apply.suspend$extension"), - ) + // ── Per-sub-project filter buckets ────────────────────────────────────── + + object Monix { + lazy val all: Seq[ProblemFilter] = Seq.empty + } + + object MonixInternalJCTools { + lazy val all: Seq[ProblemFilter] = Seq.empty + } + + object MonixExecutionAtomic { + lazy val all: Seq[ProblemFilter] = Seq.empty + } + + object MonixExecution { + lazy val changesFor_3_0_1: Seq[ProblemFilter] = Seq( + exclude[DirectMissingMethodProblem]("monix.execution.internal.Trampoline.*"), + exclude[DirectMissingMethodProblem]( + "monix.execution.schedulers.TrampolineExecutionContext#JVMNormalTrampoline.*" + ), + exclude[DirectMissingMethodProblem]( + "monix.execution.schedulers.TrampolineExecutionContext#JVMOptimalTrampoline.*" + ) + ) + + lazy val changesFor_3_3_0: Seq[ProblemFilter] = Seq( + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPMC.this" + ), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#Java7.this"), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue#MPMC.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromCircularQueue#Java8SPSC.this" + ), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.apply"), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.this"), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.apply"), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.this"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8SPSC.this" + ), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue.apply"), + exclude[IncompatibleMethTypeProblem]("monix.execution.internal.collection.queues.FromCircularQueue.apply"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#MPMC.this" + ), + exclude[MissingTypesProblem]("monix.execution.internal.collection.queues.QueueDrain"), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromCircularQueue#Java8MPSC.this" + ), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java8MPSC.this" + ), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue#Java7.this" + ), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.internal.collection.queues.FromCircularQueue#Java8SPMC.this" + ), + exclude[MissingTypesProblem]("monix.execution.Scheduler$Extensions"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$ForkJoinPool$"), + exclude[MissingClassProblem]("monix.execution.schedulers.ExecuteExtensions"), + exclude[DirectMissingMethodProblem]("monix.execution.CancelableFuture#Async*"), + exclude[DirectMissingMethodProblem]("monix.execution.CancelableFuture#Pure*"), + exclude[DirectMissingMethodProblem]("monix.execution.internal.Platform.fusionMaxStackDepth"), + exclude[DirectMissingMethodProblem]("monix.execution.internal.Platform.fusionMaxStackDepth") + ) + + lazy val changesFor_3_4_0: Seq[ProblemFilter] = Seq( + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$"), + exclude[MissingClassProblem]("monix.execution.internal.forkJoin.package$ForkJoinPool$"), + exclude[MissingClassProblem]("monix.execution.misc.compat"), + exclude[MissingClassProblem]("monix.execution.misc.compat$"), + exclude[MissingClassProblem]("monix.execution.schedulers.AdaptedThreadPoolExecutorMixin") + ) + + lazy val changesFor_3_5_0: Seq[ProblemFilter] = Seq( + exclude[MissingClassProblem]("monix.execution.atomic.Atomic"), + exclude[MissingClassProblem]("monix.execution.atomic.Atomic$"), + exclude[MissingClassProblem]("monix.execution.atomic.Atomic$Macros"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicAny"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicAny$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBoolean"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBoolean$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicBooleanBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicByteBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicCharBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicDoubleBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicFloatBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicIntBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicLongBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicBuilder$AtomicShortBuilder$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicByte"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicByte$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicChar"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicChar$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicDouble"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicDouble$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicFloat"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicFloat$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicInt"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicInt$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicLong"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicLong$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumber"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumberAny"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicNumberAny$"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicShort"), + exclude[MissingClassProblem]("monix.execution.atomic.AtomicShort$"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits$"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits$Level1"), + exclude[MissingClassProblem]("monix.execution.atomic.Implicits$Level2"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Left128$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Left64$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$LeftRight128$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$LeftRight256$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$NoPadding$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Right128$"), + exclude[MissingClassProblem]("monix.execution.atomic.PaddingStrategy$Right64$"), + exclude[MissingClassProblem]("monix.execution.atomic.package"), + exclude[MissingClassProblem]("monix.execution.atomic.package$"), + exclude[MissingClassProblem]("monix.execution.internal.InternalApi"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxPaddingStrategy"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedInt"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedLong"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.BoxedObject"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.Factory"), + exclude[MissingClassProblem]("monix.execution.internal.atomic.UnsafeAccess"), + exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromCircularQueue$Java7"), + exclude[MissingClassProblem]("monix.execution.internal.collection.queues.FromMessagePassingQueue$Java7"), + exclude[MissingClassProblem]("monix.execution.misc.HygieneUtilMacros"), + exclude[MissingClassProblem]("monix.execution.misc.HygieneUtilMacros$util$"), + exclude[MissingClassProblem]("monix.execution.misc.InlineMacros"), + exclude[MissingClassProblem]("monix.execution.misc.Local$Macros"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestBox"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestBox$"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestBox$Macros"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros$"), + exclude[MissingClassProblem]("monix.execution.misc.test.TestInlineMacros$Macros"), + exclude[DirectMissingMethodProblem]("monix.execution.AsyncQueue.$default$3"), + exclude[IncompatibleResultTypeProblem]("monix.execution.cancelables.AssignableCancelable.alreadyCanceled"), + exclude[IncompatibleResultTypeProblem]("monix.execution.cancelables.BooleanCancelable.alreadyCanceled") + ) + + lazy val all: Seq[ProblemFilter] = + Seq(changesFor_3_0_1, changesFor_3_3_0, changesFor_3_4_0, changesFor_3_5_0).flatten + } + + object MonixCatnap { + lazy val changesFor_3_2_0: Seq[ProblemFilter] = Seq( + exclude[IncompatibleResultTypeProblem]("monix.catnap.internal.ParallelApplicative.apply") + ) + + lazy val changesFor_3_5_0: Seq[ProblemFilter] = Seq( + exclude[DirectMissingMethodProblem]("monix.catnap.ConcurrentChannel#ChanConsumer.this"), + exclude[DirectMissingMethodProblem]("monix.catnap.ConcurrentChannel#ChanProducer.this"), + exclude[IncompatibleResultTypeProblem]("monix.catnap.cancelables.AssignableCancelableF.alreadyCanceled"), + exclude[IncompatibleResultTypeProblem]("monix.catnap.cancelables.BooleanCancelableF.alreadyCanceled") + ) + + lazy val all: Seq[ProblemFilter] = Seq(changesFor_3_2_0, changesFor_3_5_0).flatten + } + + object MonixEval { + lazy val changesFor_3_2_0: Seq[ProblemFilter] = Seq( + exclude[MissingClassProblem]("monix.eval.internal.TaskGather*") + ) + + lazy val changesFor_3_3_0: Seq[ProblemFilter] = Seq( + exclude[MissingTypesProblem]("monix.eval.CoevalInstancesLevel0"), + exclude[MissingTypesProblem]("monix.eval.Coeval$DeprecatedExtensions"), + exclude[MissingTypesProblem]("monix.eval.Coeval$"), + exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$Companion"), + exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$Extensions"), + exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated"), + exclude[MissingClassProblem]("monix.eval.internal.CoevalDeprecated$"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Context.copy"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Context.this"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Context.apply"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Context.apply"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Map.apply"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Map.this"), + exclude[IncompatibleResultTypeProblem]("monix.eval.Task#Map.copy$default$3"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Map.index"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Task#Map.copy"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#FlatMap.apply"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#FlatMap.this"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#FlatMap.copy"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Async.apply"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Async.copy"), + exclude[DirectMissingMethodProblem]("monix.eval.Task#Async.this"), + exclude[DirectMissingMethodProblem]("monix.eval.Coeval#FlatMap.copy"), + exclude[DirectMissingMethodProblem]("monix.eval.Coeval#FlatMap.this"), + exclude[DirectMissingMethodProblem]("monix.eval.Coeval#Map.index"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Coeval#Map.copy"), + exclude[IncompatibleResultTypeProblem]("monix.eval.Coeval#Map.copy$default$3"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Coeval#Map.this"), + exclude[IncompatibleMethTypeProblem]("monix.eval.Coeval#Map.apply"), + exclude[DirectMissingMethodProblem]("monix.eval.Coeval#FlatMap.apply") + ) + + lazy val changesFor_3_5_0: Seq[ProblemFilter] = Seq( + exclude[DirectMissingMethodProblem]("monix.eval.internal.TaskMapBoth#Register.sendSignal") + ) + + lazy val all: Seq[ProblemFilter] = Seq(changesFor_3_2_0, changesFor_3_3_0, changesFor_3_5_0).flatten + } + + object MonixTail { + lazy val changesFor_3_5_0: Seq[ProblemFilter] = Seq( + exclude[DirectMissingMethodProblem]("monix.tail.internal.IterantZipMap#Loop.processOneASeqB"), + exclude[DirectMissingMethodProblem]("monix.tail.IterantBuilders#Apply.suspend$extension") + ) + + lazy val all: Seq[ProblemFilter] = Seq(changesFor_3_5_0).flatten + } + + object MonixReactive { + lazy val changesFor_3_3_0: Seq[ProblemFilter] = Seq( + exclude[IncompatibleMethTypeProblem]( + "monix.reactive.observers.buffers.ConcurrentQueue#FromMessagePassingQueue.this" + ), + exclude[MissingClassProblem]("monix.reactive.internal.operators.TakeLastOperator") + ) + + lazy val changesFor_3_5_0: Seq[ProblemFilter] = Seq( + exclude[DirectMissingMethodProblem]("monix.reactive.subjects.ConcurrentSubject.async"), + exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator"), + exclude[MissingClassProblem]("monix.reactive.internal.operators.CollectWhileOperator$") + ) + + lazy val all: Seq[ProblemFilter] = Seq(changesFor_3_3_0, changesFor_3_5_0).flatten + } + + object MonixJava { + lazy val all: Seq[ProblemFilter] = Seq.empty + } } From f4cf169b44a265129c78fcfb874dd9ad315e23cf Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Tue, 7 Apr 2026 18:25:56 +0300 Subject: [PATCH 66/69] Switch to `main` as main branch --- .github/workflows/build.yml | 2 +- .github/workflows/manual-publish.yml | 2 +- README.md | 24 +++++++++++------------- build.sbt | 6 ------ 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6330a3e7b..22dd170b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -270,7 +270,7 @@ jobs: # publish: # name: Publish to Sonatype - # if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x') + # if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') # needs: [ all_tests ] # env: diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index c49537d14..6c027a7ec 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -6,7 +6,7 @@ on: ref_to_publish: description: 'Ref (branch or tag)' required: true - default: 'refs/heads/series/4.x' + default: 'refs/heads/main' stable_version: description: 'Stable version? (true=staging, false=snapshot)' required: true diff --git a/README.md b/README.md index d97931e45..9565116b3 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,17 @@ Asynchronous, Reactive Programming for Scala and [Scala.js](http://www.scala-js.org/). -[![monix Scala version support](https://index.scala-lang.org/monix/monix/monix/latest-by-scala-version.svg)](https://index.scala-lang.org/monix/monix/monix) - -[![Build](https://github.com/monix/monix/workflows/build/badge.svg?branch=series/4.x)](https://github.com/monix/monix/actions?query=branch%3Aseries%2F4.x+workflow%3Abuild) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix) -[![Discord](https://img.shields.io/discord/632277896739946517.svg?label=&logo=discord&logoColor=ffffff&color=404244&labelColor=6A7EC2)](https://discord.gg/wsVZSEx4Nw) - -- [Overview](#overview) -- [Usage](#usage) - - [Library dependency (sbt)](#library-dependency-sbt) - - [Sub-projects](#sub-projects) -- [Documentation](#documentation) -- [Contributing](#contributing) -- [Adopters](#adopters) -- [License](#license) +[![build](https://github.com/monix/monix/actions/workflows/build.yml/badge.svg)](https://github.com/monix/monix/actions/workflows/build.yml) [![monix Scala version support](https://index.scala-lang.org/monix/monix/monix/latest-by-scala-version.svg)](https://index.scala-lang.org/monix/monix/monix) + +- [Monix](#monix) + - [Overview](#overview) + - [Usage](#usage) + - [Library dependency (sbt)](#library-dependency-sbt) + - [Sub-projects](#sub-projects) + - [Documentation](#documentation) + - [Contributing](#contributing) + - [Adopters](#adopters) + - [License](#license) ## Overview diff --git a/build.sbt b/build.sbt index b4f547e3d..316a16ac7 100644 --- a/build.sbt +++ b/build.sbt @@ -280,10 +280,6 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( // https://github.com/sbt/sbt/issues/2654 incOptions := incOptions.value.withLogRecompileOnMacro(false), - // Series/4.x is unpublished. - // Delete this after the first release ... - ThisBuild / dynverVTagPrefix := false, - // -- Settings meant for deployment on oss.sonatype.org ThisBuild / publishTo := sonatypePublishToBundle.value, ThisBuild / isSnapshot := { @@ -293,8 +289,6 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( ThisBuild / sonatypeProfileName := organization.value, sonatypeSessionName := s"[sbt-sonatype] ${name.value}-${version.value}", - // Only on the Series 4.x branch - ThisBuild / dynverVTagPrefix := false, publishMavenStyle := true, Test / publishArtifact := false, pomIncludeRepository := { _ => false }, // removes optional dependencies From 330fd7d16383297264b271762e6267a07edc8507 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Tue, 7 Apr 2026 18:27:25 +0300 Subject: [PATCH 67/69] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9565116b3..cfec51e39 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ a project exemplifying Monix used both on the server and on the client. ### Library dependency (sbt) -Compatibility baseline for Monix `3.5.x`: +Compatibility baseline: - JDK `17` minimum (`21` validated) - Scala `2.13.18` and Scala `3.8.2` @@ -66,7 +66,7 @@ Compatibility baseline for Monix `3.5.x`: For the stable release (compatible with Cats, and Cats-Effect 2.x): ```scala -libraryDependencies += "io.monix" %% "monix" % "3.5.0" +libraryDependencies += "io.monix" %% "monix" % "x.y.z" ``` ### Sub-projects From f7ce85d964e1616573b43db34bb445e8ff6a3ba3 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Tue, 7 Apr 2026 18:33:54 +0300 Subject: [PATCH 68/69] Fix build on main --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22dd170b0..1c9feda6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: build on: pull_request: - branches: ['series/*'] + branches: ['series/*', 'main'] push: - branches: ['series/*'] + branches: ['series/*', 'main'] tags: ["v[0-9]+*"] jobs: From 13aa0532f0de9a4c139a5d5e57c1f50d3e76a361 Mon Sep 17 00:00:00 2001 From: Alexandru Nedelcu Date: Wed, 8 Apr 2026 10:13:01 +0300 Subject: [PATCH 69/69] Fix formatting --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index 316a16ac7..08b880a35 100644 --- a/build.sbt +++ b/build.sbt @@ -288,7 +288,6 @@ lazy val sharedSettings = pgpSettings ++ Def.settings( ThisBuild / dynverSonatypeSnapshots := !(isVersionStable.value && publishStableMonixVersion.value), ThisBuild / sonatypeProfileName := organization.value, sonatypeSessionName := s"[sbt-sonatype] ${name.value}-${version.value}", - publishMavenStyle := true, Test / publishArtifact := false, pomIncludeRepository := { _ => false }, // removes optional dependencies