Add own PathStringDescriptor to compare paths properly on case-insensitive filesystems
This commit is contained in:
@@ -496,8 +496,7 @@ open class IncrementalCacheImpl<Target>(
|
||||
override fun dumpValue(value: String): String = value
|
||||
}
|
||||
|
||||
// TODO: find how to deal with PathStringDescriptor - it seems too deeply rooted in jps
|
||||
inner class SourceToClassesMap(storageFile: File) : BasicStringMap<Collection<String>>(storageFile, /* PathStringDescriptor.INSTANCE,*/ StringCollectionExternalizer) {
|
||||
inner class SourceToClassesMap(storageFile: File) : BasicStringMap<Collection<String>>(storageFile, PathStringDescriptor, StringCollectionExternalizer) {
|
||||
fun clearOutputsForSource(sourceFile: File) {
|
||||
remove(sourceFile.absolutePath)
|
||||
}
|
||||
|
||||
@@ -171,6 +171,12 @@ object IntExternalizer : DataExternalizer<Int> {
|
||||
}
|
||||
}
|
||||
|
||||
object PathStringDescriptor : EnumeratorStringDescriptor() {
|
||||
override fun getHashCode(value: String) = FileUtil.pathHashCode(value)
|
||||
|
||||
override fun isEqual(val1: String, val2: String?) = FileUtil.pathsEqual(val1, val2)
|
||||
}
|
||||
|
||||
object FileKeyDescriptor : KeyDescriptor<File> {
|
||||
override fun read(input: DataInput): File = File(input.readUTF())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user