Do not expose paths with placeholders in JS IC caches
#KT-31310 Fixed
This commit is contained in:
@@ -752,7 +752,7 @@ open class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
|
||||
|
||||
}
|
||||
|
||||
private fun checkOutputFilesList(outputDir: File = productionOutputDir) {
|
||||
protected fun checkOutputFilesList(outputDir: File = productionOutputDir) {
|
||||
if (!expectedOutputFile.exists()) {
|
||||
expectedOutputFile.writeText("")
|
||||
throw IllegalStateException("$expectedOutputFile did not exist. Created empty file.")
|
||||
|
||||
+17
@@ -36,18 +36,35 @@ import java.io.File
|
||||
|
||||
class KotlinJpsBuildTestIncremental : KotlinJpsBuildTest() {
|
||||
var isICEnabledBackup: Boolean = false
|
||||
var isICEnabledForJsBackup: Boolean = false
|
||||
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
isICEnabledBackup = IncrementalCompilation.isEnabledForJvm()
|
||||
IncrementalCompilation.setIsEnabledForJvm(true)
|
||||
|
||||
isICEnabledForJsBackup = IncrementalCompilation.isEnabledForJs()
|
||||
IncrementalCompilation.setIsEnabledForJs(true)
|
||||
}
|
||||
|
||||
override fun tearDown() {
|
||||
IncrementalCompilation.setIsEnabledForJvm(isICEnabledBackup)
|
||||
IncrementalCompilation.setIsEnabledForJs(isICEnabledForJsBackup)
|
||||
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
fun testKotlinJavaScriptChangePackage() {
|
||||
initProject(LibraryDependency.JS_STDLIB)
|
||||
buildAllModules().assertSuccessful()
|
||||
|
||||
val class2Kt = File(workDir, "src/Class2.kt")
|
||||
val newClass2KtContent = class2Kt.readText().replace("package2", "package1")
|
||||
JpsBuildTestCase.change(class2Kt.path, newClass2KtContent)
|
||||
buildAllModules().assertSuccessful()
|
||||
checkOutputFilesList(File(workDir, "out/production"))
|
||||
}
|
||||
|
||||
fun testRelocatableCaches() {
|
||||
fun buildAndGetMappings(): String {
|
||||
workDir.deleteRecursively()
|
||||
|
||||
Reference in New Issue
Block a user