mirror of https://github.com/sbt/sbt.git
parent
0681649994
commit
8f3a7b4f5b
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
[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
|
||||
|
||||
|
|
@ -75,6 +76,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] by [@dwijnand][@dwijnand]
|
||||
|
||||
### Rolling back XML parsing workaround
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
// https://github.com/sbt/sbt/issues/1818
|
||||
|
||||
scalaVersion := "2.11.5"
|
||||
libraryDependencies += "org.scala-lang" %% "scala-actors-migration" % "1.1.0"
|
||||
|
||||
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"
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
> update
|
||||
> check
|
||||
Loading…
Reference in New Issue