diff --git a/main/Build.scala b/main/Build.scala index 191364178..5374eebf6 100644 --- a/main/Build.scala +++ b/main/Build.scala @@ -192,9 +192,11 @@ object BuildStreams val scope = scoped.scope pathComponent(scope.config, scoped, "config")(_.name) :: pathComponent(scope.task, scoped, "task")(_.label) :: - pathComponent(scope.extra, scoped, "extra")(_ => error("Unimplemented")) :: + pathComponent(scope.extra, scoped, "extra")(showAMap) :: Nil } + def showAMap(a: AttributeMap): String = + a.entries.toSeq.sortBy(_.key.label).map { case AttributeEntry(key, value) => key.label + "=" + value.toString } mkString(" ") def projectPath(units: Map[URI, LoadedBuildUnit], root: URI, scoped: ScopedKey[_], data: Settings[Scope]): File = scoped.scope.project match { diff --git a/util/collection/Attributes.scala b/util/collection/Attributes.scala index 4c3a16873..f275cdbe0 100644 --- a/util/collection/Attributes.scala +++ b/util/collection/Attributes.scala @@ -72,9 +72,9 @@ private class BasicAttributeMap(private val backing: Map[AttributeKey[_], Any]) } // type inference required less generality -final case class AttributeEntry[T](a: AttributeKey[T], b: T) +final case class AttributeEntry[T](key: AttributeKey[T], value: T) { - override def toString = a.label + ": " + b + override def toString = key.label + ": " + value } final case class Attributed[D](data: D)(val metadata: AttributeMap)