From 6848fd9f69474fde2181907ee9cb53940ad0d957 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 5 Aug 2015 07:00:39 -0400 Subject: [PATCH] cached resolution: don't include callers from evicted modules --- .../sbt/ivyint/CachedResolutionResolveEngine.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala b/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala index 73b0ec6fc..96c7d88b4 100644 --- a/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala +++ b/ivy/src/main/scala/sbt/ivyint/CachedResolutionResolveEngine.scala @@ -395,6 +395,18 @@ private[sbt] trait CachedResolutionResolveEngine extends ResolveEngine { */ def mergeOrganizationArtifactReports(rootModuleConf: String, reports0: Vector[OrganizationArtifactReport], os: Vector[IvyOverride], log: Logger): Vector[OrganizationArtifactReport] = { + // filter out evicted modules from further logic + def filterReports(report0: OrganizationArtifactReport): Option[OrganizationArtifactReport] = + report0.modules.toVector flatMap { mr => + if (mr.evicted || mr.problem.nonEmpty) None + else + // https://github.com/sbt/sbt/issues/1763 + Some(mr.copy(callers = JsonUtil.filterOutArtificialCallers(mr.callers))) + } match { + case Vector() => None + case ms => Some(OrganizationArtifactReport(report0.organization, report0.name, ms)) + } + // group by takes up too much memory. trading space with time. val orgNamePairs: Vector[(String, String)] = (reports0 map { oar => (oar.organization, oar.name) }).distinct // this might take up some memory, but it's limited to a single