mirror of https://github.com/sbt/sbt.git
Fixes #1710. Fixed cached resolution mutual eviction
When stitching the minigraphs together only exclude the artifacts that were evicted in *all* graphs, instead of some graphs. Consider the following scenario: - Y1 evicts slf4j-api 1.6.6 and picks 1.7.5 - Y2 evicts slf4j-api 1.7.5 and picks 1.6.6 At the root level, we need to use our own judgement and pick 1.7.5.
This commit is contained in:
parent
a1039ed99a
commit
4de9c3960d
|
|
@ -321,7 +321,7 @@ private[sbt] trait CachedResolutionResolveEngine extends ResolveEngine {
|
|||
val merged = (modules groupBy { m => (m.module.organization, m.module.name, m.module.revision) }).toSeq.toVector flatMap {
|
||||
case ((org, name, version), xs) =>
|
||||
if (xs.size < 2) xs
|
||||
else Vector(xs.head.copy(evicted = xs exists { _.evicted }, callers = xs flatMap { _.callers }))
|
||||
else Vector(xs.head.copy(evicted = xs forall { _.evicted }, callers = xs flatMap { _.callers }))
|
||||
}
|
||||
val conflicts = merged filter { m => !m.evicted && m.problem.isEmpty }
|
||||
if (conflicts.size < 2) merged
|
||||
|
|
|
|||
Loading…
Reference in New Issue