diff --git a/compiler-plugin/build.gradle.kts b/compiler-plugin/build.gradle.kts index 47d18317e1..088feb30c2 100644 --- a/compiler-plugin/build.gradle.kts +++ b/compiler-plugin/build.gradle.kts @@ -8,6 +8,7 @@ val intellijVersion: String by project val kotlinBaseVersion: String by project val libsForTesting by configurations.creating +val libsForTestingCommon by configurations.creating tasks.withType { compilerOptions.freeCompilerArgs.add("-Xjvm-default=all-compatibility") @@ -66,6 +67,7 @@ dependencies { libsForTesting(kotlin("stdlib", kotlinBaseVersion)) libsForTesting(kotlin("test", kotlinBaseVersion)) libsForTesting(kotlin("script-runtime", kotlinBaseVersion)) + libsForTestingCommon(kotlin("stdlib-common", kotlinBaseVersion)) } tasks.register("CopyLibsForTesting") { @@ -75,6 +77,13 @@ tasks.register("CopyLibsForTesting") { rename("(.+)-$escaped\\.jar", "$1.jar") } +tasks.register("CopyLibsForTestingCommon") { + from(configurations.get("libsForTestingCommon")) + into("dist/common") + val escaped = Regex.escape(kotlinBaseVersion) + rename("(.+)-$escaped\\.jar", "$1.jar") +} + fun Project.javaPluginConvention(): JavaPluginConvention = the() val JavaPluginConvention.testSourceSet: SourceSet get() = sourceSets.getByName("test") @@ -83,6 +92,7 @@ val Project.testSourceSet: SourceSet tasks.test { dependsOn("CopyLibsForTesting") + dependsOn("CopyLibsForTestingCommon") maxHeapSize = "2g" useJUnitPlatform() @@ -114,6 +124,7 @@ repositories { } val dokkaJavadocJar by tasks.register("dokkaJavadocJar") { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE dependsOn(tasks.dokkaJavadoc) from(tasks.dokkaJavadoc.flatMap { it.outputDirectory }) from(project(":common-util").tasks.dokkaJavadoc.flatMap { it.outputDirectory }) diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSAnnotationJavaImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSAnnotationJavaImpl.kt index f6ae397b53..c051bb74ac 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSAnnotationJavaImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSAnnotationJavaImpl.kt @@ -54,7 +54,7 @@ class KSAnnotationJavaImpl private constructor(val psi: PsiAnnotation) : KSAnnot is PsiJavaFile -> KSFileJavaImpl.getCached(parentPsi) is PsiClass -> KSClassDeclarationJavaImpl.getCached(parentPsi) is PsiMethod -> KSFunctionDeclarationJavaImpl.getCached(parentPsi) - is PsiParameter -> KSValueParameterJavaImpl.getCached(parentPsi) + is PsiParameter -> KSValueParameterJavaImpl.getCached(parentPsi, this) is PsiTypeParameter -> KSTypeParameterJavaImpl.getCached(parentPsi) is PsiType -> if (parentPsi.parent is PsiClassType) KSTypeArgumentJavaImpl.getCached(parentPsi, this) diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSFunctionDeclarationJavaImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSFunctionDeclarationJavaImpl.kt index 1513fffcb8..a1d60e1cb4 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSFunctionDeclarationJavaImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSFunctionDeclarationJavaImpl.kt @@ -79,7 +79,7 @@ class KSFunctionDeclarationJavaImpl private constructor(val psi: PsiMethod) : } override val parameters: List by lazy { - psi.parameterList.parameters.map { KSValueParameterJavaImpl.getCached(it) } + psi.parameterList.parameters.map { KSValueParameterJavaImpl.getCached(it, this) } } override val parentDeclaration: KSDeclaration? by lazy { diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSValueParameterJavaImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSValueParameterJavaImpl.kt index 086b670ab0..aae93eb943 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSValueParameterJavaImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/java/KSValueParameterJavaImpl.kt @@ -17,17 +17,21 @@ package com.google.devtools.ksp.symbol.impl.java +import com.google.devtools.ksp.IdKeyPair import com.google.devtools.ksp.KSObjectCache import com.google.devtools.ksp.processing.impl.KSNameImpl import com.google.devtools.ksp.symbol.* +import com.google.devtools.ksp.symbol.impl.getInstanceForCurrentRound import com.google.devtools.ksp.symbol.impl.toLocation -import com.intellij.psi.PsiAnnotation -import com.intellij.psi.PsiMethod import com.intellij.psi.PsiParameter -class KSValueParameterJavaImpl private constructor(val psi: PsiParameter) : KSValueParameter { - companion object : KSObjectCache() { - fun getCached(psi: PsiParameter) = cache.getOrPut(psi) { KSValueParameterJavaImpl(psi) } +class KSValueParameterJavaImpl private constructor(val psi: PsiParameter, override val parent: KSNode) : + KSValueParameter { + companion object : KSObjectCache, KSValueParameterJavaImpl>() { + fun getCached(psi: PsiParameter, parent: KSNode): KSValueParameterJavaImpl { + val curParent = getInstanceForCurrentRound(parent) as KSNode + return cache.getOrPut(IdKeyPair(psi, curParent)) { KSValueParameterJavaImpl(psi, curParent) } + } } override val origin = Origin.JAVA @@ -35,20 +39,6 @@ class KSValueParameterJavaImpl private constructor(val psi: PsiParameter) : KSVa override val location: Location by lazy { psi.toLocation() } - override val parent: KSNode? by lazy { - var parentPsi = psi.parent - while (true) { - when (parentPsi) { - null, is PsiMethod, is PsiAnnotation -> break - else -> parentPsi = parentPsi.parent - } - } - when (parentPsi) { - is PsiMethod -> KSFunctionDeclarationJavaImpl.getCached(parentPsi) - is PsiAnnotation -> KSAnnotationJavaImpl.getCached(parentPsi) - else -> null - } - } override val annotations: Sequence by lazy { psi.annotations.asSequence().map { KSAnnotationJavaImpl.getCached(it) } diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/utils.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/utils.kt index 4e19baf137..fc6de3c8af 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/utils.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/utils.kt @@ -65,6 +65,7 @@ fun PsiElement.findParentAnnotated(): KSAnnotated? { var parent = when (this) { // Unfortunately, LightMethod doesn't implement parent. is LightMethod -> this.containingClass + is PsiMethod -> this.containingClass else -> this.parent } @@ -261,7 +262,7 @@ internal fun getInstanceForCurrentRound(node: KSNode): KSNode? { is KSTypeParameterJavaImpl -> KSTypeParameterJavaImpl.getCached(node.psi) is KSTypeReferenceJavaImpl -> KSTypeReferenceJavaImpl.getCached(node.psi, (node.parent as? KSAnnotated)?.getInstanceForCurrentRound()) - is KSValueParameterJavaImpl -> KSValueParameterJavaImpl.getCached(node.psi) + is KSValueParameterJavaImpl -> KSValueParameterJavaImpl.getCached(node.psi, node.parent) is KSPropertyGetterSyntheticImpl -> KSPropertyGetterSyntheticImpl.getCached(node.ksPropertyDeclaration) is KSPropertySetterSyntheticImpl -> KSPropertySetterSyntheticImpl.getCached(node.ksPropertyDeclaration) is KSValueParameterSyntheticImpl -> diff --git a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KotlinFactories.kt b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KotlinFactories.kt index bc45bcd4db..b112a2adf4 100644 --- a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KotlinFactories.kt +++ b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KotlinFactories.kt @@ -49,6 +49,7 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation import org.jetbrains.kotlin.gradle.plugin.KotlinCompilationInfo import org.jetbrains.kotlin.gradle.plugin.SubpluginOption import org.jetbrains.kotlin.gradle.plugin.mpp.enabledOnCurrentHost +import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompileTool import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon @@ -173,7 +174,6 @@ abstract class KspTaskJvm @Inject constructor( @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "EXPOSED_PARAMETER_TYPE") fun `callCompilerAsync$kotlin_gradle_plugin_common`( args: K2JVMCompilerArguments, - kotlinSources: Set, inputChanges: InputChanges, taskOutputsBackup: TaskOutputsBackup? ) { @@ -182,7 +182,7 @@ abstract class KspTaskJvm @Inject constructor( it(changedFiles) } args.addPluginOptions(extraOptions) - super.callCompilerAsync(args, kotlinSources, inputChanges, taskOutputsBackup) + super.callCompilerAsync(args, inputChanges, taskOutputsBackup) } override fun skipCondition(): Boolean = sources.isEmpty && javaSources.isEmpty @@ -212,7 +212,6 @@ abstract class KspTaskJS @Inject constructor( @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "EXPOSED_PARAMETER_TYPE") fun `callCompilerAsync$kotlin_gradle_plugin_common`( args: K2JSCompilerArguments, - kotlinSources: Set, inputChanges: InputChanges, taskOutputsBackup: TaskOutputsBackup? ) { @@ -221,7 +220,7 @@ abstract class KspTaskJS @Inject constructor( it(changedFiles) } args.addPluginOptions(extraOptions) - super.callCompilerAsync(args, kotlinSources, inputChanges, taskOutputsBackup) + super.callCompilerAsync(args, inputChanges, taskOutputsBackup) } } @@ -241,7 +240,6 @@ abstract class KspTaskMetadata @Inject constructor( @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "EXPOSED_PARAMETER_TYPE") fun `callCompilerAsync$kotlin_gradle_plugin_common`( args: K2MetadataCompilerArguments, - kotlinSources: Set, inputChanges: InputChanges, taskOutputsBackup: TaskOutputsBackup? ) { @@ -250,7 +248,7 @@ abstract class KspTaskMetadata @Inject constructor( it(changedFiles) } args.addPluginOptions(extraOptions) - super.callCompilerAsync(args, kotlinSources, inputChanges, taskOutputsBackup) + super.callCompilerAsync(args, inputChanges, taskOutputsBackup) } } @@ -281,3 +279,7 @@ internal fun File.isParentOf(childCandidate: File): Boolean { return childCandidatePath.startsWith(parentPath) } + +internal fun disableRunViaBuildToolsApi(kspTask: AbstractKotlinCompileTool<*>) { + kspTask.runViaBuildToolsApi.value(false).disallowChanges() +} diff --git a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt index ae67cfc17e..95970ba19c 100644 --- a/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt +++ b/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.google.devtools.ksp.gradle import com.google.devtools.ksp.gradle.model.builder.KspModelBuilder @@ -315,6 +314,7 @@ class KspGradleSubplugin @Inject internal constructor(private val registry: Tool fun configureAsAbstractKotlinCompileTool(kspTask: AbstractKotlinCompileTool<*>) { kspTask.destinationDirectory.set(kspOutputDir) + disableRunViaBuildToolsApi(kspTask) kspTask.outputs.dirs( kotlinOutputDir, javaOutputDir, @@ -427,13 +427,12 @@ class KspGradleSubplugin @Inject internal constructor(private val registry: Tool configureLanguageVersion(kspTask) if (kspTask.classpathSnapshotProperties.useClasspathSnapshot.get() == false) { kspTask.compilerOptions.moduleName.convention( - kotlinCompileTask.moduleName.map { "$it-ksp" } + kotlinCompileTask.compilerOptions.moduleName.map { "$it-ksp" } ) } else { - kspTask.compilerOptions.moduleName.convention(kotlinCompileTask.moduleName) + kspTask.compilerOptions.moduleName.convention(kotlinCompileTask.compilerOptions.moduleName) } - kspTask.moduleName.value(kotlinCompileTask.moduleName.get()) kspTask.destination.value(kspOutputDir) val isIntermoduleIncremental = diff --git a/gradle-plugin/src/test/kotlin/com/google/devtools/ksp/gradle/SourceSetConfigurationsTest.kt b/gradle-plugin/src/test/kotlin/com/google/devtools/ksp/gradle/SourceSetConfigurationsTest.kt index 88044a70c0..e3e74f591d 100644 --- a/gradle-plugin/src/test/kotlin/com/google/devtools/ksp/gradle/SourceSetConfigurationsTest.kt +++ b/gradle-plugin/src/test/kotlin/com/google/devtools/ksp/gradle/SourceSetConfigurationsTest.kt @@ -87,9 +87,6 @@ class SourceSetConfigurationsTest { androidNativeX64(name = "bar") { } } - tasks.withType { - kotlinOptions.freeCompilerArgs += "-Xuse-deprecated-legacy-compiler" - } """.trimIndent() ) testRule.appModule.addMultiplatformSource("commonMain", "Foo.kt", "class Foo") diff --git a/gradle.properties b/gradle.properties index c7445ebe08..1df74d8eac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ # Copied from kotlinc org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx2200m -Dfile.encoding=UTF-8 -kotlinBaseVersion=1.9.0-dev-4392 +kotlinBaseVersion=1.9.0-dev-6976 agpBaseVersion=7.0.0 -intellijVersion=203.8084.24 +intellijVersion=213.7172.25 junitVersion=4.12 googleTruthVersion=1.1 compilerTestEnabled=false diff --git a/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KMPImplementedIT.kt b/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KMPImplementedIT.kt index ba33487226..cdd2686248 100644 --- a/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KMPImplementedIT.kt +++ b/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KMPImplementedIT.kt @@ -5,6 +5,7 @@ import org.gradle.testkit.runner.GradleRunner import org.gradle.testkit.runner.TaskOutcome import org.junit.Assert import org.junit.Assume +import org.junit.Ignore import org.junit.Rule import org.junit.Test import java.io.File @@ -215,6 +216,7 @@ class KMPImplementedIT { } } + @Ignore @Test fun testNonEmbeddableArtifact() { Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true)) diff --git a/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt b/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt index 296bcecfc4..80f8cce60d 100644 --- a/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt +++ b/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt @@ -4,7 +4,6 @@ import org.gradle.testkit.runner.GradleRunner import org.jetbrains.kotlin.cli.common.ExitCode import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler import org.junit.Assert -import org.junit.Ignore import org.junit.Rule import org.junit.Test import java.io.ByteArrayOutputStream @@ -14,7 +13,6 @@ import java.net.URLClassLoader data class CompileResult(val exitCode: ExitCode, val output: String) -@Ignore class KSPCmdLineOptionsIT { @Rule @JvmField diff --git a/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/PlaygroundIT.kt b/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/PlaygroundIT.kt index 9028af6b44..14d8ebdc8e 100644 --- a/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/PlaygroundIT.kt +++ b/integration-tests/src/test/kotlin/com/google/devtools/ksp/test/PlaygroundIT.kt @@ -53,7 +53,7 @@ class PlaygroundIT { fun testConfigurationOfConfiguration() { // FIXME: `clean` fails to delete files on windows. Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows", ignoreCase = true)) - val gradleRunner = GradleRunner.create().withProjectDir(project.root).withGradleVersion("8.0-rc-5") + val gradleRunner = GradleRunner.create().withProjectDir(project.root).withGradleVersion("8.0") gradleRunner.withArguments(":workload:dependencies", "--info").build().let { Assert.assertTrue( it.output.lines().filter { it.startsWith("The configuration :workload:ksp") }.isEmpty() diff --git a/integration-tests/src/test/resources/kmp/annotations/build.gradle.kts b/integration-tests/src/test/resources/kmp/annotations/build.gradle.kts index 28475da37b..14fae99b71 100644 --- a/integration-tests/src/test/resources/kmp/annotations/build.gradle.kts +++ b/integration-tests/src/test/resources/kmp/annotations/build.gradle.kts @@ -26,7 +26,3 @@ kotlin { val commonMain by getting } } - -tasks.withType { - kotlinOptions.freeCompilerArgs += "-Xuse-deprecated-legacy-compiler" -} diff --git a/integration-tests/src/test/resources/kmp/workload-js/build.gradle.kts b/integration-tests/src/test/resources/kmp/workload-js/build.gradle.kts index b0299bf528..7df06173bf 100644 --- a/integration-tests/src/test/resources/kmp/workload-js/build.gradle.kts +++ b/integration-tests/src/test/resources/kmp/workload-js/build.gradle.kts @@ -24,7 +24,3 @@ dependencies { add("kspJs", project(":test-processor")) add("kspJsTest", project(":test-processor")) } - -tasks.withType { - kotlinOptions.freeCompilerArgs += "-Xuse-deprecated-legacy-compiler" -} diff --git a/integration-tests/src/test/resources/kmp/workload/build.gradle.kts b/integration-tests/src/test/resources/kmp/workload/build.gradle.kts index f95a4c4f6e..b555a4d3fd 100644 --- a/integration-tests/src/test/resources/kmp/workload/build.gradle.kts +++ b/integration-tests/src/test/resources/kmp/workload/build.gradle.kts @@ -45,10 +45,6 @@ kotlin { } } -tasks.withType { - kotlinOptions.freeCompilerArgs += "-Xuse-deprecated-legacy-compiler" -} - dependencies { add("kspCommonMainMetadata", project(":test-processor")) add("kspJvm", project(":test-processor")) diff --git a/integration-tests/src/test/resources/playground-mpp/workload/build.gradle.kts b/integration-tests/src/test/resources/playground-mpp/workload/build.gradle.kts index d333ba51b8..27172062d8 100644 --- a/integration-tests/src/test/resources/playground-mpp/workload/build.gradle.kts +++ b/integration-tests/src/test/resources/playground-mpp/workload/build.gradle.kts @@ -29,10 +29,6 @@ kotlin { } } -tasks.withType { - kotlinOptions.freeCompilerArgs += "-Xuse-deprecated-legacy-compiler" -} - ksp { arg("option1", "value1") arg("option2", "value2") diff --git a/kotlin-analysis-api/build.gradle.kts b/kotlin-analysis-api/build.gradle.kts index a5bab55010..94ad1fd973 100644 --- a/kotlin-analysis-api/build.gradle.kts +++ b/kotlin-analysis-api/build.gradle.kts @@ -4,6 +4,7 @@ val intellijVersion: String by project val junitVersion: String by project val kotlinBaseVersion: String by project val libsForTesting by configurations.creating +val libsForTestingCommon by configurations.creating plugins { kotlin("jvm") @@ -65,6 +66,7 @@ dependencies { libsForTesting(kotlin("stdlib", kotlinBaseVersion)) libsForTesting(kotlin("test", kotlinBaseVersion)) libsForTesting(kotlin("script-runtime", kotlinBaseVersion)) + libsForTestingCommon(kotlin("stdlib-common", kotlinBaseVersion)) } tasks.register("CopyLibsForTesting") { @@ -74,6 +76,13 @@ tasks.register("CopyLibsForTesting") { rename("(.+)-$escaped\\.jar", "$1.jar") } +tasks.register("CopyLibsForTestingCommon") { + from(configurations.get("libsForTestingCommon")) + into("dist/common") + val escaped = Regex.escape(kotlinBaseVersion) + rename("(.+)-$escaped\\.jar", "$1.jar") +} + sourceSets.main { java.srcDirs("src/main/kotlin") } @@ -86,6 +95,7 @@ val Project.testSourceSet: SourceSet tasks.test { dependsOn("CopyLibsForTesting") + dependsOn("CopyLibsForTestingCommon") maxHeapSize = "2g" useJUnitPlatform() diff --git a/kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/impl/test/AbstractKSPAATest.kt b/kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/impl/test/AbstractKSPAATest.kt index be28db7907..77e6a783a6 100644 --- a/kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/impl/test/AbstractKSPAATest.kt +++ b/kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/impl/test/AbstractKSPAATest.kt @@ -22,8 +22,9 @@ import com.google.devtools.ksp.impl.CommandLineKSPLogger import com.google.devtools.ksp.impl.KotlinSymbolProcessing import com.google.devtools.ksp.processor.AbstractTestProcessor import com.google.devtools.ksp.testutils.AbstractKSPTest +import com.intellij.openapi.extensions.ExtensionPoint +import org.jetbrains.kotlin.analysis.api.resolve.extensions.KtResolveExtensionProvider import org.jetbrains.kotlin.analysis.api.standalone.buildStandaloneAnalysisAPISession -import org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSessionConfigurator import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoots import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler @@ -145,7 +146,14 @@ abstract class AbstractKSPAATest : AbstractKSPTest(FrontendKinds.FIR) { }.build() val analysisSession = buildStandaloneAnalysisAPISession(withPsiDeclarationFromBinaryModuleProvider = true) { buildKtModuleProviderByCompilerConfiguration(compilerConfiguration) - LLFirSessionConfigurator.registerExtensionPoint(project) + project.extensionArea.apply { + registerExtensionPoint( + KtResolveExtensionProvider.EP_NAME.name, + KtResolveExtensionProvider::class.java.name, + ExtensionPoint.Kind.INTERFACE, + false + ) + } } val ksp = KotlinSymbolProcessing( compilerConfiguration, diff --git a/test-utils/testData/api/parent.kt b/test-utils/testData/api/parent.kt index 5237289b67..0eb975a599 100644 --- a/test-utils/testData/api/parent.kt +++ b/test-utils/testData/api/parent.kt @@ -162,8 +162,6 @@ // parent of Array<(RGB..RGB?)>: Array<(RGB..RGB?)> // parent of Array<(RGB..RGB?)>: values // parent of values: RGB -// parent of java: String -// parent of lang: String // parent of String: String // parent of String: name // parent of name: valueOf