e: [ksp] --> Missing Definition type 'com.github.springeye.snote.di.DIFactory' for 'com.github.springeye.snote.di.privateAppDatabase'. Fix your configuration to define type 'DIFactory'.
e: Error occurred in KSP, check log for detail
Expected behavior
sp can build the code normally
Koin project used and used version (please complete the following information):
koin-bom = "4.0.0"
koin-annotations = "1.4.0-RC4"
@ComponentScan("com.github.springeye")
//@ComponentScan
@Module
class AppModule {
@Single
fun privateAppDatabase(factory:DIFactory):AppDatabase{
return factory.createRoomDatabase()
}
}
commonMain/kotlin/DIFactory.kt
expect class DIFactory {
fun getPlatform(): Platform
fun createRoomDatabase(): AppDatabase
}
desktopMain/kotlin/DIFactory.desktop.kt
@Single
actual class DIFactory {
actual fun createRoomDatabase(): AppDatabase {
return getRoomDatabase(getDatabaseBuilder())
}
actual fun getPlatform(): Platform {
return JVMPlatform()
}
}
Describe the bug
To Reproduce I followed the documentation https://insert-koin.io/docs/reference/koin-annotations/kmp configuration but it doesn't work properly
Expected behavior sp can build the code normally
Koin project used and used version (please complete the following information): koin-bom = "4.0.0" koin-annotations = "1.4.0-RC4"
commonMain/kotlin/AppModule.kt
commonMain/kotlin/DIFactory.kt
desktopMain/kotlin/DIFactory.desktop.kt