Do not use File.canonicalPath in incremental caches
This fix improves performance of incremental compilation on Windows machines. When portable JPS caches are used, DirtyFilesHolder.getRemovedFiles could return file names which are not allowed on current platform. Previously it resulted in IOException on File.getCanonicalFile. #KT-53735 Fixed
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.incremental.*
|
||||
import org.jetbrains.kotlin.incremental.classpathDiff.BreadthFirstSearch.findReachableNodes
|
||||
import org.jetbrains.kotlin.incremental.classpathDiff.ClasspathSnapshotShrinker.shrinkClasspath
|
||||
import org.jetbrains.kotlin.incremental.classpathDiff.ImpactedSymbolsComputer.computeImpactedSymbols
|
||||
import org.jetbrains.kotlin.incremental.storage.FileToCanonicalPathConverter
|
||||
import org.jetbrains.kotlin.incremental.storage.FileToAbsolutePathConverter
|
||||
import org.jetbrains.kotlin.incremental.storage.ListExternalizer
|
||||
import org.jetbrains.kotlin.incremental.storage.loadFromFile
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
@@ -203,7 +203,7 @@ object ClasspathChangesComputer {
|
||||
): ProgramSymbolSet {
|
||||
val workingDir =
|
||||
FileUtil.createTempDirectory(this::class.java.simpleName, "_WorkingDir_${UUID.randomUUID()}", /* deleteOnExit */ true)
|
||||
val incrementalJvmCache = IncrementalJvmCache(workingDir, /* targetOutputDir */ null, FileToCanonicalPathConverter)
|
||||
val incrementalJvmCache = IncrementalJvmCache(workingDir, /* targetOutputDir */ null, FileToAbsolutePathConverter)
|
||||
|
||||
// Step 1:
|
||||
// - Add previous class snapshots to incrementalJvmCache.
|
||||
|
||||
Reference in New Issue
Block a user