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 to ZIO 2.0.22 and latest Scala LTS + maintenance versions #690

Merged
merged 5 commits into from
Apr 12, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
java: ['adopt@1.8', 'adopt@1.11']
scala: ['2.12.17', '2.13.10', '3.3.0']
scala: ['2.12.19', '2.13.13', '3.3.3']
platform: ['JVM', 'JS']
steps:
- name: Checkout current branch
Expand All @@ -45,10 +45,10 @@ jobs:
- name: Cache scala dependencies
uses: coursier/cache-action@v5
- name: Run tests
if: matrix.scala != '3.3.0'
if: matrix.scala != '3.3.3'
run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }}
- name: Run dotty tests
if: matrix.scala == '3.3.0' && matrix.platform == 'JVM'
if: matrix.scala == '3.3.3' && matrix.platform == 'JVM'
run: sbt ++${{ matrix.scala }}! testJVM

ci:
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ lazy val root = project
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)

val zioVersion = "2.0.21"
val zioVersion = "2.0.22"
val catsVersion = "2.9.0"
val catsEffectVersion = "3.5.3"
val catsEffectVersion = "3.5.4"
val catsMtlVersion = "1.3.0"
val disciplineScalaTestVersion = "2.2.0"
val fs2Version = "3.9.4"
val fs2Version = "3.10.2"
val scalaJavaTimeVersion = "2.5.0"

lazy val zioInteropTracer = crossProject(JSPlatform, JVMPlatform)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import zio.stream.{ Stream, ZStream }
import zio.test.*

object CoreSummonSpec extends ZIOSpecDefault {
override def spec =
override def spec: Spec[Any, Throwable] =
suite("summons from catz.core work with only a cats-core dependency")(
test("ZIO instances") {
val monad = implicitly[Monad[UIO]]
Expand Down
8 changes: 4 additions & 4 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import BuildInfoKeys._
object BuildHelper {
val testDeps = Seq("org.scalacheck" %% "scalacheck" % "1.17.0" % Test)

val Scala212 = "2.12.17"
val Scala213 = "2.13.10"
val Scala3 = "3.3.0"
val Scala212 = "2.12.19"
val Scala213 = "2.13.13"
val Scala3 = "3.3.3"

private val stdOptions = Seq(
"-deprecation",
Expand Down Expand Up @@ -92,7 +92,7 @@ object BuildHelper {
scalacOptions ++= stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value),
libraryDependencies ++= testDeps ++ {
if (isDotty(scalaVersion.value)) Seq.empty
else Seq(compilerPlugin("org.typelevel" % "kind-projector" % "0.13.2") cross CrossVersion.full)
else Seq(compilerPlugin("org.typelevel" % "kind-projector" % "0.13.3") cross CrossVersion.full)
},
Test / parallelExecution := true,
incOptions ~= (_.withLogRecompileOnMacro(false)),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.2
sbt.version=1.9.9
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import zio.Trace

object InteropTracerSpec extends ZIOSpecDefault {

private val myLambda: () => Any = () => ()
override def spec =
private val myLambda: () => Any = () => ()
override def spec: Spec[Any, Throwable] =
suite("InteropTracerSpec")(
test("lambda tracing") {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import zio.test.*
import zio.*

object CatsInteropSpec extends CatsRunnableSpec {
def spec = suite("Cats interop")(
def spec: Spec[Any, Throwable] = suite("Cats interop")(
test("cats fiber wrapped in Resource can be canceled") {
for {
promise <- Promise.make[Nothing, Int]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import scala.collection.mutable

object CatsZManagedSyntaxSpec extends CatsRunnableSpec {

def spec =
def spec: Spec[Any, Throwable] =
suite("CatsZManagedSyntaxSpec")(
suite("toManaged")(
test("calls finalizers correctly when use is externally interrupted") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import zio.test.*
import zio.test.interop.catz.test.*

object Fs2ZioSpec extends CatsRunnableSpec {
def spec =
def spec: Spec[Any, Throwable] =
suite("ZIO with Fs2")(
suite("fs2 parJoin")(
testF("works if F is cats.effect.IO") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object catzQueueSpec extends CatsRunnableSpec {
actual <- q.takeAll
} yield assert(actual)(equalTo(expected.toList))

def spec = suite("catzQueueSpec")(
def spec: Spec[Any, Throwable] = suite("catzQueueSpec")(
testF("can use a bounded queue from Cats Effect IO")(boundedQueueTest[CIO]),
testF("can use a dropping queue from Cats Effect IO")(droppingQueueTest[CIO]),
testF("can use a sliding queue from Cats Effect IO")(slidingQueueTest[CIO]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object fs2StreamSpec extends ZIOSpecDefault {
y <- expected.runCollect
} yield assert(x)(equalTo(y))

def spec = suite("zio.stream.ZStream <-> fs2.Stream")(
def spec: Spec[Any, Throwable] = suite("zio.stream.ZStream <-> fs2.Stream")(
suite("test toFs2Stream conversion")(
test("simple stream")(check(Gen.chunkOf(Gen.int)) { (chunk: Chunk[Int]) =>
assertEqual(ZStream.fromChunk(chunk).toFs2Stream, fs2StreamFromChunk(chunk))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ abstract class CatsRunnableSpec extends ZIOSpecDefault {
Unsafe.unsafe { implicit u =>
runtime.unsafe.runToFuture {
ZIO.fromFuture { implicit ec =>
Dispatcher.parallel[CIO].allocated.unsafeToFuture().andThen { case Success((dispatcher, close)) =>
openDispatcher = dispatcher
Dispatcher.parallel[CIO].allocated.unsafeToFuture().andThen { case Success((disp, close)) =>
openDispatcher = disp
closeDispatcher = close
}
}.orDie
}
}

override val aspects = Chunk(
override val aspects: Chunk[TestAspect[Nothing, Any, Nothing, Any]] = Chunk(
TestAspect.timeout(1.minute),
TestAspect.afterAll(ZIO.fromFuture(_ => closeDispatcher.unsafeToFuture()).orDie)
)
Expand Down
Loading