rudolf.hladik
11/06/2023, 1:50 PM[ksp] --> Missing Definition type StarWarsApi for MyViewModel. Fix your configuration to define type StarWarsApi. but if I turn off the check everythink compiles and the definition is injected properly.rudolf.hladik
11/06/2023, 1:53 PMMyViewModel is using Annotation @Factory and the injected Api is in different module and is provided with single { } method. But I thought that it can be used both manual and annotation based at the same timerudolf.hladik
11/06/2023, 2:02 PMfeature and network modules. feature has viewmodels which uses api from networkarnaud.giuliani
11/08/2023, 8:51 AMProblem may be that, theyes, Koin annotations compilation check covers annotated components only for now (still WIP)is using AnnotationMyViewModeland the injected Api is in different module and is provided with@Factorymethod. But I thought that it can be used both manual and annotation based at the same timesingle { }
arnaud.giuliani
11/08/2023, 8:53 AMAlso where should I turn on the compile time check?
Do I have to turn it on in every module?
E.g I haveGood question, need to double check if you activate it in the main module is enough or not 🤔andfeaturemodules.networkhas viewmodels which uses api fromfeaturenetwork
rudolf.hladik
11/09/2023, 2:44 PMsingle { } definitions by annotations. Or is there a secret to provide e.g. httpClient with annotations?
single {
HttpClient {
install(ContentNegotiation) {
json(json = get(named("restApiJson")), contentType = ContentType.Application.Json)
}
install(Logging) {
this.level = <http://LogLevel.INFO|LogLevel.INFO>
this.logger = KtorKermitLogger()
}
}
}arnaud.giuliani
11/09/2023, 3:24 PM@Module
class MyModule {
@Single
fun httpClient() = HttpClient {
install(ContentNegotiation) {
json(json = get(named("restApiJson")), contentType = ContentType.Application.Json)
}
install(Logging) {
this.level = <http://LogLevel.INFO|LogLevel.INFO>
this.logger = KtorKermitLogger()
}
}
}arnaud.giuliani
11/09/2023, 3:26 PMrudolf.hladik
11/10/2023, 8:27 AMApolloClientFactory is internal, is there some workaround this? the internal modifier is important for us as it is inside kmp shared module.arnaud.giuliani
11/10/2023, 1:31 PMrudolf.hladik
11/10/2023, 1:50 PMApolloClientFactory is internal and it says it would expose itarnaud.giuliani
11/10/2023, 2:00 PMrudolf.hladik
11/10/2023, 2:04 PMget<ApolloClientFactory> it's inside single lambda, can I somehow call get() inside body of apolloClient function?arnaud.giuliani
11/10/2023, 2:40 PMarnaud.giuliani
11/10/2023, 2:40 PMrudolf.hladik
11/14/2023, 8:55 AMrudolf.hladik
11/14/2023, 8:56 AMarnaud.giuliani
11/14/2023, 9:17 AM