Skip to content
Permalink
Browse files

Enable mima for interpreter-api and jupyter-api

  • Loading branch information...
alexarchambault committed Mar 22, 2019
1 parent b854636 commit 2854de8e4fe235288b40218e87896b9ff70dcc02
Showing with 37 additions and 2 deletions.
  1. +1 −1 .travis.sh
  2. +3 −1 build.sbt
  3. +23 −0 project/Mima.scala
  4. +9 −0 project/Settings.scala
  5. +1 −0 project/plugins.sbt
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -e

sbt ++$TRAVIS_SCALA_VERSION'!' "show version" test
sbt ++$TRAVIS_SCALA_VERSION'!' "show version" test mimaReportBinaryIssues
@@ -64,7 +64,8 @@ lazy val protocol = project
lazy val `interpreter-api` = project
.underShared
.settings(
shared
shared,
mima
)

lazy val interpreter = project
@@ -105,6 +106,7 @@ lazy val `jupyter-api` = project
.dependsOn(`interpreter-api`)
.settings(
shared,
mima,
libraryDependencies += Deps.jvmRepr
)

@@ -0,0 +1,23 @@

import sys.process._

object Mima {

private def stable(ver: String): Boolean =
ver.exists(c => c != '0' && c != '.') &&
ver
.replace("-RC", "-")
.forall(c => c == '.' || c == '-' || c.isDigit)

def binaryCompatibilityVersions: Set[String] =
Seq("git", "tag", "--merged", "HEAD^", "--contains", "v0.3.1")
.!!
.linesIterator
.map(_.trim)
.filter(_.startsWith("v"))
.map(_.stripPrefix("v"))
.filter(_ != "0.3.1") // Mima enabled right after it
.filter(stable)
.toSet

}
@@ -2,6 +2,7 @@
import java.nio.charset.StandardCharsets.UTF_8
import java.nio.file.Files

import com.typesafe.tools.mima.plugin.MimaPlugin
import sbt._
import sbt.Keys._

@@ -155,4 +156,12 @@ object Settings {
}
}

lazy val mima = Seq(
MimaPlugin.autoImport.mimaPreviousArtifacts := {
Mima.binaryCompatibilityVersions.map { ver =>
(organization.value % moduleName.value % ver).cross(crossVersion.value)
}
}
)

}
@@ -1,3 +1,4 @@
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.2")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.11")
addSbtCoursier

0 comments on commit 2854de8

Please sign in to comment.
You can’t perform that action at this time.