From c3d305611c51ecfe27b85d442ef2575613c4adf3 Mon Sep 17 00:00:00 2001 From: Alexander Semenov Date: Thu, 17 Oct 2019 20:17:08 +0300 Subject: [PATCH 1/3] Remove mdoc from classpath. --- build.sbt | 84 ++++++++++++------- .../com/rms/miu/slickcats/DBIOInstances.scala | 0 .../rms/miu/slickcats/DBIOInstancesTest.scala | 0 version.sbt | 2 +- 4 files changed, 53 insertions(+), 33 deletions(-) rename {src => slick-cats/src}/main/scala/com/rms/miu/slickcats/DBIOInstances.scala (100%) rename {src => slick-cats/src}/test/scala/com/rms/miu/slickcats/DBIOInstancesTest.scala (100%) diff --git a/build.sbt b/build.sbt index 4a1a04b..b1c4d78 100644 --- a/build.sbt +++ b/build.sbt @@ -1,37 +1,57 @@ -organization := "com.rms.miu" -name := "slick-cats" -description := "cats and slick" - -scalaVersion := "2.12.4" -crossScalaVersions := Seq("2.11.12", "2.12.8","2.13.1") - -scalacOptions ++= Seq( - "-deprecation", - "-encoding", "UTF-8", - "-feature", - "-language:implicitConversions", - "-language:higherKinds", - "-unchecked", - "-Xfatal-warnings", - "-Xlint", - "-Ywarn-dead-code", - "-Ywarn-numeric-widen", - "-Ywarn-value-discard" +name := "slick-cats-parent" + +sourcesInBase := false +publish / skip := true + +val commonSettings = Seq( + organization := "com.rms.miu", + + scalaVersion := "2.12.10", + crossScalaVersions := Seq("2.11.12", "2.12.10","2.13.1"), + + scalacOptions ++= Seq( + "-deprecation", + "-encoding", "UTF-8", + "-feature", + "-language:implicitConversions", + "-language:higherKinds", + "-unchecked", + "-Xfatal-warnings", + "-Xlint", + "-Ywarn-dead-code", + "-Ywarn-numeric-widen", + "-Ywarn-value-discard" + ) ) val catsVersion = "2.0.0" -libraryDependencies ++= Seq( - "com.typesafe.slick" %% "slick" % "3.3.2", - "org.typelevel" %% "cats-core" % catsVersion, - "org.typelevel" %% "cats-laws" % catsVersion % Test, - "org.typelevel" %% "discipline-scalatest" % "1.0.0-RC1" % Test, - "org.scalatest" %% "scalatest" % "3.0.8" % Test, - "org.scalacheck" %% "scalacheck" % "1.14.2" % Test -) +lazy val slickcats = + project.in(file("slick-cats")) + .settings(commonSettings) + .settings( + name := "slick-cats", + description := "Cats instances for Slick's DBIO", + libraryDependencies ++= Seq( + "com.typesafe.slick" %% "slick" % "3.3.2", + "org.typelevel" %% "cats-core" % catsVersion, + "org.typelevel" %% "cats-laws" % catsVersion % Test, + "org.typelevel" %% "discipline-scalatest" % "1.0.0-RC1" % Test, + "org.scalatest" %% "scalatest" % "3.0.8" % Test, + "org.scalacheck" %% "scalacheck" % "1.14.2" % Test + ) + ) -enablePlugins(MdocPlugin) -scalacOptions in mdoc --= Seq("-Ywarn-unused-import", "-Xlint") +lazy val docs = + project.in(file("slick-cats-docs")) + .dependsOn(slickcats) + .enablePlugins(MdocPlugin) + .settings(commonSettings) + .settings( + name := "slick-cats-docs", + scalacOptions in mdoc --= Seq("-Ywarn-unused-import", "-Xlint"), + publish / skip := true + ) licenses += ("BSD New", url("https://opensource.org/licenses/BSD-3-Clause")) homepage := Some(url("https://github.com/rmsone/slick-cats")) @@ -42,9 +62,9 @@ scmInfo := Some( ) ) developers := List( - Developer(id="23will", name="William Duncan", email="", url=url("https://github.com/23will")), - Developer(id="tvaroh", name="Alexander Semenov", email="", url=url("https://github.com/tvaroh")), - Developer(id="frosforever", name="Yosef Fertel", email="", url=url("https://github.com/frosforever")) + Developer(id = "23will", name = "William Duncan", email = "", url("https://github.com/23will")), + Developer(id = "tvaroh", name = "Alexander Semenov", email = "", url("https://github.com/tvaroh")), + Developer(id = "frosforever", name = "Yosef Fertel", email = "", url("https://github.com/frosforever")) ) publishMavenStyle := true diff --git a/src/main/scala/com/rms/miu/slickcats/DBIOInstances.scala b/slick-cats/src/main/scala/com/rms/miu/slickcats/DBIOInstances.scala similarity index 100% rename from src/main/scala/com/rms/miu/slickcats/DBIOInstances.scala rename to slick-cats/src/main/scala/com/rms/miu/slickcats/DBIOInstances.scala diff --git a/src/test/scala/com/rms/miu/slickcats/DBIOInstancesTest.scala b/slick-cats/src/test/scala/com/rms/miu/slickcats/DBIOInstancesTest.scala similarity index 100% rename from src/test/scala/com/rms/miu/slickcats/DBIOInstancesTest.scala rename to slick-cats/src/test/scala/com/rms/miu/slickcats/DBIOInstancesTest.scala diff --git a/version.sbt b/version.sbt index 02ae30c..225486b 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "0.10.0" +version in ThisBuild := "0.10.1-SNAPSHOT" From 874c64983ca264fbb6ecbbc93ced7708e224c973 Mon Sep 17 00:00:00 2001 From: Alexander Semenov Date: Thu, 17 Oct 2019 20:24:22 +0300 Subject: [PATCH 2/3] Bump up sbt version. --- README.md | 6 ++++++ project/build.properties | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ab5f47..6ede8d1 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ SlickCats ========== [Cats](https://github.com/typelevel/cats) instances for [Slick's](http://slick.typesafe.com/) `DBIO` including: + * Monad * MonadError * CoflatMap @@ -14,6 +15,7 @@ SlickCats * Equals ## Using + To add *slick-cats* dependency to a project, add the following to your build definition: ```scala libraryDependencies += "com.rms.miu" %% "slick-cats" % version @@ -38,10 +40,12 @@ Because of possible binary incompatibilities here are the dependency versions us | 0.8 | 3.2.3 | 1.2.x | | 0.9.0 | 3.2.3 | 1.5.x | | 0.9.1 | 3.3.0 | 1.5.x | +| 0.10.1 | 3.3.2 | 2.0.0 | Artifacts are publicly available on Maven Central starting from version *0.6*. ## Accessing the Instances + Some or all of the following imports may be needed: ```scala import cats._ @@ -79,6 +83,7 @@ implicitly[Monoid[DBIO[Int]]] ``` ## Known Issues + Instances are supplied for `DBIO[A]` only. Despite being the same thing, type aliases will not match for implicit conversion. This means that the following @@ -133,6 +138,7 @@ res11: slick.dbio.DBIO[String] = SuccessAction(hello) will compile fine. ## Extras + This README is compiled using [tut](https://github.com/tpolecat/tut) to ensure that only working examples are given. Feedback of any kind is appreciated. Especially if you have any ideas on getting around the `DBIOAction` issue above. diff --git a/project/build.properties b/project/build.properties index 080a737..6adcdc7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.0 +sbt.version=1.3.3 From e8d9990ad1283af16628feca5817fd9218aab589 Mon Sep 17 00:00:00 2001 From: Alexander Semenov Date: Thu, 17 Oct 2019 20:25:17 +0300 Subject: [PATCH 3/3] Set version to 0.10.1 --- version.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.sbt b/version.sbt index 225486b..8b0f7f5 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "0.10.1-SNAPSHOT" +version in ThisBuild := "0.10.1"