Skip to content

Commit 2a585b7

Browse files
authored
Merge pull request #5 from AVSystem/bump-dependencies
Bump SBT 1.12.6, Scala 2.13.18/3.3.7, and all build plugins
2 parents 317be58 + 07c6184 commit 2a585b7

153 files changed

Lines changed: 452 additions & 379 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: build
22

33
on:
44
pull_request:
5-
branches: ['series/*']
5+
branches: [ 'series/*' ]
66
push:
7-
branches: ['series/*']
8-
tags: ["v[0-9]+*"]
7+
branches: [ 'series/*' ]
8+
tags: [ "v[0-9]+*" ]
99

1010
jobs:
1111
jvm-tests:
@@ -17,7 +17,7 @@ jobs:
1717
java: [ 11 ]
1818
# WARN: build.sbt depends on this key path, as scalaVersion and
1919
# crossScalaVersions is determined from it
20-
scala: [ 2.13.8, 3.1.2 ]
20+
scala: [ 2.13.18, 3.3.7 ]
2121

2222
env:
2323
CI: true
@@ -65,8 +65,8 @@ jobs:
6565
# WARN: build.sbt depends on this key path, as scalaVersion and
6666
# crossScalaVersions is determined from it
6767
include:
68-
- { java: 11, scala: 2.13.8 }
69-
- { java: 11, scala: 3.1.2 }
68+
- { java: 11, scala: 2.13.18 }
69+
- { java: 11, scala: 3.3.7 }
7070

7171
env:
7272
CI: true
@@ -118,8 +118,8 @@ jobs:
118118
fail-fast: false
119119
matrix:
120120
include:
121-
- { java: 11, scala: 2.13.8 }
122-
- { java: 11, scala: 3.1.2 }
121+
- { java: 11, scala: 2.13.18 }
122+
- { java: 11, scala: 3.3.7 }
123123

124124
steps:
125125
- uses: actions/checkout@v4
@@ -162,9 +162,9 @@ jobs:
162162
fail-fast: false
163163
matrix:
164164
include:
165-
- { java: 11, scala: 2.13.8 }
165+
- { java: 11, scala: 2.13.18 }
166166
# TODO: enable this after it works!
167-
# - { java: 11, scala: 3.1.2 }
167+
# - { java: 11, scala: 3.3.5 }
168168

169169
steps:
170170
- uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ TAGS
1818
metals.sbt
1919
.vscode
2020
.bsp
21+
.planning/

.jvmopts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
-XX:ReservedCodeCacheSize=250M
55
-XX:+TieredCompilation
66
-XX:-UseGCOverheadLimit
7-
-XX:+CMSClassUnloadingEnabled
87

build.sbt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import sbt.{ Def, Global, Tags }
33

44
import scala.collection.immutable.SortedSet
55
import MonixBuildUtils._
6+
import org.typelevel.scalacoptions.ScalacOptions
67

78
val benchmarkProjects = List(
89
"benchmarksPrev",
@@ -31,9 +32,9 @@ val reactiveStreams_Version = "1.0.4"
3132
val macrotaskExecutor_Version = "1.0.0"
3233
val minitest_Version = "2.9.6"
3334
val implicitBox_Version = "0.3.4"
34-
val kindProjector_Version = "0.13.2"
35+
val kindProjector_Version = "0.13.4"
3536
val betterMonadicFor_Version = "0.3.1"
36-
val silencer_Version = "1.7.8"
37+
val silencer_Version = "1.7.19"
3738
val scalaCompat_Version = "2.7.0"
3839

3940
// The Monix version with which we must keep binary compatibility.
@@ -189,8 +190,19 @@ lazy val sharedSettings = pgpSettings ++ Seq(
189190
"-Wunused:explicits",
190191
"-Ywarn-unused:params",
191192
"-Wunused:params",
192-
"-Xlint:infer-any"
193+
"-Xlint:infer-any",
194+
"-Wnonunit-statement"
193195
),
196+
// Disabled from tpolecat for test compilation:
197+
// -Wunused:patvars triggers on for-comprehension loop vars in tests (pre-existing pattern)
198+
// -Xlint:constant triggers on intentional overflow tests (e.g. Long.MaxValue + 1)
199+
Test / scalacOptions --= {
200+
CrossVersion.partialVersion(scalaVersion.value) match {
201+
case Some((2, 13)) => Seq("-Wunused:patvars", "-Xlint:constant")
202+
case Some((2, 12)) => Seq("-Ywarn-unused:patvars")
203+
case _ => Seq.empty
204+
}
205+
},
194206
// Turning off fatal warnings for doc generation
195207
Compile / doc / tpolecatExcludeOptions ++= ScalacOptions.defaultConsoleExclude,
196208
// Silence everything in auto-generated files
@@ -202,7 +214,9 @@ lazy val sharedSettings = pgpSettings ++ Seq(
202214
},
203215
scalacOptions --= {
204216
if (isDotty.value)
205-
Seq("-Xfatal-warnings")
217+
// tpolecat uses -Werror in Scala 3; disable fatal warnings
218+
// so that pre-existing value-discard and similar patterns don't break Scala 3 builds
219+
Seq("-Werror")
206220
else
207221
Seq()
208222
},

monix-catnap/shared/src/test/scala/monix/execution/TypeClassLawsForCancelableFutureSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ object TypeClassLawsForCancelableFutureSuite extends BaseLawsSuite {
3333
}
3434

3535
test("adaptError") {
36-
implicit val ec = TestScheduler()
36+
implicit val ec: TestScheduler = TestScheduler()
3737
val F = MonadError[CancelableFuture, Throwable]
3838

3939
val fa1 = F.catchNonFatal(1); ec.tick()
@@ -45,7 +45,7 @@ object TypeClassLawsForCancelableFutureSuite extends BaseLawsSuite {
4545
}
4646

4747
test("adaptErrorEval") {
48-
implicit val ec = TestScheduler()
48+
implicit val ec: TestScheduler = TestScheduler()
4949
val F = MonadError[CancelableFuture, Throwable]
5050

5151
val fa1 = F.catchNonFatalEval(Eval.always(1)); ec.tick()
@@ -57,7 +57,7 @@ object TypeClassLawsForCancelableFutureSuite extends BaseLawsSuite {
5757
}
5858

5959
test("flatMap should be stack safe") {
60-
implicit val s = TestScheduler()
60+
implicit val s: TestScheduler = TestScheduler()
6161
val n = 100000
6262
val M = Monad[CancelableFuture]
6363
val f = M.tailRecM(0)(i => M.pure(if (i < n) Left(i + 1) else Right(i)))

monix-eval/shared/src/test/scala/monix/eval/TypeClassLawsForTaskWithCallbackSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class BaseTypeClassLawsForTaskWithCallbackSuite(implicit opts: Task.Options) ext
5151
implicit
5252
A: Eq[A],
5353
ec: TestScheduler,
54-
opts: Options) = {
54+
opts: Options): Eq[Task[A]] = {
5555

5656
Eq.by { task =>
5757
val p = Promise[A]()

monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/AbstractBackPressuredBufferedSubscriber.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717

1818
package monix.reactive.observers.buffers
1919

20-
import monix.execution.Ack
20+
import monix.execution.{Ack, Scheduler}
2121
import monix.execution.Ack.{Continue, Stop}
2222
import monix.execution.internal.collection.JSArrayQueue
2323
import monix.execution.internal.math.nextPowerOf2
24+
2425
import scala.util.control.NonFatal
2526
import monix.reactive.observers.{BufferedSubscriber, Subscriber}
2627

@@ -37,7 +38,7 @@ private[observers] abstract class AbstractBackPressuredBufferedSubscriber[A, R](
3738
private[this] val bufferSize = nextPowerOf2(_size)
3839

3940
private[this] val em = out.scheduler.executionModel
40-
implicit final val scheduler = out.scheduler
41+
implicit final val scheduler: Scheduler = out.scheduler
4142

4243
private[this] var upstreamIsComplete = false
4344
private[this] var downstreamIsComplete = false

monix-reactive/js/src/main/scala/monix/reactive/observers/buffers/SyncBufferedSubscriber.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package monix.reactive.observers.buffers
1919

2020
import monix.eval.Coeval
21-
import monix.execution.Ack
21+
import monix.execution.{Ack, Scheduler}
2222
import monix.execution.Ack.{Continue, Stop}
2323
import monix.execution.internal.collection.{JSArrayQueue, _}
2424

@@ -38,7 +38,7 @@ private[observers] final class SyncBufferedSubscriber[-A] private (
3838
onOverflow: Long => Coeval[Option[A]] = null)
3939
extends BufferedSubscriber[A] with Subscriber.Sync[A] {
4040

41-
implicit val scheduler = out.scheduler
41+
implicit val scheduler: Scheduler = out.scheduler
4242
// to be modified only in onError, before upstreamIsComplete
4343
private[this] var errorThrown: Throwable = _
4444
// to be modified only in onError / onComplete

monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/DeflateOperator.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
package monix.reactive.compression.internal.operators
1919

2020
import java.util.zip.Deflater
21-
22-
import monix.execution.Ack
21+
import monix.execution.{Ack, Scheduler}
2322
import monix.execution.Ack.Continue
2423
import monix.reactive.Observable.Operator
2524
import monix.reactive.compression.{CompressionLevel, CompressionParameters, CompressionStrategy, FlushMode}
@@ -36,7 +35,7 @@ private[compression] final class DeflateOperator(
3635
) extends Operator[Array[Byte], Array[Byte]] {
3736
override def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] = {
3837
new Subscriber[Array[Byte]] {
39-
implicit val scheduler = out.scheduler
38+
implicit val scheduler: Scheduler = out.scheduler
4039

4140
private[this] var ack: Future[Ack] = Continue
4241
private[this] val deflate =

monix-reactive/jvm/src/main/scala/monix/reactive/compression/internal/operators/GunzipOperator.scala

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,11 @@ package monix.reactive.compression.internal.operators
1919

2020
import java.util.zip.{CRC32, DataFormatException, Inflater}
2121
import java.{util => ju}
22-
23-
import monix.execution.Ack
22+
import monix.execution.{Ack, Scheduler}
2423
import monix.execution.Ack.{Continue, Stop}
2524
import monix.reactive.Observable.Operator
2625
import monix.reactive.compression.internal.operators.Gunzipper._
27-
import monix.reactive.compression.{
28-
gzipCompressionMethod,
29-
gzipFlag,
30-
gzipMagicFirstByte,
31-
gzipMagicSecondByte,
32-
CompressionException
33-
}
26+
import monix.reactive.compression.{CompressionException, gzipCompressionMethod, gzipFlag, gzipMagicFirstByte, gzipMagicSecondByte}
3427
import monix.reactive.observers.Subscriber
3528

3629
import scala.annotation.tailrec
@@ -42,7 +35,7 @@ private[compression] final class GunzipOperator(bufferSize: Int) extends Operato
4235

4336
def apply(out: Subscriber[Array[Byte]]): Subscriber[Array[Byte]] =
4437
new Subscriber[Array[Byte]] {
45-
implicit val scheduler = out.scheduler
38+
implicit val scheduler: Scheduler = out.scheduler
4639

4740
private[this] var isDone = false
4841
private[this] var ack: Future[Ack] = _

0 commit comments

Comments
 (0)