[JS IR] Invalidate all klib dependencies after removing it

Without the invalidation, broken JS code
 (with broken cross-module references) may appear.

 ^KT-54911 Fixed
This commit is contained in:
Alexander Korepanov
2022-11-21 15:50:52 +01:00
committed by Space Team
parent ca19d71a00
commit 693258ae91
41 changed files with 402 additions and 150 deletions
@@ -0,0 +1 @@
fun foo() = 1
@@ -0,0 +1 @@
inline fun foo() = 2
@@ -0,0 +1,12 @@
STEP 0:
STEP 1:
modifications:
U : l1.1.kt -> l1.kt
added file: l1.kt
STEP 2:
modifications:
U : l1.2.kt -> l1.kt
modified ir: l1.kt
STEP 3:
removed file: l1.kt
STEP 4..5:
@@ -0,0 +1 @@
fun foo() = 0
@@ -0,0 +1 @@
fun foo() = 3
@@ -0,0 +1 @@
inline fun foo() = 4
@@ -0,0 +1 @@
inline fun foo() = 5
@@ -0,0 +1,19 @@
STEP 0:
modifications:
U : l1.0.kt -> l1.kt
added file: l1.kt
STEP 1:
removed file: l1.kt
STEP 2:
STEP 3:
modifications:
U : l1.3.kt -> l1.kt
added file: l1.kt
STEP 4:
modifications:
U : l1.4.kt -> l1.kt
modified ir: l1.kt
STEP 5:
modifications:
U : l1.5.kt -> l1.kt
modified ir: l1.kt
@@ -0,0 +1,7 @@
fun box(stepId: Int): String {
val x = foo()
if (x != stepId) {
return "Fail: $x != $stepId"
}
return "OK"
}
@@ -0,0 +1,15 @@
STEP 0:
dependencies: lib1
added file: m.kt
STEP 1:
dependencies: lib1-new
removed direct depends: m.kt
STEP 2:
dependencies: lib1-new
updated imports: m.kt
STEP 3:
dependencies: lib1
removed direct depends: m.kt
STEP 4..5:
dependencies: lib1
updated imports: m.kt
@@ -0,0 +1,11 @@
MODULES: lib1, lib1-new, main
STEP 0:
libs: lib1, main
dirty js: lib1, main
STEP 1..2:
libs: lib1-new, main
dirty js: lib1-new, main
STEP 3..5:
libs: lib1, main
dirty js: lib1, main