Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Analysis API to 2.1.20-dev-4370 #3802

Merged
merged 15 commits into from
Nov 26, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SequentialTasksExecutionStressTest : AbstractGradleIntegrationTest() {
buildVersions,
"runTasks",
"-Ptask_number=$iterations",
jvmArgs = listOf("-Xmx1G", "-XX:MaxMetaspaceSize=500m"),
jvmArgs = listOf("-Xmx1G", "-XX:MaxMetaspaceSize=2g"),
enableBuildCache = false,
).buildRelaxed()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public class JavaAnalysisPlugin : DokkaPlugin() {
DocCommentFinder(logger, docCommentFactory)
}

@InternalDokkaApi
public fun disposeGlobalStandaloneApplicationServices() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we add this function inside analysis-java-psi module and not call directly inside K2 analysis?

Copy link
Contributor Author

@vmishenev vmishenev Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only from analysis-java-psi, you can call the methods of the IJ Platform. The K2 module has the truncated version of IJ from the compiler dependencies.
On the other hand, the calling of disposeGlobalStandaloneApplicationServices might affect the PSI analysis somehow.

Copy link
Contributor Author

@vmishenev vmishenev Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, Marco will merge the endpoint into AA so we will be able to call it from K2. I left TODO

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it will be nice to also create an issue on our side, to keep track of it

@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 @@ -42,7 +42,10 @@ public class SymbolsAnalysisPlugin : DokkaPlugin() {
}

internal val disposeKotlinAnalysisPostAction by extending {
CoreExtensions.postActions with PostAction { querySingle { kotlinAnalysis }.close() }
CoreExtensions.postActions with PostAction {
querySingle { kotlinAnalysis }.close()
javaAnalysisPlugin.disposeGlobalStandaloneApplicationServices()
}
}

internal val symbolToDocumentableTranslator by extending {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class
}

@Test
@OnlyDescriptors("#3787")
vmishenev marked this conversation as resolved.
Show resolved Hide resolved
fun nestedGenericClasses() {
inlineModelTest(
"""
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ktor = "2.3.11"

## Analysis
kotlin-compiler = "2.0.20"
kotlin-compiler-k2 = "2.1.0-dev-5441"
kotlin-compiler-k2 = "2.1.0-dev-7103"
whyoleg marked this conversation as resolved.
Show resolved Hide resolved

# 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
Loading