From 5612944bf9ae2f39b5a75c6d2e7233f3b28054eb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 20 Apr 2023 01:25:33 +0000 Subject: [PATCH 01/36] Update mysql-connector-java to 8.0.33 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 181702c5b..4dba290f6 100644 --- a/build.sbt +++ b/build.sbt @@ -197,7 +197,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.32" % Test, + "mysql" % "mysql-connector-java" % "8.0.33" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 388a9489b22f61607449a8f547111e7218a27c65 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 29 Jul 2023 05:19:27 +0000 Subject: [PATCH 02/36] Update logback-classic to 1.4.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e00c1b91..fd4e19978 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ val zioVersion = "2.0.15" val zioSchemaVersion = "0.4.13" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.40.17" -val logbackVersion = "1.3.8" +val logbackVersion = "1.4.8" lazy val root = project .in(file(".")) From 0a15c7e1eb8ee5183971324d8958ca6c9b001ad5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 29 Jul 2023 05:19:52 +0000 Subject: [PATCH 03/36] Update ojdbc8 to 23.2.0.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e00c1b91..42b1b1a55 100644 --- a/build.sbt +++ b/build.sbt @@ -217,7 +217,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "21.10.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "23.2.0.0" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From 7b56b61467396d35a8ee980e5bf1583df45b4e18 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 29 Jul 2023 05:20:18 +0000 Subject: [PATCH 04/36] Update sbt-tpolecat to 0.5.0 --- project/plugins.sbt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..bb617a4c6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,12 +1,12 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") -addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") +addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") From aacf2672da8d07e331ebd5224ba9d4e40cc4be15 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 11 Sep 2023 04:39:43 +0000 Subject: [PATCH 05/36] Update sbt-scalafix to 0.11.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..6d1825a3e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,6 +7,6 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8" addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") From 0bbd48f973a00f86078447dda95cc698aab77efe Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 11 Sep 2023 04:40:44 +0000 Subject: [PATCH 06/36] Update sbt-scalafmt to 2.5.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..1c96310d7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") From 7ece83acacf278525f42ecdb3cf54f9cb0cd812c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 7 Nov 2023 03:20:16 +0000 Subject: [PATCH 07/36] Update HikariCP to 5.1.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e00c1b91..cc43d0908 100644 --- a/build.sbt +++ b/build.sbt @@ -175,7 +175,7 @@ lazy val jdbc_hikaricp = project .settings(buildInfoSettings("zio.sql.jdbc-hickaricp")) .settings( libraryDependencies ++= Seq( - "com.zaxxer" % "HikariCP" % "4.0.3", // 5.x doesn't support Java 1.8 + "com.zaxxer" % "HikariCP" % "5.1.0", // 5.x doesn't support Java 1.8 "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, From e3402a48ae4b2fbf395dc7fdd1c38fa2a04f8e5b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 18 Nov 2023 08:39:24 +0000 Subject: [PATCH 08/36] Update scalafmt-core to 3.7.17 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 342a5dd24..d49630712 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.11" +version = "3.7.17" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From ac289967e98e240afd9f1a51f35571b3d0215a0c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 13 Jan 2024 21:13:33 +0000 Subject: [PATCH 09/36] Update zio, zio-streams, zio-test, ... to 2.0.21 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e00c1b91..23ebbf54e 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.15" +val zioVersion = "2.0.21" val zioSchemaVersion = "0.4.13" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.40.17" From 55dd02e6688a40880290fc59ce2bda288df8514c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 13 Jan 2024 21:13:51 +0000 Subject: [PATCH 10/36] Update zio-schema, zio-schema-derivation to 0.4.17 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e00c1b91..4de539810 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "2.0.15" -val zioSchemaVersion = "0.4.13" +val zioSchemaVersion = "0.4.17" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.40.17" val logbackVersion = "1.3.8" From af8a93a85d0e52ccbb0ee5af5b80db24e9542b23 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 13 Jan 2024 21:14:26 +0000 Subject: [PATCH 11/36] Update sbt-jmh to 0.4.7 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..0001784b2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") From e14470f147171af43c5c8fd35788cc43284971d9 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Feb 2024 19:47:23 +0000 Subject: [PATCH 12/36] Update postgresql to 42.7.2 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 6e00c1b91..9ae056736 100644 --- a/build.sbt +++ b/build.sbt @@ -155,7 +155,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.6.0" % Test, + "org.postgresql" % "postgresql" % "42.7.2" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -236,7 +236,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.6.0" % Compile, + "org.postgresql" % "postgresql" % "42.7.2" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From b676dcacd99aac704b5449980a136f78cbbca5a4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 24 Feb 2024 06:34:25 +0000 Subject: [PATCH 13/36] Update sbt to 1.9.9 --- mysql/project/build.properties | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/project/build.properties b/mysql/project/build.properties index 52413ab79..04267b14a 100644 --- a/mysql/project/build.properties +++ b/mysql/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.3 +sbt.version=1.9.9 diff --git a/project/build.properties b/project/build.properties index 52413ab79..04267b14a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.3 +sbt.version=1.9.9 From eeb7e9988601b81d28535f6e5fca23ad4668a285 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 26 Feb 2024 08:13:19 +0000 Subject: [PATCH 14/36] Update sbt-scoverage to 2.0.11 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..6ae68525b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2" addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") From 5450730333eda4349870b098b0c4d1bce8fa5d3c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 28 Feb 2024 14:26:08 +0000 Subject: [PATCH 15/36] Update scala-library, scala-reflect to 2.12.19 --- .github/workflows/ci.yml | 2 +- project/BuildHelper.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac38c1366..b19ddfaf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.12.18', '2.13.10'] + scala: ['2.12.19', '2.13.10'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index fa55096d4..a6ee526e3 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -10,7 +10,7 @@ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { val SilencerVersion = "1.17.13" - val Scala212 = "2.12.18" + val Scala212 = "2.12.19" val Scala213 = "2.13.10" val ScalaDotty = "3.3.0" From ee35c43f87f91ddff0ca957009ed13c27d445335 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 21 Mar 2024 00:30:50 +0000 Subject: [PATCH 16/36] Update sbt-buildinfo to 0.12.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..46789bcab 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2 addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") From 49b44c9daa297512e847a0aaac856c42f64accb4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 21 Mar 2024 00:30:56 +0000 Subject: [PATCH 17/36] Update sbt-scalajs, scalajs-compiler, ... to 1.16.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..7f50b1d2c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") From 13291723f6b3f7c40a339b2054fdbe9e635f9233 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 29 Mar 2024 02:17:47 +0000 Subject: [PATCH 18/36] Update sbt-bloop to 1.5.16 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4bdf3ebcf..5cdb78194 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0" addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.9") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.16") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") From 7b6987d79fe10549f4e504112443737a415dd2a4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 29 Mar 2024 02:18:04 +0000 Subject: [PATCH 19/36] Update ojdbc8 to 23.3.0.23.09 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 42b1b1a55..795766ac8 100644 --- a/build.sbt +++ b/build.sbt @@ -217,7 +217,7 @@ lazy val oracle = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "oracle-xe" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "com.oracle.database.jdbc" % "ojdbc8" % "23.2.0.0" % Test, + "com.oracle.database.jdbc" % "ojdbc8" % "23.3.0.23.09" % Test, "com.dimafeng" %% "testcontainers-scala-oracle-xe" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From b8f8f21e5f8c5d09f9bdebdf72a528e9b23d5d9a Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Fri, 29 Mar 2024 16:51:08 +0100 Subject: [PATCH 20/36] Hardcode MySQL version --- build.sbt | 2 +- jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala | 2 +- mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 42b1b1a55..0a363eb06 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,7 @@ addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck" val zioVersion = "2.0.15" val zioSchemaVersion = "0.4.13" val testcontainersVersion = "1.18.3" -val testcontainersScalaVersion = "0.40.17" +val testcontainersScalaVersion = "0.41.3" val logbackVersion = "1.3.8" lazy val root = project diff --git a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala index ebba6fa31..bced36f76 100644 --- a/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala +++ b/jdbc-hikaricp/src/test/scala/zio/sql/MySqlTestContainer.scala @@ -7,7 +7,7 @@ import zio._ final case class MySqlConfig(username: String, password: String, url: String) object MySqlTestContainer { - def mysql(imageName: String = "mysql"): ZIO[Scope, Throwable, MySQLContainer] = + def mysql(imageName: String = "mysql:8.2.0"): ZIO[Scope, Throwable, MySQLContainer] = ZIO.acquireRelease { ZIO.attemptBlocking { val c = new MySQLContainer( diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala index 1a97a1a2e..0ff8914c9 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlRunnableSpec.scala @@ -8,7 +8,7 @@ trait MysqlRunnableSpec extends JdbcRunnableSpec with MysqlJdbcModule { override protected def getContainer: SingleContainer[_] with JdbcDatabaseContainer = new MySQLContainer( - mysqlImageVersion = Option("mysql").map(DockerImageName.parse) + mysqlImageVersion = Option("mysql:8.2.0").map(DockerImageName.parse) ).configure { a => a.withInitScript("shop_schema.sql") () From 23a1716da09585f18e1da4f0806e57f7a4daa109 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 30 Mar 2024 21:04:34 +0100 Subject: [PATCH 21/36] Drop support for Java 8 and add Java 17 --- .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 ac38c1366..7fd524fff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - java: ['adopt@1.8', 'adopt@1.11'] + java: ['adopt@1.11', 'adopt@1.17'] scala: ['2.12.18', '2.13.10'] steps: - name: Checkout current branch From 0f01c59e91593872ce18efb62b6cd9cd58395130 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Sat, 30 Mar 2024 21:13:05 +0100 Subject: [PATCH 22/36] Update setup-scala action --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fd524fff..146dd6fe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: with: fetch-depth: 0 - name: Setup Scala and Java - uses: olafurpg/setup-scala@v10 + uses: olafurpg/setup-scala@v14 - name: Cache scala dependencies uses: coursier/cache-action@v5 - name: Lint code @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - java: ['adopt@1.11', 'adopt@1.17'] + java: ['openjdk@1.11.0', 'openjdk@1.17.0'] scala: ['2.12.18', '2.13.10'] steps: - name: Checkout current branch @@ -42,7 +42,7 @@ jobs: with: fetch-depth: 0 - name: Setup Scala and Java - uses: olafurpg/setup-scala@v10 + uses: olafurpg/setup-scala@v14 with: java-version: ${{ matrix.java }} - name: Cache scala dependencies @@ -57,7 +57,7 @@ jobs: - name: Checkout current branch uses: actions/checkout@v3.1.0 - name: Setup Scala and Java - uses: olafurpg/setup-scala@v13 + uses: olafurpg/setup-scala@v14 - name: Cache scala dependencies uses: coursier/cache-action@v6 - name: Check Document Generation @@ -73,7 +73,7 @@ jobs: with: fetch-depth: 0 - name: Setup Scala and Java - uses: olafurpg/setup-scala@v10 + uses: olafurpg/setup-scala@v14 - name: Cache scala dependencies uses: coursier/cache-action@v5 - name: Release artifacts From 198033a4167e106cdb4259b1494790e8025cfb39 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Mar 2024 04:37:56 +0000 Subject: [PATCH 23/36] Update sbt-scalafix to 0.12.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 2a464d7d6..335326241 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,6 +7,6 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.16") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0") addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") From 920c4483dbaf1da36cd6f40c0133c7785c0212b3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Mar 2024 04:38:12 +0000 Subject: [PATCH 24/36] Update logback-classic to 1.4.14 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index fb32fb8f9..cf17533fa 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ val zioVersion = "2.0.21" val zioSchemaVersion = "0.4.17" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.41.3" -val logbackVersion = "1.4.8" +val logbackVersion = "1.4.14" lazy val root = project .in(file(".")) From 77eca182c49f75794639f4cbdb256f31e6c56a6d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Mar 2024 04:38:31 +0000 Subject: [PATCH 25/36] Update zio-schema, zio-schema-derivation to 1.0.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index fb32fb8f9..4561f3df9 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "2.0.21" -val zioSchemaVersion = "0.4.17" +val zioSchemaVersion = "1.0.1" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.41.3" val logbackVersion = "1.4.8" From fb014a8a7b6671e9a38d2814bfbdf9ffede9e2e0 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Mar 2024 04:38:41 +0000 Subject: [PATCH 26/36] Update mysql-connector-java to 8.3.0 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index fb32fb8f9..11b4cf831 100644 --- a/build.sbt +++ b/build.sbt @@ -179,7 +179,7 @@ lazy val jdbc_hikaricp = project "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.29" % Test, + "com.mysql" % "mysql-connector-j" % "8.0.29" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) @@ -198,7 +198,7 @@ lazy val mysql = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "mysql" % "mysql-connector-java" % "8.0.33" % Test, + "com.mysql" % "mysql-connector-j" % "8.3.0" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From cd28bf9f90b76839d13f7d3510a21f134ec5f1ba Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Mar 2024 04:38:55 +0000 Subject: [PATCH 27/36] Update postgresql to 42.7.3 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index fb32fb8f9..72b5ac288 100644 --- a/build.sbt +++ b/build.sbt @@ -155,7 +155,7 @@ lazy val jdbc = project libraryDependencies ++= Seq( "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, - "org.postgresql" % "postgresql" % "42.7.2" % Test, + "org.postgresql" % "postgresql" % "42.7.3" % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test ) ) @@ -236,7 +236,7 @@ lazy val postgres = project "org.testcontainers" % "database-commons" % testcontainersVersion % Test, "org.testcontainers" % "postgresql" % testcontainersVersion % Test, "org.testcontainers" % "jdbc" % testcontainersVersion % Test, - "org.postgresql" % "postgresql" % "42.7.2" % Compile, + "org.postgresql" % "postgresql" % "42.7.3" % Compile, "com.dimafeng" %% "testcontainers-scala-postgresql" % testcontainersScalaVersion % Test, "ch.qos.logback" % "logback-classic" % logbackVersion % Test ) From e7c398e2f2da0a86575d0a0de49af4baf358baae Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 31 Mar 2024 04:39:30 +0000 Subject: [PATCH 28/36] Update scalafmt-core to 3.8.1 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index d49630712..858d639ff 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.17" +version = "3.8.1" maxColumn = 120 align.preset = most continuationIndent.defnSite = 2 From 62bbee4474147fee8b66755f79797b0c5b943f87 Mon Sep 17 00:00:00 2001 From: Jakub Czuchnowski Date: Sun, 31 Mar 2024 12:57:40 +0200 Subject: [PATCH 29/36] Update build.sbt --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index faf96ad58..23984a8d0 100644 --- a/build.sbt +++ b/build.sbt @@ -179,7 +179,7 @@ lazy val jdbc_hikaricp = project "dev.zio" %% "zio-test" % zioVersion % Test, "dev.zio" %% "zio-test-sbt" % zioVersion % Test, "org.testcontainers" % "mysql" % testcontainersVersion % Test, - "com.mysql" % "mysql-connector-j" % "8.0.29" % Test, + "com.mysql" % "mysql-connector-j" % "8.3.0" % Test, "com.dimafeng" %% "testcontainers-scala-mysql" % testcontainersScalaVersion % Test ) ) From e7e1fe98a387c7a9e5111bda3bca3890313a209a Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 8 Apr 2024 16:10:34 +0200 Subject: [PATCH 30/36] Update to Scala 2.13.12 --- .github/workflows/ci.yml | 2 +- .../zio/sql/expr/Set.scala | 2 - .../main/scala-2.13/zio/sql/expr/Set.scala | 34 ++++++++++++++++ .../test/scala/zio/sql/ProductSchema.scala | 5 ++- .../scala/zio/sql/TestBasicSelectSpec.scala | 6 +-- .../src/main/scala/zio/sql/Examples.scala | 11 ++--- .../main/scala/zio/sql/GroupByExamples.scala | 4 +- .../src/main/scala/zio/sql/LiveExample.scala | 5 ++- .../zio/sql/mysql/CommonFunctionDefSpec.scala | 3 +- .../zio/sql/mysql/CustomFunctionDefSpec.scala | 3 +- .../test/scala/zio/sql/mysql/DeleteSpec.scala | 5 ++- .../scala/zio/sql/mysql/MysqlModuleSpec.scala | 12 ++++-- .../scala/zio/sql/mysql/TransactionSpec.scala | 3 +- .../scala/zio/sql/oracle/DualSchema.scala | 8 ++-- .../scala/zio/sql/oracle/ShopSchema.scala | 37 ++++++++++++++--- .../scala/zio/sql/postgresql/DbSchema.scala | 28 ++++++++----- .../scala/zio/sql/postgresql/DeleteSpec.scala | 6 ++- project/BuildHelper.scala | 18 ++------- .../scala/zio/sql/sqlserver/DbSchema.scala | 13 +++--- .../sql/sqlserver/SqlServerModuleSpec.scala | 40 +++++++++++++++---- 20 files changed, 169 insertions(+), 76 deletions(-) rename core/jvm/src/main/{scala => scala-2.12}/zio/sql/expr/Set.scala (92%) create mode 100644 core/jvm/src/main/scala-2.13/zio/sql/expr/Set.scala diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 146dd6fe5..0ad17c91f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: fail-fast: false matrix: java: ['openjdk@1.11.0', 'openjdk@1.17.0'] - scala: ['2.12.18', '2.13.10'] + scala: ['2.12.18', '2.13.12'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/core/jvm/src/main/scala/zio/sql/expr/Set.scala b/core/jvm/src/main/scala-2.12/zio/sql/expr/Set.scala similarity index 92% rename from core/jvm/src/main/scala/zio/sql/expr/Set.scala rename to core/jvm/src/main/scala-2.12/zio/sql/expr/Set.scala index cee01b5d9..e5a31f678 100644 --- a/core/jvm/src/main/scala/zio/sql/expr/Set.scala +++ b/core/jvm/src/main/scala-2.12/zio/sql/expr/Set.scala @@ -2,7 +2,6 @@ package zio.sql.expr import zio.sql.typetag.TypeTag import zio.sql.Features -import com.github.ghik.silencer.silent sealed trait Set[F, -A] { type Value @@ -17,7 +16,6 @@ sealed trait Set[F, -A] { object Set { type Aux[F, -A, Value0] = Set[F, A] { type Value = Value0 } - @silent def apply[F: Features.IsSource, A, Value0: TypeTag]( lhs0: Expr[F, A, Value0], rhs0: Expr[_, A, Value0] diff --git a/core/jvm/src/main/scala-2.13/zio/sql/expr/Set.scala b/core/jvm/src/main/scala-2.13/zio/sql/expr/Set.scala new file mode 100644 index 000000000..5b00f655d --- /dev/null +++ b/core/jvm/src/main/scala-2.13/zio/sql/expr/Set.scala @@ -0,0 +1,34 @@ +package zio.sql.expr + +import zio.sql.typetag.TypeTag +import zio.sql.Features + +import scala.annotation.nowarn + +sealed trait Set[F, -A] { + type Value + + def lhs: Expr[F, A, Value] + def rhs: Expr[_, A, Value] + + def typeTag: TypeTag[Value] + +} + +object Set { + type Aux[F, -A, Value0] = Set[F, A] { type Value = Value0 } + + @nowarn + def apply[F: Features.IsSource, A, Value0: TypeTag]( + lhs0: Expr[F, A, Value0], + rhs0: Expr[_, A, Value0] + ): Set.Aux[F, A, Value0] = + new Set[F, A] { + type Value = Value0 + + def lhs = lhs0 + def rhs = rhs0 + + def typeTag = implicitly[TypeTag[Value]] + } +} diff --git a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala index 2c93fb539..3adc83ebc 100644 --- a/core/jvm/src/test/scala/zio/sql/ProductSchema.scala +++ b/core/jvm/src/test/scala/zio/sql/ProductSchema.scala @@ -30,10 +30,11 @@ object ProductSchema { deleted: Boolean ) - implicit val localDateSchema = + implicit val localDateSchema: Schema[LocalDate] = Schema.primitive[LocalDate](StandardType.LocalDateType) - implicit val productsSchema = DeriveSchema.gen[Product] + implicit val productsSchema: Schema.CaseClass6[String, LocalDate, String, Int, Int, Boolean, Product] = + DeriveSchema.gen[Product] val productTable = Table.defineTable[Product] diff --git a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala index 6a1846c6b..ac32294d0 100644 --- a/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala +++ b/core/jvm/src/test/scala/zio/sql/TestBasicSelectSpec.scala @@ -4,7 +4,7 @@ import zio.test._ import zio.test.Assertion._ import zio.schema._ import zio.test.ZIOSpecDefault -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import java.time.LocalDate import zio.sql.table._ import zio.sql.select._ @@ -21,9 +21,9 @@ object TestBasicSelect { case class Users(user_id: String, dob: LocalDate, first_name: String, last_name: String) - implicit val localDateSchema = + implicit val localDateSchema: Schema[LocalDate] = Schema.primitive[LocalDate](StandardType.LocalDateType) - implicit val userSchema = DeriveSchema.gen[Users] + implicit val userSchema: Schema.CaseClass4[String, LocalDate, String, String, Users] = DeriveSchema.gen[Users] val userTable = Table.defineTable[Users] diff --git a/examples/src/main/scala/zio/sql/Examples.scala b/examples/src/main/scala/zio/sql/Examples.scala index 293351121..1e056a109 100644 --- a/examples/src/main/scala/zio/sql/Examples.scala +++ b/examples/src/main/scala/zio/sql/Examples.scala @@ -3,7 +3,7 @@ package zio.sql import java.util.UUID import java.time._ import zio.sql.postgresql.PostgresJdbcModule -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.expr.AggregationDef._ import zio.sql.expr.FunctionDef._ import zio.sql.table._ @@ -142,7 +142,7 @@ object Examples extends App with PostgresJdbcModule { firstName: String, lastName: String ) - implicit val userSchema = DeriveSchema.gen[User] + implicit val userSchema: Schema.CaseClass5[UUID, Int, LocalDate, String, String, User] = DeriveSchema.gen[User] val dataSchema: User = User(UUID.randomUUID(), 22, LocalDate.ofYearDay(1990, 1), "Ronald", "Russel") @@ -173,7 +173,7 @@ object Examples extends App with PostgresJdbcModule { case class Users(id: UUID, age: Int, dob: LocalDate, firstName: String, lastName: String) - implicit val userSchema = DeriveSchema.gen[Users] + implicit val userSchema: Schema.CaseClass5[UUID, Int, LocalDate, String, String, Users] = DeriveSchema.gen[Users] val users = Table.defineTable[Users] @@ -184,7 +184,7 @@ object Examples extends App with PostgresJdbcModule { case class Orders(id: java.util.UUID, userId: java.util.UUID, orderDate: LocalDate) - implicit val orderSchema = DeriveSchema.gen[Orders] + implicit val orderSchema: Schema.CaseClass3[UUID, UUID, LocalDate, Orders] = DeriveSchema.gen[Orders] val orders = Table.defineTable[Orders] @@ -194,7 +194,8 @@ object Examples extends App with PostgresJdbcModule { object OrderDetails { case class OrderDetail(orderId: java.util.UUID, productId: Int, quantity: Double, unitPrice: Double) - implicit val orderDetailSchema = DeriveSchema.gen[OrderDetail] + implicit val orderDetailSchema: Schema.CaseClass4[java.util.UUID, Int, Double, Double, OrderDetail] = + DeriveSchema.gen[OrderDetail] val orderDetails = Table.defineTable[OrderDetail] diff --git a/examples/src/main/scala/zio/sql/GroupByExamples.scala b/examples/src/main/scala/zio/sql/GroupByExamples.scala index e29738640..505619bd9 100644 --- a/examples/src/main/scala/zio/sql/GroupByExamples.scala +++ b/examples/src/main/scala/zio/sql/GroupByExamples.scala @@ -1,6 +1,6 @@ package zio.sql -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.postgresql.PostgresJdbcModule import zio.sql.expr.AggregationDef._ import zio.sql.table._ @@ -9,7 +9,7 @@ object GroupByExamples extends App with PostgresJdbcModule { case class Product(id: Int, name: String, amount: Int, price: Double) - implicit val productSchema = DeriveSchema.gen[Product] + implicit val productSchema: Schema.CaseClass4[Int, String, Int, Double, Product] = DeriveSchema.gen[Product] val productTable = Table.defineTable[Product] diff --git a/examples/src/main/scala/zio/sql/LiveExample.scala b/examples/src/main/scala/zio/sql/LiveExample.scala index 4162a4aba..bb3f65592 100644 --- a/examples/src/main/scala/zio/sql/LiveExample.scala +++ b/examples/src/main/scala/zio/sql/LiveExample.scala @@ -5,7 +5,7 @@ import java.time.LocalDate import java.util.Properties import zio._ -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.{ ConnectionPool, ConnectionPoolConfig } import zio.sql.postgresql.PostgresJdbcModule import zio.sql.table._ @@ -71,7 +71,8 @@ object LiveExample extends ZIOAppDefault with PostgresJdbcModule { case class Customer(id: UUID, age: Int, dob: LocalDate, firstName: String, lastName: String) - implicit val customerSchema = DeriveSchema.gen[Customer] + implicit val customerSchema: Schema.CaseClass5[UUID, Int, LocalDate, String, String, Customer] = + DeriveSchema.gen[Customer] val customers = Table.defineTable[Customer]("customers") diff --git a/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala index 953588441..bfe405870 100644 --- a/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/CommonFunctionDefSpec.scala @@ -15,7 +15,8 @@ object CommonFunctionDefSpec extends MysqlRunnableSpec with Jdbc { case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] diff --git a/mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala b/mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala index 34f512f73..8347e7b9e 100644 --- a/mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/CustomFunctionDefSpec.scala @@ -15,7 +15,8 @@ object CustomFunctionDefSpec extends MysqlRunnableSpec with Jdbc { case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] diff --git a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala index 057a3f7e8..fbbc3f71a 100644 --- a/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/DeleteSpec.scala @@ -4,7 +4,7 @@ import zio.test._ import java.util.UUID import java.time.LocalDate -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.test.TestAspect.sequential import zio.sql.table._ @@ -12,7 +12,8 @@ object DeleteSpec extends MysqlRunnableSpec { case class Customers(id: UUID, dob: LocalDate, first_name: String, lastName: String, verified: Boolean) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index d3a423b6a..662ae3106 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -16,7 +16,8 @@ object MysqlModuleSpec extends MysqlRunnableSpec { case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] @@ -24,14 +25,16 @@ object MysqlModuleSpec extends MysqlRunnableSpec { case class Orders(id: UUID, customer_id: UUID, order_date: LocalDate, deleted_at: Option[LocalDateTime]) - implicit val orderSchema = DeriveSchema.gen[Orders] + implicit val orderSchema: Schema.CaseClass4[UUID, UUID, LocalDate, Option[LocalDateTime], Orders] = + DeriveSchema.gen[Orders] val orders = Table.defineTable[Orders] val (orderId, fkCustomerId, orderDate, deletedAt) = orders.columns case class ProductPrice(productId: UUID, effective: LocalDate, price: BigDecimal) - implicit val productPriceSchema = DeriveSchema.gen[ProductPrice] + implicit val productPriceSchema: Schema.CaseClass3[UUID, LocalDate, BigDecimal, ProductPrice] = + DeriveSchema.gen[ProductPrice] val productPrices = Table.defineTableSmart[ProductPrice] @@ -39,7 +42,8 @@ object MysqlModuleSpec extends MysqlRunnableSpec { case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + implicit val orderDetailsSchema: Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetails] = + DeriveSchema.gen[OrderDetails] val orderDetails = Table.defineTableSmart[OrderDetails] diff --git a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala index b22d8ca8b..10e3f835e 100644 --- a/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/TransactionSpec.scala @@ -15,7 +15,8 @@ object TransactionSpec extends MysqlRunnableSpec with Jdbc { case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] diff --git a/oracle/src/test/scala/zio/sql/oracle/DualSchema.scala b/oracle/src/test/scala/zio/sql/oracle/DualSchema.scala index cc62e5924..93b7c24ba 100644 --- a/oracle/src/test/scala/zio/sql/oracle/DualSchema.scala +++ b/oracle/src/test/scala/zio/sql/oracle/DualSchema.scala @@ -1,14 +1,14 @@ package zio.sql.oracle -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.table._ trait DualSchema { object Dual { case class Dual(dummy: String) - implicit val dummySchema = DeriveSchema.gen[Dual] - val dual = Table.defineTable[Dual] - val dummy = dual.columns + implicit val dummySchema: Schema.CaseClass1[String, Dual] = DeriveSchema.gen[Dual] + val dual = Table.defineTable[Dual] + val dummy = dual.columns } } diff --git a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala index 6958ef9c3..4a4ac8365 100644 --- a/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala +++ b/oracle/src/test/scala/zio/sql/oracle/ShopSchema.scala @@ -4,7 +4,7 @@ import java.math.BigDecimal import java.util.UUID import java.time._ import zio.Chunk -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.table._ trait ShopSchema extends OracleSqlModule { self => @@ -13,7 +13,8 @@ trait ShopSchema extends OracleSqlModule { self => case class Customers(id: UUID, dob: LocalDate, first_name: String, last_name: String, verified: Boolean) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, LocalDate, String, String, Boolean, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTableSmart[Customers] @@ -22,7 +23,7 @@ trait ShopSchema extends OracleSqlModule { self => object Orders { case class Order(id: UUID, customerId: UUID, orderDate: LocalDate) - implicit val orderSchema = DeriveSchema.gen[Order] + implicit val orderSchema: Schema.CaseClass3[UUID, UUID, LocalDate, Order] = DeriveSchema.gen[Order] val orders = Table.defineTableSmart[Order] @@ -31,7 +32,8 @@ trait ShopSchema extends OracleSqlModule { self => object ProductPrices { case class ProductPrice(productId: UUID, effective: LocalDate, price: BigDecimal) - implicit val productPriceSchema = DeriveSchema.gen[ProductPrice] + implicit val productPriceSchema: Schema.CaseClass3[UUID, LocalDate, BigDecimal, ProductPrice] = + DeriveSchema.gen[ProductPrice] val productPrices = Table.defineTableSmart[ProductPrice] @@ -41,7 +43,8 @@ trait ShopSchema extends OracleSqlModule { self => object OrderDetailsSchema { case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + implicit val orderDetailsSchema: Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetails] = + DeriveSchema.gen[OrderDetails] val orderDetails = Table.defineTableSmart[OrderDetails] @@ -73,7 +76,29 @@ trait ShopSchema extends OracleSqlModule { self => zoneddatetime: ZonedDateTime ) - implicit val alTypesSchema = DeriveSchema.gen[AllType] + implicit val alTypesSchema: Schema.CaseClass20[ + UUID, + Chunk[Byte], + BigDecimal, + Boolean, + Char, + Double, + Float, + Instant, + Int, + Option[Int], + LocalDate, + LocalDateTime, + LocalTime, + Long, + OffsetDateTime, + OffsetTime, + Short, + String, + UUID, + ZonedDateTime, + AllType + ] = DeriveSchema.gen[AllType] val allTypes = Table.defineTableSmart[AllType] diff --git a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala index 9f2a3a940..1a43e3d49 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DbSchema.scala @@ -2,7 +2,7 @@ package zio.sql.postgresql import java.time.{ LocalDate, ZonedDateTime } import java.util.UUID -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import java.math.BigDecimal import zio.sql.table._ import zio.sql.select._ @@ -14,18 +14,19 @@ trait DbSchema extends PostgresJdbcModule { self => case class MetroSystem(id: Int, cityId: Int, name: String, dailyRidership: Int) case class MetroLine(id: Int, systemId: Int, name: String, stationCount: Int, trackType: Int) - implicit val citySchema = DeriveSchema.gen[City] + implicit val citySchema: Schema.CaseClass5[Int, String, Int, Float, Option[String], City] = DeriveSchema.gen[City] val city = Table.defineTable[City] val (cityId, cityName, population, area, link) = city.columns - implicit val metroSystemSchema = DeriveSchema.gen[MetroSystem] + implicit val metroSystemSchema: Schema.CaseClass4[Int, Int, String, Int, MetroSystem] = + DeriveSchema.gen[MetroSystem] val metroSystem = Table.defineTable[MetroSystem] val (metroSystemId, cityIdFk, metroSystemName, dailyRidership) = metroSystem.columns - implicit val metroLineSchema = DeriveSchema.gen[MetroLine] + implicit val metroLineSchema: Schema.CaseClass5[Int, Int, String, Int, Int, MetroLine] = DeriveSchema.gen[MetroLine] val metroLine = Table.defineTable[MetroLine] @@ -64,7 +65,9 @@ trait DbSchema extends PostgresJdbcModule { self => createdTimestamp: ZonedDateTime ) - implicit val custommerSchema = DeriveSchema.gen[Customer] + implicit val custommerSchema + : Schema.CaseClass7[UUID, LocalDate, String, String, Boolean, String, ZonedDateTime, Customer] = + DeriveSchema.gen[Customer] val customers = Table.defineTableSmart[Customer] @@ -77,7 +80,7 @@ trait DbSchema extends PostgresJdbcModule { self => object OrdersSchema { case class Orders(id: UUID, customerId: UUID, orderDate: LocalDate) - implicit val orderSchema = DeriveSchema.gen[Orders] + implicit val orderSchema: Schema.CaseClass3[UUID, UUID, LocalDate, Orders] = DeriveSchema.gen[Orders] val orders = Table.defineTableSmart[Orders] @@ -87,7 +90,7 @@ trait DbSchema extends PostgresJdbcModule { self => object ProductSchema { case class Products(id: UUID, name: String, description: String, imageUrl: String) - implicit val productSchema = DeriveSchema.gen[Products] + implicit val productSchema: Schema.CaseClass4[UUID, String, String, String, Products] = DeriveSchema.gen[Products] val products = Table.defineTableSmart[Products] @@ -96,7 +99,8 @@ trait DbSchema extends PostgresJdbcModule { self => object ProductPrices { case class ProductPrice(productId: UUID, effective: LocalDate, price: BigDecimal) - implicit val productPriceSchema = DeriveSchema.gen[ProductPrice] + implicit val productPriceSchema: Schema.CaseClass3[UUID, LocalDate, BigDecimal, ProductPrice] = + DeriveSchema.gen[ProductPrice] val productPrices = Table.defineTableSmart[ProductPrice] @@ -106,7 +110,8 @@ trait DbSchema extends PostgresJdbcModule { self => object OrderDetailsSchema { case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + implicit val orderDetailsSchema: Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetails] = + DeriveSchema.gen[OrderDetails] val orderDetails = Table.defineTableSmart[OrderDetails] @@ -116,7 +121,8 @@ trait DbSchema extends PostgresJdbcModule { self => object PersonsSchema { case class Persons(id: UUID, name: Option[String], birthDate: Option[LocalDate]) - implicit val personsSchema = DeriveSchema.gen[Persons] + implicit val personsSchema: Schema.CaseClass3[UUID, Option[String], Option[LocalDate], Persons] = + DeriveSchema.gen[Persons] val persons = Table.defineTableSmart[Persons] @@ -127,7 +133,7 @@ trait DbSchema extends PostgresJdbcModule { self => case class Movies(id: Int, rating: Option[Int]) - implicit val moviesSchema = DeriveSchema.gen[Movies] + implicit val moviesSchema: Schema.CaseClass2[Int, Option[Int], Movies] = DeriveSchema.gen[Movies] val movies = Table.defineTableSmart[Movies] diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala index 37c21866c..d61bdf93e 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteSpec.scala @@ -4,7 +4,7 @@ import zio.test._ import java.util.UUID import java.time.LocalDate import java.time.ZonedDateTime -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.table._ object DeleteSpec extends PostgresRunnableSpec { @@ -19,7 +19,9 @@ object DeleteSpec extends PostgresRunnableSpec { createdTimestamp: ZonedDateTime ) - implicit val custommerSchema = DeriveSchema.gen[Customers] + implicit val custommerSchema + : Schema.CaseClass7[UUID, LocalDate, String, String, Boolean, String, ZonedDateTime, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index fa55096d4..fa426eed9 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -9,10 +9,9 @@ import BuildInfoKeys._ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { - val SilencerVersion = "1.17.13" - val Scala212 = "2.12.18" - val Scala213 = "2.13.10" - val ScalaDotty = "3.3.0" + val Scala212 = "2.12.18" + val Scala213 = "2.13.12" + val ScalaDotty = "3.3.0" def buildInfoSettings(packageName: String) = Seq( @@ -150,17 +149,6 @@ object BuildHelper { crossScalaVersions := Seq(Scala213, Scala212), ThisBuild / scalaVersion := Scala213, scalacOptions := stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value), - libraryDependencies ++= { - if (scalaVersion.value == ScalaDotty) - Seq( - "com.github.ghik" % s"silencer-lib_2.13.10" % SilencerVersion % Provided - ) - else - Seq( - ("com.github.ghik" % "silencer-lib" % SilencerVersion % Provided).cross(CrossVersion.full), - compilerPlugin(("com.github.ghik" % "silencer-plugin" % SilencerVersion).cross(CrossVersion.full)) - ) - }, resolvers ++= Resolver.sonatypeOssRepos("snapshots"), Test / parallelExecution := true, incOptions ~= (_.withLogRecompileOnMacro(false)), diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala index 060d59298..fbac3c0bd 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/DbSchema.scala @@ -3,7 +3,7 @@ package zio.sql.sqlserver import java.util.UUID import java.time._ import java.math.BigDecimal -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.sql.table._ import zio.sql.select._ @@ -21,7 +21,9 @@ trait DbSchema extends SqlServerSqlModule { self => createdTimestamp: ZonedDateTime ) - implicit val custommerSchema = DeriveSchema.gen[Customer] + implicit val custommerSchema + : Schema.CaseClass7[UUID, LocalDate, String, String, Boolean, String, ZonedDateTime, Customer] = + DeriveSchema.gen[Customer] val customers = Table.defineTableSmart[Customer] @@ -32,7 +34,7 @@ trait DbSchema extends SqlServerSqlModule { self => case class Orders(id: UUID, customerId: UUID, orderDate: LocalDate) - implicit val orderSchema = DeriveSchema.gen[Orders] + implicit val orderSchema: Schema.CaseClass3[UUID, UUID, LocalDate, Orders] = DeriveSchema.gen[Orders] val orders = Table.defineTableSmart[Orders] @@ -40,7 +42,7 @@ trait DbSchema extends SqlServerSqlModule { self => case class Products(id: UUID, name: String, description: String, imageUrl: String) - implicit val productSchema = DeriveSchema.gen[Products] + implicit val productSchema: Schema.CaseClass4[UUID, String, String, String, Products] = DeriveSchema.gen[Products] val products = Table.defineTableSmart[Products] @@ -48,7 +50,8 @@ trait DbSchema extends SqlServerSqlModule { self => case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + implicit val orderDetailsSchema: Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetails] = + DeriveSchema.gen[OrderDetails] val orderDetails = Table.defineTableSmart[OrderDetails] diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index f9a721f79..844dbe083 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -5,7 +5,7 @@ import java.time._ import java.time.temporal.ChronoUnit import java.util.UUID import zio._ -import zio.schema.DeriveSchema +import zio.schema.{ DeriveSchema, Schema } import zio.test._ import zio.test.Assertion._ import zio.test.TestAspect.{ retries, samples, sequential, shrinks } @@ -27,7 +27,8 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { dateOfBirth: LocalDate ) - implicit val customerRow = DeriveSchema.gen[CustomerRow] + implicit val customerRow: Schema.CaseClass5[UUID, String, String, Boolean, LocalDate, CustomerRow] = + DeriveSchema.gen[CustomerRow] private def customerSelectJoseAssertion[F]( condition: Expr[F, customers.TableType, Boolean] @@ -954,7 +955,8 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { object CustomerSchema { case class Customers(id: UUID, firstName: String, lastName: String, verified: Boolean, dob: LocalDate) - implicit val customerSchema = DeriveSchema.gen[Customers] + implicit val customerSchema: Schema.CaseClass5[UUID, String, String, Boolean, LocalDate, Customers] = + DeriveSchema.gen[Customers] val customers = Table.defineTable[Customers] @@ -965,7 +967,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { object OrderSchema { case class Orders(id: UUID, customerId: UUID, orderDate: LocalDate) - implicit val orderSchema = DeriveSchema.gen[Orders] + implicit val orderSchema: Schema.CaseClass3[UUID, UUID, LocalDate, Orders] = DeriveSchema.gen[Orders] val orders = Table.defineTable[Orders] @@ -975,7 +977,8 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { object ProductSchema { case class ProductPrices(productId: UUID, effective: OffsetDateTime, price: BigDecimal) - implicit val productPricesSchema = DeriveSchema.gen[ProductPrices] + implicit val productPricesSchema: Schema.CaseClass3[UUID, OffsetDateTime, BigDecimal, ProductPrices] = + DeriveSchema.gen[ProductPrices] val productPrices = Table.defineTable[ProductPrices] @@ -985,7 +988,8 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { object OrderDetails { case class OrderDetails(orderId: UUID, productId: UUID, quantity: Int, unitPrice: BigDecimal) - implicit val orderDetailsSchema = DeriveSchema.gen[OrderDetails] + implicit val orderDetailsSchema: Schema.CaseClass4[UUID, UUID, Int, BigDecimal, OrderDetails] = + DeriveSchema.gen[OrderDetails] val orderDetails = Table.defineTable[OrderDetails] @@ -1036,7 +1040,29 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { zoneddatetime: ZonedDateTime ) - implicit val alTypesSchema = DeriveSchema.gen[AllType] + implicit val alTypesSchema: Schema.CaseClass20[ + UUID, + Chunk[Byte], + java.math.BigDecimal, + Boolean, + Char, + Double, + Float, + Instant, + Int, + Option[Int], + LocalDate, + LocalDateTime, + LocalTime, + Long, + OffsetDateTime, + OffsetTime, + Short, + String, + UUID, + ZonedDateTime, + AllType + ] = DeriveSchema.gen[AllType] val allTypes = Table.defineTableSmart[AllType] From ce027df573669f18a96c8e4d245f0d9ed115136f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 9 Apr 2024 03:05:41 +0000 Subject: [PATCH 31/36] Update sbt-bloop to 1.5.17 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 335326241..8fa550115 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.16") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.17") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") From 14ecff5d999a821596ba5184f455286fc81dccf7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 9 Apr 2024 03:06:03 +0000 Subject: [PATCH 32/36] Update sbt-tpolecat to 0.5.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 335326241..bfc633d3f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -8,5 +8,5 @@ addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.16") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.3.1") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") -addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") From e1a91ab29b7a952689cfb576b2c888a14ceb62fa Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 13 Apr 2024 18:26:03 +0000 Subject: [PATCH 33/36] Update zio, zio-streams, zio-test, ... to 2.0.22 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 514391d30..6676c8b3a 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ addCommandAlias("fmtOnce", "all scalafmtSbt scalafmt test:scalafmt") addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") -val zioVersion = "2.0.21" +val zioVersion = "2.0.22" val zioSchemaVersion = "1.0.1" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.41.3" From 4bd6941eb956a3ea31812f8f665e3a556e406990 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 17 Apr 2024 23:53:47 +0000 Subject: [PATCH 34/36] Update logback-classic to 1.5.6 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 514391d30..5bc3caf6b 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ val zioVersion = "2.0.21" val zioSchemaVersion = "1.0.1" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.41.3" -val logbackVersion = "1.4.14" +val logbackVersion = "1.5.6" lazy val root = project .in(file(".")) From 182924e07b317880369279b4cd93c15efd3cc0f4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 24 Apr 2024 00:47:27 +0000 Subject: [PATCH 35/36] Update zio-schema, zio-schema-derivation to 1.1.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 514391d30..6980e846a 100644 --- a/build.sbt +++ b/build.sbt @@ -24,7 +24,7 @@ addCommandAlias("fmt", "fmtOnce;fmtOnce") addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck") val zioVersion = "2.0.21" -val zioSchemaVersion = "1.0.1" +val zioSchemaVersion = "1.1.1" val testcontainersVersion = "1.18.3" val testcontainersScalaVersion = "0.41.3" val logbackVersion = "1.4.14" From ee981b8d50791ab9810270ad401e30f4c16117e0 Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 6 May 2024 16:16:48 +0200 Subject: [PATCH 36/36] Update to Scala 2.13.13 --- .github/workflows/ci.yml | 2 +- core/jvm/src/main/scala/zio/sql/select/Read.scala | 4 ++-- .../src/main/scala/zio/sql/JdbcInternalModule.scala | 2 +- .../test/scala/zio/sql/mysql/MysqlModuleSpec.scala | 6 +++--- .../scala/zio/sql/oracle/OracleSqlModuleSpec.scala | 4 ++-- .../zio/sql/postgresql/CustomFunctionDefSpec.scala | 2 +- .../scala/zio/sql/postgresql/DeleteBatchSpec.scala | 8 ++++---- .../scala/zio/sql/postgresql/InsertBatchSpec.scala | 8 ++++---- .../zio/sql/postgresql/PostgresSqlModuleSpec.scala | 13 ++++++++++--- .../scala/zio/sql/postgresql/TransactionSpec.scala | 8 ++++---- .../scala/zio/sql/postgresql/UpdateBatchSpec.scala | 8 ++++---- project/BuildHelper.scala | 2 +- .../zio/sql/sqlserver/SqlServerModuleSpec.scala | 6 +++--- 13 files changed, 40 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ad17c91f..7fd59f2ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: fail-fast: false matrix: java: ['openjdk@1.11.0', 'openjdk@1.17.0'] - scala: ['2.12.18', '2.13.12'] + scala: ['2.12.18', '2.13.13'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/core/jvm/src/main/scala/zio/sql/select/Read.scala b/core/jvm/src/main/scala/zio/sql/select/Read.scala index b889d9d96..bc485927f 100644 --- a/core/jvm/src/main/scala/zio/sql/select/Read.scala +++ b/core/jvm/src/main/scala/zio/sql/select/Read.scala @@ -39,10 +39,10 @@ sealed trait Read[+Out] { self => } def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = - Read.Union[ResultType, Out1](self, that, true) + Read.Union[ResultType, Out1](self, that, distinct = true) def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] = - Read.Union[ResultType, Out1](self, that, false) + Read.Union[ResultType, Out1](self, that, distinct = false) } object Read { diff --git a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala index c07d1ab37..b0590de5a 100644 --- a/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala +++ b/jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala @@ -106,7 +106,7 @@ trait JdbcInternalModule { self: Jdbc => case TDialectSpecific(t) => t.decode(columnIndex, resultSet) case t @ Nullable() => val _ = nonNull - extractColumn(columnIndex, resultSet, t.typeTag, false).map(Option(_)) + extractColumn(columnIndex, resultSet, t.typeTag, nonNull = false).map(Option(_)) case TNone => Right(None) } } diff --git a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala index 662ae3106..84e6df905 100644 --- a/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala +++ b/mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala @@ -140,7 +140,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec { UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", "Wiggins", - false, + verified = false, LocalDate.parse("1987-03-23") ) ) @@ -286,8 +286,8 @@ object MysqlModuleSpec extends MysqlRunnableSpec { ) val rows = List( - CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", true), - CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", false) + CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", verified = true), + CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", verified = false) ) val command = insertInto(customers)( diff --git a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala index f7672bc50..3958abfd3 100644 --- a/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala +++ b/oracle/src/test/scala/zio/sql/oracle/OracleSqlModuleSpec.scala @@ -137,8 +137,8 @@ object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema { test("Can insert rows") { val rows = List( - Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", true), - Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", false) + Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", verified = true), + Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", verified = false) ) val command = insertInto(customers)( diff --git a/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala index c2f89ff5d..05e13a894 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/CustomFunctionDefSpec.scala @@ -436,7 +436,7 @@ object CustomFunctionDefSpec extends PostgresRunnableSpec with DbSchema { UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"), "Ronald", "Russell", - true, + verified = true, LocalDate.parse("1983-01-05") ) ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala index 6257c05b6..2c9c88e07 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/DeleteBatchSpec.scala @@ -37,7 +37,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer1", "lnameCustomer1", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -46,7 +46,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer2", "lnameCustomer2", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -55,7 +55,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer3", "lnameCustomer3", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -64,7 +64,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer4", "lnameCustomer4", - false, + verified = false, LocalDate.now().toString, ZonedDateTime.now() ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala index 1d6397c63..7bff93468 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/InsertBatchSpec.scala @@ -22,7 +22,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer1", "lnameCustomer1", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -31,7 +31,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer2", "lnameCustomer2", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -40,7 +40,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer3", "lnameCustomer3", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -49,7 +49,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer4", "lnameCustomer4", - false, + verified = false, LocalDate.now().toString, ZonedDateTime.now() ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala index e33d211d3..83c62330b 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/PostgresSqlModuleSpec.scala @@ -32,7 +32,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", "Wiggins", - false, + verified = false, LocalDate.parse("1987-03-23") ) ) @@ -450,7 +450,15 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { val created = ZonedDateTime.now() val data = - CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created) + CustomerRow( + UUID.randomUUID(), + "Jaro", + "Regec", + verified = true, + LocalDate.ofYearDay(1990, 1), + created.toString, + created + ) implicit val customerRowSchema = Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow]( @@ -647,7 +655,6 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema { test("in joined tables, columns of the same name from different table are treated as different columns") { import Cities._ import Ordering._ - import Expr._ /** * SELECT ms.name, c.name, COUNT(ml.id) as line_count diff --git a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala index ffdadc64b..00cdf579c 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/TransactionSpec.scala @@ -51,7 +51,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer1", "lnameCustomer1", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -60,7 +60,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer2", "lnameCustomer2", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -89,7 +89,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer1", "lnameCustomer1", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -98,7 +98,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer2", "lnameCustomer2", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) diff --git a/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala b/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala index 04dad2230..bd704f0c0 100644 --- a/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala +++ b/postgres/src/test/scala/zio/sql/postgresql/UpdateBatchSpec.scala @@ -27,7 +27,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer1", "lnameCustomer1", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -36,7 +36,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer2", "lnameCustomer2", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -45,7 +45,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer3", "lnameCustomer3", - true, + verified = true, LocalDate.now().toString, ZonedDateTime.now() ) @@ -54,7 +54,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema { LocalDate.now(), "fnameCustomer4", "lnameCustomer4", - false, + verified = false, LocalDate.now().toString, ZonedDateTime.now() ) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index fa426eed9..23466085a 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -10,7 +10,7 @@ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb object BuildHelper { val Scala212 = "2.12.18" - val Scala213 = "2.13.12" + val Scala213 = "2.13.13" val ScalaDotty = "3.3.0" def buildInfoSettings(packageName: String) = diff --git a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala index 844dbe083..4ca986746 100644 --- a/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala +++ b/sqlserver/src/test/scala/zio/sql/sqlserver/SqlServerModuleSpec.scala @@ -44,7 +44,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"), "Jose", "Wiggins", - false, + verified = false, LocalDate.parse("1987-03-23") ) ) @@ -675,8 +675,8 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec { test("Can insert rows") { val rows = List( - CustomerRow(UUID.randomUUID(), "Peter", "Parker", true, LocalDate.ofYearDay(2001, 8)), - CustomerRow(UUID.randomUUID(), "Stephen", "Strange", false, LocalDate.ofYearDay(1980, 2)) + CustomerRow(UUID.randomUUID(), "Peter", "Parker", verified = true, LocalDate.ofYearDay(2001, 8)), + CustomerRow(UUID.randomUUID(), "Stephen", "Strange", verified = false, LocalDate.ofYearDay(1980, 2)) ) val command = insertInto(customers)(