From 1c831aeca614807d91e39b61cf440cad04c9d4d0 Mon Sep 17 00:00:00 2001 From: Alistair Johnson Date: Mon, 19 Nov 2018 01:25:08 +0100 Subject: [PATCH 1/3] Use newer composite projects --- build.sbt | 153 +++++++++++++++++++++--------------------------------- 1 file changed, 60 insertions(+), 93 deletions(-) diff --git a/build.sbt b/build.sbt index 6adf2f4fb9..e5836d0fd0 100644 --- a/build.sbt +++ b/build.sbt @@ -196,7 +196,7 @@ lazy val docSettings = Seq( "white-color" -> "#FFFFFF" ), autoAPIMappings := true, - unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(kernelJVM, coreJVM, freeJVM), + unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(kernel.jvm, core.jvm, free.jvm), docsMappingsAPIDir := "api", addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), docsMappingsAPIDir), ghpagesNoJekyll := false, @@ -302,7 +302,7 @@ lazy val docs = project .settings(noPublishSettings) .settings(docSettings) .settings(commonJvmSettings) - .dependsOn(coreJVM, freeJVM, kernelLawsJVM, lawsJVM, testkitJVM) + .dependsOn(core.jvm, free.jvm, kernelLaws.jvm, laws.jvm, testkit.jvm) lazy val cats = project .in(file(".")) @@ -310,7 +310,7 @@ lazy val cats = project .settings(catsSettings) .settings(noPublishSettings) .aggregate(catsJVM, catsJS) - .dependsOn(catsJVM, catsJS, testsJVM % "test-internal -> test") + .dependsOn(catsJVM, catsJS, tests.jvm % "test-internal -> test") lazy val catsJVM = project .in(file(".catsJVM")) @@ -318,31 +318,31 @@ lazy val catsJVM = project .settings(noPublishSettings) .settings(catsSettings) .settings(commonJvmSettings) - .aggregate(macrosJVM, - kernelJVM, - kernelLawsJVM, - coreJVM, - lawsJVM, - freeJVM, - testkitJVM, - testsJVM, - alleycatsCoreJVM, - alleycatsLawsJVM, - alleycatsTestsJVM, + .aggregate(macros.jvm, + kernel.jvm, + kernelLaws.jvm, + core.jvm, + laws.jvm, + free.jvm, + testkit.jvm, + tests.jvm, + alleycatsCore.jvm, + alleycatsLaws.jvm, + alleycatsTests.jvm, jvm, docs) .dependsOn( - macrosJVM, - kernelJVM, - kernelLawsJVM, - coreJVM, - lawsJVM, - freeJVM, - testkitJVM, - testsJVM % "test-internal -> test", - alleycatsCoreJVM, - alleycatsLawsJVM, - alleycatsTestsJVM % "test-internal -> test", + macros.jvm, + kernel.jvm, + kernelLaws.jvm, + core.jvm, + laws.jvm, + free.jvm, + testkit.jvm, + tests.jvm % "test-internal -> test", + alleycatsCore.jvm, + alleycatsLaws.jvm, + alleycatsTests.jvm % "test-internal -> test", jvm ) @@ -352,30 +352,30 @@ lazy val catsJS = project .settings(noPublishSettings) .settings(catsSettings) .settings(commonJsSettings) - .aggregate(macrosJS, - kernelJS, - kernelLawsJS, - coreJS, - lawsJS, - freeJS, - testkitJS, - testsJS, - alleycatsCoreJS, - alleycatsLawsJS, - alleycatsTestsJS, + .aggregate(macros.js, + kernel.js, + kernelLaws.js, + core.js, + laws.js, + free.js, + testkit.js, + tests.js, + alleycatsCore.js, + alleycatsLaws.js, + alleycatsTests.js, js) .dependsOn( - macrosJS, - kernelJS, - kernelLawsJS, - coreJS, - lawsJS, - freeJS, - testkitJS, - testsJS % "test-internal -> test", - alleycatsCoreJS, - alleycatsLawsJS, - alleycatsTestsJS % "test-internal -> test", + macros.js, + kernel.js, + kernelLaws.js, + core.js, + laws.js, + free.js, + testkit.js, + tests.js % "test-internal -> test", + alleycatsCore.js, + alleycatsLaws.js, + alleycatsTests.js % "test-internal -> test", js ) .enablePlugins(ScalaJSPlugin) @@ -389,9 +389,6 @@ lazy val macros = crossProject(JSPlatform, JVMPlatform) .jsSettings(coverageEnabled := false) .settings(scalacOptions := scalacOptions.value.filter(_ != "-Xfatal-warnings")) -lazy val macrosJVM = macros.jvm -lazy val macrosJS = macros.js - lazy val kernel = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("kernel")) @@ -405,9 +402,6 @@ lazy val kernel = crossProject(JSPlatform, JVMPlatform) .jvmSettings(commonJvmSettings ++ mimaSettings("cats-kernel")) .settings(libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalaCheckVersion(scalaVersion.value) % "test") -lazy val kernelJVM = kernel.jvm -lazy val kernelJS = kernel.js - lazy val kernelLaws = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("kernel-laws")) @@ -422,9 +416,6 @@ lazy val kernelLaws = crossProject(JSPlatform, JVMPlatform) .jsSettings(coverageEnabled := false) .dependsOn(kernel) -lazy val kernelLawsJVM = kernelLaws.jvm -lazy val kernelLawsJS = kernelLaws.js - lazy val core = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .dependsOn(macros, kernel) @@ -436,9 +427,6 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings ++ mimaSettings("cats-core")) -lazy val coreJVM = core.jvm -lazy val coreJS = core.js - lazy val laws = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .dependsOn(macros, kernel, core, kernelLaws) @@ -450,9 +438,6 @@ lazy val laws = crossProject(JSPlatform, JVMPlatform) .jvmSettings(commonJvmSettings) .jsSettings(coverageEnabled := false) -lazy val lawsJVM = laws.jvm -lazy val lawsJS = laws.js - lazy val free = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .dependsOn(macros, core, tests % "test-internal -> test") @@ -461,9 +446,6 @@ lazy val free = crossProject(JSPlatform, JVMPlatform) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings ++ mimaSettings("cats-free")) -lazy val freeJVM = free.jvm -lazy val freeJS = free.js - lazy val tests = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .dependsOn(testkit % "test") @@ -473,9 +455,6 @@ lazy val tests = crossProject(JSPlatform, JVMPlatform) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings) -lazy val testsJVM = tests.jvm -lazy val testsJS = tests.js - lazy val testkit = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .dependsOn(macros, core, laws) @@ -488,9 +467,6 @@ lazy val testkit = crossProject(JSPlatform, JVMPlatform) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings) -lazy val testkitJVM = testkit.jvm -lazy val testkitJS = testkit.js - lazy val alleycatsCore = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("alleycats-core")) @@ -509,9 +485,6 @@ lazy val alleycatsCore = crossProject(JSPlatform, JVMPlatform) .jvmSettings(commonJvmSettings) .settings(scalacOptions ~= { _.filterNot(Set("-Ywarn-unused-import", "-Ywarn-unused:imports")) }) //export-hook triggers unused import -lazy val alleycatsCoreJVM = alleycatsCore.jvm -lazy val alleycatsCoreJS = alleycatsCore.js - lazy val alleycatsLaws = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("alleycats-laws")) @@ -527,9 +500,6 @@ lazy val alleycatsLaws = crossProject(JSPlatform, JVMPlatform) .jsSettings(coverageEnabled := false) .dependsOn(alleycatsCore) -lazy val alleycatsLawsJVM = alleycatsLaws.jvm -lazy val alleycatsLawsJS = alleycatsLaws.js - lazy val alleycatsTests = crossProject(JSPlatform, JVMPlatform) .crossType(CrossType.Pure) .in(file("alleycats-tests")) @@ -540,13 +510,10 @@ lazy val alleycatsTests = crossProject(JSPlatform, JVMPlatform) .jsSettings(commonJsSettings) .jvmSettings(commonJvmSettings) -lazy val alleycatsTestsJVM = alleycatsTests.jvm -lazy val alleycatsTestsJS = alleycatsTests.js - // bench is currently JVM-only lazy val bench = project - .dependsOn(macrosJVM, coreJVM, freeJVM, lawsJVM) + .dependsOn(macros.jvm, core.jvm, free.jvm, laws.jvm) .settings(moduleName := "cats-bench") .settings(catsSettings) .settings(noPublishSettings) @@ -576,11 +543,11 @@ lazy val binCompatTest = project "org.scalatest" %%% "scalatest" % scalatestVersion(scalaVersion.value) % Test ) ) - .dependsOn(coreJVM % Test) + .dependsOn(core.jvm % Test) // cats-js is JS-only lazy val js = project - .dependsOn(macrosJS, coreJS, testsJS % "test-internal -> test") + .dependsOn(macros.js, core.js, tests.js % "test-internal -> test") .settings(moduleName := "cats-js") .settings(catsSettings) .settings(commonJsSettings) @@ -588,7 +555,7 @@ lazy val js = project // cats-jvm is JVM-only lazy val jvm = project - .dependsOn(macrosJVM, coreJVM, testsJVM % "test-internal -> test") + .dependsOn(macros.jvm, core.jvm, tests.jvm % "test-internal -> test") .settings(moduleName := "cats-jvm") .settings(catsSettings) .settings(commonJvmSettings) @@ -685,17 +652,17 @@ addCommandAlias("fmt", "; compile:scalafmt; test:scalafmt; scalafmtSbt") addCommandAlias("fmtCheck", "; compile:scalafmtCheck; test:scalafmtCheck; scalafmtSbtCheck") // These aliases serialise the build for the benefit of Travis-CI. -addCommandAlias("buildKernelJVM", ";kernelJVM/test;kernelLawsJVM/test") -addCommandAlias("buildCoreJVM", ";macrosJVM/test;coreJVM/test") -addCommandAlias("buildTestsJVM", ";lawsJVM/test;testkitJVM/test;testsJVM/test;jvm/test") -addCommandAlias("buildFreeJVM", ";freeJVM/test") -addCommandAlias("buildAlleycatsJVM", ";alleycatsCoreJVM/test;alleycatsLawsJVM/test;alleycatsTestsJVM/test") -addCommandAlias("buildJVM", ";buildKernelJVM;buildCoreJVM;buildTestsJVM;buildFreeJVM;buildAlleycatsJVM") +addCommandAlias("buildKernelJVM", ";kernel.jvm/test;kernelLaws.jvm/test") +addCommandAlias("buildCoreJVM", ";macros.jvm/test;core.jvm/test") +addCommandAlias("buildTestsJVM", ";laws.jvm/test;testkit.jvm/test;tests.jvm/test;jvm/test") +addCommandAlias("buildFreeJVM", ";free.jvm/test") +addCommandAlias("buildAlleycatsJVM", ";alleycatsCore.jvm/test;alleycatsLaws.jvm/test;alleycatsTests.jvm/test") +addCommandAlias("buildJVM", ";buildKernel.jvm;buildCore.jvm;buildTests.jvm;buildFree.jvm;buildAlleycats.jvm") addCommandAlias("validateBC", ";binCompatTest/test;mimaReportBinaryIssues") addCommandAlias("validateJVM", ";scalastyle;fmtCheck;buildJVM;bench/test;validateBC;makeMicrosite") -addCommandAlias("validateJS", ";catsJS/compile;testsJS/test;js/test") -addCommandAlias("validateKernelJS", "kernelLawsJS/test") -addCommandAlias("validateFreeJS", "freeJS/test") //separated due to memory constraint on travis +addCommandAlias("validateJS", ";cats.js/compile;tests.js/test;js/test") +addCommandAlias("validateKernelJS", "kernelLaws.js/test") +addCommandAlias("validateFreeJS", "free.js/test") //separated due to memory constraint on travis addCommandAlias("validate", ";clean;validateJS;validateKernelJS;validateFreeJS;validateJVM") addCommandAlias("prePR", ";fmt;validateBC") From 66ecfe5b4b9146b9fe00d24e14d28878cdcb8626 Mon Sep 17 00:00:00 2001 From: Alistair Johnson Date: Mon, 19 Nov 2018 01:36:12 +0100 Subject: [PATCH 2/3] Fix aliases --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index e5836d0fd0..7fbc8fe21f 100644 --- a/build.sbt +++ b/build.sbt @@ -657,10 +657,10 @@ addCommandAlias("buildCoreJVM", ";macros.jvm/test;core.jvm/test") addCommandAlias("buildTestsJVM", ";laws.jvm/test;testkit.jvm/test;tests.jvm/test;jvm/test") addCommandAlias("buildFreeJVM", ";free.jvm/test") addCommandAlias("buildAlleycatsJVM", ";alleycatsCore.jvm/test;alleycatsLaws.jvm/test;alleycatsTests.jvm/test") -addCommandAlias("buildJVM", ";buildKernel.jvm;buildCore.jvm;buildTests.jvm;buildFree.jvm;buildAlleycats.jvm") +addCommandAlias("buildJVM", ";buildKernelJVM;buildCore.jvm;buildTestsJVM;buildFree.jvm;buildAlleycatsJVM") addCommandAlias("validateBC", ";binCompatTest/test;mimaReportBinaryIssues") addCommandAlias("validateJVM", ";scalastyle;fmtCheck;buildJVM;bench/test;validateBC;makeMicrosite") -addCommandAlias("validateJS", ";cats.js/compile;tests.js/test;js/test") +addCommandAlias("validateJS", ";catsJS/compile;tests.js/test;js/test") addCommandAlias("validateKernelJS", "kernelLaws.js/test") addCommandAlias("validateFreeJS", "free.js/test") //separated due to memory constraint on travis addCommandAlias("validate", ";clean;validateJS;validateKernelJS;validateFreeJS;validateJVM") From 127be19b81ac9458281a60e5c28362dd5183d61f Mon Sep 17 00:00:00 2001 From: Alistair Johnson Date: Mon, 19 Nov 2018 01:50:39 +0100 Subject: [PATCH 3/3] Fix projects in aliases --- build.sbt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index 7fbc8fe21f..8d7832df1a 100644 --- a/build.sbt +++ b/build.sbt @@ -652,17 +652,17 @@ addCommandAlias("fmt", "; compile:scalafmt; test:scalafmt; scalafmtSbt") addCommandAlias("fmtCheck", "; compile:scalafmtCheck; test:scalafmtCheck; scalafmtSbtCheck") // These aliases serialise the build for the benefit of Travis-CI. -addCommandAlias("buildKernelJVM", ";kernel.jvm/test;kernelLaws.jvm/test") -addCommandAlias("buildCoreJVM", ";macros.jvm/test;core.jvm/test") -addCommandAlias("buildTestsJVM", ";laws.jvm/test;testkit.jvm/test;tests.jvm/test;jvm/test") -addCommandAlias("buildFreeJVM", ";free.jvm/test") -addCommandAlias("buildAlleycatsJVM", ";alleycatsCore.jvm/test;alleycatsLaws.jvm/test;alleycatsTests.jvm/test") -addCommandAlias("buildJVM", ";buildKernelJVM;buildCore.jvm;buildTestsJVM;buildFree.jvm;buildAlleycatsJVM") +addCommandAlias("buildKernelJVM", ";kernelJVM/test;kernelLawsJVM/test") +addCommandAlias("buildCoreJVM", ";macrosJVM/test;coreJVM/test") +addCommandAlias("buildTestsJVM", ";lawsJVM/test;testkitJVM/test;testsJVM/test;jvm/test") +addCommandAlias("buildFreeJVM", ";freeJVM/test") +addCommandAlias("buildAlleycatsJVM", ";alleycatsCoreJVM/test;alleycatsLawsJVM/test;alleycatsTestsJVM/test") +addCommandAlias("buildJVM", ";buildKernelJVM;buildCoreJVM;buildTestsJVM;buildFreeJVM;buildAlleycatsJVM") addCommandAlias("validateBC", ";binCompatTest/test;mimaReportBinaryIssues") addCommandAlias("validateJVM", ";scalastyle;fmtCheck;buildJVM;bench/test;validateBC;makeMicrosite") -addCommandAlias("validateJS", ";catsJS/compile;tests.js/test;js/test") -addCommandAlias("validateKernelJS", "kernelLaws.js/test") -addCommandAlias("validateFreeJS", "free.js/test") //separated due to memory constraint on travis +addCommandAlias("validateJS", ";catsJS/compile;testsJS/test;js/test") +addCommandAlias("validateKernelJS", "kernelLawsJS/test") +addCommandAlias("validateFreeJS", "freeJS/test") //separated due to memory constraint on travis addCommandAlias("validate", ";clean;validateJS;validateKernelJS;validateFreeJS;validateJVM") addCommandAlias("prePR", ";fmt;validateBC")