[IC] Lower logging level inside RecoverableCompilationTransaction
#KT-49785 In Progress
This commit is contained in:
committed by
Space Team
parent
5461667421
commit
7d471dafa3
+6
-6
@@ -6,9 +6,9 @@
|
|||||||
package org.jetbrains.kotlin.incremental
|
package org.jetbrains.kotlin.incremental
|
||||||
|
|
||||||
import org.jetbrains.kotlin.build.report.BuildReporter
|
import org.jetbrains.kotlin.build.report.BuildReporter
|
||||||
|
import org.jetbrains.kotlin.build.report.debug
|
||||||
import org.jetbrains.kotlin.build.report.metrics.BuildTime
|
import org.jetbrains.kotlin.build.report.metrics.BuildTime
|
||||||
import org.jetbrains.kotlin.build.report.metrics.measure
|
import org.jetbrains.kotlin.build.report.metrics.measure
|
||||||
import org.jetbrains.kotlin.build.report.warn
|
|
||||||
import org.jetbrains.kotlin.compilerRunner.OutputItemsCollector
|
import org.jetbrains.kotlin.compilerRunner.OutputItemsCollector
|
||||||
import org.jetbrains.kotlin.konan.file.use
|
import org.jetbrains.kotlin.konan.file.use
|
||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
@@ -60,7 +60,7 @@ class RecoverableCompilationTransaction(
|
|||||||
if (Files.exists(outputFile)) {
|
if (Files.exists(outputFile)) {
|
||||||
stashFile(outputFile)
|
stashFile(outputFile)
|
||||||
} else {
|
} else {
|
||||||
reporter.warn { "Marking the $outputFile file as newly added" }
|
reporter.debug { "Marking the $outputFile file as newly added" }
|
||||||
fileRelocationRegistry[outputFile] = null
|
fileRelocationRegistry[outputFile] = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,8 +68,8 @@ class RecoverableCompilationTransaction(
|
|||||||
|
|
||||||
override fun deleteFile(outputFile: Path) {
|
override fun deleteFile(outputFile: Path) {
|
||||||
if (fileRelocationIsAlreadyRegisteredFor(outputFile)) {
|
if (fileRelocationIsAlreadyRegisteredFor(outputFile)) {
|
||||||
reporter.warn { "Deleting $outputFile" }
|
|
||||||
if (Files.exists(outputFile)) {
|
if (Files.exists(outputFile)) {
|
||||||
|
reporter.debug { "Deleting $outputFile" }
|
||||||
Files.delete(outputFile)
|
Files.delete(outputFile)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -81,7 +81,7 @@ class RecoverableCompilationTransaction(
|
|||||||
|
|
||||||
private fun stashFile(outputFile: Path) {
|
private fun stashFile(outputFile: Path) {
|
||||||
val relocatedFilePath = getNextRelocatedFilePath()
|
val relocatedFilePath = getNextRelocatedFilePath()
|
||||||
reporter.warn { "Moving $outputFile to the stash as $relocatedFilePath" }
|
reporter.debug { "Moving $outputFile to the stash as $relocatedFilePath" }
|
||||||
fileRelocationRegistry[outputFile] = relocatedFilePath
|
fileRelocationRegistry[outputFile] = relocatedFilePath
|
||||||
Files.move(outputFile, relocatedFilePath)
|
Files.move(outputFile, relocatedFilePath)
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ class RecoverableCompilationTransaction(
|
|||||||
private fun fileRelocationIsAlreadyRegisteredFor(outputFile: Path) = outputFile in fileRelocationRegistry
|
private fun fileRelocationIsAlreadyRegisteredFor(outputFile: Path) = outputFile in fileRelocationRegistry
|
||||||
|
|
||||||
private fun revertChanges() {
|
private fun revertChanges() {
|
||||||
reporter.warn { "Reverting changes" }
|
reporter.debug { "Reverting changes" }
|
||||||
reporter.measure(BuildTime.RESTORE_OUTPUT_FROM_BACKUP) {
|
reporter.measure(BuildTime.RESTORE_OUTPUT_FROM_BACKUP) {
|
||||||
for ((originPath, relocatedPath) in fileRelocationRegistry) {
|
for ((originPath, relocatedPath) in fileRelocationRegistry) {
|
||||||
if (relocatedPath == null) {
|
if (relocatedPath == null) {
|
||||||
@@ -106,7 +106,7 @@ class RecoverableCompilationTransaction(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun cleanupStash() {
|
private fun cleanupStash() {
|
||||||
reporter.warn { "Cleaning up stash" }
|
reporter.debug { "Cleaning up stash" }
|
||||||
reporter.measure(BuildTime.CLEAN_BACKUP_STASH) {
|
reporter.measure(BuildTime.CLEAN_BACKUP_STASH) {
|
||||||
Files.walk(stashDir).use {
|
Files.walk(stashDir).use {
|
||||||
it.sorted(Comparator.reverseOrder())
|
it.sorted(Comparator.reverseOrder())
|
||||||
|
|||||||
Reference in New Issue
Block a user