From 57cf737852b2a83cf23c1c20f83585ebd77c844f Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sat, 20 Jun 2015 15:02:35 +0100 Subject: [PATCH] Fix Fixes resolutions wrongly reported as not done. Happened for org.apache.spark:spark-core_2.11:1.3.1 in particular. --- core/src/main/scala/coursier/core/Resolver.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/coursier/core/Resolver.scala b/core/src/main/scala/coursier/core/Resolver.scala index d39aabe33..7bdb6bbaf 100644 --- a/core/src/main/scala/coursier/core/Resolver.scala +++ b/core/src/main/scala/coursier/core/Resolver.scala @@ -403,6 +403,9 @@ object Resolver { * The "next" dependency set, made of the current dependencies and their transitive dependencies, * trying to solve version conflicts. Transitive dependencies are calculated with the current cache. * + * May contain dependencies added in previous iterations, but no more required. These are filtered below, see + * @newDependencies. + * * Returns a tuple made of the conflicting dependencies, and all the dependencies. */ def nextDependenciesAndConflicts = { @@ -426,8 +429,8 @@ object Resolver { */ def isDone: Boolean = { def isFixPoint = { - val (nextConflicts, nextDependencies) = nextDependenciesAndConflicts - dependencies == (nextDependencies ++ nextConflicts).toSet && conflicts == nextConflicts.toSet + val (nextConflicts, _) = nextDependenciesAndConflicts + dependencies == (newDependencies ++ nextConflicts) && conflicts == nextConflicts.toSet } missingFromCache.isEmpty && isFixPoint