diff --git a/.travis.yml b/.travis.yml index 6ade336230..b4a39701f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,15 +10,15 @@ git: depth: 9999 scala: - - 2.10.7 - 2.11.12 + - 2.13.0-M4 - 2.12.6 matrix: allow_failures: # There are known issues in this scala milestone release that prevent the tests to compile. # But we want to enable the build to facilitate debuging, esp on the community build. - - scala: 2.13.0-M3 + - scala: 2.13.0-M4 jdk: - oraclejdk8 @@ -60,4 +60,4 @@ cache: - $HOME/.coursier # Pants cache - $HOME/.cache - + diff --git a/build.sbt b/build.sbt index a79d7cc4ad..e8fa17bf43 100644 --- a/build.sbt +++ b/build.sbt @@ -7,20 +7,13 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} lazy val scoverageSettings = Seq( coverageMinimum := 60, coverageFailOnMinimum := false, - //https://github.com/scoverage/sbt-scoverage/issues/72 - coverageHighlighting := { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 10)) => false - case _ => true - } - } + coverageHighlighting := true ) organization in ThisBuild := "org.typelevel" lazy val kernelSettings = Seq( - // don't warn on value discarding because it's broken on 2.10 with @sp(Unit) - scalacOptions ++= commonScalacOptions.filter(_ != "-Ywarn-value-discard"), + scalacOptions ++= commonScalacOptions, resolvers ++= Seq( Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots")), @@ -53,17 +46,10 @@ lazy val commonSettings = Seq( case _ => Seq(node) } }).transform(node).head -}, + }, fork in test := true, parallelExecution in Test := false, - scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings"), - unmanagedSourceDirectories in Test ++= { - val bd = baseDirectory.value - if (CrossVersion.partialVersion(scalaVersion.value) exists (_._2 >= 11)) - CrossType.Pure.sharedSrcDir(bd, "test").toList map (f => file(f.getPath + "-2.11+")) - else - Nil - } + scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings") ) ++ warnUnusedImport ++ update2_12 ++ xlint @@ -107,7 +93,7 @@ lazy val includeGeneratedSrc: Setting[_] = { } } -lazy val catsSettings = commonSettings ++ publishSettings ++ scoverageSettings ++ javadocSettings +lazy val catsSettings = commonSettings ++ publishSettings ++ scoverageSettings lazy val scalaCheckVersion = "1.13.5" // 2.13.0-M3 workaround @@ -133,26 +119,6 @@ lazy val testingDependencies = Seq( // libraryDependencies += "org.scalatest" %%% "scalatest" % scalaTestVersion % "test") libraryDependencies += "org.scalatest" %%% "scalatest" % scalatestVersion(scalaVersion.value) % "test") -/** - * Remove 2.10 projects from doc generation, as the macros used in the projects - * cause problems generating the documentation on scala 2.10. As the APIs for 2.10 - * and 2.11 are the same this has no effect on the resultant documentation, though - * it does mean that the scaladocs cannot be generated when the build is in 2.10 mode. - */ -def docsSourcesAndProjects(sv: String): (Boolean, Seq[ProjectReference]) = - CrossVersion.partialVersion(sv) match { - case Some((2, 10)) => (false, Nil) - case _ => (true, Seq(kernelJVM, coreJVM, freeJVM)) - } - -lazy val javadocSettings = Seq( - sources in (Compile, doc) := { - val docSource = (sources in (Compile, doc)).value - if (docsSourcesAndProjects(scalaVersion.value)._1) docSource else Nil - } -) - - lazy val docsMappingsAPIDir = settingKey[String]("Name of subdirectory in site target directory for api docs") lazy val docSettings = Seq( @@ -193,8 +159,7 @@ lazy val docSettings = Seq( "gray-lighter" -> "#F4F3F4", "white-color" -> "#FFFFFF"), autoAPIMappings := true, - unidocProjectFilter in (ScalaUnidoc, unidoc) := - inProjects(docsSourcesAndProjects(scalaVersion.value)._2:_*), + unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(kernelJVM, coreJVM, freeJVM), docsMappingsAPIDir := "api", addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), docsMappingsAPIDir), ghpagesNoJekyll := false, @@ -628,22 +593,6 @@ lazy val crossVersionSharedSources: Seq[Setting[_]] = } } -lazy val scalaMacroDependencies: Seq[Setting[_]] = Seq( - libraryDependencies += scalaOrganization.value %%% "scala-reflect" % scalaVersion.value % "provided", - libraryDependencies ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - // if scala 2.11+ is used, quasiquotes are merged into scala-reflect - case Some((2, scalaMajor)) if scalaMajor >= 11 => Seq() - // in Scala 2.10, quasiquotes are provided by macro paradise - case Some((2, 10)) => - Seq( - compilerPlugin("org.scalamacros" %% "paradise" % "2.1.0" cross CrossVersion.patch), - "org.scalamacros" %% "quasiquotes" % "2.1.0" cross CrossVersion.binary - ) - } - } -) - lazy val commonScalacOptions = Seq( "-deprecation", "-encoding", "UTF-8", diff --git a/tests/src/test/scala-2.11+/cats/tests/ExtraRegressionSuite.scala b/tests/src/test/scala/cats/tests/ExtraRegressionSuite.scala similarity index 100% rename from tests/src/test/scala-2.11+/cats/tests/ExtraRegressionSuite.scala rename to tests/src/test/scala/cats/tests/ExtraRegressionSuite.scala