Skip to content
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

Check bincompat on stuff we should be checking bincompat for #3129

Merged
merged 4 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ jobs:
env: TEST="scalafix"
script: cd scalafix && sbt tests/test

- stage: test
- &bincompat
stage: test
env: TEST="binary compatibility"
script: sbt ++$TRAVIS_SCALA_VERSION! validateBC
scala: *scala_version_212
- <<: *bincompat
scala: *scala_version_213

- stage: styling
env: TEST="linting"
Expand Down
34 changes: 12 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ lazy val docSettings = Seq(
includeFilter in Jekyll := (includeFilter in makeSite).value
)

def mimaPrevious(moduleName: String, scalaVer: String, ver: String): List[ModuleID] = {
def mimaPrevious(moduleName: String, scalaVer: String, ver: String, includeCats1: Boolean = true): List[ModuleID] = {
import sbtrelease.Version

def semverBinCompatVersions(major: Int, minor: Int, patch: Int): List[(Int, Int, Int)] = {
Expand Down Expand Up @@ -262,17 +262,14 @@ def mimaPrevious(moduleName: String, scalaVer: String, ver: String): List[Module
// Safety Net for Inclusions
lazy val extraVersions: List[String] = List("1.0.1", "1.1.0", "1.2.0", "1.3.1", "1.4.0", "1.5.0", "1.6.1")

if (priorTo2_13(scalaVer)) {
(mimaVersions ++ extraVersions)
.filterNot(excludedVersions.contains(_))
.map(v => "org.typelevel" %% moduleName % v)
} else List()

(mimaVersions ++ (if (priorTo2_13(scalaVer) && includeCats1) extraVersions else Nil))
.filterNot(excludedVersions.contains(_))
.map(v => "org.typelevel" %% moduleName % v)
}

def mimaSettings(moduleName: String) =
def mimaSettings(moduleName: String, includeCats1: Boolean = true) =
Seq(
mimaPreviousArtifacts := mimaPrevious(moduleName, scalaVersion.value, version.value).toSet,
mimaPreviousArtifacts := mimaPrevious(moduleName, scalaVersion.value, version.value, includeCats1).toSet,
mimaBinaryIssueFilters ++= {
import com.typesafe.tools.mima.core._
import com.typesafe.tools.mima.core.ProblemFilters._
Expand Down Expand Up @@ -517,7 +514,7 @@ lazy val kernelLaws = crossProject(JSPlatform, JVMPlatform)
.settings(testingDependencies)
.settings(scalacOptions in Test := (scalacOptions in Test).value.filter(_ != "-Xfatal-warnings"))
.jsSettings(commonJsSettings)
.jvmSettings(commonJvmSettings)
.jvmSettings(commonJvmSettings ++ mimaSettings("cats-kernel-laws", includeCats1 = false))
.jsSettings(coverageEnabled := false)
.dependsOn(kernel)

Expand All @@ -540,7 +537,7 @@ lazy val laws = crossProject(JSPlatform, JVMPlatform)
.settings(disciplineDependencies)
.settings(testingDependencies)
.jsSettings(commonJsSettings)
.jvmSettings(commonJvmSettings)
.jvmSettings(commonJvmSettings ++ mimaSettings("cats-laws", includeCats1 = false))
.jsSettings(coverageEnabled := false)

lazy val free = crossProject(JSPlatform, JVMPlatform)
Expand Down Expand Up @@ -571,7 +568,7 @@ lazy val testkit = crossProject(JSPlatform, JVMPlatform)
.settings(catsSettings)
.settings(disciplineDependencies)
.jsSettings(commonJsSettings)
.jvmSettings(commonJvmSettings)
.jvmSettings(commonJvmSettings ++ mimaSettings("cats-testkit", includeCats1 = false))
.settings(scalacOptions := scalacOptions.value.filter(_ != "-Xfatal-warnings"))

lazy val alleycatsCore = crossProject(JSPlatform, JVMPlatform)
Expand All @@ -584,7 +581,7 @@ lazy val alleycatsCore = crossProject(JSPlatform, JVMPlatform)
.settings(scoverageSettings)
.settings(includeGeneratedSrc)
.jsSettings(commonJsSettings)
.jvmSettings(commonJvmSettings)
.jvmSettings(commonJvmSettings ++ mimaSettings("alleycats-core", includeCats1 = false))

lazy val alleycatsLaws = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
Expand All @@ -597,7 +594,7 @@ lazy val alleycatsLaws = crossProject(JSPlatform, JVMPlatform)
.settings(disciplineDependencies)
.settings(testingDependencies)
.jsSettings(commonJsSettings)
.jvmSettings(commonJvmSettings)
.jvmSettings(commonJvmSettings ++ mimaSettings("alleycats-laws", includeCats1 = false))
.jsSettings(coverageEnabled := false)

lazy val alleycatsTests = crossProject(JSPlatform, JVMPlatform)
Expand Down Expand Up @@ -641,14 +638,7 @@ lazy val binCompatTest = project
useCoursier := false,
commonScalaVersionSettings,
addCompilerPlugin(("org.typelevel" %% "kind-projector" % kindProjectorVersion).cross(CrossVersion.full)),
libraryDependencies ++= List(
{
if (priorTo2_13(scalaVersion.value))
mimaPrevious("cats-core", scalaVersion.value, version.value).last % Provided
else //We are not testing BC on Scala 2.13 yet.
"org.typelevel" %% "cats-core" % "2.0.0-M4" % Provided
}
)
libraryDependencies += mimaPrevious("cats-core", scalaVersion.value, version.value).last % Provided
)
.settings(testingDependencies)
.dependsOn(core.jvm % Test)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala-2.13+/cats/instances/stream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ trait StreamInstances extends cats.kernel.instances.StreamInstances {
}

@deprecated("Use catsStdParallelForZipLazyList", "2.0.0-RC2")
implicit val catsStdParallelForStreamZipStream: Parallel.Aux[Stream, ZipStream] =
implicit def catsStdParallelForStreamZipStream: Parallel.Aux[Stream, ZipStream] =
new Parallel[Stream] {
type F[x] = ZipStream[x]

Expand Down