From f66fa0c135cba017027977b2727b9d1f50f31777 Mon Sep 17 00:00:00 2001 From: Andriy Plokhotnyuk Date: Sat, 25 Jan 2025 16:40:45 +0100 Subject: [PATCH] Update Scala 2 to 2.12.20 and 2.13.16 --- .github/workflows/ci.yml | 4 ++-- project/BuildHelper.scala | 2 +- .../src/main/scala/zio/json/golden/filehelpers.scala | 10 ++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7b8f34ee..698e29c2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: fail-fast: false matrix: java: ['17', '21'] - scala: ['2.13.15', '3.3.4'] + scala: ['2.13.16', '3.3.4'] steps: - name: Checkout current branch uses: actions/checkout@v4.1.2 @@ -79,7 +79,7 @@ jobs: fail-fast: false matrix: java: ['17', '21'] - scala: ['2.12.19', '2.13.15', '3.3.4'] + scala: ['2.12.20', '2.13.16', '3.3.4'] platform: ['JVM', 'JS', 'Native'] steps: - name: Checkout current branch diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 5b8643048..71d179ffe 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -238,7 +238,7 @@ object BuildHelper { }, semanticdbEnabled := scalaVersion.value != ScalaDotty, // enable SemanticDB semanticdbOptions += "-P:semanticdb:synthetics:on", - semanticdbVersion := "4.10.2", + semanticdbVersion := "4.12.7", Test / parallelExecution := true, incOptions ~= (_.withLogRecompileOnMacro(false)), autoAPIMappings := true, diff --git a/zio-json-golden/src/main/scala/zio/json/golden/filehelpers.scala b/zio-json-golden/src/main/scala/zio/json/golden/filehelpers.scala index 15c1a2243..636b690f3 100644 --- a/zio-json-golden/src/main/scala/zio/json/golden/filehelpers.scala +++ b/zio-json-golden/src/main/scala/zio/json/golden/filehelpers.scala @@ -5,8 +5,6 @@ import java.nio.file.Path import zio.{ test => _, _ } import zio.json._ -import zio.stacktracer.TracingImplicits.disableAutoTrace - import java.nio.file.Files object filehelpers { @@ -15,17 +13,13 @@ object filehelpers { if (file.getName == "target") ZIO.succeed(file) else ZIO.attempt(file.getParentFile).flatMap(getRootDir) - def createGoldenDirectory(pathToDir: String)(implicit trace: Trace): Task[Path] = { - val _ = disableAutoTrace // TODO: Find a way to suppress the unused import warning - val rootFile = new File(getClass.getResource("/").toURI) - + def createGoldenDirectory(pathToDir: String)(implicit trace: Trace): Task[Path] = for { - baseFile <- getRootDir(rootFile) + baseFile <- getRootDir(new File(getClass.getResource(".").toURI)) goldenDir = new File(baseFile.getParentFile, pathToDir) path = goldenDir.toPath _ <- ZIO.attemptBlocking(goldenDir.mkdirs) } yield path - } def writeSampleToFile(path: Path, sample: GoldenSample)(implicit trace: Trace): IO[IOException, Unit] = { val jsonString = sample.toJsonPretty