[LL FIR] KT-57455 Avoid creating optional annotation class providers
- An `OptionalAnnotationClassesProvider` only needs to be created if the package part provider may even have optional annotation classes. - In the IDE case, the package part provider never provides optional annotation classes, so especially in the IDE, we can avoid a lot of useless symbol providers with this.
This commit is contained in:
committed by
Space Team
parent
d3be38476a
commit
f9785c1050
+3
@@ -68,4 +68,7 @@ class IncrementalPackagePartProvider(
|
||||
override fun getAllOptionalAnnotationClasses(): List<ClassData> =
|
||||
moduleMappings.flatMap(JvmPackagePartProviderBase.Companion::getAllOptionalAnnotationClasses) +
|
||||
parent.getAllOptionalAnnotationClasses()
|
||||
|
||||
override fun mayHaveOptionalAnnotationClasses(): Boolean =
|
||||
moduleMappings.any { it.moduleData.optionalAnnotations.isNotEmpty() } || parent.mayHaveOptionalAnnotationClasses()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user