[AA] KT-58257 Add module dependents exception for KtBuiltinsModule and KtSdkModule

- The IDE implementation of `KotlinModuleDependentsProvider` cannot
  easily find all dependents for a builtins or SDK module. Instead,
  builtins and SDK changes can be handled via global module state
  modification events, because most modules will depend on builtins and
  SDK modules.
This commit is contained in:
Marco Pennekamp
2023-05-22 18:32:10 +02:00
committed by Space Team
parent 027fd5600f
commit 1f556589a2
@@ -10,6 +10,11 @@ import com.intellij.openapi.project.Project
/**
* [KotlinModuleDependentsProvider] provides dependents for a [KtModule], which are modules that depend on the [KtModule].
*
* [getDirectDependents] and [getTransitiveDependents] may return an empty set for [KtBuiltinsModule]s and [KtSdkModule]s even though most
* modules depend on builtins/SDKs, because it is often not feasible to compute that set. Instead, users of [KotlinModuleDependentsProvider]
* should keep this limitation in mind and handle it separately. For example, a global modification event should be published for builtins
* and SDK changes.
*
* Implementations of this provider should ensure that results are provided in reasonable time, for example by caching results, as its
* functions may be called frequently.
*/