File tree Expand file tree Collapse file tree 3 files changed +3
-19
lines changed
ksp/src/main/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 3 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ Changelog
44** Unreleased**
55--------------
66
7+ - Update to KSP ` 2.3.5 ` and remove the memory leak patch as it's now fixed upstream.
8+
790.12.1
810------
911
Original file line number Diff line number Diff line change 22gjf = " 1.33.0"
33kotlin = " 2.3.0"
44kotlinpoet = " 2.2.0"
5- ksp = " 2.3.4 "
5+ ksp = " 2.3.5 "
66ktfmt = " 0.61"
77
88[plugins ]
Original file line number Diff line number Diff line change 11/* Adds support for KSP (https://goo.gle/ksp). */
22package com.tschuchort.compiletesting
33
4- import com.google.devtools.ksp.impl.KSPCoreEnvironment
54import com.google.devtools.ksp.impl.KotlinSymbolProcessing
65import com.google.devtools.ksp.processing.KSPJvmConfig
76import com.google.devtools.ksp.processing.SymbolProcessorProvider
87import java.io.File
98import java.io.PrintStream
109import java.util.EnumSet
11- import ksp.com.intellij.openapi.application.ApplicationManager as ShadedKspApplicationManager
12- import ksp.com.intellij.openapi.util.Disposer as ShadedKspDisposer
13- import ksp.com.intellij.openapi.util.Disposer.dispose
1410import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
1511import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
1612
@@ -135,22 +131,8 @@ class Ksp2PrecursorTool : PrecursorTool, KspTool {
135131 }
136132 } finally {
137133 logger.reportAll()
138- clearKspLeaks()
139134 }
140135 }
141-
142- /* *
143- * KSP leaks its core environment because its CLI appears to be intended for single-shot use and
144- * stores stuff in ThreadLocals.
145- *
146- * The Gradle plugin doesn't seem to run into this because it runs all the tasks in an isolated
147- * classloader that dies between task runs.
148- */
149- private fun clearKspLeaks () {
150- KSPCoreEnvironment .instance_prop.remove()
151- // Doesn't _seem_ necessary but just in case, since it does appear to spin this up
152- ShadedKspApplicationManager .getApplication()?.let (ShadedKspDisposer ::dispose)
153- }
154136}
155137
156138private fun KotlinVersion.languageVersion (): String {
You can’t perform that action at this time.
0 commit comments