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
Currently creating two separated KoinApplications with module generated by KSP in the same runtime gives the same beans instead of different instances.
Example of difference:
val fooModule:Module get() = module { single<Foo>() { Foo() } }
val koinApp1 = koinApplication { modules(fooModule) }
val koinApp2 = koinApplication { modules(fooModule) }
val beanFromKoinApp1 = koinApp1.koin.get<Foo>()
val beanFromKoinApp2 = koinApp1.koin.get<Foo>()
//beanFromKoinApp1 and beanFromKoinApp2 are different instances
val fooModule:Module= module { single<Foo>() { Foo() } }
val koinApp1 = koinApplication { modules(fooModule) }
val koinApp2 = koinApplication { modules(fooModule) }
val beanFromKoinApp1 = koinApp1.koin.get<Foo>()
val beanFromKoinApp2 = koinApp1.koin.get<Foo>()
//beanFromKoinApp1 and beanFromKoinApp2 are the same instance
The text was updated successfully, but these errors were encountered:
I believe KSP should generate:
instead of
Currently creating two separated
KoinApplication
s with module generated by KSP in the same runtime gives the same beans instead of different instances.Example of difference:
The text was updated successfully, but these errors were encountered: