KSP 2.3.8 does not always generate sources
- Dominant language
- Kotlin
- Stars
- 3.5k
- Forks
- 415
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 53
Description
This issue appears randomly, and we are not able to reproduce consistently!
On an ephemeral CI the `compileTestKotlin` task does not take the ksp generated source in its `javaSources` input.
By looking at the `kspTestKotlin` build cache entries: in the failing build, the cache entry does not contain the expected files.
- build A
```
cache-entry-a5b216b26ea784c150d527b4e7dd722c
├── METADATA
├── missing-tree-kspConfig.classOutputDir
├── missing-tree-kspConfig.kotlinOutputDir
├── missing-tree-kspConfig.resourceOutputDir
└── tree-kspConfig.javaOutputDir
└── fr
└── leboncoin
└── repositories
└── vehiclecashpurchase
├── injection
│ └── DaggerTestComponent.java
└── VehicleCashPurchaseApiServiceTest_MembersInjector.java
```
- build B
```
cache-entry-5b4e74b295426adec6ee0aca799d57b3
├── METADATA
├── missing-tree-kspConfig.classOutputDir
├── missing-tree-kspConfig.javaOutputDir
├── missing-tree-kspConfig.kotlinOutputDir
└── missing-tree-kspConfig.resourceOutputDir
```
---
We then re-tried with a --rerun-tasks, and `compileTestKotlin` was successful (`javaSources` inputs are back).
---
Even stranger, both build cache results for the `kspTestKotlin` tasks have the same key, but different contents:
- Failing build:
| Build cache result | Miss (local), Hit (remote), Store (local) |
|---|---|
| Cache key | 5b4e74b295426adec6ee0aca799d57b3 |
| Cache artifact | 602 B / 5 entries |
- Successful build:
| Build cache result | Store (local and remote) |
|---|---|
| Cache key | 5b4e74b295426adec6ee0aca799d57b3 |
| Cache artifact | 1.8 KiB / 12 entries |
Contributor guide
Assessment
This issue has not been assessed yet.