Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #1554

Merged
merged 5 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.15, 2.13.8, 3.1.2 ]

env:
CI: true
Expand Down Expand Up @@ -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.0 }
- { java: 8, scala: 2.12.15 }
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }

env:
CI: true
Expand Down Expand Up @@ -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.0 }
- { java: 8, scala: 2.12.15 }
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -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.0 }
# - { java: 8, scala: 3.1.2 }

steps:
- uses: actions/checkout@v2
Expand Down
30 changes: 16 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import sbt.{Def, Global, Tags}
import scala.collection.immutable.SortedSet
import MonixBuildUtils._


val benchmarkProjects = List(
"benchmarksPrev",
"benchmarksNext"
Expand All @@ -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.12.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"
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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -315,10 +314,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
Expand Down Expand Up @@ -360,14 +358,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",
)
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
24 changes: 12 additions & 12 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")