Skip to content

Commit

Permalink
Merge pull request #1465 from tpolecat/merge-with-master
Browse files Browse the repository at this point in the history
Merge with master
  • Loading branch information
tpolecat authored May 25, 2021
2 parents 700a11f + 512f4d7 commit f198363
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<img align="right" src="https://cdn.rawgit.com/tpolecat/doobie/series/0.5.x/doobie_logo.svg" height="150px" style="padding-left: 20px"/>

[![Travis CI](https://travis-ci.org/tpolecat/doobie.svg?branch=series%2F0.5.x)](https://travis-ci.org/tpolecat/doobie)
[![Discord](https://img.shields.io/discord/632277896739946517.svg?label=&logo=discord&logoColor=ffffff&color=404244&labelColor=6A7EC2)](https://discord.gg/7B4VfFTvsS)
[![Join the chat at https://gitter.im/tpolecat/doobie](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tpolecat/doobie?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Maven Central](https://img.shields.io/maven-central/v/org.tpolecat/doobie-core_2.12.svg)](https://maven-badges.herokuapp.com/maven-central/org.tpolecat/doobie-core_2.12)
[![Javadocs](https://javadoc.io/badge/org.tpolecat/doobie-core_2.12.svg)](https://javadoc.io/doc/org.tpolecat/doobie-core_2.12)
Expand Down
34 changes: 21 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import sbt.dsl.LinterLevel.Ignore
// Library versions all in one place, for convenience and sanity.
lazy val catsVersion = "2.6.1"
lazy val catsEffectVersion = "3.1.1"
lazy val circeVersion = "0.13.0"
lazy val circeVersion = settingKey[String]("Circe version.")
lazy val fs2Version = "3.0.3"
lazy val h2Version = "1.4.200"
lazy val hikariVersion = "3.4.5" // N.B. Hikari v4 introduces a breaking change via slf4j v2
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.6.1"
lazy val quillVersion = "3.7.1"
lazy val postGisVersion = "2.5.0"
lazy val postgresVersion = "42.2.19"
lazy val postgresVersion = "42.2.20"
lazy val refinedVersion = "0.9.25"
lazy val scalaCheckVersion = "1.15.4"
lazy val scalatestVersion = "3.2.9"
lazy val munitVersion = "0.7.26"
lazy val shapelessVersion = "2.3.4"
lazy val shapelessVersion = "2.3.7"
lazy val silencerVersion = "1.7.1"
lazy val specs2Version = "4.10.6"
lazy val specs2Version = "4.11.0"
lazy val scala212Version = "2.12.12"
lazy val scala213Version = "2.13.5"
lazy val scala30Version = "3.0.0"
Expand Down Expand Up @@ -121,6 +121,13 @@ lazy val commonSettings =
old
},

circeVersion := {
scalaVersion.value match {
case `scala30Version` => "0.14.0-M7"
case _ => "0.13.0"
}
}

)

lazy val publishSettings = Seq(
Expand Down Expand Up @@ -325,11 +332,10 @@ lazy val `postgres-circe` = project
name := "doobie-postgres-circe",
description := "Postgres circe support for doobie.",
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion
"io.circe" %% "circe-core" % circeVersion.value,
"io.circe" %% "circe-parser" % circeVersion.value
)
)
.settings(noDottySettings)

lazy val h2 = project
.in(file("modules/h2"))
Expand All @@ -355,8 +361,10 @@ lazy val hikari = project
name := "doobie-hikari",
description := "Hikari support for doobie.",
libraryDependencies ++= Seq(
"com.zaxxer" % "HikariCP" % hikariVersion,
//needs to be excluded, otherwise coursier may resolve slf4j-api 2 if > Java 11
"com.zaxxer" % "HikariCP" % hikariVersion exclude("org.slf4j", "slf4j-api"),
"com.h2database" % "h2" % h2Version % "test",
"org.slf4j" % "slf4j-api" % slf4jVersion,
"org.slf4j" % "slf4j-nop" % slf4jVersion % "test"
)
)
Expand Down Expand Up @@ -428,9 +436,9 @@ lazy val docs = project
scalacOptions := Nil,

libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-core" % circeVersion.value,
"io.circe" %% "circe-generic" % circeVersion.value,
"io.circe" %% "circe-parser" % circeVersion.value,
"io.monix" %% "monix-eval" % monixVersion,
),
fork in Test := true,
Expand Down
5 changes: 5 additions & 0 deletions modules/docs/src/main/mdoc/docs/13-Unit-Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,18 @@ The `doobie-munit` add-on provides a mix-in trait that we can add to any `Assert

```scala mdoc:silent
import _root_.munit._

class AnalysisTestSuite extends FunSuite with doobie.munit.IOChecker {

override val colors = doobie.util.Colors.None // just for docs

val transactor = Transactor.fromDriverManager[IO](
"org.postgresql.Driver", "jdbc:postgresql:world", "postgres", ""
)

test("trivial") { check(trivial) }
test("biggerThan") { check(biggerThan(0)) }
test("update") { check(update("", "")) }

}
```
4 changes: 2 additions & 2 deletions modules/munit/src/main/scala/doobie/munit/analysisspec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import munit.{Assertions, Location}

/**
* Module with a mix-in trait for specifications that enables checking of doobie `Query` and `Update` values.
*
*
* {{{
* class ExampleSuite extends FunSuite with IOChecker {
*
Expand Down Expand Up @@ -60,7 +60,7 @@ object analysisspec {
}

/** Implementation of Checker[IO] */
trait IOChecker extends Checker[IO] {
trait IOChecker extends Checker[IO] {
self: Assertions =>
import cats.effect.unsafe.implicits.global
override implicit val M: Async[IO] = IO.asyncForIO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ 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)
Expand Down
2 changes: 1 addition & 1 deletion project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Required for the freegen definition for postgres in ../build.sbt
val postgresVersion = "42.2.19"
val postgresVersion = "42.2.20"
libraryDependencies += "org.postgresql" % "postgresql" % postgresVersion
8 changes: 4 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ 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.6.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.1")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.2")
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.17")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.19")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.18")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.21")
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5")

0 comments on commit f198363

Please sign in to comment.