From d2b05b8f4fc22af432f89961c61f24f81cf90a85 Mon Sep 17 00:00:00 2001 From: Marco Pennekamp Date: Thu, 13 Jul 2023 15:00:43 +0200 Subject: [PATCH] [AA] KT-58257 Restore timing guarantees of module state modification events - Specifically for non-global module state modification, we can guarantee that the event is published before the module is modified. This allows subscribers to use the provided `KtModule` without needing to fear that the module has already been disposed (in case of removal). --- .../providers/topics/KotlinModuleStateModificationListener.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analysis/analysis-api-providers/src/org/jetbrains/kotlin/analysis/providers/topics/KotlinModuleStateModificationListener.kt b/analysis/analysis-api-providers/src/org/jetbrains/kotlin/analysis/providers/topics/KotlinModuleStateModificationListener.kt index 2f3b315ce79..9ec91bab451 100644 --- a/analysis/analysis-api-providers/src/org/jetbrains/kotlin/analysis/providers/topics/KotlinModuleStateModificationListener.kt +++ b/analysis/analysis-api-providers/src/org/jetbrains/kotlin/analysis/providers/topics/KotlinModuleStateModificationListener.kt @@ -9,8 +9,8 @@ import org.jetbrains.kotlin.analysis.project.structure.KtModule public fun interface KotlinModuleStateModificationListener { /** - * [onModification] is invoked in a write action before or after the [module] is moved, removed, or its structure is changed. - * [isRemoval] signals if the event is a removal. + * [onModification] is invoked in a write action *before* the [module] is moved, removed, or its structure is changed. [isRemoval] + * signals if the event is a removal. */ public fun onModification(module: KtModule, isRemoval: Boolean) }