You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Module
@ComponentScan("com.example.network")
class NetworkModule
commonMain holds the interface:
internal interface IFirebaseAppCheckTokenProvider {
suspend fun getToken(): Result<String>
}
That is implemented in androidMain and iosMain sourceSets:
@Single
internal class FirebaseAppCheckTokenProvider : IFirebaseAppCheckTokenProvider {
// Some implementation
}
For some reason, I'm getting the "Missing Definition type" error:
e: [ksp] --> Missing Definition type 'com.example.network.firebase.IFirebaseAppCheckTokenProvider' for 'com.example.network.client.getDefaultHttpClient'. Fix your configuration to define type 'IFirebaseAppCheckTokenProvider'.
When looking into the generated code, I see that, indeed, commonMain doesn't contain the IFirebaseAppCheckTokenProvider definition but android/ios does have a complete generated module with IFirebaseAppCheckTokenProvider inside it.
commonMain:
public val com_example_network_di_NetworkModule : Module get() = module {
factory() { com.example.network.client.getDefaultHttpClient(firebaseAppCheckTokenProvider=get()) } bind(io.ktor.client.HttpClient::class)
}
public val com.example.network.di.NetworkModule.module : org.koin.core.module.Module get() = com_example_network_di_NetworkModule
android:
public val com_example_network_di_NetworkModule : Module = module {
single() { com.example.network.firebase.FirebaseAppCheckTokenProvider() } bind(com.example.network.firebase.IFirebaseAppCheckTokenProvider::class)
factory() { com.example.network.client.getDefaultHttpClient(firebaseAppCheckTokenProvider=get()) } bind(io.ktor.client.HttpClient::class)
}
public val com.example.network.di.NetworkModule.module : org.koin.core.module.Module get() = com_example_network_di_NetworkModule
What would you suggest to do in this case to make KOIN_CONFIG_CHECK work?
Koin project used and used version (please complete the following information): koin-core version 3.5.6 koin-annotations version 1.4.0-RC4
The text was updated successfully, but these errors were encountered:
Describe the bug
I have the KMP network module with structure like this:
ComponentScan is enabled for the entire module:
commonMain
holds the interface:That is implemented in
androidMain
andiosMain
sourceSets:For some reason, I'm getting the "Missing Definition type" error:
When looking into the generated code, I see that, indeed,
commonMain
doesn't contain theIFirebaseAppCheckTokenProvider
definition butandroid/ios
does have a complete generated module withIFirebaseAppCheckTokenProvider
inside it.commonMain:
android:
What would you suggest to do in this case to make KOIN_CONFIG_CHECK work?
Koin project used and used version (please complete the following information):
koin-core version 3.5.6
koin-annotations version 1.4.0-RC4
The text was updated successfully, but these errors were encountered: