@@ -224,7 +224,7 @@ public class KotlinBuilder extends ModuleLevelBuilder {
|
|||||||
try {
|
try {
|
||||||
for (ModuleBuildTarget target : chunk.getTargets()) {
|
for (ModuleBuildTarget target : chunk.getTargets()) {
|
||||||
for (String file : dirtyFilesHolder.getRemovedFiles(target)) {
|
for (String file : dirtyFilesHolder.getRemovedFiles(target)) {
|
||||||
cache.clearPackagePartSourceData(target.getId(), new File(file));
|
cache.clearCacheForRemovedFile(target.getId(), new File(file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,10 @@ public class IncrementalCacheImpl(baseDir: File): IncrementalCache {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public fun clearCacheForRemovedFile(moduleId: String, sourceFile: File) {
|
||||||
|
packageSourcesData.remove(getKeyForPackagePart(moduleId, sourceFile))
|
||||||
|
}
|
||||||
|
|
||||||
private fun putData(moduleId: String, fqName: FqName, data: ByteArray): Boolean {
|
private fun putData(moduleId: String, fqName: FqName, data: ByteArray): Boolean {
|
||||||
val id = ClassOrPackageId(moduleId, fqName)
|
val id = ClassOrPackageId(moduleId, fqName)
|
||||||
val oldData = protoData[id]
|
val oldData = protoData[id]
|
||||||
@@ -156,19 +160,12 @@ public class IncrementalCacheImpl(baseDir: File): IncrementalCache {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun putPackagePartSourceData(moduleId: String, sourceFile: File, className: JvmClassName?) {
|
private fun getKeyForPackagePart(moduleId: String, sourceFile: File): String {
|
||||||
val key = moduleId + File.pathSeparator + sourceFile.getAbsolutePath()
|
return moduleId + File.pathSeparator + sourceFile.getAbsolutePath()
|
||||||
|
|
||||||
if (className != null) {
|
|
||||||
packageSourcesData.put(key, className.getInternalName())
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
packageSourcesData.remove(key)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun clearPackagePartSourceData(moduleId: String, sourceFile: File) {
|
private fun putPackagePartSourceData(moduleId: String, sourceFile: File, className: JvmClassName) {
|
||||||
putPackagePartSourceData(moduleId, sourceFile, null)
|
packageSourcesData.put(getKeyForPackagePart(moduleId, sourceFile), className.getInternalName())
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun getRemovedPackageParts(moduleId: String, compiledSourceFilesToFqName: Map<File, String>): Collection<String> {
|
public override fun getRemovedPackageParts(moduleId: String, compiledSourceFilesToFqName: Map<File, String>): Collection<String> {
|
||||||
|
|||||||
Reference in New Issue
Block a user