improve "X is evicted completely"

Fixes https://github.com/sbt/sbt/issues/4946

1. This rewords "evicted completely" to "evicted for all versions"
2. Skips transitive and complete evictions (eviction that has no winner version)
This commit is contained in:
Eugene Yokota 2019-08-13 23:35:50 -04:00
parent f58fa46c8c
commit 8fee1e2666
1 changed files with 4 additions and 2 deletions

View File

@ -183,7 +183,7 @@ object EvictionPair {
}
val winnerRev = a.winner match {
case Some(r) => s":${r.module.revision} is selected over ${revsStr}"
case _ => " is evicted completely"
case _ => " is evicted for all versions"
}
val title = s"\t* ${a.organization}:${a.name}$winnerRev"
title :: (if (a.showCallers) callers.reverse else Nil) ::: List("")
@ -312,7 +312,9 @@ object EvictionWarning {
binaryIncompatibleEvictionExists = true
}
case p =>
if (!guessCompatible(p)) {
// don't report on a transitive eviction that does not have a winner
// https://github.com/sbt/sbt/issues/4946
if (!guessCompatible(p) && p.winner.isDefined) {
if (options.warnTransitiveEvictions)
transitiveEvictions += p
if (options.warnEvictionSummary)