From 4de9c3960d28697b045118eef6bb2f310b56fbb5 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 1 Nov 2014 20:45:44 -0400 Subject: [PATCH] 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. --- .../main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala b/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala index 73003bcb7..88dd4241c 100644 --- a/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala +++ b/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala @@ -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