Skip to content

Commit

Permalink
Update AA to 2.2.0-dev-326
Browse files Browse the repository at this point in the history
  • Loading branch information
vmishenev committed Jan 22, 2025
1 parent d54787b commit 7018fd4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public final class org/jetbrains/dokka/analysis/java/ExceptionJavadocTag$Compani

public final class org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin : org/jetbrains/dokka/plugability/DokkaPlugin {
public fun <init> ()V
public final fun disposeGlobalStandaloneApplicationServices ()V
public final fun getDocCommentCreators ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
public final fun getDocCommentFinder ()Lorg/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder;
public final fun getDocCommentParsers ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,6 @@ public class JavaAnalysisPlugin : DokkaPlugin() {
DocCommentFinder(logger, docCommentFactory)
}

// TODO #3936(https://youtrack.jetbrains.com/issue/KT-71862) use an endpoint from AA
/**
* Disposes global resources which would persist after unloading Analysis API (Symbols analysis) and IJ platform classes.
*
* **Important:** Once this function has been called, Analysis API *and* IntelliJ platform classes should not be used anymore. The classes
* should either be unloaded or the whole program should be shut down.
*
* Note: Disposing of resources, including threads, allows unloading Dokka's class loader.
*/
@InternalDokkaApi
public fun disposeGlobalStandaloneApplicationServices() {
@Suppress("UnstableApiUsage")
com.intellij.util.concurrency.AppExecutorUtil.shutdownApplicationScheduledExecutorService()
}

internal val javaDocCommentCreator by extending {
docCommentCreators providing { JavaDocCommentCreator() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.jetbrains.dokka.analysis.kotlin.symbols.services.SymbolExternalDocume
import org.jetbrains.dokka.analysis.kotlin.symbols.translators.DefaultSymbolToDocumentableTranslator
import org.jetbrains.dokka.plugability.*
import org.jetbrains.dokka.renderers.PostAction
import org.jetbrains.kotlin.analysis.api.KaExperimentalApi
import org.jetbrains.kotlin.asJava.elements.KtLightAbstractAnnotation

@Suppress("unused")
Expand All @@ -38,13 +39,23 @@ public class SymbolsAnalysisPlugin : DokkaPlugin() {
}
}


internal val disposeKotlinAnalysisPostAction by extending {
CoreExtensions.postActions providing { context ->
PostAction {
querySingle { kotlinAnalysis }.close()
if (context.configuration.finalizeCoroutines)
// TODO #3936(https://youtrack.jetbrains.com/issue/KT-71862) use an endpoint from AA
javaAnalysisPlugin.disposeGlobalStandaloneApplicationServices()
if (context.configuration.finalizeCoroutines) {
/**
* Disposes global resources which would persist after unloading Analysis API (Symbols analysis) and IJ platform classes.
*
* **Important:** Once this function has been called, Analysis API *and* IntelliJ platform classes should not be used anymore. The classes
* should either be unloaded or the whole program should be shut down.
*
* Note: Disposing of resources, including threads, allows unloading Dokka's class loader.
*/
@OptIn(KaExperimentalApi::class)
org.jetbrains.kotlin.analysis.api.standalone.disposeGlobalStandaloneApplicationServices()
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,7 @@ internal class DokkaSymbolVisitor(
ExtraModifiers.KotlinOnlyModifiers.Const.takeIf { (this as? KaKotlinPropertySymbol)?.isConst == true },
ExtraModifiers.KotlinOnlyModifiers.LateInit.takeIf { (this as? KaKotlinPropertySymbol)?.isLateInit == true },
//ExtraModifiers.JavaOnlyModifiers.Static.takeIf { isJvmStaticInObjectOrClassOrInterface() },
// TODO https://youtrack.jetbrains.com/issue/KT-68236/Analysis-API-add-isExternal-property-for-KaPropertySymbol
ExtraModifiers.KotlinOnlyModifiers.External.takeIf { (psi as? KtProperty)?.hasModifier(KtTokens.EXTERNAL_KEYWORD) == true },
ExtraModifiers.KotlinOnlyModifiers.External.takeIf { isExternal },
//ExtraModifiers.KotlinOnlyModifiers.Static.takeIf { isStatic },
ExtraModifiers.KotlinOnlyModifiers.Override.takeIf {
origin != KaSymbolOrigin.SUBSTITUTION_OVERRIDE && origin != KaSymbolOrigin.INTERSECTION_OVERRIDE && isOverride
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ javaDiffUtils = "4.12"

## Analysis
kotlin-compiler = "2.0.20"
kotlin-compiler-k2 = "2.1.20-dev-4370"
kotlin-compiler-k2 = "2.2.0-dev-326"

# MUST match the version of the intellij platform used in the kotlin compiler,
# otherwise this will lead to different versions of psi API and implementations
Expand Down

0 comments on commit 7018fd4

Please sign in to comment.