support extra axis for streams

This commit is contained in:
Mark Harrah 2011-05-07 22:02:06 -04:00
parent 5d47aca7e8
commit 77be505093
2 changed files with 5 additions and 3 deletions

View File

@ -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
{

View File

@ -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)