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
Describe the bug
It is OK for library modules to have some Missing Definition, this shouldn't be checked by KOIN_CONFIG_CHECK, or at least it shouldn't be the default behavior.
Additional informations
If I have an Android Application depending on this it should be possible to define another module injecting Config.
And this works perfectly fine if I disable the check.
You can try yourself by creating an android application depending on the library and injecting in the Application onCreate:
Duplicate of #95. Since you provide the external dependency in the Koin DSL, which is runtime, the compiler check cannot verify it at build time, hence the error.
I made the example with a "config" class but how am I going to access the application android context, for instance, from a module with kotlin-annotation if the only way to inject that is from the application?
I know I can expose a method to create the module of my library that inject the context, however in a modularized app it is way more convenient if that's provided by the app and modules that needs it can access it in the android side of the code.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
It is OK for library modules to have some Missing Definition, this shouldn't be checked by KOIN_CONFIG_CHECK, or at least it shouldn't be the default behavior.
To Reproduce
KOIN_CONFIG_CHECK
Expected behavior
this should compile.
Actual behavior
This fails with
Koin project used and used version:
Additional informations
If I have an Android Application depending on this it should be possible to define another module injecting
Config
.And this works perfectly fine if I disable the check.
You can try yourself by creating an android application depending on the library and injecting in the Application onCreate:
and than injecting
ExternallyConfigurableComponent
and callinguseConfig
it will print
foo
if you disable the check, and it will not compile if you enable the check.Dagger / Hilt also works this way: you can inject from outside a module as long as it is not an application module.
The text was updated successfully, but these errors were encountered: