ComponentScan generates an empty module when using expect/actual classes
Describe the bug When creating a @Module with @ComponentScan in a KMP project it seems that it's completely ignoring the expect/actual classes (inside the package specified to @ComponentScan) that is supposed to include in the annotated module.
To Reproduce Download the sample project that I attached, it should contain all the configuration provided in the guide. Launch: ./gradlew clean kspCommonMainMetadata Go to: org/koin/ksp/generated/MyModuleGencom$test$koin$annotations.kt Look at the generated module, it should be empty.
Expected behavior The generated module should contain the singleton definition for MyComponent
Koin project used and used version (please complete the following information): ksp: 2.0.20-1.0.25 koin: 4.0.0 koin-annotations: 2.0.0-beta02
The test project: KoinAnnotationTest 2.zip
Also if trying to inject an expected class as a dependency it will fail
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Module, ComponentScan and Expect classes are in common. Just implement actual class on other native targets.
did you followed those docs? https://insert-koin.io/docs/reference/koin-annotations/kmp#sharing-patterns
Look at 2.1.1-Beta1
I followed https://insert-koin.io/docs/reference/koin-annotations/kmp/#sharing-expectactual-module---rely-on-native-module-scanning @Single annotation does not work (ksp generates empty module), but @Singleton does 🙃
lol ok 😅