Don't call File.getCanonicalPath in KGP
Relates to KT-54579.
This commit is contained in:
@@ -126,7 +126,7 @@ class FileAgeComparator : Comparator<File> {
|
||||
leftTS == 0L || rightTS == 0L -> 0 // cannot read any file timestamp, => undecidable
|
||||
leftTS > rightTS -> -1
|
||||
leftTS < rightTS -> 1
|
||||
else -> compareValues(left.canonicalPath, right.canonicalPath)
|
||||
else -> compareValues(left.normalize().absolutePath, right.normalize().absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1063,7 +1063,7 @@ class CompileServiceImpl(
|
||||
}
|
||||
daemon.scheduleShutdown(true)
|
||||
} catch (e: Throwable) {
|
||||
log.info("Cannot connect to a daemon, assuming dying ('${runFile.canonicalPath}'): ${e.message}")
|
||||
log.info("Cannot connect to a daemon, assuming dying ('${runFile.normalize().absolutePath}'): ${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -527,7 +527,7 @@ class CompileServiceServerSideImpl(
|
||||
daemon.scheduleShutdown(true)
|
||||
log.fine("other : SHUTDOWN_OK")
|
||||
} catch (e: Throwable) {
|
||||
log.info("Cannot connect to a daemon, assuming dying ('${runFile.canonicalPath}'): ${e.message}")
|
||||
log.info("Cannot connect to a daemon, assuming dying ('${runFile.normalize().absolutePath}'): ${e.message}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class BuildReportICReporter(
|
||||
icLogLines.add("Compile iteration:")
|
||||
for (file in sourceFiles) {
|
||||
val reason = recompilationReason[file]?.let { " <- $it" } ?: ""
|
||||
icLogLines.add(" ${file.relativeOrCanonical()}$reason")
|
||||
icLogLines.add(" ${file.relativeOrAbsolute()}$reason")
|
||||
}
|
||||
recompilationReason.clear()
|
||||
}
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ internal class BuildReportICReporterAsync(
|
||||
icLogLines.add("Compile iteration:")
|
||||
for (file in sourceFiles) {
|
||||
val reason = recompilationReason[file]?.let { " <- $it" } ?: ""
|
||||
icLogLines.add(" ${file.relativeOrCanonical()}$reason")
|
||||
icLogLines.add(" ${file.relativeOrAbsolute()}$reason")
|
||||
}
|
||||
recompilationReason.clear()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user