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.
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
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:
| Build cache result |
Miss (local), Hit (remote), Store (local) |
| Cache key |
5b4e74b295426adec6ee0aca799d57b3 |
| Cache artifact |
602 B / 5 entries |
| Build cache result |
Store (local and remote) |
| Cache key |
5b4e74b295426adec6ee0aca799d57b3 |
| Cache artifact |
1.8 KiB / 12 entries |
This issue appears randomly, and we are not able to reproduce consistently!
On an ephemeral CI the
compileTestKotlintask does not take the ksp generated source in itsjavaSourcesinput.By looking at the
kspTestKotlinbuild cache entries: in the failing build, the cache entry does not contain the expected files.We then re-tried with a --rerun-tasks, and
compileTestKotlinwas successful (javaSourcesinputs are back).Even stranger, both build cache results for the
kspTestKotlintasks have the same key, but different contents: