Merge pull request #386 from rtyley/avoid-repeating-version-in-eviction-error

Avoid repeating versions in Eviction error message
This commit is contained in:
eugene yokota 2021-09-18 22:29:03 -04:00 committed by GitHub
commit 54c1ee53c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -155,7 +155,8 @@ final class EvictionError private[sbt] (
evictions.foreach({
case (a, scheme) =>
val revs = a.evicteds map { _.module.revision }
val revsStr = if (revs.size <= 1) revs.mkString else "{" + revs.mkString(", ") + "}"
val revsStr =
if (revs.size <= 1) revs.mkString else "{" + revs.distinct.mkString(", ") + "}"
val seen: mutable.Set[ModuleID] = mutable.Set()
val callers: List[String] = (a.evicteds.toList ::: a.winner.toList) flatMap { r =>
val rev = r.module.revision