From a9a89254099e2905f1c66d361d3cf79d199bd8ad Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 24 Aug 2018 22:38:59 +0200 Subject: [PATCH] Revert "Report error on .class files produced by Kotlin 1.3-M1" This reverts commit ba111d58ae76282e19b43f81e8c6c03fe3c8e61e. The reverted commit only makes sense after a bootstrap step after advancing the metadata version, which has not yet happened in master, but did happen in 1.3-M2, where this commit was supposed to end up --- .../jetbrains/kotlin/incremental/CacheVersion.kt | 2 +- .../load/kotlin/DeserializedDescriptorResolver.kt | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/build-common/src/org/jetbrains/kotlin/incremental/CacheVersion.kt b/build-common/src/org/jetbrains/kotlin/incremental/CacheVersion.kt index 7b4ad78c691..e92abb40eeb 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/CacheVersion.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/CacheVersion.kt @@ -23,7 +23,7 @@ import org.jetbrains.kotlin.metadata.jvm.deserialization.JvmMetadataVersion import java.io.File import java.io.IOException -private val NORMAL_VERSION = 10 +private val NORMAL_VERSION = 9 private val DATA_CONTAINER_VERSION = 3 private val NORMAL_VERSION_FILE_NAME = "format-version.txt" diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/DeserializedDescriptorResolver.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/DeserializedDescriptorResolver.kt index c4631194392..a64fd8bcb53 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/DeserializedDescriptorResolver.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/DeserializedDescriptorResolver.kt @@ -84,15 +84,8 @@ class DeserializedDescriptorResolver { * or is run with a released language version. */ private val KotlinJvmBinaryClass.isPreReleaseInvisible: Boolean - get() = (components.configuration.reportErrorsOnPreReleaseDependencies && - (classHeader.isPreRelease || classHeader.metadataVersion == KOTLIN_1_1_EAP_METADATA_VERSION)) || - isCompiledWith13M1 - - // We report pre-release errors on .class files produced by 1.3-M1 even if this compiler is pre-release. This is needed because - // 1.3-M1 did not mangle names of functions mentioning inline classes yet, and we don't want to support this case in the codegen - private val KotlinJvmBinaryClass.isCompiledWith13M1: Boolean - get() = !components.configuration.skipMetadataVersionCheck && - classHeader.isPreRelease && classHeader.metadataVersion == KOTLIN_1_3_M1_METADATA_VERSION + get() = components.configuration.reportErrorsOnPreReleaseDependencies && + (classHeader.isPreRelease || classHeader.metadataVersion == KOTLIN_1_1_EAP_METADATA_VERSION) internal fun readData(kotlinClass: KotlinJvmBinaryClass, expectedKinds: Set): Array? { val header = kotlinClass.classHeader @@ -125,7 +118,5 @@ class DeserializedDescriptorResolver { setOf(KotlinClassHeader.Kind.FILE_FACADE, KotlinClassHeader.Kind.MULTIFILE_CLASS_PART) private val KOTLIN_1_1_EAP_METADATA_VERSION = JvmMetadataVersion(1, 1, 2) - - private val KOTLIN_1_3_M1_METADATA_VERSION = JvmMetadataVersion(1, 1, 11) } }