isaac-udy / Enro

A simple navigation library for Android 🗺️
https://enro.dev
Apache License 2.0
255 stars 13 forks source link

KSP processing conflicts with that of Hilt #192

Open b-reetz opened 1 year ago

b-reetz commented 1 year ago

KSP for Hilt was introduced in 2.48 but fails to work when also using KSP with Enro 2.2.0

Expected Behavior

Enro and Hilt can both take advantage of KSP

Current Behavior

Compilation fails;

.../EnroBugExample/app/build/generated/ksp/debug/java/byRounds/2/dagger/hilt/internal/aggregatedroot/codegen/_enro_reproducable_EnroBugExampleApplication.java: kotlin.io.FileAlreadyExistsException: .../EnroBugExample/app/build/generated/ksp/debug/java/byRounds/2/dagger/hilt/internal/aggregatedroot/codegen/_enro_reproducable_EnroBugExampleApplication.java

Steps to Reproduce

Use KSP (Rather than KAPT) for both Hilt & Enro. Compilation fails with the above error message.

Workaround

Stick to using KAPT for one of the libraries (can be Enro or Hilt)

Minimal reproducible project; EnroBugExample.zip

isaac-udy commented 1 year ago

I believe this is actually an issue specifically with Hilt during multi-round processing. I have created a matching issue in the Dagger repository. See here: https://github.com/google/dagger/issues/4161