From 2929c47652d6f460cbbffb159da9acc038aca664 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Mon, 3 Jul 2017 12:56:34 +0200 Subject: [PATCH] Revert "Ensure a same artifact isn't downloaded twice in the same iteration" This reverts commit d437cfb87d0f4b5ddad4a46a8282dc3830557b18. --- .../coursier/core/ResolutionProcess.scala | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala b/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala index 9ccf4e557..195b237ec 100644 --- a/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala +++ b/core/shared/src/main/scala/coursier/core/ResolutionProcess.scala @@ -64,22 +64,6 @@ final case class Missing( cont: Resolution => ResolutionProcess ) extends ResolutionProcess { - def uniqueModules: Missing = { - - // only try to fetch a single version of a given module in a same iteration, so that resolutions for different - // versions don't try to download the same URL in the same iteration, which the coursier.Cache.Logger API doesn't - // allow - - val missing0 = missing.groupBy(_._1).toSeq.map(_._2).map { - case Seq(v) => v - case Seq() => sys.error("Cannot happen") - case v => - v.maxBy { case (_, v0) => Version(v0) } - } - - copy(missing = missing0) - } - def next(results: Fetch.MD): ResolutionProcess = { val errors = results.collect { @@ -136,7 +120,7 @@ final case class Missing( Continue(res0, cont) } else - Missing(depMgmtMissing.toSeq, res, cont0).uniqueModules + Missing(depMgmtMissing.toSeq, res, cont0) } val current0 = current.copyWithCache( @@ -174,7 +158,7 @@ object ResolutionProcess { if (resolution0.isDone) Done(resolution0) else - Missing(resolution0.missingFromCache.toSeq, resolution0, apply).uniqueModules + Missing(resolution0.missingFromCache.toSeq, resolution0, apply) } }