-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce cats-kernel and remove algebra dependency #1001
Changes from 12 commits
03aad13
38a3dc8
157710f
ceb94cc
673d045
d19a098
3378af3
34e206a
041a06a
f8e3910
e6bd8fe
4b8b789
ada6b75
de8a2fc
fc0acf2
5f408e1
d2dcb23
8fe8938
aac4652
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,16 @@ lazy val catsDoctestSettings = Seq( | |
doctestWithDependencies := false | ||
) ++ doctestSettings | ||
|
||
lazy val kernelSettings = Seq( | ||
scalacOptions ++= commonScalacOptions.filter(_ != "-Ywarn-value-discard"), | ||
resolvers ++= Seq( | ||
"bintray/non" at "http://dl.bintray.com/non/maven", | ||
Resolver.sonatypeRepo("releases"), | ||
Resolver.sonatypeRepo("snapshots")), | ||
parallelExecution in Test := false, | ||
scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings") | ||
) ++ warnUnusedImport | ||
|
||
lazy val commonSettings = Seq( | ||
scalacOptions ++= commonScalacOptions, | ||
resolvers ++= Seq( | ||
|
@@ -33,8 +43,6 @@ lazy val commonSettings = Seq( | |
), | ||
libraryDependencies ++= Seq( | ||
"com.github.mpilquist" %%% "simulacrum" % "0.7.0", | ||
"org.spire-math" %%% "algebra" % "0.3.1", | ||
"org.spire-math" %%% "algebra-std" % "0.3.1", | ||
"org.typelevel" %%% "machinist" % "0.4.1", | ||
compilerPlugin("org.scalamacros" %% "paradise" % "2.1.0" cross CrossVersion.full), | ||
compilerPlugin("org.spire-math" %% "kind-projector" % "0.6.3") | ||
|
@@ -80,8 +88,12 @@ lazy val scalacheckVersion = "1.12.5" | |
|
||
lazy val disciplineDependencies = Seq( | ||
libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalacheckVersion, | ||
libraryDependencies += "org.typelevel" %%% "discipline" % "0.4" | ||
) | ||
libraryDependencies += "org.typelevel" %%% "discipline" % "0.4") | ||
|
||
lazy val testingDependencies = Seq( | ||
libraryDependencies += "org.typelevel" %%% "catalysts-platform" % "0.0.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think not, since we are checking the platform in the law testing code that we are publishing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I didn't realize this was only being included in laws/tests. 👍 |
||
libraryDependencies += "org.typelevel" %%% "catalysts-macros" % "0.0.2" % "test", | ||
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.0-M7" % "test") | ||
|
||
/** | ||
* Remove 2.10 projects from doc generation, as the macros used in the projects | ||
|
@@ -136,15 +148,15 @@ lazy val catsJVM = project.in(file(".catsJVM")) | |
.settings(moduleName := "cats") | ||
.settings(catsSettings) | ||
.settings(commonJvmSettings) | ||
.aggregate(macrosJVM, coreJVM, lawsJVM, testsJVM, jvm, docs, bench) | ||
.dependsOn(macrosJVM, coreJVM, lawsJVM, testsJVM % "test-internal -> test", jvm, bench % "compile-internal;test-internal -> test") | ||
.aggregate(macrosJVM, kernelJVM, kernelLawsJVM, coreJVM, lawsJVM, testsJVM, jvm, docs, bench) | ||
.dependsOn(macrosJVM, kernelJVM, kernelLawsJVM, coreJVM, lawsJVM, testsJVM % "test-internal -> test", jvm, bench % "compile-internal;test-internal -> test") | ||
|
||
lazy val catsJS = project.in(file(".catsJS")) | ||
.settings(moduleName := "cats") | ||
.settings(catsSettings) | ||
.settings(commonJsSettings) | ||
.aggregate(macrosJS, coreJS, lawsJS, testsJS, js) | ||
.dependsOn(macrosJS, coreJS, lawsJS, testsJS % "test-internal -> test", js) | ||
.aggregate(macrosJS, kernelJS, kernelLawsJS, coreJS, lawsJS, testsJS, js) | ||
.dependsOn(macrosJS, kernelJS, kernelLawsJS, coreJS, lawsJS, testsJS % "test-internal -> test", js) | ||
.enablePlugins(ScalaJSPlugin) | ||
|
||
|
||
|
@@ -158,14 +170,41 @@ lazy val macros = crossProject.crossType(CrossType.Pure) | |
lazy val macrosJVM = macros.jvm | ||
lazy val macrosJS = macros.js | ||
|
||
lazy val kernel = crossProject.crossType(CrossType.Pure) | ||
.in(file("kernel")) | ||
.settings(moduleName := "cats-kernel") | ||
.settings(kernelSettings: _*) | ||
.settings(buildSettings: _*) | ||
.settings(publishSettings: _*) | ||
.settings(scoverageSettings: _*) | ||
.settings(sourceGenerators in Compile <+= (sourceManaged in Compile).map(KernelBoiler.gen)) | ||
.jsSettings(commonJsSettings:_*) | ||
.jvmSettings(commonJvmSettings:_*) | ||
|
||
lazy val kernelJVM = kernel.jvm | ||
lazy val kernelJS = kernel.js | ||
|
||
lazy val kernelLaws = crossProject.crossType(CrossType.Pure) | ||
.in(file("kernel-laws")) | ||
.settings(moduleName := "cats-kernel-laws") | ||
.settings(kernelSettings: _*) | ||
.settings(buildSettings: _*) | ||
.settings(publishSettings: _*) | ||
.settings(scoverageSettings: _*) | ||
.settings(disciplineDependencies: _*) | ||
.settings(testingDependencies: _*) | ||
.jsSettings(commonJsSettings:_*) | ||
.jvmSettings(commonJvmSettings:_*) | ||
.dependsOn(kernel) | ||
|
||
lazy val kernelLawsJVM = kernelLaws.jvm | ||
lazy val kernelLawsJS = kernelLaws.js | ||
|
||
lazy val core = crossProject.crossType(CrossType.Pure) | ||
.dependsOn(macros) | ||
.dependsOn(macros, kernel) | ||
.settings(moduleName := "cats-core") | ||
.settings(catsSettings:_*) | ||
.settings( | ||
sourceGenerators in Compile <+= (sourceManaged in Compile).map(Boilerplate.gen) | ||
) | ||
.settings(sourceGenerators in Compile <+= (sourceManaged in Compile).map(Boilerplate.gen)) | ||
.settings(libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalacheckVersion % "test") | ||
.jsSettings(commonJsSettings:_*) | ||
.jvmSettings(commonJvmSettings:_*) | ||
|
@@ -174,7 +213,7 @@ lazy val coreJVM = core.jvm | |
lazy val coreJS = core.js | ||
|
||
lazy val laws = crossProject.crossType(CrossType.Pure) | ||
.dependsOn(macros, core) | ||
.dependsOn(macros, kernel, core, kernelLaws) | ||
.settings(moduleName := "cats-laws") | ||
.settings(catsSettings:_*) | ||
.settings(disciplineDependencies:_*) | ||
|
@@ -193,9 +232,7 @@ lazy val tests = crossProject.crossType(CrossType.Pure) | |
.settings(catsSettings:_*) | ||
.settings(disciplineDependencies:_*) | ||
.settings(noPublishSettings:_*) | ||
.settings(libraryDependencies ++= Seq( | ||
"org.scalatest" %%% "scalatest" % "3.0.0-M7" % "test", | ||
"org.typelevel" %%% "catalysts-platform" % "0.0.2" % "test")) | ||
.settings(testingDependencies: _*) | ||
.jsSettings(commonJsSettings:_*) | ||
.jvmSettings(commonJvmSettings:_*) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package cats | ||
package std | ||
|
||
trait BigIntInstances extends algebra.std.BigIntInstances { | ||
trait BigIntInstances extends cats.kernel.std.BigIntInstances { | ||
implicit val bigIntShow: Show[BigInt] = | ||
Show.fromToString[BigInt] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That may not be necessary -- I'm not sure what we're using it for. I'll try removing it.