Remove unused Structure.taskToKey

This commit is contained in:
Adrien Piquerez 2024-11-13 11:22:53 +01:00
parent 6fbe032517
commit 327d05e28f
3 changed files with 0 additions and 13 deletions

View File

@ -351,17 +351,6 @@ object BuildUtilLite:
end BuildUtilLite
object Index {
def taskToKeyMap(data: Settings[Scope]): Map[Task[?], ScopedKey[Task[?]]] = {
val pairs = data.scopes flatMap (scope =>
data.data(scope).entries collect { case AttributeEntry(key, value: Task[_]) =>
(value, ScopedKey(scope, key.asInstanceOf[AttributeKey[Task[?]]]))
}
)
pairs.toMap[Task[?], ScopedKey[Task[?]]]
}
def allKeys(settings: Seq[Setting[?]]): Set[ScopedKey[?]] = {
val result = new java.util.HashSet[ScopedKey[?]]
settings.foreach { s =>

View File

@ -71,7 +71,6 @@ final class BuildStructure(
// information that is not original, but can be reconstructed from the rest of BuildStructure
final class StructureIndex(
val keyMap: Map[String, AttributeKey[?]],
val taskToKey: Map[Task[?], ScopedKey[Task[?]]],
val triggers: Triggers,
val keyIndex: KeyIndex,
val aggregateKeyIndex: KeyIndex,

View File

@ -384,7 +384,6 @@ private[sbt] object Load {
val aggIndex = KeyIndex.aggregate(scopedKeys.toVector, extra(keyIndex), projectsMap, configsMap)
new StructureIndex(
Index.stringToKeyMap(attributeKeys),
Index.taskToKeyMap(data),
Index.triggers(data),
keyIndex,
aggIndex