diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2023-07-18 22:33:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 22:33:24 +0300 |
commit | 19d287f288fdb19b510ab24b9dae80c04db88ede (patch) | |
tree | 9093044c6f0d02aaa80a011b189c0ceadc853ba8 | |
parent | 298065f1595e53f44ac63114fbb95d9caaaf9e8f (diff) | |
download | dokka-19d287f288fdb19b510ab24b9dae80c04db88ede.tar.gz dokka-19d287f288fdb19b510ab24b9dae80c04db88ede.tar.bz2 dokka-19d287f288fdb19b510ab24b9dae80c04db88ede.zip |
Update Kotlin compiler to 1.8.20 (#3062)
11 files changed, 89 insertions, 95 deletions
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2e7365c2..4f7f1772 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,9 +8,7 @@ kotlinx-coroutines = "1.6.3" kotlinx-bcv = "0.12.1" ## Analysis -kotlin-compiler = "1.8.10" -kotlin-ide-plugin = "213-1.8.10-release-430-IJ6777.52" -kotlin-jps-common = "213-1.6.21-release-334-IJ6777.52" # TODO [beresnev] not sure which version should be used exactly +kotlin-compiler = "1.8.20" # MUST match the version of the intellij platform used in the kotlin compiler, # otherwise this will lead to different versions of psi API and implementations diff --git a/subprojects/analysis-kotlin-descriptors/compiler/api/compiler.api b/subprojects/analysis-kotlin-descriptors/compiler/api/compiler.api index 0ad66c33..7d53418f 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/api/compiler.api +++ b/subprojects/analysis-kotlin-descriptors/compiler/api/compiler.api @@ -39,7 +39,7 @@ public final class org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDoc } public abstract interface class org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService { - public abstract fun createPackageFragmentProvider (Lorg/jetbrains/kotlin/library/KotlinLibrary;Lorg/jetbrains/kotlin/storage/StorageManager;Lorg/jetbrains/kotlin/backend/common/serialization/metadata/KlibMetadataModuleDescriptorFactory;Lorg/jetbrains/kotlin/config/LanguageVersionSettings;Lorg/jetbrains/kotlin/descriptors/ModuleDescriptor;Lorg/jetbrains/kotlin/incremental/components/LookupTracker;)Lorg/jetbrains/kotlin/descriptors/PackageFragmentProvider; + public abstract fun createPackageFragmentProvider (Lorg/jetbrains/kotlin/library/KotlinLibrary;Lorg/jetbrains/kotlin/storage/StorageManager;Lorg/jetbrains/kotlin/library/metadata/KlibMetadataModuleDescriptorFactory;Lorg/jetbrains/kotlin/config/LanguageVersionSettings;Lorg/jetbrains/kotlin/descriptors/ModuleDescriptor;Lorg/jetbrains/kotlin/incremental/components/LookupTracker;)Lorg/jetbrains/kotlin/descriptors/PackageFragmentProvider; public abstract fun isAnalysisCompatible (Lorg/jetbrains/kotlin/library/KotlinLibrary;)Z } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt index ceb5536a..35b577fd 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt @@ -1,7 +1,7 @@ package org.jetbrains.dokka.analysis.kotlin.descriptors.compiler import org.jetbrains.dokka.InternalDokkaApi -import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataModuleDescriptorFactory +import org.jetbrains.kotlin.library.metadata.KlibMetadataModuleDescriptorFactory import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentProvider diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt index 0fb07412..ed9d887d 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt @@ -20,7 +20,6 @@ import com.intellij.psi.search.GlobalSearchScope import org.jetbrains.dokka.InternalDokkaApi import org.jetbrains.dokka.Platform import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.AnalysisContextCreator -import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.CompilerExtensionPointProvider import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.KLibService import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.MockApplicationHack import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.configuration.resolve.* @@ -49,7 +48,6 @@ import org.jetbrains.kotlin.context.ProjectContext import org.jetbrains.kotlin.context.withModule import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl -import org.jetbrains.kotlin.extensions.ApplicationExtensionDescriptor import org.jetbrains.kotlin.js.config.JSConfigurationKeys import org.jetbrains.kotlin.js.resolve.JsPlatformAnalyzerServices import org.jetbrains.kotlin.library.KLIB_FILE_EXTENSION @@ -345,22 +343,23 @@ class AnalysisEnvironment( moduleInfo: ModuleInfo ): ResolverForModule = CommonResolverForModuleFactory( - CommonAnalysisParameters( - metadataPartProviderFactory = { content -> - environment.createPackagePartProvider(content.moduleContentScope) - } - ), - CompilerEnvironment, - unspecifiedJvmPlatform, - true, - dependencyContainer - ).createResolverForModule( - descriptor as ModuleDescriptorImpl, - projectContext.withModule(descriptor), - modulesContent(moduleInfo), - this, - LanguageVersionSettingsImpl.DEFAULT, - CliSealedClassInheritorsProvider, + CommonAnalysisParameters( + metadataPartProviderFactory = { content -> + environment.createPackagePartProvider(content.moduleContentScope) + } + ), + CompilerEnvironment, + unspecifiedJvmPlatform, + true, + dependencyContainer + ).createResolverForModule( + moduleDescriptor = descriptor as ModuleDescriptorImpl, + moduleContext = projectContext.withModule(descriptor), + moduleContent = modulesContent(moduleInfo), + resolverForProject = this, + languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, + sealedInheritorsProvider = CliSealedClassInheritorsProvider, + resolveOptimizingOptions = null ) override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null @@ -382,12 +381,13 @@ class AnalysisEnvironment( descriptor: ModuleDescriptor, moduleInfo: ModuleInfo ): ResolverForModule = DokkaJsResolverForModuleFactory(CompilerEnvironment, kLibService).createResolverForModule( - descriptor as ModuleDescriptorImpl, - projectContext.withModule(descriptor), - modulesContent(moduleInfo), - this, - LanguageVersionSettingsImpl.DEFAULT, - CliSealedClassInheritorsProvider, + moduleDescriptor = descriptor as ModuleDescriptorImpl, + moduleContext = projectContext.withModule(descriptor), + moduleContent = modulesContent(moduleInfo), + resolverForProject = this, + languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, + sealedInheritorsProvider = CliSealedClassInheritorsProvider, + resolveOptimizingOptions = null ) override fun builtInsForModule(module: ModuleInfo): KotlinBuiltIns = DefaultBuiltIns.Instance @@ -413,12 +413,13 @@ class AnalysisEnvironment( ): ResolverForModule { return DokkaNativeResolverForModuleFactory(CompilerEnvironment, kLibService).createResolverForModule( - descriptor as ModuleDescriptorImpl, - projectContext.withModule(descriptor), - modulesContent(moduleInfo), - this, - LanguageVersionSettingsImpl.DEFAULT, - CliSealedClassInheritorsProvider, + moduleDescriptor = descriptor as ModuleDescriptorImpl, + moduleContext = projectContext.withModule(descriptor), + moduleContent = modulesContent(moduleInfo), + resolverForProject = this, + languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, + sealedInheritorsProvider = CliSealedClassInheritorsProvider, + resolveOptimizingOptions = null ) } @@ -463,32 +464,33 @@ class AnalysisEnvironment( descriptor: ModuleDescriptor, moduleInfo: ModuleInfo ): ResolverForModule = JvmResolverForModuleFactory( - JvmPlatformParameters(packagePartProviderFactory = { content -> - JvmPackagePartProvider( - configuration.languageVersionSettings, - content.moduleContentScope - ) - .apply { - addRoots(javaRoots, messageCollector) - } - }, moduleByJavaClass = { - val file = - (it as? BinaryJavaClass)?.virtualFile ?: (it as JavaClassImpl).psi.containingFile.virtualFile - if (file in sourcesScope) - module - else - library - }, resolverForReferencedModule = null, - useBuiltinsProviderForModule = { false }), - CompilerEnvironment, - unspecifiedJvmPlatform - ).createResolverForModule( - descriptor as ModuleDescriptorImpl, - projectContext.withModule(descriptor), - modulesContent(moduleInfo), - this, - configuration.languageVersionSettings, - CliSealedClassInheritorsProvider, + JvmPlatformParameters(packagePartProviderFactory = { content -> + JvmPackagePartProvider( + configuration.languageVersionSettings, + content.moduleContentScope + ) + .apply { + addRoots(javaRoots, messageCollector) + } + }, moduleByJavaClass = { + val file = + (it as? BinaryJavaClass)?.virtualFile ?: (it as JavaClassImpl).psi.containingFile.virtualFile + if (file in sourcesScope) + module + else + library + }, resolverForReferencedModule = null, + useBuiltinsProviderForModule = { false }), + CompilerEnvironment, + unspecifiedJvmPlatform + ).createResolverForModule( + moduleDescriptor = descriptor as ModuleDescriptorImpl, + moduleContext = projectContext.withModule(descriptor), + moduleContent = modulesContent(moduleInfo), + resolverForProject = this, + languageVersionSettings = configuration.languageVersionSettings, + sealedInheritorsProvider = CliSealedClassInheritorsProvider, + resolveOptimizingOptions = null ) override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null @@ -528,7 +530,14 @@ class AnalysisEnvironment( } // Set up JDK classpath roots explicitly because of https://github.com/JetBrains/kotlin/commit/f89765eb33dd95c8de33a919cca83651b326b246 - internal fun configureJdkClasspathRoots() = configuration.configureJdkClasspathRoots() + internal fun configureJdkClasspathRoots() { + val jdkHome = File(System.getProperty("java.home")) + if (!jdkHome.exists()) { + messageCollector.report(CompilerMessageSeverity.WARNING, "Set existed java.home to use JDK") + } + configuration.put(JVMConfigurationKeys.JDK_HOME, jdkHome) + configuration.configureJdkClasspathRoots() // only non-nodular JDK + } /** * Adds path to classpath. * $path: path to add @@ -573,23 +582,6 @@ class AnalysisEnvironment( Disposer.dispose(this) } - private companion object { - private fun <T : Any> registerExtensionPoint( - appExtension: ApplicationExtensionDescriptor<T>, - instances: List<T>, - disposable: Disposable - ) { - @Suppress("DEPRECATION") - val extensionArea = Extensions.getRootArea() - - if (extensionArea.hasExtensionPoint(appExtension.extensionPointName)) { - return - } - - appExtension.registerExtensionPoint() - instances.forEach { extension -> appExtension.registerExtension(extension, disposable) } - } - } } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt index b409441b..bb6148ad 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaJsResolverForModuleFactory.kt @@ -13,7 +13,7 @@ import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.frontend.di.createContainerForLazyResolve import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.js.resolve.JsPlatformAnalyzerServices -import org.jetbrains.kotlin.konan.util.KlibMetadataFactories +import org.jetbrains.kotlin.library.metadata.KlibMetadataFactories import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer import org.jetbrains.kotlin.resolve.SealedClassInheritorsProvider import org.jetbrains.kotlin.resolve.TargetEnvironment @@ -22,7 +22,8 @@ import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactory import org.jetbrains.kotlin.serialization.js.DynamicTypeDeserializer import org.jetbrains.kotlin.serialization.js.KotlinJavascriptSerializationUtil import org.jetbrains.kotlin.serialization.js.createKotlinJavascriptPackageFragmentProvider -import org.jetbrains.kotlin.serialization.konan.impl.KlibMetadataModuleDescriptorFactoryImpl +import org.jetbrains.kotlin.library.metadata.impl.KlibMetadataModuleDescriptorFactoryImpl +import org.jetbrains.kotlin.resolve.scopes.optimization.OptimizingOptions import org.jetbrains.kotlin.utils.KotlinJavascriptMetadataUtils import java.io.File @@ -48,7 +49,8 @@ internal class DokkaJsResolverForModuleFactory( moduleContent: ModuleContent<M>, resolverForProject: ResolverForProject<M>, languageVersionSettings: LanguageVersionSettings, - sealedInheritorsProvider: SealedClassInheritorsProvider + sealedInheritorsProvider: SealedClassInheritorsProvider, + resolveOptimizingOptions: OptimizingOptions? ): ResolverForModule { val declarationProviderFactory = DeclarationProviderFactoryService.createDeclarationProviderFactory( moduleContext.project, @@ -110,7 +112,7 @@ internal class DokkaJsResolverForModuleFactory( emptyList() } } - .filter { it.version.isCompatible() } + .filter { it.version.isCompatibleWithCurrentCompilerVersion() } .map { metadata -> val (header, packageFragmentProtos) = KotlinJavascriptSerializationUtil.readModuleAsProto(metadata.body, metadata.version) diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt index 95f5486d..bd4da5ac 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaKlibMetadataCommonDependencyContainer.kt @@ -8,16 +8,16 @@ import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentProvider import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl -import org.jetbrains.kotlin.descriptors.konan.DeserializedKlibModuleOrigin +import org.jetbrains.kotlin.library.metadata.DeserializedKlibModuleOrigin import org.jetbrains.kotlin.incremental.components.LookupTracker -import org.jetbrains.kotlin.konan.util.KlibMetadataFactories +import org.jetbrains.kotlin.library.metadata.KlibMetadataFactories import org.jetbrains.kotlin.library.KotlinLibrary import org.jetbrains.kotlin.library.metadata.NativeTypeTransformer import org.jetbrains.kotlin.library.metadata.NullFlexibleTypeDeserializer import org.jetbrains.kotlin.library.metadata.parseModuleHeader import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.resolve.CompilerDeserializationConfiguration -import org.jetbrains.kotlin.serialization.konan.impl.KlibMetadataModuleDescriptorFactoryImpl +import org.jetbrains.kotlin.library.metadata.impl.KlibMetadataModuleDescriptorFactoryImpl import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.storage.StorageManager diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt index 526815d3..8895296c 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeKlibLibraryInfo.kt @@ -2,8 +2,8 @@ package org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.configuration.r import org.jetbrains.kotlin.analyzer.ModuleInfo import org.jetbrains.kotlin.descriptors.ModuleCapability -import org.jetbrains.kotlin.descriptors.konan.DeserializedKlibModuleOrigin -import org.jetbrains.kotlin.descriptors.konan.KlibModuleOrigin +import org.jetbrains.kotlin.library.metadata.DeserializedKlibModuleOrigin +import org.jetbrains.kotlin.library.metadata.KlibModuleOrigin import org.jetbrains.kotlin.library.KotlinLibrary import org.jetbrains.kotlin.library.isInterop import org.jetbrains.kotlin.library.shortName diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt index db86b82f..ff1eb491 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/resolve/DokkaNativeResolverForModuleFactory.kt @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.descriptors.impl.CompositePackageFragmentProvider import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.frontend.di.createContainerForLazyResolve import org.jetbrains.kotlin.incremental.components.LookupTracker -import org.jetbrains.kotlin.konan.util.KlibMetadataFactories +import org.jetbrains.kotlin.library.metadata.KlibMetadataFactories import org.jetbrains.kotlin.library.metadata.NullFlexibleTypeDeserializer import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer import org.jetbrains.kotlin.resolve.SealedClassInheritorsProvider @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.resolve.TargetEnvironment import org.jetbrains.kotlin.resolve.konan.platform.NativePlatformAnalyzerServices import org.jetbrains.kotlin.resolve.lazy.ResolveSession import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactoryService +import org.jetbrains.kotlin.resolve.scopes.optimization.OptimizingOptions /** TODO: replace by [NativeResolverForModuleFactory] after fix of KT-40734 */ internal class DokkaNativeResolverForModuleFactory( @@ -34,7 +35,8 @@ internal class DokkaNativeResolverForModuleFactory( moduleContent: ModuleContent<M>, resolverForProject: ResolverForProject<M>, languageVersionSettings: LanguageVersionSettings, - sealedInheritorsProvider: SealedClassInheritorsProvider + sealedInheritorsProvider: SealedClassInheritorsProvider, + resolveOptimizingOptions: OptimizingOptions? ): ResolverForModule { val declarationProviderFactory = DeclarationProviderFactoryService.createDeclarationProviderFactory( diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt index a0416375..47fefe11 100644 --- a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt +++ b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeKLibService.kt @@ -1,7 +1,7 @@ package org.jetbrains.dokka.analysis.kotlin.descriptors.ide import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.KLibService -import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataModuleDescriptorFactory +import org.jetbrains.kotlin.library.metadata.KlibMetadataModuleDescriptorFactory import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentProvider diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt index 9f94f249..4923534d 100644 --- a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt +++ b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibCompatibilityInfo.kt @@ -5,8 +5,8 @@ package org.jetbrains.kotlin.idea.klib import org.jetbrains.kotlin.library.* -import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataVersion -import org.jetbrains.kotlin.backend.common.serialization.metadata.metadataVersion +import org.jetbrains.kotlin.library.metadata.KlibMetadataVersion +import org.jetbrains.kotlin.library.metadata.metadataVersion import java.io.IOException /** @@ -30,7 +30,7 @@ internal val KotlinLibrary.compatibilityInfo: KlibCompatibilityInfo if (hasPre14Manifest) return KlibCompatibilityInfo.Pre14Layout - val metadataVersion = safeRead(null) { metadataVersion } + val metadataVersion = safeRead(null) { this.metadataVersion } @Suppress("DEPRECATION") return when { metadataVersion == null -> { diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt index 9740e8bc..55c615f6 100644 --- a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt +++ b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/kotlin/idea/klib/KlibLoadingMetadataCache.kt @@ -9,7 +9,7 @@ import org.jetbrains.kotlin.library.KLIB_MANIFEST_FILE_NAME import org.jetbrains.kotlin.library.KLIB_METADATA_FILE_EXTENSION import org.jetbrains.kotlin.library.KLIB_MODULE_METADATA_FILE_NAME import org.jetbrains.kotlin.library.metadata.KlibMetadataProtoBuf -import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataVersion +import org.jetbrains.kotlin.library.metadata.KlibMetadataVersion import org.jetbrains.kotlin.library.metadata.parseModuleHeader import org.jetbrains.kotlin.library.metadata.parsePackageFragment import org.jetbrains.kotlin.library.readKonanLibraryVersioning |