Restore tasks outputs to pre-execution state in worker.

Workers usually execute later than task action and does not raise
exception to the task. Such behaviour skips task outputs restoration to
the pre-execution state.

Kotlin compiler on incremental compilation error leaves 'dirty*' files
in the build output, forcing Gradle to run non-incrementally on the
next build. Fixed it by moving task outputs reset logic into worker as
well.

^KT-46406 In Progress
This commit is contained in:
Yahor Berdnikau
2021-09-16 10:52:15 +02:00
committed by Space
parent 904f9c72f2
commit 3dc69495f9
12 changed files with 166 additions and 68 deletions
@@ -5,9 +5,10 @@
package org.jetbrains.kotlin.build.report.metrics
import java.io.Serializable
import java.util.*
class BuildMetricsReporterImpl : BuildMetricsReporter {
class BuildMetricsReporterImpl : BuildMetricsReporter, Serializable {
private val myBuildTimeStartNs: EnumMap<BuildTime, Long> =
EnumMap(
BuildTime::class.java