-
Notifications
You must be signed in to change notification settings - Fork 19
@Repository generated components are not recognised by graph if their indirect parents are requested #167
Comments
Turned out that checking only requested type for The intended way of solving the problem is adding: @Module
interface FooRepositoryModule {
fun fooRepository(a: AbstractFooRepository): FooRepository = a
} |
Can't guarantee 100% scan on all rounds Advice: Use injection by class: @Module
interface FooRepositoryModule {
fun fooRepository(a: AbstractFooRepository): FooRepository = a
} |
In 0.13.1 version the above solution doesn't work anymore. But problem still persist. I get the error:
but now when I try to fix it with module:
I get the following error:
The only remaining fix for this issue that I found is manually instantiating
|
Try put |
Tried. Got the error:
|
Kora version: 0.13.3 Now even my last fix (which btw worked in 0.11.10) to directly instantiate The following Module: @Module
interface FooRepositoryModule {
fun fooRepository(/* ... deps ... */): FooRepository = `$AbstractFooRepository_Impl`(/* ... deps ... */)
} Makes task |
Assume I have the following class hierarchy:
If I then create the new component:
I get the following error:
But if I change
repo
type fromFooRepository
toAbstractFooRepository
everything compiles just fineThe text was updated successfully, but these errors were encountered: