mirror of https://github.com/sbt/sbt.git
Drop use of AttributeKey#rawLabel
This commit is contained in:
parent
ca71b4b902
commit
bf8c5d2135
|
|
@ -158,7 +158,7 @@ object Act {
|
|||
val taskSeq = tasks.toSeq
|
||||
def taskKeys(f: AttributeKey[_] => String): Seq[(String, AttributeKey[_])] = taskSeq.map(key => (f(key), key))
|
||||
val normKeys = taskKeys(_.label)
|
||||
val valid = allKnown ++ normKeys ++ taskKeys(_.rawLabel)
|
||||
val valid = allKnown ++ normKeys
|
||||
val suggested = normKeys.map(_._1).toSet
|
||||
val keyP = filterStrings(examples(ID, suggested, "key"), valid.keySet, "key") map valid
|
||||
(token(value(keyP) | GlobalString ^^^ ParsedGlobal) <~ token("::".id)) ?? Omitted
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ object Index {
|
|||
def attributeKeys(settings: Settings[Scope]): Set[AttributeKey[_]] =
|
||||
settings.data.values.flatMap(_.keys).toSet[AttributeKey[_]]
|
||||
def stringToKeyMap(settings: Set[AttributeKey[_]]): Map[String, AttributeKey[_]] =
|
||||
stringToKeyMap0(settings)(_.rawLabel) ++ stringToKeyMap0(settings)(_.label)
|
||||
stringToKeyMap0(settings)(_.label)
|
||||
|
||||
private[this] def stringToKeyMap0(settings: Set[AttributeKey[_]])(label: AttributeKey[_] => String): Map[String, AttributeKey[_]] =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ trait ExtendableKeyIndex extends KeyIndex {
|
|||
}
|
||||
// task axis <-> key
|
||||
private[sbt] final class AKeyIndex(val data: Relation[Option[AttributeKey[_]], String]) {
|
||||
def add(task: Option[AttributeKey[_]], key: AttributeKey[_]): AKeyIndex = new AKeyIndex(data + (task, key.rawLabel) + (task, key.label))
|
||||
def add(task: Option[AttributeKey[_]], key: AttributeKey[_]): AKeyIndex = new AKeyIndex(data + (task, key.label))
|
||||
def keys(task: Option[AttributeKey[_]]): Set[String] = data.forward(task)
|
||||
def allKeys: Set[String] = data._2s.toSet
|
||||
def tasks: Set[AttributeKey[_]] = data._1s.flatten.toSet
|
||||
|
|
|
|||
Loading…
Reference in New Issue