Mark removed source file as deleted for compiler
#KT-55905 Fixed
This commit is contained in:
committed by
Space Team
parent
c1420794b4
commit
3aade8ad95
+1
-1
@@ -469,7 +469,7 @@ abstract class IncrementalCompilerRunner<
|
|||||||
val lookupTracker = LookupTrackerImpl(LookupTracker.DO_NOTHING)
|
val lookupTracker = LookupTrackerImpl(LookupTracker.DO_NOTHING)
|
||||||
val expectActualTracker = ExpectActualTrackerImpl()
|
val expectActualTracker = ExpectActualTrackerImpl()
|
||||||
//TODO(valtman) sourceToCompile calculate based on abiSnapshot
|
//TODO(valtman) sourceToCompile calculate based on abiSnapshot
|
||||||
val (sourcesToCompile, removedKotlinSources) = dirtySources.partition(File::exists)
|
val (sourcesToCompile, removedKotlinSources) = dirtySources.partition { it.exists() && allKotlinSources.contains(it) }
|
||||||
|
|
||||||
val services = makeServices(
|
val services = makeServices(
|
||||||
args, lookupTracker, expectActualTracker, caches,
|
args, lookupTracker, expectActualTracker, caches,
|
||||||
|
|||||||
+19
@@ -6,6 +6,7 @@ import org.jetbrains.kotlin.build.report.metrics.BuildAttribute
|
|||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilerExecutionStrategy
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilerExecutionStrategy
|
||||||
import org.jetbrains.kotlin.gradle.testbase.*
|
import org.jetbrains.kotlin.gradle.testbase.*
|
||||||
import org.jetbrains.kotlin.gradle.util.checkedReplace
|
import org.jetbrains.kotlin.gradle.util.checkedReplace
|
||||||
|
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||||
import org.junit.jupiter.api.Disabled
|
import org.junit.jupiter.api.Disabled
|
||||||
import org.junit.jupiter.api.DisplayName
|
import org.junit.jupiter.api.DisplayName
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
@@ -200,6 +201,24 @@ open class IncrementalCompilationJvmMultiProjectIT : BaseIncrementalCompilationM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//KT-55905
|
||||||
|
@DisplayName("Imncremental compilation with source set update")
|
||||||
|
@GradleTest
|
||||||
|
open fun testSourceSetAdjustment(gradleVersion: GradleVersion) {
|
||||||
|
val setUpExternalSource = "sourceSets[\"main\"].kotlin.srcDir(\"../external/src\")"
|
||||||
|
defaultProject(gradleVersion) {
|
||||||
|
subProject("lib").buildGradle.appendText("\n$setUpExternalSource")
|
||||||
|
subProject("lib")
|
||||||
|
.projectPath
|
||||||
|
.resolve("src/main/kotlin/bar/A.kt").modify {
|
||||||
|
it.replace("fun a() {}","fun a() {}\nfun c() = ExternalClass()" )
|
||||||
|
}
|
||||||
|
build("assemble")
|
||||||
|
subProject("lib").buildGradle.replaceText(setUpExternalSource, "")
|
||||||
|
buildAndFail("assemble")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected fun testCompileLibWithGroovy_doTest(
|
protected fun testCompileLibWithGroovy_doTest(
|
||||||
gradleVersion: GradleVersion,
|
gradleVersion: GradleVersion,
|
||||||
assertResults: (TestProject, BuildResult) -> Unit
|
assertResults: (TestProject, BuildResult) -> Unit
|
||||||
|
|||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package bar
|
||||||
|
|
||||||
|
open class ExternalClass {
|
||||||
|
fun some() {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user