Hi, I have been writing an sdk recently and I deci...
# koin
r
Hi, I have been writing an sdk recently and I decided not to use Koin in the sdk as it would force users to use it as well and provide additional configuration. A similar issue is raised in this reddit post. Any thoughts on embedding Koin inside an sdk without forcing the host app to use it too?
j
You can already do that with Koin. Anyway I am not sure why you need to use a DI framework in a sdk which is monomodule and has no tests.
r
Do what already? Also, the link was to highlight how the host app has to configure Koin, whether it has tests or not is irrelevant.
n
You can already isolate it: https://insert-koin.io/docs/reference/koin-core/context-isolation/ The Reddit post doesn't show anything, it's just someone who made it that way.
🙌 1
j
@Rak why do you need a DI framework in a monomodule project without tests? It would facilitate integration testing, or in multimodule the setup itself, but being monomodule you can pass the implementations as default params in the constructors
r
@Javier Its not my library, its just an example of a library requiring DI. However, I could absolutely see a complex library requiring DI.
Managing an object graph with or without tests is made easier with a DI library