@@ -26,7 +26,10 @@ class BuildGraphHasher(private val bazelClient: BazelClient) : KoinComponent {
26
26
private val sourceFileHasher: SourceFileHasher by inject()
27
27
private val logger: Logger by inject()
28
28
29
- fun hashAllBazelTargetsAndSourcefiles (seedFilepaths : Set <Path > = emptySet()): Map <String , String > {
29
+ fun hashAllBazelTargetsAndSourcefiles (
30
+ seedFilepaths : Set <Path > = emptySet(),
31
+ ignoredAttrs : Set <String > = emptySet()
32
+ ): Map <String , String > {
30
33
/* *
31
34
* Bazel will lock parallel queries but this is still allowing us to hash source files while executing a parallel query
32
35
*/
@@ -56,7 +59,12 @@ class BuildGraphHasher(private val bazelClient: BazelClient) : KoinComponent {
56
59
Pair (sourceDigestsFuture.await(), targetsTask.await())
57
60
}
58
61
val seedForFilepaths = createSeedForFilepaths(seedFilepaths)
59
- return hashAllTargets(seedForFilepaths, sourceDigests, allTargets)
62
+ return hashAllTargets(
63
+ seedForFilepaths,
64
+ sourceDigests,
65
+ allTargets,
66
+ ignoredAttrs
67
+ )
60
68
}
61
69
62
70
private fun hashSourcefiles (targets : List <Build .Target >): ConcurrentMap <String , ByteArray > {
@@ -94,7 +102,8 @@ class BuildGraphHasher(private val bazelClient: BazelClient) : KoinComponent {
94
102
private fun hashAllTargets (
95
103
seedHash : ByteArray ,
96
104
sourceDigests : ConcurrentMap <String , ByteArray >,
97
- allTargets : List <BazelTarget >
105
+ allTargets : List <BazelTarget >,
106
+ ignoredAttrs : Set <String >
98
107
): Map <String , String > {
99
108
val ruleHashes: ConcurrentMap <String , ByteArray > = ConcurrentHashMap ()
100
109
val targetToRule: MutableMap <String , BazelRule > = HashMap ()
@@ -107,7 +116,8 @@ class BuildGraphHasher(private val bazelClient: BazelClient) : KoinComponent {
107
116
targetToRule,
108
117
sourceDigests,
109
118
ruleHashes,
110
- seedHash
119
+ seedHash,
120
+ ignoredAttrs
111
121
)
112
122
Pair (target.name, targetDigest.toHexString())
113
123
}
0 commit comments