Benoît Liessens
01/09/2025, 6:43 PM@Singleton(createdAtStart = true)
doesn’t do what I expect (eagerly create the class instance) unless I call createEagerInstances()
like such:
koin {
modules(TheModule().module)
createEagerInstances()
}
Is that expected? Why have 2 distinct names (createAtStart and Eager) and 2 requirements for a single effect?
Thanksarnaud.giuliani
01/10/2025, 6:13 PMkoinApplication
or startKoin
to start Koin?Benoît Liessens
01/10/2025, 7:11 PMfun Application.mainModule() {
install(Koin)
}
And in (various) other KTor modules I start a koin context as follows:
fun Application.featureModule() {
koin {
modules(ModuleA().module, ModuleB().module)
}
}