russhwolf
03/31/2025, 1:29 AM// common
@Module(includes = [PlatformModule::class])
class CommonModule {
@Single
fun provideFoo(bar: Bar) = Foo(bar)
}
@Module
expect class PlatformModule()
// platform
@Module
actual class PlatformModule {
@Single
fun provideBar() = Bar()
}
If I have KOIN_CONFIG_CHECK
enabled, this setup fails with "missing declaration for property bar". It works fine if PlatformModule
is not an expect/actual declaration, and the expect/actual version is fine at runtime if I disable the check.
Is this a known issue or should I file a ticket?russhwolf
04/02/2025, 12:18 AMKibet Theophilus
04/02/2025, 6:52 AM@Provided
annotation on the commonModule i.e
// common
@Module(includes = [PlatformModule::class])
class CommonModule {
@Single
fun provideFoo(@Provided bar: Bar) = Foo(bar)
}
@Module
expect class PlatformModule()
// platform
@Module
actual class PlatformModule {
@Single
fun provideBar() = Bar()
}
russhwolf
04/02/2025, 5:54 PM