[2.x] fix: Format Seq values consistently in multi-project builds (fixes #7339) (#8567)

When running commands like 'Test/definedTests' on multi-project builds,
the output was showing raw Vector(...) format instead of nicely formatted
per-item output.

Before:
  [info] svc / Test / definedTests
  [info]   Vector(Test FooSpec : ..., Test BarSpec : ..., ...)

After:
  [info] svc / Test / definedTests
  [info]   * Test FooSpec : ...
  [info]   * Test BarSpec : ...

The fix extends printSettings to check if values are Seq types in
the multi-project case and format each item on its own line with
a '* ' prefix, matching the single-project behavior.
This commit is contained in:
E.G 2026-01-18 06:37:42 +11:00 committed by GitHub
parent 1efebeaa98
commit 402619fc45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 1 deletions

View File

@ -55,7 +55,17 @@ object Aggregation {
case KeyValue(_, x: Seq[?]) :: Nil => print(x.mkString("* ", "\n* ", ""))
case KeyValue(_, x) :: Nil => print(x.toString)
case _ =>
xs foreach (kv => print(display.show(kv.key) + "\n\t" + kv.value.toString))
xs foreach { kv =>
print(display.show(kv.key))
kv.value match {
case seq: Seq[?] if seq.nonEmpty =>
seq.foreach(item => print("\t* " + item.toString))
case seq: Seq[?] =>
print("\t(empty)")
case x =>
print("\t" + x.toString)
}
}
}
type Values[T] = Seq[KeyValue[T]]