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 ZIO version #1205

Merged
merged 6 commits into from
Jan 6, 2025
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
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: temurin
java-version: 8
java-version: 11
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
Expand All @@ -86,6 +86,9 @@ jobs:
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install Boehm GC
if: ${{ startsWith(matrix.platform, 'Native') }}
run: sudo apt-get update && sudo apt-get install -y libgc-dev
- name: Setup Java
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -124,7 +127,7 @@ jobs:
uses: actions/[email protected]
with:
distribution: temurin
java-version: 8
java-version: 11
check-latest: true
- name: Release
run: sbt ci-release
Expand Down
12 changes: 5 additions & 7 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.1.7"
val zioVersion = "2.1.14"

lazy val zioJsonRoot = project
.in(file("."))
Expand Down Expand Up @@ -250,12 +250,11 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
}
}
)
.nativeSettings(Test / fork := false)
.nativeSettings(nativeSettings)
.nativeSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion
),
nativeConfig ~= { _.withMultithreading(false) }
)
)
.enablePlugins(BuildInfoPlugin)

Expand Down Expand Up @@ -314,10 +313,9 @@ 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"),
nativeConfig ~= { _.withMultithreading(false) }
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
.nativeSettings(Test / fork := false)
.nativeSettings(nativeSettings)

lazy val zioJsonMacrosJVM = zioJsonMacros.jvm.dependsOn(zioJsonJVM)

Expand Down
15 changes: 12 additions & 3 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import sbtbuildinfo.*
import sbtbuildinfo.BuildInfoKeys.*
import sbtcrossproject.CrossPlugin.autoImport.*

import scala.scalanative.sbtplugin.ScalaNativePlugin.autoImport.*

object BuildHelper {
private val versions: Map[String, String] = {
import org.snakeyaml.engine.v2.api.{ Load, LoadSettings }
Expand Down Expand Up @@ -275,9 +277,16 @@ object BuildHelper {
)

def nativeSettings = Seq(
Test / skip := true,
doc / skip := true,
Compile / doc / sources := Seq.empty
nativeConfig ~= { cfg =>
import scala.scalanative.build.{ GC, Mode }

val os = System.getProperty("os.name").toLowerCase
// For some unknown reason, we can't run the test suites in debug mode on MacOS
if (os.contains("mac")) cfg.withMode(Mode.releaseFast)
else cfg.withGC(GC.boehm) // See https://github.com/scala-native/scala-native/issues/4032
},
scalacOptions += "-P:scalanative:genStaticForwardersForNonTopLevelObjects",
Test / fork := false
)

val scalaReflectTestSettings: List[Setting[_]] = List(
Expand Down