Skip to content

Commit

Permalink
Update dependencies (#1142)
Browse files Browse the repository at this point in the history
* Update dependencies

* Update workflow

* Mark macro test flaky

* Downgrade Scala native to fix tests

* Upgrade Scala native

* Disable native multi threading

* Disable native multi threading
  • Loading branch information
987Nabil authored Aug 13, 2024
1 parent 6d2abd4 commit 154f6b1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
java-version: 21
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
Expand All @@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['11', '17']
java: ['17', '21']
scala: ['2.13.13']
steps:
- name: Checkout current branch
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['11', '17']
java: ['17', '21']
scala: ['2.12.19', '2.13.13', '3.3.3']
platform: ['JVM', 'JS', 'Native']
steps:
Expand Down
34 changes: 18 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ addCommandAlias(
"zioJsonNative/test; zioJsonInteropScalaz7xNative/test"
)

val zioVersion = "2.0.21"
val zioVersion = "2.1.7"

lazy val zioJsonRoot = project
.in(file("."))
Expand All @@ -82,7 +82,7 @@ lazy val zioJsonRoot = project
zioJsonGolden
)

val circeVersion = "0.14.3"
val circeVersion = "0.14.9"

lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.in(file("zio-json"))
Expand All @@ -105,7 +105,7 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.9.0",
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.12.0",
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test",
"io.circe" %%% "circe-core" % circeVersion % "test",
Expand All @@ -117,16 +117,16 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Vector(
"com.softwaremill.magnolia1_3" %%% "magnolia" % "1.3.0"
"com.softwaremill.magnolia1_3" %%% "magnolia" % "1.3.7"
)

case _ =>
Vector(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided,
"com.softwaremill.magnolia1_2" %%% "magnolia" % "1.1.8",
"io.circe" %%% "circe-generic-extras" % circeVersion % "test",
"com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-core" % "2.23.3" % "test",
"com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-macros" % "2.23.3" % "test"
"com.softwaremill.magnolia1_2" %%% "magnolia" % "1.1.10",
"io.circe" %%% "circe-generic-extras" % "0.14.4" % "test",
"com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-core" % "2.30.7" % "test",
"com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-macros" % "2.30.7" % "test"
)
}
},
Expand Down Expand Up @@ -218,8 +218,8 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"))
.jsSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0",
"io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.6.0"
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion,
"io.github.cquiroz" %%% "scala-java-time-tzdb" % scalaJavaTimeVersion
)
)
.jvmSettings(
Expand Down Expand Up @@ -253,8 +253,9 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.nativeSettings(Test / fork := false)
.nativeSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0"
)
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion
),
nativeConfig ~= { _.withMultithreading(false) }
)
.enablePlugins(BuildInfoPlugin)

Expand Down Expand Up @@ -313,7 +314,8 @@ lazy val zioJsonMacros = crossProject(JSPlatform, JVMPlatform, NativePlatform)
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test"
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
nativeConfig ~= { _.withMultithreading(false) }
)
.nativeSettings(Test / fork := false)

Expand All @@ -333,7 +335,7 @@ lazy val zioJsonInteropHttp4s = project
"org.http4s" %% "http4s-dsl" % "0.23.26",
"dev.zio" %% "zio" % zioVersion,
"org.typelevel" %% "cats-effect" % "3.4.9",
"dev.zio" %% "zio-interop-cats" % "23.0.03" % "test",
"dev.zio" %% "zio-interop-cats" % "23.1.0.3" % "test",
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
),
Expand All @@ -349,7 +351,7 @@ lazy val zioJsonInteropRefined = crossProject(JSPlatform, JVMPlatform, NativePla
.settings(buildInfoSettings("zio.json.interop.refined"))
.settings(
libraryDependencies ++= Seq(
"eu.timepit" %%% "refined" % "0.10.2",
"eu.timepit" %%% "refined" % "0.11.2",
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test"
),
Expand All @@ -365,7 +367,7 @@ lazy val zioJsonInteropScalaz7x = crossProject(JSPlatform, JVMPlatform, NativePl
.settings(
crossScalaVersions -= ScalaDotty,
libraryDependencies ++= Seq(
"org.scalaz" %%% "scalaz-core" % "7.3.7",
"org.scalaz" %%% "scalaz-core" % "7.3.8",
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test"
),
Expand Down
11 changes: 7 additions & 4 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,13 @@ object BuildHelper {
}
)

def jsSettings = Seq(
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.2.2",
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.2.2"
)
val scalaJavaTimeVersion = "2.6.0"

def jsSettings =
Seq(
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion,
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % scalaJavaTimeVersion
)

def nativeSettings = Seq(
Test / skip := true,
Expand Down
7 changes: 4 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.1")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("pl.project13.scala" % "sbt-jcstress" % "0.2.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.0-alpha.28")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.0-alpha.27")

libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7"
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ object DeriveSpec extends ZIOSpecDefault {
assert("""{"hint":"Child1"}""".fromJson[Parent])(isLeft(equalTo("(invalid disambiguator)"))) &&
assert("""{"child1":{}}""".fromJson[Parent])(isLeft(equalTo("(missing hint 'hint')")))
}
)
) @@ TestAspect.flaky // flaky only for Scala Native
)

object exampleproducts {
Expand Down

0 comments on commit 154f6b1

Please sign in to comment.