[AA] KT-58257 Improve modification event API and documentation

- Module state modification events now have a modification kind, which
  allows adding additional kinds of modification in the future (e.g.
  separating module property and content root updates, if the workspace
  model ever supports it).
  - Splitting off modification kinds was also a good opportunity to
    better document when module state modification occurs.
- Changed the documentation of modification events to be (1) less
  reliant on the IDE implementation and (2) more detailed in the
  intended effect of each event.
- Removed the notion of "stable" modules again and replaced it with
  "libraries". Even though an SDK is technically not a library, the
  term "library modules" should be more friendly to API consumers.
This commit is contained in:
Marco Pennekamp
2023-07-18 16:43:12 +02:00
committed by Space Team
parent d2b05b8f4f
commit 03c8654fe3
9 changed files with 78 additions and 38 deletions
@@ -64,11 +64,3 @@ public inline fun <reified M : KtModule> KtModule.allDirectDependenciesOfType():
*/
public fun computeTransitiveDependsOnDependencies(directDependsOnDependencies: List<KtModule>): List<KtModule> =
topologicalSort(directDependsOnDependencies) { this.directDependsOnDependencies }
/**
* A stable [KtModule] does not contain conventionally *editable* sources and cannot cause or be affected by out-of-block modification.
*
* Stable modules may still be subject to modification (e.g. when a JAR is added to a library), but in such cases, module state modification
* events will be raised.
*/
public val KtModule.isStableModule: Boolean get() = this is KtBinaryModule || this is KtLibrarySourceModule