From f1312315c1321024cf58b9e66b8416ceaae3fe7a Mon Sep 17 00:00:00 2001 From: Massimo Siani Date: Tue, 25 May 2021 11:13:53 +0200 Subject: [PATCH 01/34] Add FinDynamic to the adopters --- modules/docs/src/main/mdoc/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/docs/src/main/mdoc/index.md b/modules/docs/src/main/mdoc/index.md index 846dd198a..b658321fd 100644 --- a/modules/docs/src/main/mdoc/index.md +++ b/modules/docs/src/main/mdoc/index.md @@ -131,6 +131,7 @@ Don't see yours? [You can add it in a PR!](https://github.com/tpolecat/doobie/ed - [Doomoolmori](https://doomoolmori.com) - [eBay Inc.](https://www.ebay.com) - [Evolution](https://www.evolution.com/) + - [FinDynamic](https://www.findynamic.com/en) - [HIFI](https://hi.fi) - [ITV](https://www.itv.com/) - [lences.io](https://lenses.io) From 4853f5b693328538a97c0735918a8d75d8ff461e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 27 May 2021 02:29:30 +0200 Subject: [PATCH 02/34] Update refined to 0.9.26 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2af6f63f5..96b351ff2 100644 --- a/build.sbt +++ b/build.sbt @@ -13,7 +13,7 @@ lazy val monixVersion = "3.4.0" lazy val quillVersion = "3.7.1" lazy val postGisVersion = "2.5.0" lazy val postgresVersion = "42.2.20" -lazy val refinedVersion = "0.9.25" +lazy val refinedVersion = "0.9.26" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" lazy val munitVersion = "0.7.26" From 12fb8811c3503d8231228a0b163b9d39e7deac4a Mon Sep 17 00:00:00 2001 From: Jack Treble Date: Thu, 27 May 2021 13:00:39 +0100 Subject: [PATCH 03/34] enable scala 3 build for doobie-scalatest --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index 96b351ff2..46a4ef3b0 100644 --- a/build.sbt +++ b/build.sbt @@ -397,7 +397,6 @@ lazy val scalatest = project "com.h2database" % "h2" % h2Version % "test" ) ) - .settings(noDottySettings) lazy val munit = project .in(file("modules/munit")) From b5ab01ea4e6050372e0a6e634f6842b9a8594f74 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 28 May 2021 23:30:15 +0200 Subject: [PATCH 04/34] Update sbt-scoverage to 1.8.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ef7752b96..c27d30056 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.9.2") addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") From 4cd038f56dfde3b2df6a63b106573d23f4a1b8de Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Jun 2021 09:39:51 +0200 Subject: [PATCH 05/34] Update sbt-jmh to 0.4.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c27d30056..8cd14040e 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("io.chrisdavenport" % "sbt-mima-version-check" % "0.1.2") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.18") From c409a1fdbddcf3e530b5018265a005be60670a69 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 1 Jun 2021 17:06:59 +0200 Subject: [PATCH 06/34] Update sbt-tpolecat to 0.1.20 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8cd14040e..3611df9cd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,6 +7,6 @@ addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("io.chrisdavenport" % "sbt-mima-version-check" % "0.1.2") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.18") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5") From cf619124862a81789c3ee395df77c596d47cc257 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 11 Jun 2021 00:58:16 +0200 Subject: [PATCH 07/34] Update postgresql to 42.2.21 --- build.sbt | 2 +- project/build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 46a4ef3b0..28e55c695 100644 --- a/build.sbt +++ b/build.sbt @@ -12,7 +12,7 @@ lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" lazy val quillVersion = "3.7.1" lazy val postGisVersion = "2.5.0" -lazy val postgresVersion = "42.2.20" +lazy val postgresVersion = "42.2.21" lazy val refinedVersion = "0.9.26" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" diff --git a/project/build.sbt b/project/build.sbt index 0fcc78f12..072c98d26 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1,3 +1,3 @@ // Required for the freegen definition for postgres in ../build.sbt -val postgresVersion = "42.2.20" +val postgresVersion = "42.2.21" libraryDependencies += "org.postgresql" % "postgresql" % postgresVersion From f64604e81f3e785525f139e084adc366554c3abb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 14 Jun 2021 19:54:06 +0200 Subject: [PATCH 08/34] Update munit-cats-effect-2 to 1.0.5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 28e55c695..2abf7bcee 100644 --- a/build.sbt +++ b/build.sbt @@ -81,7 +81,7 @@ lazy val commonSettings = // MUnit libraryDependencies ++= Seq( "org.typelevel" %% "scalacheck-effect-munit" % "1.0.2" % Test, - "org.typelevel" %% "munit-cats-effect-2" % "1.0.3" % Test, + "org.typelevel" %% "munit-cats-effect-2" % "1.0.5" % Test, ), testFrameworks += new TestFramework("munit.Framework"), From f17d3e4b029954b6b31264eb07c6457d2db16043 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 16 Jun 2021 19:17:11 +0200 Subject: [PATCH 09/34] Update postgresql to 42.2.22 --- build.sbt | 2 +- project/build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 2abf7bcee..5a4a6998a 100644 --- a/build.sbt +++ b/build.sbt @@ -12,7 +12,7 @@ lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" lazy val quillVersion = "3.7.1" lazy val postGisVersion = "2.5.0" -lazy val postgresVersion = "42.2.21" +lazy val postgresVersion = "42.2.22" lazy val refinedVersion = "0.9.26" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" diff --git a/project/build.sbt b/project/build.sbt index 072c98d26..813d83cb2 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1,3 +1,3 @@ // Required for the freegen definition for postgres in ../build.sbt -val postgresVersion = "42.2.21" +val postgresVersion = "42.2.22" libraryDependencies += "org.postgresql" % "postgresql" % postgresVersion From f61c80f728665be0e73a0bb9d1c188bff7febdb9 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 18 Jun 2021 08:45:57 +0200 Subject: [PATCH 10/34] Update slf4j-api, slf4j-nop, slf4j-simple to 1.7.31 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5a4a6998a..7110e7279 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ lazy val specs2Version = "4.11.0" lazy val scala212Version = "2.12.12" lazy val scala213Version = "2.13.5" lazy val scala30Version = "3.0.0" -lazy val slf4jVersion = "1.7.30" +lazy val slf4jVersion = "1.7.31" // These are releases to ignore during MiMa checks lazy val botchedReleases = Set("0.8.0", "0.8.1") From 90a2a0fe08dc49a88448905c1146d609541a6eeb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 18 Jun 2021 13:10:29 +0200 Subject: [PATCH 11/34] Update quill-jdbc to 3.7.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7110e7279..40f103b35 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ lazy val h2Version = "1.4.200" lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking change via slf4j v2 lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" -lazy val quillVersion = "3.7.1" +lazy val quillVersion = "3.7.2" lazy val postGisVersion = "2.5.0" lazy val postgresVersion = "42.2.22" lazy val refinedVersion = "0.9.26" From cc3798988db5e999d7ecffa520fedd289e4bb932 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 25 Jun 2021 10:22:46 +0200 Subject: [PATCH 12/34] Update specs2-core to 4.12.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7110e7279..ba65cfbee 100644 --- a/build.sbt +++ b/build.sbt @@ -19,7 +19,7 @@ lazy val scalatestVersion = "3.2.9" lazy val munitVersion = "0.7.26" lazy val shapelessVersion = "2.3.7" lazy val silencerVersion = "1.7.1" -lazy val specs2Version = "4.11.0" +lazy val specs2Version = "4.12.2" lazy val scala212Version = "2.12.12" lazy val scala213Version = "2.13.5" lazy val scala30Version = "3.0.0" From 1f321745678433915be546a4ded695c16d53ab7f Mon Sep 17 00:00:00 2001 From: Yisrael Union Date: Tue, 29 Jun 2021 14:41:51 -0400 Subject: [PATCH 13/34] Update 12-Custom-Mappings.md added clarification for pulling into scope java.time meta instances --- modules/docs/src/main/mdoc/docs/12-Custom-Mappings.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/docs/src/main/mdoc/docs/12-Custom-Mappings.md b/modules/docs/src/main/mdoc/docs/12-Custom-Mappings.md index 8b2deb50b..f6b325ce5 100644 --- a/modules/docs/src/main/mdoc/docs/12-Custom-Mappings.md +++ b/modules/docs/src/main/mdoc/docs/12-Custom-Mappings.md @@ -56,6 +56,8 @@ Instances are provided for the following Scala types: - `Instant`, `LocalDate`, `LocalTime`, `LocalDateTime`, `OffsetTime`, `OffsetDateTime` and `ZonedDateTime` from the `java.time` package; and - single-element case classes wrapping one of the above types. +The `java.time` instances may require a separate import , dependent on your Database Driver . See the [doobie-faq](https://tpolecat.github.io/doobie/docs/18-FAQ.html#how-do-i-use-java-time-types-with-doobie-) for details + The above cases are defined by the JDBC specification. See later chapters on vendor-specific additions, which provide mappings for some non-standard types such as `UUID`s and network addresses. #### Deriving Get and Put from Existing Instances From 618cc60c4dc6459d14a29972c1943fb25fcd8951 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 29 Jun 2021 23:01:48 +0200 Subject: [PATCH 14/34] Update fs2-core, fs2-io to 2.5.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index ba65cfbee..d3c9aae52 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ import sbt.dsl.LinterLevel.Ignore lazy val catsVersion = "2.6.1" lazy val catsEffectVersion = "2.5.1" lazy val circeVersion = settingKey[String]("Circe version.") -lazy val fs2Version = "2.5.6" +lazy val fs2Version = "2.5.7" lazy val h2Version = "1.4.200" lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking change via slf4j v2 lazy val kindProjectorVersion = "0.11.2" From 726ef2272db367157959b987e96be31404b3b93f Mon Sep 17 00:00:00 2001 From: Matthew Moss Date: Thu, 1 Jul 2021 12:27:01 +1000 Subject: [PATCH 15/34] Fix order of gets in Read.ap --- modules/core/src/main/scala/doobie/util/read.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/main/scala/doobie/util/read.scala b/modules/core/src/main/scala/doobie/util/read.scala index 53559c7cb..7c7edea38 100644 --- a/modules/core/src/main/scala/doobie/util/read.scala +++ b/modules/core/src/main/scala/doobie/util/read.scala @@ -49,7 +49,7 @@ final class Read[A]( new Read(gets, (rs, n) => f(unsafeGet(rs, n))) def ap[B](ff: Read[A => B]): Read[B] = - new Read(gets ++ ff.gets, (rs, n) => ff.unsafeGet(rs, n)(unsafeGet(rs, n + ff.length))) + new Read(ff.gets ++ gets, (rs, n) => ff.unsafeGet(rs, n)(unsafeGet(rs, n + ff.length))) def get(n: Int): ResultSetIO[A] = FRS.raw(unsafeGet(_, n)) From a7eb37163e9208b277be82a8bd6542a00075b1f6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 2 Jul 2021 18:53:20 +0200 Subject: [PATCH 16/34] Update munit to 0.7.27 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d3c9aae52..a88c9f5d3 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ lazy val postgresVersion = "42.2.22" lazy val refinedVersion = "0.9.26" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" -lazy val munitVersion = "0.7.26" +lazy val munitVersion = "0.7.27" lazy val shapelessVersion = "2.3.7" lazy val silencerVersion = "1.7.1" lazy val specs2Version = "4.12.2" From 0195f31bc6196d69baa5bca15ede701436755f42 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 3 Jul 2021 22:54:46 +0200 Subject: [PATCH 17/34] Update fs2-core, fs2-io to 2.5.8 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a88c9f5d3..63bcdc7a4 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ import sbt.dsl.LinterLevel.Ignore lazy val catsVersion = "2.6.1" lazy val catsEffectVersion = "2.5.1" lazy val circeVersion = settingKey[String]("Circe version.") -lazy val fs2Version = "2.5.7" +lazy val fs2Version = "2.5.8" lazy val h2Version = "1.4.200" lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking change via slf4j v2 lazy val kindProjectorVersion = "0.11.2" From d032bc7d03ff06cb6ed1f7b6f3c0af6b62441e98 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 5 Jul 2021 10:10:34 +0200 Subject: [PATCH 18/34] Update specs2-core to 4.12.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 63bcdc7a4..8e30314ad 100644 --- a/build.sbt +++ b/build.sbt @@ -19,7 +19,7 @@ lazy val scalatestVersion = "3.2.9" lazy val munitVersion = "0.7.27" lazy val shapelessVersion = "2.3.7" lazy val silencerVersion = "1.7.1" -lazy val specs2Version = "4.12.2" +lazy val specs2Version = "4.12.3" lazy val scala212Version = "2.12.12" lazy val scala213Version = "2.13.5" lazy val scala30Version = "3.0.0" From 40668dc78ecbfefdf393d7ab88d845208d1ddd2b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 6 Jul 2021 19:17:54 +0200 Subject: [PATCH 19/34] Update postgresql to 42.2.23 --- build.sbt | 2 +- project/build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 8e30314ad..875d58956 100644 --- a/build.sbt +++ b/build.sbt @@ -12,7 +12,7 @@ lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" lazy val quillVersion = "3.7.1" lazy val postGisVersion = "2.5.0" -lazy val postgresVersion = "42.2.22" +lazy val postgresVersion = "42.2.23" lazy val refinedVersion = "0.9.26" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" diff --git a/project/build.sbt b/project/build.sbt index 813d83cb2..784607c58 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1,3 +1,3 @@ // Required for the freegen definition for postgres in ../build.sbt -val postgresVersion = "42.2.22" +val postgresVersion = "42.2.23" libraryDependencies += "org.postgresql" % "postgresql" % postgresVersion From 03b696f83ce8f1ddf5f430a3220b34c2a858b463 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 9 Jul 2021 16:14:03 +0200 Subject: [PATCH 20/34] Update scala3-library to 3.0.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 875d58956..3898984e5 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,7 @@ lazy val silencerVersion = "1.7.1" lazy val specs2Version = "4.12.3" lazy val scala212Version = "2.12.12" lazy val scala213Version = "2.13.5" -lazy val scala30Version = "3.0.0" +lazy val scala30Version = "3.0.1" lazy val slf4jVersion = "1.7.31" // These are releases to ignore during MiMa checks From 523dac5a7b5c1cf4b9dec08508eca34f5cd81068 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 9 Jul 2021 23:08:08 +0200 Subject: [PATCH 21/34] Update fs2-core, fs2-io to 2.5.9 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3898984e5..42fdd0add 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ import sbt.dsl.LinterLevel.Ignore lazy val catsVersion = "2.6.1" lazy val catsEffectVersion = "2.5.1" lazy val circeVersion = settingKey[String]("Circe version.") -lazy val fs2Version = "2.5.8" +lazy val fs2Version = "2.5.9" lazy val h2Version = "1.4.200" lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking change via slf4j v2 lazy val kindProjectorVersion = "0.11.2" From d0bdbf387faa9df0dc0e1e610c347e939dafe94b Mon Sep 17 00:00:00 2001 From: Matthew Moss Date: Mon, 12 Jul 2021 10:15:01 +1000 Subject: [PATCH 22/34] Add read tests from #1490 --- .../core/src/test/scala/doobie/util/ReadSuite.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/core/src/test/scala/doobie/util/ReadSuite.scala b/modules/core/src/test/scala/doobie/util/ReadSuite.scala index 369613365..b590f654a 100644 --- a/modules/core/src/test/scala/doobie/util/ReadSuite.scala +++ b/modules/core/src/test/scala/doobie/util/ReadSuite.scala @@ -75,4 +75,15 @@ class ReadSuite extends munit.FunSuite with ReadSuitePlatform { assertEquals(o, List((1, 2, 3, 4, 5))) } + test("Read should select correct columns when combined with `product`") { + import cats.syntax.all._ + import doobie.implicits._ + val r = util.Read[Int].product(util.Read[Int].product(util.Read[Int])) + + val q = sql"SELECT 1, 2, 3".query(r).to[List] + val o = q.transact(xa).unsafeRunSync() + + assertEquals(o, List((1, (2, 3)))) + } + } From 638d27b06cece193893f6b42760cf7493753eb8d Mon Sep 17 00:00:00 2001 From: Matthew Moss Date: Tue, 13 Jul 2021 21:10:43 +1000 Subject: [PATCH 23/34] Add tests for read column order in check --- .../scala/doobie/munit/CheckerTests.scala | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/munit/src/test/scala/doobie/munit/CheckerTests.scala b/modules/munit/src/test/scala/doobie/munit/CheckerTests.scala index 7ba145aa0..d20268b7f 100644 --- a/modules/munit/src/test/scala/doobie/munit/CheckerTests.scala +++ b/modules/munit/src/test/scala/doobie/munit/CheckerTests.scala @@ -6,6 +6,7 @@ package doobie.munit import cats.effect.{ ContextShift, IO } import doobie.syntax.string._ +import doobie.util.Read import doobie.util.transactor.Transactor import munit._ import scala.concurrent.ExecutionContext @@ -21,13 +22,36 @@ trait CheckerChecks[M[_]] extends FunSuite with Checker[M] { ) test("trivial") { check(sql"select 1".query[Int]) } - + test("fail".fail) { check(sql"select 1".query[String]) } final case class Foo[F[_]](x: Int) test ("trivial case-class"){ check(sql"select 1".query[Foo[cats.Id]]) } + test("Read should select correct columns when combined with `product`") { + import cats.syntax.all._ + import doobie.implicits._ + + val ri = Read[Int] + val rs = Read[String] + + // tupled use product under the hood + val combined: Read[(Int, String)] = (ri, rs).tupled + + check(sql"SELECT 1, '2'".query(combined)) + } + + test("Read should select correct columns for checking when combined with `ap`") { + val readInt = Read[(Int, Int)] + val readIntToInt: Read[Tuple2[Int, Int] => String] = + Read[(String, String)].map(i => k => s"$i,$k") + + val combined: Read[String] = readInt.ap(readIntToInt) + + check(sql"SELECT '1', '2', 3, 4".query(combined)) + } + } class IOCheckerCheck extends CheckerChecks[IO] with IOChecker { From 6e084f78828d2cd58f22e63ca22569ff91154b24 Mon Sep 17 00:00:00 2001 From: Matthew Moss Date: Tue, 13 Jul 2021 21:23:07 +1000 Subject: [PATCH 24/34] Add test for ordering of gets in Read.product --- .../core/src/test/scala/doobie/util/ReadSuite.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/core/src/test/scala/doobie/util/ReadSuite.scala b/modules/core/src/test/scala/doobie/util/ReadSuite.scala index b590f654a..d76ae9d50 100644 --- a/modules/core/src/test/scala/doobie/util/ReadSuite.scala +++ b/modules/core/src/test/scala/doobie/util/ReadSuite.scala @@ -60,6 +60,17 @@ class ReadSuite extends munit.FunSuite with ReadSuitePlatform { assertEquals(util.Read[LenStr2].length, 1) } + test(".product should product the correct ordering of gets") { + import cats.syntax.all._ + + val readInt = util.Read[Int] + val readString = util.Read[String] + + val p = readInt.product(readString) + + assertEquals(p.gets, (readInt.gets ++ readString.gets)) + } + test("Read should select correct columns when combined with `ap`") { import cats.syntax.all._ import doobie.implicits._ From bab47be97bca3881232dfd67bec950268811ce36 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Jul 2021 11:18:05 +0200 Subject: [PATCH 25/34] Update refined to 0.9.27 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 42fdd0add..145589e63 100644 --- a/build.sbt +++ b/build.sbt @@ -13,7 +13,7 @@ lazy val monixVersion = "3.4.0" lazy val quillVersion = "3.7.1" lazy val postGisVersion = "2.5.0" lazy val postgresVersion = "42.2.23" -lazy val refinedVersion = "0.9.26" +lazy val refinedVersion = "0.9.27" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" lazy val munitVersion = "0.7.27" From d230c7e8b5a1b5246c110763d32c5cda81a85f45 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 20 Jul 2021 16:13:15 +0200 Subject: [PATCH 26/34] Update slf4j-api, slf4j-nop, slf4j-simple to 1.7.32 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 145589e63..7e30b3f70 100644 --- a/build.sbt +++ b/build.sbt @@ -23,7 +23,7 @@ lazy val specs2Version = "4.12.3" lazy val scala212Version = "2.12.12" lazy val scala213Version = "2.13.5" lazy val scala30Version = "3.0.1" -lazy val slf4jVersion = "1.7.31" +lazy val slf4jVersion = "1.7.32" // These are releases to ignore during MiMa checks lazy val botchedReleases = Set("0.8.0", "0.8.1") From f665ff2ecd16e21d33802d80db42051039bc69be Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 22 Jul 2021 15:11:41 +0200 Subject: [PATCH 27/34] Update mdoc, sbt-mdoc to 2.2.22 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 3611df9cd..eca0f02c7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -8,5 +8,5 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("io.chrisdavenport" % "sbt-mima-version-check" % "0.1.2") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.22") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5") From f2d976eb420caf539af4a993f6ff07b6015eda8a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 23 Jul 2021 09:09:44 +0200 Subject: [PATCH 28/34] Update postgis-jdbc to 2.5.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7e30b3f70..a0bc7dd37 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,7 @@ lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" lazy val quillVersion = "3.7.1" -lazy val postGisVersion = "2.5.0" +lazy val postGisVersion = "2.5.1" lazy val postgresVersion = "42.2.23" lazy val refinedVersion = "0.9.27" lazy val scalaCheckVersion = "1.15.4" From bdb92171098b27f56f304b7dfa86f156da6ad70e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 23 Jul 2021 10:43:32 +0200 Subject: [PATCH 29/34] Update quill-jdbc to 3.7.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a0bc7dd37..91fdbfd0e 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ lazy val h2Version = "1.4.200" lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking change via slf4j v2 lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" -lazy val quillVersion = "3.7.1" +lazy val quillVersion = "3.7.2" lazy val postGisVersion = "2.5.1" lazy val postgresVersion = "42.2.23" lazy val refinedVersion = "0.9.27" From 8a191371bda4d0b729c29fd85ae7108bb66ea685 Mon Sep 17 00:00:00 2001 From: dwlizlo Date: Tue, 27 Jul 2021 17:03:36 +0200 Subject: [PATCH 30/34] Bump dependencies for quill and circe --- build.sbt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build.sbt b/build.sbt index 91fdbfd0e..be8fd4eea 100644 --- a/build.sbt +++ b/build.sbt @@ -4,13 +4,13 @@ import sbt.dsl.LinterLevel.Ignore // Library versions all in one place, for convenience and sanity. lazy val catsVersion = "2.6.1" lazy val catsEffectVersion = "2.5.1" -lazy val circeVersion = settingKey[String]("Circe version.") +lazy val circeVersion = "0.14.1" lazy val fs2Version = "2.5.9" lazy val h2Version = "1.4.200" lazy val hikariVersion = "4.0.3" // N.B. Hikari v4 introduces a breaking change via slf4j v2 lazy val kindProjectorVersion = "0.11.2" lazy val monixVersion = "3.4.0" -lazy val quillVersion = "3.7.2" +lazy val quillVersion = settingKey[String]("Quill version.") lazy val postGisVersion = "2.5.1" lazy val postgresVersion = "42.2.23" lazy val refinedVersion = "0.9.27" @@ -121,10 +121,10 @@ lazy val commonSettings = old }, - circeVersion := { + quillVersion := { scalaVersion.value match { - case `scala30Version` => "0.14.0-M7" - case _ => "0.13.0" + case `scala30Version` => "3.7.2.Beta.1.4" + case _ => "3.7.2" } } @@ -332,8 +332,8 @@ lazy val `postgres-circe` = project name := "doobie-postgres-circe", description := "Postgres circe support for doobie.", libraryDependencies ++= Seq( - "io.circe" %% "circe-core" % circeVersion.value, - "io.circe" %% "circe-parser" % circeVersion.value + "io.circe" %% "circe-core" % circeVersion, + "io.circe" %% "circe-parser" % circeVersion ) ) @@ -435,9 +435,9 @@ lazy val docs = project scalacOptions := Nil, libraryDependencies ++= Seq( - "io.circe" %% "circe-core" % circeVersion.value, - "io.circe" %% "circe-generic" % circeVersion.value, - "io.circe" %% "circe-parser" % circeVersion.value, + "io.circe" %% "circe-core" % circeVersion, + "io.circe" %% "circe-generic" % circeVersion, + "io.circe" %% "circe-parser" % circeVersion, "io.monix" %% "monix-eval" % monixVersion, ), fork in Test := true, @@ -462,7 +462,7 @@ lazy val docs = project "shapelessVersion" -> shapelessVersion, "h2Version" -> h2Version, "postgresVersion" -> postgresVersion, - "quillVersion" -> quillVersion, + "quillVersion" -> quillVersion.value, "scalaVersion" -> scalaVersion.value, ), @@ -500,7 +500,7 @@ lazy val quill = project name := "doobie-quill", description := "Quill support for doobie.", libraryDependencies ++= Seq( - "io.getquill" %% "quill-jdbc" % quillVersion, + "io.getquill" %% "quill-jdbc" % quillVersion.value, "org.slf4j" % "slf4j-simple" % slf4jVersion % "test" ), ) From 702c6cb2eea664bc44925d9bd7b8d7a584592bd3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 28 Jul 2021 07:32:35 +0200 Subject: [PATCH 31/34] Update cats-effect to 2.5.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index be8fd4eea..7ca35438a 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import sbt.dsl.LinterLevel.Ignore // Library versions all in one place, for convenience and sanity. lazy val catsVersion = "2.6.1" -lazy val catsEffectVersion = "2.5.1" +lazy val catsEffectVersion = "2.5.2" lazy val circeVersion = "0.14.1" lazy val fs2Version = "2.5.9" lazy val h2Version = "1.4.200" From 1aa8af6c3f8e352474042717ccfd9edce13ad7ac Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 4 Aug 2021 21:14:59 +0200 Subject: [PATCH 32/34] Update cats-effect to 2.5.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7ca35438a..b5b128de7 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import sbt.dsl.LinterLevel.Ignore // Library versions all in one place, for convenience and sanity. lazy val catsVersion = "2.6.1" -lazy val catsEffectVersion = "2.5.2" +lazy val catsEffectVersion = "2.5.3" lazy val circeVersion = "0.14.1" lazy val fs2Version = "2.5.9" lazy val h2Version = "1.4.200" From c62d30e78df3d86a56d3131ec3164977d4283302 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 9 Aug 2021 23:25:00 +0200 Subject: [PATCH 33/34] Update munit to 0.7.28 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b5b128de7..e2a22c6a9 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ lazy val postgresVersion = "42.2.23" lazy val refinedVersion = "0.9.27" lazy val scalaCheckVersion = "1.15.4" lazy val scalatestVersion = "3.2.9" -lazy val munitVersion = "0.7.27" +lazy val munitVersion = "0.7.28" lazy val shapelessVersion = "2.3.7" lazy val silencerVersion = "1.7.1" lazy val specs2Version = "4.12.3" From 31edb656a4a7ffee3c079dde30678f1cf3ba959e Mon Sep 17 00:00:00 2001 From: Akiomi Kamakura Date: Tue, 17 Aug 2021 00:56:22 +0900 Subject: [PATCH 34/34] Fix alignment in build.sbt --- build.sbt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index e2a22c6a9..bdce5e5e2 100644 --- a/build.sbt +++ b/build.sbt @@ -22,7 +22,7 @@ lazy val silencerVersion = "1.7.1" lazy val specs2Version = "4.12.3" lazy val scala212Version = "2.12.12" lazy val scala213Version = "2.13.5" -lazy val scala30Version = "3.0.1" +lazy val scala30Version = "3.0.1" lazy val slf4jVersion = "1.7.32" // These are releases to ignore during MiMa checks @@ -282,8 +282,8 @@ lazy val postgres = project name := "doobie-postgres", description := "Postgres support for doobie.", libraryDependencies ++= Seq( - "co.fs2" %% "fs2-io" % fs2Version, - "org.postgresql" % "postgresql" % postgresVersion, + "co.fs2" %% "fs2-io" % fs2Version, + "org.postgresql" % "postgresql" % postgresVersion, postgisDep % "provided" ), scalacOptions -= "-Xfatal-warnings", // we need to do deprecated things @@ -409,8 +409,8 @@ lazy val munit = project description := "MUnit support for doobie.", testFrameworks += new TestFramework("munit.Framework"), libraryDependencies ++= Seq( - "org.scalameta" %% "munit" % munitVersion, - "com.h2database" % "h2" % h2Version % "test" + "org.scalameta" %% "munit" % munitVersion, + "com.h2database" % "h2" % h2Version % "test" ) )