google / casa-android

A framework to bootstrap the creation of catalog samples apps by removing all the boilerplate and dynamically including all available samples into a single activity.
Apache License 2.0
263 stars 16 forks source link

KSP/Kapt execution order #50

Closed yaraki closed 10 months ago

yaraki commented 11 months ago

The module :framework:processor is a KSP processor. It takes @Sample annotations and turns them into dagger components. Then, Dagger (Hilt) runs as a Kapt processor. That is, the build of this project relies on the current execution order of KSP before Kapt.

In fact, this order changes when I bump KSP to 1.9.10-1.0.13. Dagger on Kapt tries to run before our KSP processor and fails (https://github.com/google/casa-android/commit/70c39320b00d7fa521d23732ea5cd93012a13885).

One possible solution is to use migrate to Dagger on KSP, but this didn't work well either. There is a way for a KSP processor to wait for other KSP processors (https://kotlinlang.org/docs/ksp-multi-round.html), but Dagger doesn't seem to implement it (https://github.com/google/casa-android/commit/e486b1fe75723be18da41f3fde8390fdb346d6b8).

Giving up the version bump of Dagger means giving up the version bump of Kotlin as well as Compose and all the other libraries tied with a Kotlin version.

What should we do?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Jean-Daniel commented 10 months ago

This issue is still a concern. Should not be marked stale.