From 80447d5d7c2507bfda28d117b963b17465f35f07 Mon Sep 17 00:00:00 2001 From: Ting-Yuan Huang Date: Mon, 20 Nov 2023 11:45:28 -0800 Subject: [PATCH] UPDATE AA VERSION: 2.0.0-dev-7674 (cherry picked from commit c3b5f728565629f04c771078208f8f9d5417a77b) --- gradle.properties | 2 +- .../com/google/devtools/ksp/impl/KotlinSymbolProcessing.kt | 5 +---- .../impl/symbol/kotlin/synthetic/KSSyntheticAnnotations.kt | 3 ++- .../com/google/devtools/ksp/impl/symbol/kotlin/util.kt | 3 ++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index ade3a0eb14..84854e5542 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ junit5Version=5.8.2 junitPlatformVersion=1.8.2 googleTruthVersion=1.1 -aaKotlinBaseVersion=2.0.0-dev-6573 +aaKotlinBaseVersion=2.0.0-dev-7674 aaIntellijVersion=213.7172.25 aaGuavaVersion=29.0-jre aaAsmVersion=9.0 diff --git a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/KotlinSymbolProcessing.kt b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/KotlinSymbolProcessing.kt index 2f62a889bb..012a321d19 100644 --- a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/KotlinSymbolProcessing.kt +++ b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/KotlinSymbolProcessing.kt @@ -69,8 +69,6 @@ import org.jetbrains.kotlin.analysis.api.standalone.base.project.structure.Stand import org.jetbrains.kotlin.analysis.low.level.api.fir.api.services.FirSealedClassInheritorsProcessorFactory import org.jetbrains.kotlin.analysis.low.level.api.fir.project.structure.LLFirLibrarySymbolProviderFactory import org.jetbrains.kotlin.analysis.project.structure.KtModule -import org.jetbrains.kotlin.analysis.project.structure.KtModuleScopeProvider -import org.jetbrains.kotlin.analysis.project.structure.KtModuleScopeProviderImpl 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 @@ -289,11 +287,10 @@ class KotlinSymbolProcessing( KtAlwaysAccessibleLifeTimeTokenProvider::class.java ) - registerService(KtModuleScopeProvider::class.java, KtModuleScopeProviderImpl()) // Despite being a static implementation, this is only used by IDE tests registerService( KotlinAnnotationsResolverFactory::class.java, - KotlinStaticAnnotationsResolverFactory(ktFiles) + KotlinStaticAnnotationsResolverFactory(project, ktFiles) ) registerService( KotlinResolutionScopeProvider::class.java, diff --git a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/synthetic/KSSyntheticAnnotations.kt b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/synthetic/KSSyntheticAnnotations.kt index 4f46f5aeeb..2b7c03ec9c 100644 --- a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/synthetic/KSSyntheticAnnotations.kt +++ b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/synthetic/KSSyntheticAnnotations.kt @@ -8,5 +8,6 @@ fun getExtensionFunctionTypeAnnotation(index: Int) = KtAnnotationApplicationWith null, null, emptyList(), - index + index, + null ) diff --git a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/util.kt b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/util.kt index 2bc42cff54..9212bcef2d 100644 --- a/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/util.kt +++ b/kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/symbol/kotlin/util.kt @@ -447,11 +447,12 @@ internal fun KtValueParameterSymbol.getDefaultValue(): KtAnnotationValue? { ) (this as? KtFirValueParameterSymbol)?.let { val firSession = it.firSymbol.fir.moduleData.session + val symbolBuilder = it.builder val expectedTypeRef = it.firSymbol.fir.returnTypeRef val expression = defaultValue ?.toFirExpression(firSession, JavaTypeParameterStack.EMPTY, expectedTypeRef) expression?.let { - FirAnnotationValueConverter.toConstantValue(expression, firSession) + FirAnnotationValueConverter.toConstantValue(expression, symbolBuilder) } } }