mirror of https://github.com/sbt/sbt.git
As with https://github.com/sbt/librarymanagement/pull/386, which dealt with Eviction *errors*, this fixes the way Eviction *warnings* report the list of evicted versions - removing duplicate versions - and does a refactor so that both `EvictionError` & `EvictionWarning` are using the same logic to generate the revision string. The logic for the revisions string is moved to the new field `EvictionPair.evictedRevs`. Without this fix, we see Eviction warnings like this: ``` * org.scala-lang.modules:scala-java8-compat_2.13:1.0.2 is selected over {1.0.0, 1.0.0} ``` |
||
|---|---|---|
| .github | ||
| bin | ||
| core | ||
| ivy/src | ||
| notes | ||
| project | ||
| scripted-test/src/sbt-test/lmScriptedTest | ||
| .gitignore | ||
| .java-version | ||
| .scalafmt.conf | ||
| LICENSE | ||
| README.md | ||
| build.sbt | ||
| sbt-allsources.sh | ||
README.md
librarymanagement module for sbt
scala> import java.io.File
import java.io.File
scala> import sbt.librarymanagement._, syntax._
import sbt.librarymanagement._
import syntax._
scala> val log = sbt.util.LogExchange.logger("test")
log: sbt.internal.util.ManagedLogger = sbt.internal.util.ManagedLogger@c439b0f
scala> val lm = {
import sbt.librarymanagement.ivy._
val ivyConfig = InlineIvyConfiguration().withLog(log)
IvyDependencyResolution(ivyConfig)
}
lm: sbt.librarymanagement.DependencyResolution = sbt.librarymanagement.DependencyResolution@6a9b40f8
scala> val module = "commons-io" % "commons-io" % "2.5"
module: sbt.librarymanagement.ModuleID = commons-io:commons-io:2.5
scala> lm.retrieve(module, scalaModuleInfo = None, new File("target"), log)
res0: Either[sbt.librarymanagement.UnresolvedWarning,Vector[java.io.File]] = Right(Vector(target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar, target/jars/commons-io/commons-io/commons-io-2.5.jar))