Skip to content

Commit

Permalink
UPDATE AA VERSION: 2.0.0-dev-14242
Browse files Browse the repository at this point in the history
annotationInDependencies is disabled in KSP2 which incorrectly adds
@ValueParameterTarget(...) on a constructor parameter to its
corresponding property.
  • Loading branch information
ting-yuan committed Feb 5, 2024
1 parent c2210ea commit 42217b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ junit5Version=5.8.2
junitPlatformVersion=1.8.2
googleTruthVersion=1.1

aaKotlinBaseVersion=2.0.0-dev-12830
aaKotlinBaseVersion=2.0.0-dev-14242
aaIntellijVersion=213.7172.25
aaGuavaVersion=29.0-jre
aaAsmVersion=9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import com.intellij.openapi.util.Disposer
import com.intellij.openapi.vfs.StandardFileSystems
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.openapi.vfs.impl.jar.CoreJarFileSystem
import com.intellij.psi.PsiFileSystemItem
import com.intellij.psi.PsiJavaFile
import com.intellij.psi.PsiManager
Expand All @@ -71,11 +70,9 @@ import org.jetbrains.kotlin.analysis.api.standalone.base.project.structure.KtSta
import org.jetbrains.kotlin.analysis.api.standalone.base.project.structure.LLFirStandaloneLibrarySymbolProviderFactory
import org.jetbrains.kotlin.analysis.api.standalone.base.project.structure.StandaloneProjectFactory
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.getFirResolveSession
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.services.FirSealedClassInheritorsProcessorFactory
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.services.LLSealedInheritorsProviderFactory
import org.jetbrains.kotlin.analysis.low.level.api.fir.project.structure.LLFirLibrarySymbolProviderFactory
import org.jetbrains.kotlin.analysis.project.structure.KtBinaryModule
import org.jetbrains.kotlin.analysis.project.structure.KtModule
import org.jetbrains.kotlin.analysis.project.structure.allDirectDependencies
import org.jetbrains.kotlin.analysis.project.structure.builder.KtModuleBuilder
import org.jetbrains.kotlin.analysis.project.structure.builder.KtModuleProviderBuilder
import org.jetbrains.kotlin.analysis.project.structure.builder.buildKtSdkModule
Expand Down Expand Up @@ -262,12 +259,7 @@ class KotlinSymbolProcessing(
kotlinCoreProjectEnvironment.project.apply {
registerService(
KotlinPsiDeclarationProviderFactory::class.java,
KotlinStaticPsiDeclarationProviderFactory(
this,
ktModuleProviderImpl.allKtModules.flatMap { it.allDirectDependencies() }
.filterIsInstance<KtBinaryModule>(),
kotlinCoreProjectEnvironment.environment.jarFileSystem as CoreJarFileSystem
)
KotlinStaticPsiDeclarationProviderFactory(this)
)
}

Expand Down Expand Up @@ -343,9 +335,9 @@ class KotlinSymbolProcessing(
registerService(KotlinPackageProviderFactory::class.java, IncrementalKotlinPackageProviderFactory(project))

registerService(
FirSealedClassInheritorsProcessorFactory::class.java,
object : FirSealedClassInheritorsProcessorFactory() {
override fun createSealedClassInheritorsProvider(): SealedClassInheritorsProvider {
LLSealedInheritorsProviderFactory::class.java,
object : LLSealedInheritorsProviderFactory {
override fun createSealedInheritorsProvider(): SealedClassInheritorsProvider {
return SealedClassInheritorsProviderImpl
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class KSPAATest : AbstractKSPAATest() {
runTest("../test-utils/testData/api/allFunctions_kt_inherits_java.kt")
}

@Disabled
@TestMetadata("annotationInDependencies.kt")
@Test
fun testAnnotationsInDependencies() {
Expand Down

0 comments on commit 42217b8

Please sign in to comment.