mirror of https://github.com/sbt/sbt.git
Merge pull request #1899 from dwijnand/fix/1818/exempt-scala-actors-migration
Exempt scala-actors-migration from version checks.
This commit is contained in:
commit
d344a833d5
|
|
@ -66,7 +66,12 @@ 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 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 && isNotScalaPickling && hasBinVerMismatch && matchesOneOfTheConfigs
|
||||
if (mismatched)
|
||||
Some("Binary version (" + depBinaryVersion + ") for dependency " + id +
|
||||
"\n\tin " + module.getModuleRevisionId +
|
||||
|
|
@ -111,4 +116,4 @@ private object IvyScala {
|
|||
configurationNames.foreach(rule.addConfiguration)
|
||||
rule
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,10 @@
|
|||
[1787]: https://github.com/sbt/sbt/pull/1787
|
||||
[1793]: https://github.com/sbt/sbt/pull/1793
|
||||
[1817]: https://github.com/sbt/sbt/pull/1817
|
||||
[1818]: https://github.com/sbt/sbt/pull/1818
|
||||
[1869]: https://github.com/sbt/sbt/issues/1869
|
||||
[1871]: https://github.com/sbt/sbt/pull/1871
|
||||
[1899]: https://github.com/sbt/sbt/pull/1899
|
||||
|
||||
### Changes with compatibility implications
|
||||
|
||||
|
|
@ -75,6 +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 and org.scala-lang:scala-pickling from scala binary version checks. [#1818][1818]/[#1899][1899] by [@dwijnand][@dwijnand]
|
||||
|
||||
### Rolling back XML parsing workaround
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
// https://github.com/sbt/sbt/issues/1818
|
||||
|
||||
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 "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"
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
> update
|
||||
> check
|
||||
Loading…
Reference in New Issue