Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Include project name in each binary compat report.

Fixes #6
  • Loading branch information...
commit d274a2de27d346aa0ce45569075482a00b0f3c2f 1 parent 22db058
Havoc Pennington havocp authored
2  sbtplugin/src/main/scala/com/typesafe/tools/mima/plugin/MimaPlugin.scala
View
@@ -20,7 +20,7 @@ object MimaPlugin extends Plugin {
Nil
}
},
- reportBinaryIssues <<= (findBinaryIssues, failOnProblem, streams) map SbtMima.reportErrors
+ reportBinaryIssues <<= (findBinaryIssues, failOnProblem, streams, name) map SbtMima.reportErrors
)
/** Setup mima with default settings, applicable for most projects. */
def mimaDefaultSettings: Seq[Setting[_]] = Seq(
6 sbtplugin/src/main/scala/com/typesafe/tools/mima/plugin/SbtMima.scala
View
@@ -34,15 +34,15 @@ object SbtMima {
/** Reports binary compatibility errors.
* @param failOnProblem if true, fails the build on binary compatibility errors.
*/
- def reportErrors(errors: List[core.Problem], failOnProblem: Boolean, s: TaskStreams): Unit = {
+ def reportErrors(errors: List[core.Problem], failOnProblem: Boolean, s: TaskStreams, projectName: String): Unit = {
// TODO - Line wrapping an other magikz
def prettyPrint(p: core.Problem): String = " * " + p.description
- s.log.info("Found " + errors.size + " potential binary incompatibilities")
+ s.log.info(projectName + ": found " + errors.size + " potential binary incompatibilities")
errors map prettyPrint foreach { p =>
if(failOnProblem) s.log.error(p)
else s.log.warn(p)
}
- if(failOnProblem && !errors.isEmpty) sys.error("Binary compatibility check failed!")
+ if(failOnProblem && !errors.isEmpty) sys.error(projectName + ": Binary compatibility check failed!")
}
/** Resolves an artifact representing the previous abstract binary interface
* for testing.
Please sign in to comment.
Something went wrong with that request. Please try again.