Open extmkv opened 11 months ago
Here is a repo to reproduce @extmkv issue: https://github.com/rodrirepresa/koinannotationissue
@arnaudgiuliani do you have any insights or idea how we can solve this?
One way is to create a dependency graph from there like we do with hilt or dagger, and remove the annotation from the class, it will work, bcz i had faced the issue, and was able to sort in this way, so i hope, it will get sorted, and this is a bug obviously
@TheReprator can you provide an example?
I don't know, whether it helped or not, You can see this repo, for this use case,
Repository: https://github.com/TheReprator/AccountBook_Backend/tree/koinAnnotation Branch: koinAnnotation
More specifically, like this, https://github.com/TheReprator/AccountBook_Backend/blob/koinAnnotation/api/userIdentity/src/main/kotlin/dev/reprator/userIdentity/di/UserIdentityModule.kt
But you will not be able to run this, as it have a dependency which I need to provide dynamically, and I had raised a bug in koin for that,
Regards, Vikram Singh
sorry for the delay 🙏
@extmkv did you use includes to be sure you chain the modules?
C uses B uses A. Then you need to include A in B, and B in C.
C uses B uses A. Then you need to include A in B, and B in C.
I have the same issue. Using include
doesn't work for me, I still get the issue about the missing dependency.
@arnaudgiuliani I don't think that will work at all. Did you had time to check the repository shared by @rodrirepresa ?
Ok, need to check more deeply 👍
@arnaudgiuliani did you manage to have a look?
@arnaudgiuliani any updates on this? This issue still occurs on KA 1.4.0/2.0.0-Beta1 between two feature modules
@arnaudgiuliani Is there a way to fix it? I also have this problem on KA 1.4.0/2.0.0-Beta1
Describe the bug Our project has 90+ modules, where 38 use Koin. After finishing the migration to Koin Annotations, we enabled the flag in all modules, and an issue arises when a module requires a dependency provided in another one, causing it to fail.
To Reproduce Lets take into consideration a project with 3 library modules + 1 app module.
Module A This module contains an interface
Foo
.Module B Has an implementation of
Foo
calledBar
Module C
App
Error
I'm gonna create a repository with a similar setup.