mirror of https://github.com/sbt/sbt.git
Tweak dependency printing
This commit is contained in:
parent
a0e04a6c85
commit
45e4f6d7f7
|
|
@ -45,10 +45,10 @@ object Print {
|
|||
)
|
||||
|
||||
val deps1 = minDeps
|
||||
.groupBy(_.copy(configuration = ""))
|
||||
.groupBy(_.copy(configuration = "", attributes = Attributes("", "")))
|
||||
.toVector
|
||||
.map { case (k, l) =>
|
||||
k.copy(configuration = l.toVector.map(_.configuration).sorted.mkString(";"))
|
||||
k.copy(configuration = l.toVector.map(_.configuration).sorted.distinct.mkString(";"))
|
||||
}
|
||||
.sortBy { dep =>
|
||||
(dep.module.organization, dep.module.name, dep.module.toString, dep.version)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package coursier.util
|
||||
|
||||
import coursier.core.Attributes
|
||||
import coursier.{Dependency, Module}
|
||||
import utest._
|
||||
|
||||
object PrintTests extends TestSuite {
|
||||
|
||||
val tests = TestSuite {
|
||||
'ignoreAttributes - {
|
||||
val dep = Dependency(
|
||||
Module("org", "name"),
|
||||
"0.1",
|
||||
configuration = "foo"
|
||||
)
|
||||
val deps = Seq(
|
||||
dep,
|
||||
dep.copy(attributes = Attributes("fooz", ""))
|
||||
)
|
||||
|
||||
val res = Print.dependenciesUnknownConfigs(deps, Map())
|
||||
val expectedRes = "org:name:0.1:foo"
|
||||
|
||||
assert(res == expectedRes)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue