Consider platform compatibility in library usage index

Logic of module dependencies is enhanced to filter out incompatible
common -> platform dependencies. However the reversed index for getting
all modules that use libraries doesn't take this filtering into
account and returns all modules based exclusively on order entries.
This leads to incorrect library dependency calculation.

^KT-44638 Verification pending
This commit is contained in:
Pavel Kirpichenkov
2021-02-03 17:54:40 +03:00
parent 27dcd07a5e
commit 9f7d7e55da
8 changed files with 58 additions and 3 deletions
@@ -0,0 +1,6 @@
fun checkCloneableIsAbsent(array: Array<String>) {
array.<!UNRESOLVED_REFERENCE!>clone<!>()
}
@<!UNRESOLVED_REFERENCE!>Metadata<!>
class MetaUnresolved
@@ -0,0 +1,10 @@
// See KT-44638
MODULE jvm { platform=[JVM] }
MODULE js { platform=[JS] }
MODULE common { platform=[JVM, JS] }
jvm -> STDLIB_JVM, MOCK_JDK { kind=DEPENDENCY }
js -> STDLIB_JS { kind=DEPENDENCY }
common -> STDLIB_COMMON, STDLIB_JVM { kind=DEPENDENCY }
jvm -> common { kind=DEPENDS_ON }
@@ -0,0 +1,6 @@
fun checkCloneableIsAbsent(array: Array<String>) {
array.<!UNRESOLVED_REFERENCE!>clone<!>()
}
@<!UNRESOLVED_REFERENCE!>Metadata<!>
class MetaUnresolved
@@ -0,0 +1,6 @@
fun checkCloneable(array: Array<String>) {
array.clone()
}
<!EXPLICIT_METADATA_IS_DISALLOWED!>@Metadata<!>
class MetaWithError