Skip to content

Commit

Permalink
Update To Latest ZIO Version (#674)
Browse files Browse the repository at this point in the history
* update to latest zio version

* update scala 3 version
  • Loading branch information
adamgfraser authored Sep 12, 2023
1 parent b120f74 commit d884406
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
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: ['[email protected]', '[email protected]']
scala: ['2.12.17', '2.13.10', '3.2.1']
scala: ['2.12.17', '2.13.10', '3.3.0']
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.2.1'
if: matrix.scala != '3.3.0'
run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }}
- name: Run dotty tests
if: matrix.scala == '3.2.1' && matrix.platform == 'JVM'
if: matrix.scala == '3.3.0' && matrix.platform == 'JVM'
run: sbt ++${{ matrix.scala }}! testJVM

ci:
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ lazy val root = project
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)

val zioVersion = "2.0.13"
val zioVersion = "2.0.16"
val catsVersion = "2.9.0"
val catsEffectVersion = "3.4.8"
val catsMtlVersion = "1.3.0"
Expand Down
4 changes: 2 additions & 2 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object BuildHelper {

val Scala212 = "2.12.17"
val Scala213 = "2.13.10"
val Scala3 = "3.2.1"
val Scala3 = "3.3.0"

private val stdOptions = Seq(
"-deprecation",
Expand Down Expand Up @@ -61,7 +61,7 @@ object BuildHelper {

def extraOptions(scalaVersion: String, optimize: Boolean) =
CrossVersion.partialVersion(scalaVersion) match {
case Some((3, 2)) =>
case Some((3, 3)) =>
std3xOptions
case Some((2, 13)) =>
Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,11 @@ private[zio] trait CatsSpecBase

implicit def runtime(implicit ticker: Ticker): Runtime[Any] = {
val tickerExecutor = Executor.fromExecutionContext(ticker.ctx)
val fiberId = Unsafe.unsafe(implicit u => FiberId.make(Trace.empty))
val fiberRefs = FiberRefs(
Map(
FiberRef.overrideExecutor -> ::(fiberId -> Some(tickerExecutor), Nil),
FiberRef.currentBlockingExecutor -> ::(fiberId -> tickerExecutor, Nil),
DefaultServices.currentServices -> ::(fiberId -> DefaultServices.live.add[Clock](testClock), Nil)
)
)
val fiberId = FiberId.make(Trace.empty)(Unsafe.unsafe)
val fiberRefs = FiberRefs.empty
.updatedAs(fiberId)(FiberRef.overrideExecutor, Some(tickerExecutor))
.updatedAs(fiberId)(FiberRef.currentBlockingExecutor, tickerExecutor)
.updatedAs(fiberId)(DefaultServices.currentServices, DefaultServices.live.add[Clock](testClock))
val runtimeFlags = RuntimeFlags.default
Runtime(ZEnvironment.empty, fiberRefs, runtimeFlags)
}
Expand Down

0 comments on commit d884406

Please sign in to comment.