amzn / kotlin-inject-anvil

Extensions for the kotlin-inject dependency injection framework
Apache License 2.0
271 stars 8 forks source link

Generated createComponent functions should copy annotations to actualized code #72

Closed ZacSweers closed 6 days ago

ZacSweers commented 2 weeks ago

Currently they don't which results in compiler warnings and breaks the ability to use allWarningsAsErrors

> Task :compileKotlinIosX64
w: file:///Users/zacsweers/dev/android/personal/FieldSpottr/build/generated/ksp/iosX64/iosX64Main/kotlin/dev/zacsweers/fieldspottr/di/FSComponent.iosCreateComponent.kt:5:1 Annotation `@CreateComponent` is missing on actual declaration.
All annotations from expect `dev.zacsweers.fieldspottr.di.createComponent` must be present with the same arguments on actual `dev.zacsweers.fieldspottr.di.createComponent`, otherwise they might behave incorrectly.