Reuse code from build-common
KT-8487
This commit is contained in:
@@ -92,12 +92,11 @@ open class IncrementalCacheImpl<Target>(
|
||||
private val dependents = arrayListOf<IncrementalCacheImpl<Target>>()
|
||||
private val outputDir by lazy(LazyThreadSafetyMode.NONE) { requireNotNull(targetOutputDir) { "Target is expected to have output directory: $target" } }
|
||||
|
||||
// TODO: review
|
||||
val dependentsWithThis: Sequence<IncrementalCacheImpl<Target>>
|
||||
get() = sequenceOf(this).plus(dependents.asSequence())
|
||||
|
||||
internal val dependentCaches: Iterable<IncrementalCacheImpl<Target>>
|
||||
get() = dependents
|
||||
val thisWithDependentCaches: Iterable<IncrementalCacheImpl<Target>> by lazy {
|
||||
val result = arrayListOf(this)
|
||||
result.addAll(dependents)
|
||||
result
|
||||
}
|
||||
|
||||
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
||||
}
|
||||
@@ -578,7 +577,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
|
||||
val removedFqNames = removedClasses.map { it.fqNameForClassNameWithoutDollars }.toSet()
|
||||
|
||||
for (cache in dependentsWithThis) {
|
||||
for (cache in thisWithDependentCaches) {
|
||||
val parentsFqNames = hashSetOf<FqName>()
|
||||
val childrenFqNames = hashSetOf<FqName>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user