diff --git a/gradle.properties b/gradle.properties index 751aaa3676..b0c334c3b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # Copied from kotlinc org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx2200m -Dfile.encoding=UTF-8 -kotlinBaseVersion=1.9.20-dev-6963 +kotlinBaseVersion=1.9.20-dev-9102 agpBaseVersion=7.0.0 intellijVersion=213.7172.25 junitVersion=4.13.1 @@ -9,7 +9,7 @@ junit5Version=5.8.2 junitPlatformVersion=1.8.2 googleTruthVersion=1.1 -aaKotlinBaseVersion=1.9.20-dev-6963 +aaKotlinBaseVersion=1.9.20-dev-9102 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 2f583cf5db..94e81975de 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 @@ -78,19 +78,8 @@ import org.jetbrains.kotlin.analysis.project.structure.builder.buildKtSdkModule import org.jetbrains.kotlin.analysis.project.structure.builder.buildKtSourceModule import org.jetbrains.kotlin.analysis.project.structure.impl.KtModuleProviderImpl import org.jetbrains.kotlin.analysis.project.structure.impl.getSourceFilePaths -import org.jetbrains.kotlin.analysis.providers.KotlinAnnotationsResolverFactory -import org.jetbrains.kotlin.analysis.providers.KotlinDeclarationProviderFactory -import org.jetbrains.kotlin.analysis.providers.KotlinDeclarationProviderMerger -import org.jetbrains.kotlin.analysis.providers.KotlinModificationTrackerFactory -import org.jetbrains.kotlin.analysis.providers.KotlinPackageProviderFactory -import org.jetbrains.kotlin.analysis.providers.KotlinPsiDeclarationProviderFactory -import org.jetbrains.kotlin.analysis.providers.KotlinResolutionScopeProvider -import org.jetbrains.kotlin.analysis.providers.PackagePartProviderFactory -import org.jetbrains.kotlin.analysis.providers.impl.KotlinByModulesResolutionScopeProvider -import org.jetbrains.kotlin.analysis.providers.impl.KotlinStaticAnnotationsResolverFactory -import org.jetbrains.kotlin.analysis.providers.impl.KotlinStaticDeclarationProviderMerger -import org.jetbrains.kotlin.analysis.providers.impl.KotlinStaticModificationTrackerFactory -import org.jetbrains.kotlin.analysis.providers.impl.KotlinStaticPsiDeclarationProviderFactory +import org.jetbrains.kotlin.analysis.providers.* +import org.jetbrains.kotlin.analysis.providers.impl.* import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoots import org.jetbrains.kotlin.cli.common.config.kotlinSourceRoots @@ -225,13 +214,11 @@ class KotlinSymbolProcessing( // register services and build session val ktModuleProviderImpl = projectStructureProvider as KtModuleProviderImpl - val modules = ktModuleProviderImpl.mainModules - val allSourceFiles = ktModuleProviderImpl.allSourceFiles() + val modules = ktModuleProviderImpl.allKtModules + val allSourceFiles = ktModuleProviderImpl.allSourceFiles StandaloneProjectFactory.registerServicesForProjectEnvironment( kotlinCoreProjectEnvironment, projectStructureProvider, - modules, - allSourceFiles, ) val ktFiles = allSourceFiles.filterIsInstance() val libraryRoots = StandaloneProjectFactory.getAllBinaryRoots(modules, kotlinCoreProjectEnvironment) @@ -280,6 +267,10 @@ class KotlinSymbolProcessing( ) { val project = kotlinCoreProjectEnvironment.project project.apply { + registerService( + KotlinMessageBusProvider::class.java, + KotlinProjectMessageBusProvider::class.java + ) FirStandaloneServiceRegistrar.registerProjectServices(project) FirStandaloneServiceRegistrar.registerProjectExtensionPoints(project) FirStandaloneServiceRegistrar.registerProjectModelServices( @@ -291,6 +282,10 @@ class KotlinSymbolProcessing( KotlinModificationTrackerFactory::class.java, KotlinStaticModificationTrackerFactory::class.java ) + registerService( + KotlinGlobalModificationService::class.java, + KotlinStaticGlobalModificationService::class.java + ) registerService( KtLifetimeTokenProvider::class.java, KtReadActionConfinementLifetimeTokenProvider::class.java @@ -471,8 +466,7 @@ class KotlinSymbolProcessing( processors.forEach { it.finish() } } else { // Drop caches - KotlinModificationTrackerFactory.getService(project) - .incrementModificationsCount(includeBinaryTrackers = false) + KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification() KtAnalysisSessionProvider.getInstance(project).clearCaches() psiManager.dropResolveCaches() psiManager.dropPsiCaches()