From 7397fb07a671d87b97f5fd756c0e3dfe626dcb6b Mon Sep 17 00:00:00 2001 From: Vladimir Lushnikov Date: Fri, 19 Jul 2024 13:02:58 +0100 Subject: [PATCH 1/4] chore: bump scala versions (2.12.19, 2.13.13, 3.3.3 LTS) --- build.sbt | 4 ++-- core/shared/src/main/scala/zio/config/IndexedFlat.scala | 4 ++-- .../zio/config/magnolia/DeriveConfig.scala | 2 +- project/BuildHelper.scala | 2 +- project/build.properties | 2 +- .../scala-2.13/zio/config/refined/NumericTestTypes.scala | 8 ++++---- .../zio/config/magnolia/CoproductSealedTraitSpec.scala | 2 +- .../src/test/scala/zio/config/yaml/YamlConfigSpec.scala | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.sbt b/build.sbt index 3db4b163f..d4a07a323 100644 --- a/build.sbt +++ b/build.sbt @@ -26,8 +26,8 @@ inThisBuild( addCommandAlias("fmt", "; scalafmtSbt; scalafmt; test:scalafmt") addCommandAlias("fix", "; all compile:scalafix test:scalafix; all scalafmtSbt scalafmtAll") -addCommandAlias("compileAll", "; ++2.12.18; root2-12/compile; ++2.13.12!; root2-13/compile; ++3.2.2!; root3/compile;") -addCommandAlias("testAll", "; ++2.12.18; root2-12/test; ++2.13.12!; root2-13/test; ++3.2.2!; root3/test;") +addCommandAlias("compileAll", "; ++2.12.19; root2-12/compile; ++2.13.13!; root2-13/compile; ++3.3.3!; root3/compile;") +addCommandAlias("testAll", "; ++2.12.19; root2-12/test; ++2.13.13!; root2-13/test; ++3.3.3!; root3/test;") addCommandAlias( "testJS", ";zioConfigJS/test" diff --git a/core/shared/src/main/scala/zio/config/IndexedFlat.scala b/core/shared/src/main/scala/zio/config/IndexedFlat.scala index 2bc74f15b..dea0a19d1 100644 --- a/core/shared/src/main/scala/zio/config/IndexedFlat.scala +++ b/core/shared/src/main/scala/zio/config/IndexedFlat.scala @@ -17,7 +17,7 @@ trait IndexedFlat extends ConfigProvider.Flat { final def load[A](path: Chunk[String], config: Config.Primitive[A])(implicit trace: Trace ): IO[Config.Error, Chunk[A]] = - load(path, config, true) + load(path, config, split = true) final override def load[A](path: Chunk[String], config: Config.Primitive[A], split: Boolean)(implicit trace: Trace @@ -27,7 +27,7 @@ trait IndexedFlat extends ConfigProvider.Flat { final def loadIndexed[A](path: ConfigPath, config: Config.Primitive[A])(implicit trace: Trace ): IO[Config.Error, Chunk[A]] = - loadIndexed(path, config, true) + loadIndexed(path, config, split = true) } object IndexedFlat { diff --git a/magnolia/shared/src/main/scala-2.12-2.13/zio/config/magnolia/DeriveConfig.scala b/magnolia/shared/src/main/scala-2.12-2.13/zio/config/magnolia/DeriveConfig.scala index 6e7c63915..55776334a 100644 --- a/magnolia/shared/src/main/scala-2.12-2.13/zio/config/magnolia/DeriveConfig.scala +++ b/magnolia/shared/src/main/scala-2.12-2.13/zio/config/magnolia/DeriveConfig.scala @@ -213,7 +213,7 @@ object DeriveConfig { .toMap val keyNameIfPureConfig: Option[String] = - sealedTrait.annotations.collectFirst { case discriminator: discriminator => discriminator.keyName } + sealedTrait.annotations.collectFirst { case discriminator1: discriminator => discriminator1.keyName } val desc = keyNameIfPureConfig match { diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index b308b4c79..601131e47 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -214,7 +214,7 @@ object BuildHelper { Seq.empty else Seq( - compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full) + compilerPlugin("org.typelevel" %% "kind-projector" % "0.13.3" cross CrossVersion.full) ) }, semanticdbEnabled := scalaVersion.value != ScalaDotty, // enable SemanticDB diff --git a/project/build.properties b/project/build.properties index 0aa5c39b8..136f452e0 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.9.8 +sbt.version = 1.10.1 diff --git a/refined/shared/src/test/scala-2.13/zio/config/refined/NumericTestTypes.scala b/refined/shared/src/test/scala-2.13/zio/config/refined/NumericTestTypes.scala index b16395f4a..73507ea7d 100644 --- a/refined/shared/src/test/scala-2.13/zio/config/refined/NumericTestTypes.scala +++ b/refined/shared/src/test/scala-2.13/zio/config/refined/NumericTestTypes.scala @@ -3,10 +3,10 @@ package zio.config.refined import eu.timepit.refined.numeric.{Divisible, Greater, GreaterEqual, Less, LessEqual, NonDivisible} private[refined] trait NumericTestTypes { - type Less10 = Less[10] - type Greater10 = Greater[10] + type Less10 = Less[10] + type Greater10 = Greater[10] type GreaterOrEqual10 = GreaterEqual[10] - type LessOrEqual10 = LessEqual[10] - type DivisibleBy10 = Divisible[10] + type LessOrEqual10 = LessEqual[10] + type DivisibleBy10 = Divisible[10] type NonDivisibleBy10 = NonDivisible[10] } diff --git a/typesafe-magnolia-tests/shared/src/test/scala/zio/config/magnolia/CoproductSealedTraitSpec.scala b/typesafe-magnolia-tests/shared/src/test/scala/zio/config/magnolia/CoproductSealedTraitSpec.scala index ee82e1a8b..6b9313f1e 100644 --- a/typesafe-magnolia-tests/shared/src/test/scala/zio/config/magnolia/CoproductSealedTraitSpec.scala +++ b/typesafe-magnolia-tests/shared/src/test/scala/zio/config/magnolia/CoproductSealedTraitSpec.scala @@ -2,7 +2,7 @@ package zio.config.magnolia import zio.ConfigProvider import zio.config._ -import zio.config.derivation.{ name => derivedName } +import zio.config.derivation.{name => derivedName} import zio.test.Assertion._ import zio.test.{ZIOSpecDefault, _} diff --git a/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala b/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala index fb2ddfaaa..b32cf92c1 100644 --- a/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala +++ b/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala @@ -61,8 +61,8 @@ object YamlConfigSpec extends ZIOSpecDefault { val configDataBaseConfig: Config[DataBaseConfig] = Config.string("url").to[DataBaseConfig] val yamlConfig: String = s"""url: "some_url"""" - val result = read(configDataBaseConfig from ConfigProvider.fromYamlStringZIO(yamlConfig)) - val expected = DataBaseConfig("some_url") + val result = read(configDataBaseConfig from ConfigProvider.fromYamlStringZIO(yamlConfig)) + val expected = DataBaseConfig("some_url") assertZIO(result)(equalTo(expected)) } ) From 03adb91fd5a8751268166ea78cd8b4fcbad31215 Mon Sep 17 00:00:00 2001 From: Vladimir Lushnikov Date: Fri, 19 Jul 2024 13:34:12 +0100 Subject: [PATCH 2/4] chore: sync ci scala versions --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 974bf3930..55493f6c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.18', '2.13.12', '3.4.1'] + scala: ['2.12.19', '2.13.13', '3.3.3'] platform: ['JS', 'JVM', 'Native'] steps: - name: Checkout current branch From 8abedb972b7c2d3894d20ae09ea87961a382917f Mon Sep 17 00:00:00 2001 From: Vladimir Lushnikov Date: Fri, 19 Jul 2024 13:44:01 +0100 Subject: [PATCH 3/4] chore: fix boolean parameter warning in scala 2.13 --- .../src/test/scala/zio/config/typesafe/TypesafeConfigSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typesafe/shared/src/test/scala/zio/config/typesafe/TypesafeConfigSpec.scala b/typesafe/shared/src/test/scala/zio/config/typesafe/TypesafeConfigSpec.scala index c98cef65c..71fda068c 100644 --- a/typesafe/shared/src/test/scala/zio/config/typesafe/TypesafeConfigSpec.scala +++ b/typesafe/shared/src/test/scala/zio/config/typesafe/TypesafeConfigSpec.scala @@ -107,7 +107,7 @@ object TypesafeConfigSpec extends ZIOSpecDefault { Employee("martha", None, Right("Medium")) ), 1000, - true, + boolean = true, None ) From b401dca873e5084d8199b34ef28ec23b88d9d6a6 Mon Sep 17 00:00:00 2001 From: Vladimir Lushnikov Date: Fri, 19 Jul 2024 15:36:11 +0100 Subject: [PATCH 4/4] chore: fix another unlabelled boolean error --- yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala b/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala index b32cf92c1..63e71259b 100644 --- a/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala +++ b/yaml/shared/src/test/scala/zio/config/yaml/YamlConfigSpec.scala @@ -52,7 +52,7 @@ object YamlConfigSpec extends ZIOSpecDefault { val zio = provider.load(config) - val expected = Child(List(A("str", Nil), B(false, List(C(1), C(2)), Map("hi" -> 1, "bi" -> 2)))) + val expected = Child(List(A("str", Nil), B(b = false, List(C(1), C(2)), Map("hi" -> 1, "bi" -> 2)))) assertZIO(zio.exit)(succeeds(equalTo(expected))) },