Move common classes to new :core:deserialization:deserialization.common module
This commit is contained in:
@@ -270,6 +270,7 @@ extra["compilerModules"] = arrayOf(
|
||||
":core:descriptors.jvm",
|
||||
":core:descriptors.runtime",
|
||||
":core:deserialization",
|
||||
":core:deserialization:deserialization.common",
|
||||
":core:util.runtime",
|
||||
":core:type-system",
|
||||
":compiler:fir:cones",
|
||||
|
||||
@@ -7,6 +7,7 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
api(project(":compiler:fir:cones"))
|
||||
api(project(":core:deserialization:deserialization.common"))
|
||||
compile(project(":compiler:resolution"))
|
||||
compile(project(":compiler:frontend.common"))
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ runtimeOnly.extendsFrom(compileOnly)
|
||||
|
||||
dependencies {
|
||||
compile(project(":compiler:frontend.common"))
|
||||
implementation(project(":core:deserialization:deserialization.common"))
|
||||
compile(project(":core:descriptors"))
|
||||
compile(project(":compiler:fir:cones"))
|
||||
compile(project(":compiler:resolution"))
|
||||
|
||||
@@ -10,6 +10,7 @@ dependencies {
|
||||
compile(project(":core:metadata"))
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(project(":core:descriptors"))
|
||||
compile(project(":core:deserialization:deserialization.common"))
|
||||
compile(commonDep("javax.inject"))
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
jvmTarget = "1.6"
|
||||
javaHome = rootProject.extra["JDK_16"] as String
|
||||
|
||||
dependencies {
|
||||
compile(project(":core:metadata"))
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(project(":core:descriptors"))
|
||||
compile(commonDep("javax.inject"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.serialization.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.metadata.deserialization.BinaryVersion
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
|
||||
data class IncompatibleVersionErrorData<out T : BinaryVersion>(
|
||||
val actualVersion: T,
|
||||
val expectedVersion: T,
|
||||
val filePath: String,
|
||||
val classId: ClassId
|
||||
)
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.serialization.deserialization.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
import org.jetbrains.kotlin.serialization.deserialization.IncompatibleVersionErrorData
|
||||
|
||||
interface DeserializedContainerSource : SourceElement {
|
||||
// Non-null if this container is loaded from a class with an incompatible binary version
|
||||
val incompatibility: IncompatibleVersionErrorData<*>?
|
||||
|
||||
// True iff this is container is "invisible" because it's loaded from a pre-release class and this compiler is a release
|
||||
val isPreReleaseInvisible: Boolean
|
||||
|
||||
// True iff this container was compiled by the new IR backend, this compiler is not using the IR backend right now,
|
||||
// and no additional flags to override this behavior were specified.
|
||||
val isInvisibleIrDependency: Boolean
|
||||
|
||||
// This string should only be used in error messages
|
||||
val presentableString: String
|
||||
}
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.serialization.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.metadata.deserialization.BinaryVersion
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
|
||||
data class IncompatibleVersionErrorData<out T : BinaryVersion>(
|
||||
val actualVersion: T,
|
||||
val expectedVersion: T,
|
||||
val filePath: String,
|
||||
val classId: ClassId
|
||||
)
|
||||
-15
@@ -45,21 +45,6 @@ interface DeserializedMemberDescriptor : DeserializedDescriptor, MemberDescripto
|
||||
}
|
||||
}
|
||||
|
||||
interface DeserializedContainerSource : SourceElement {
|
||||
// Non-null if this container is loaded from a class with an incompatible binary version
|
||||
val incompatibility: IncompatibleVersionErrorData<*>?
|
||||
|
||||
// True iff this is container is "invisible" because it's loaded from a pre-release class and this compiler is a release
|
||||
val isPreReleaseInvisible: Boolean
|
||||
|
||||
// True iff this container was compiled by the new IR backend, this compiler is not using the IR backend right now,
|
||||
// and no additional flags to override this behavior were specified.
|
||||
val isInvisibleIrDependency: Boolean
|
||||
|
||||
// This string should only be used in error messages
|
||||
val presentableString: String
|
||||
}
|
||||
|
||||
interface DeserializedCallableMemberDescriptor : DeserializedMemberDescriptor, CallableMemberDescriptor
|
||||
|
||||
class DeserializedSimpleFunctionDescriptor(
|
||||
|
||||
@@ -52,6 +52,7 @@ dependencies {
|
||||
embedded(project(":core:descriptors.common"))
|
||||
embedded(project(":core:descriptors.jvm"))
|
||||
embedded(project(":core:deserialization"))
|
||||
embedded(project(":core:deserialization:deserialization.common"))
|
||||
embedded(project(":core:descriptors.runtime"))
|
||||
embedded(project(":core:util.runtime"))
|
||||
embedded("javax.inject:javax.inject:1")
|
||||
@@ -163,6 +164,7 @@ val relocateCoreSources by task<Copy> {
|
||||
from("$core/descriptors.jvm/src")
|
||||
from("$core/descriptors.runtime/src")
|
||||
from("$core/deserialization/src")
|
||||
from("$core/deserialization/deserialization.common/src")
|
||||
from("$core/util.runtime/src")
|
||||
|
||||
exclude("META-INF/services/**")
|
||||
|
||||
+18
-16
@@ -85,22 +85,6 @@ include ":benchmarks",
|
||||
":compiler:visualizer:common",
|
||||
":compiler:visualizer:render-fir",
|
||||
":compiler:visualizer:render-psi",
|
||||
":compiler:fir:cones",
|
||||
":compiler:fir:tree",
|
||||
":compiler:fir:tree:tree-generator",
|
||||
":compiler:fir:raw-fir:fir-common",
|
||||
":compiler:fir:raw-fir:psi2fir",
|
||||
":compiler:fir:raw-fir:light-tree2fir",
|
||||
":compiler:fir:fir2ir",
|
||||
":compiler:fir:fir2ir:jvm-backend",
|
||||
":compiler:fir:resolve",
|
||||
":compiler:fir:fir-serialization",
|
||||
":compiler:fir:java",
|
||||
":compiler:fir:modularized-tests",
|
||||
":compiler:fir:dump",
|
||||
":compiler:fir:jvm",
|
||||
":compiler:fir:checkers",
|
||||
":compiler:fir:analysis-tests",
|
||||
":compiler:frontend",
|
||||
":compiler:frontend.common",
|
||||
":compiler:frontend.java",
|
||||
@@ -154,6 +138,7 @@ include ":benchmarks",
|
||||
":core:type-system",
|
||||
":core:descriptors.jvm",
|
||||
":core:deserialization",
|
||||
":core:deserialization:deserialization.common",
|
||||
":core:descriptors.runtime",
|
||||
":core:metadata",
|
||||
":core:metadata.jvm",
|
||||
@@ -312,6 +297,23 @@ include ":benchmarks",
|
||||
":kotlin-serialization",
|
||||
":kotlin-serialization-unshaded"
|
||||
|
||||
include ":compiler:fir:cones",
|
||||
":compiler:fir:tree",
|
||||
":compiler:fir:tree:tree-generator",
|
||||
":compiler:fir:raw-fir:fir-common",
|
||||
":compiler:fir:raw-fir:psi2fir",
|
||||
":compiler:fir:raw-fir:light-tree2fir",
|
||||
":compiler:fir:fir2ir",
|
||||
":compiler:fir:fir2ir:jvm-backend",
|
||||
":compiler:fir:resolve",
|
||||
":compiler:fir:fir-serialization",
|
||||
":compiler:fir:java",
|
||||
":compiler:fir:modularized-tests",
|
||||
":compiler:fir:dump",
|
||||
":compiler:fir:jvm",
|
||||
":compiler:fir:checkers",
|
||||
":compiler:fir:analysis-tests"
|
||||
|
||||
include ":idea:idea-frontend-fir:idea-fir-low-level-api"
|
||||
|
||||
include ":prepare:ide-plugin-dependencies:android-extensions-compiler-plugin-for-ide",
|
||||
|
||||
Reference in New Issue
Block a user