From 77898b67bc123fe30c57d5139b19a02d1d2c3372 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Wed, 4 Mar 2015 07:45:00 +0000 Subject: [PATCH 1/2] Exempt scala-actors-migration from version checks. Fixes #1818. --- ivy/src/main/scala/sbt/IvyScala.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ivy/src/main/scala/sbt/IvyScala.scala b/ivy/src/main/scala/sbt/IvyScala.scala index b4299906f..061eddeb7 100644 --- a/ivy/src/main/scala/sbt/IvyScala.scala +++ b/ivy/src/main/scala/sbt/IvyScala.scala @@ -66,7 +66,11 @@ private object IvyScala { { val id = dep.getDependencyRevisionId val depBinaryVersion = CrossVersion.binaryScalaVersion(id.getRevision) - val mismatched = id.getOrganisation == Organization && depBinaryVersion != scalaBinaryVersion && dep.getModuleConfigurations.exists(configSet) + def isScalaLangOrg = id.getOrganisation == Organization + def isNotScalaActorsMigration = !(id.getName startsWith "scala-actors-migration") // Exception to the rule: sbt/sbt#1818 + def hasBinVerMismatch = depBinaryVersion != scalaBinaryVersion + def matchesOneOfTheConfigs = dep.getModuleConfigurations.exists(configSet) + val mismatched = isScalaLangOrg && isNotScalaActorsMigration && hasBinVerMismatch && matchesOneOfTheConfigs if (mismatched) Some("Binary version (" + depBinaryVersion + ") for dependency " + id + "\n\tin " + module.getModuleRevisionId + @@ -111,4 +115,4 @@ private object IvyScala { configurationNames.foreach(rule.addConfiguration) rule } -} \ No newline at end of file +} From ececf95919bac9a9dc754538d4374519dde5d24d Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Fri, 6 Mar 2015 22:29:04 +0000 Subject: [PATCH 2/2] Exempt scala-pickling as well. --- ivy/src/main/scala/sbt/IvyScala.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ivy/src/main/scala/sbt/IvyScala.scala b/ivy/src/main/scala/sbt/IvyScala.scala index 061eddeb7..d2697e308 100644 --- a/ivy/src/main/scala/sbt/IvyScala.scala +++ b/ivy/src/main/scala/sbt/IvyScala.scala @@ -68,9 +68,10 @@ private object IvyScala { val depBinaryVersion = CrossVersion.binaryScalaVersion(id.getRevision) def isScalaLangOrg = id.getOrganisation == Organization def isNotScalaActorsMigration = !(id.getName startsWith "scala-actors-migration") // Exception to the rule: sbt/sbt#1818 + def isNotScalaPickling = !(id.getName startsWith "scala-pickling") // Exception to the rule: sbt/sbt#1899 def hasBinVerMismatch = depBinaryVersion != scalaBinaryVersion def matchesOneOfTheConfigs = dep.getModuleConfigurations.exists(configSet) - val mismatched = isScalaLangOrg && isNotScalaActorsMigration && hasBinVerMismatch && matchesOneOfTheConfigs + val mismatched = isScalaLangOrg && isNotScalaActorsMigration && isNotScalaPickling && hasBinVerMismatch && matchesOneOfTheConfigs if (mismatched) Some("Binary version (" + depBinaryVersion + ") for dependency " + id + "\n\tin " + module.getModuleRevisionId +