Report error on .class files produced by Kotlin 1.3-M1
Advance incremental cache version to force rebuild after switching from 1.3-M1 to 1.3-M2
This commit is contained in:
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.metadata.jvm.deserialization.JvmMetadataVersion
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
private val NORMAL_VERSION = 9
|
private val NORMAL_VERSION = 10
|
||||||
private val DATA_CONTAINER_VERSION = 3
|
private val DATA_CONTAINER_VERSION = 3
|
||||||
|
|
||||||
private val NORMAL_VERSION_FILE_NAME = "format-version.txt"
|
private val NORMAL_VERSION_FILE_NAME = "format-version.txt"
|
||||||
|
|||||||
+11
-2
@@ -84,8 +84,15 @@ class DeserializedDescriptorResolver {
|
|||||||
* or is run with a released language version.
|
* or is run with a released language version.
|
||||||
*/
|
*/
|
||||||
private val KotlinJvmBinaryClass.isPreReleaseInvisible: Boolean
|
private val KotlinJvmBinaryClass.isPreReleaseInvisible: Boolean
|
||||||
get() = components.configuration.reportErrorsOnPreReleaseDependencies &&
|
get() = (components.configuration.reportErrorsOnPreReleaseDependencies &&
|
||||||
(classHeader.isPreRelease || classHeader.metadataVersion == KOTLIN_1_1_EAP_METADATA_VERSION)
|
(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
|
||||||
|
|
||||||
internal fun readData(kotlinClass: KotlinJvmBinaryClass, expectedKinds: Set<KotlinClassHeader.Kind>): Array<String>? {
|
internal fun readData(kotlinClass: KotlinJvmBinaryClass, expectedKinds: Set<KotlinClassHeader.Kind>): Array<String>? {
|
||||||
val header = kotlinClass.classHeader
|
val header = kotlinClass.classHeader
|
||||||
@@ -118,5 +125,7 @@ class DeserializedDescriptorResolver {
|
|||||||
setOf(KotlinClassHeader.Kind.FILE_FACADE, KotlinClassHeader.Kind.MULTIFILE_CLASS_PART)
|
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_1_EAP_METADATA_VERSION = JvmMetadataVersion(1, 1, 2)
|
||||||
|
|
||||||
|
private val KOTLIN_1_3_M1_METADATA_VERSION = JvmMetadataVersion(1, 1, 11)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user