Skip to content

Commit

Permalink
Incremental: fix roots from getSealedSubclasses
Browse files Browse the repository at this point in the history
by just including the files that contain the sealed class / interface.
Their subclasses will be invalidated during dirtiness propagation.

(cherry picked from commit e593074)
  • Loading branch information
ting-yuan authored and KSP Auto Pick committed May 20, 2024
1 parent 27f57e8 commit 34e241d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ abstract class IncrementalContextBase(
symbolLookupCache.get(it).map { File(it) }
}

val dirtyFilesBySealed = sealedMap.keys.flatMap { sealedMap[it]!! }.flatMap {
symbolLookupCache.get(it).map { File(it) }
}
val dirtyFilesBySealed = sealedMap.keys

// Calculate dirty files by dirty classes in CP.
val dirtyFilesByCP = changedClasses.flatMap { fqn ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.google.devtools.ksp.test

import org.gradle.testkit.runner.GradleRunner
import org.junit.Assert
import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand All @@ -17,7 +16,6 @@ class GetSealedSubclassesIncIT(val useKSP2: Boolean) {

@Test
fun testGetSealedSubclassesInc() {
Assume.assumeFalse(useKSP2)
val gradleRunner = GradleRunner.create().withProjectDir(project.root)

val expected2 = listOf(
Expand Down

0 comments on commit 34e241d

Please sign in to comment.