Skip to content

Commit

Permalink
Merge pull request #50 from RMSone/remove-mdoc-from-classpath
Browse files Browse the repository at this point in the history
Remove mdoc from classpath
  • Loading branch information
Tvaroh authored Oct 17, 2019
2 parents c2a69e4 + e8d9990 commit d035fe0
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 34 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ SlickCats
==========

[Cats](https://github.com/typelevel/cats) instances for [Slick's](http://slick.typesafe.com/) `DBIO` including:

* Monad
* MonadError
* CoflatMap
Expand All @@ -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
Expand All @@ -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._
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.

84 changes: 52 additions & 32 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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"))
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.0
sbt.version=1.3.3
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.10.0"
version in ThisBuild := "0.10.1"

0 comments on commit d035fe0

Please sign in to comment.