mirror of https://github.com/sbt/sbt.git
Exempt scala-pickling as well.
This commit is contained in:
parent
e9b5020e83
commit
7ab42435b3
|
|
@ -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 +
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
- Issues warning if multiple dependencies to a same library is found with different version. [#1634][1634] by [@eed3si9n][@eed3si9n]
|
||||
- Removes "No main class detected" warning. [#1766][1766] by [@eed3si9n][@eed3si9n]
|
||||
- Disable publishing on implicitly created root project by not enabling `IvyPlugin` by default (`-Dsbt.root.ivyplugin=true` will revert this behavior). [#1871][1871]/[#1869][1869] by [@dwijnand][@dwijnand]
|
||||
- Exempt org.scala-lang:scala-actors-migration from scala binary version checks. [#1818][1818]/[#1899][1899] by [@dwijnand][@dwijnand]
|
||||
- Exempt org.scala-lang:scala-actors-migration and org.scala-lang:scala-pickling from scala binary version checks. [#1818][1818]/[#1899][1899] by [@dwijnand][@dwijnand]
|
||||
|
||||
### Rolling back XML parsing workaround
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,16 @@
|
|||
|
||||
scalaVersion := "2.11.5"
|
||||
libraryDependencies += "org.scala-lang" %% "scala-actors-migration" % "1.1.0"
|
||||
libraryDependencies += "org.scala-lang" %% "scala-pickling" % "0.9.1"
|
||||
|
||||
lazy val check = taskKey[Unit]("Runs the check")
|
||||
|
||||
check := {
|
||||
val lastLog = BuiltinCommands lastLogFile state.value
|
||||
val last = IO read lastLog.get
|
||||
def containsWarn1 = last contains "Binary version (1.1.0) for dependency org.scala-lang#scala-actors-migration_2.11;1.1.0"
|
||||
def containsWarn2 = last contains "differs from Scala binary version in project (2.11)."
|
||||
if (containsWarn1 && containsWarn2) sys error "scala-actors-migration isn't exempted from the Scala binary version check"
|
||||
def containsWarn2 = last contains "Binary version (0.9.1) for dependency org.scala-lang#scala-pickling_2.11;0.9.1"
|
||||
def containsWarn3 = last contains "differs from Scala binary version in project (2.11)."
|
||||
if (containsWarn1 && containsWarn3) sys error "scala-actors-migration isn't exempted from the Scala binary version check"
|
||||
if (containsWarn2 && containsWarn3) sys error "scala-pickling isn't exempted from the Scala binary version check"
|
||||
}
|
||||
Loading…
Reference in New Issue