[JS IR] Ignore unbound symbols in IC infrastructure
The IR linker is responsible for detecting unbound symbols, if it skips them for some reason, IC infrastructure must not fail with unbound symbols exceptions. Anyway, the IR validator verifies later if there are unbound symbols in reachable IR and generates the corresponding error. ^KT-56602 Fixed
This commit is contained in:
committed by
Space Team
parent
ff22f456a0
commit
3c9d653595
+3
-6
@@ -43,6 +43,7 @@ class Kotlin2JsIrBeIncrementalCompilationIT : KGPBaseTest() {
|
||||
}
|
||||
|
||||
val srcFile = projectPath.resolve("app/src/main/kotlin/App.kt").toFile()
|
||||
val guardFile = projectPath.resolve("app/build/klib/cache/cache.guard").toFile()
|
||||
val badCode = srcFile.readText()
|
||||
|
||||
var successfulBuildCacheFiles = emptyMap<String, Int>()
|
||||
@@ -56,15 +57,10 @@ class Kotlin2JsIrBeIncrementalCompilationIT : KGPBaseTest() {
|
||||
|
||||
srcFile.writeText(badCode)
|
||||
|
||||
val guardFile = projectPath.resolve("app/build/klib/cache/cache.guard").toFile()
|
||||
for (i in 0..1) {
|
||||
buildAndFail("nodeDevelopmentRun") {
|
||||
assertTasksFailed(":app:compileDevelopmentExecutableKotlinJs")
|
||||
val failedBuildCacheFiles = readCacheFiles()
|
||||
val expectedFiles = successfulBuildCacheFiles.toMutableMap()
|
||||
expectedFiles[guardFile.absolutePath] = ByteArray(0).contentHashCode()
|
||||
assertEquals(expectedFiles, failedBuildCacheFiles, "The cache files should not be modified")
|
||||
guardFile.delete()
|
||||
assertTrue("guard file after compilation error expected") { guardFile.exists() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +71,7 @@ class Kotlin2JsIrBeIncrementalCompilationIT : KGPBaseTest() {
|
||||
val successfulRebuildCacheFiles = readCacheFiles()
|
||||
assertEquals(successfulBuildCacheFiles.size, successfulRebuildCacheFiles.size, "The number of files must be the same")
|
||||
assertNotEquals(successfulBuildCacheFiles, successfulRebuildCacheFiles, "The cache files should be modified")
|
||||
assertFalse("guard file after successful compilation must be removed") { guardFile.exists() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user