Skip to content

Incremental compilation fails with "Number of loaded files in snapshots differs" #1280

@graemerocher

Description

@graemerocher

We are building support for KSP in Micronaut (a popular Java/Kotlin framework). The initial implementation is done but it fails with KSP incremental compilation enabled with an error "Number of loaded files in snapshots differs" on the second compile:

./gradlew test
> Task :kspKotlin FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':kspKotlin'.
> Number of loaded files in snapshots differs. Reported changed files: []

To reproduce download this example project and run ./gradlew cTK twice.

ksp-test2.zip

Metadata

Metadata

Assignees

Labels

P1major features or blocking bugsbugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions