Closed mibaldi closed 5 years ago
This is noted, will also support this. Thanks.
i used recent version and scope is not supported
I've tested the exact format (base on your screenshot) and add tests:
Here's the sample format that KoinGraph trying to parse:
single { ComponentA(get(), get()) }
single { ComponentB() }
factory { FactoryA(get(), get()) }
factory { FactoryB() }
viewModel { ViewModelA(get(), get(), get(), get()) }
viewModel { ViewModelB() }
scope(named<Activity>()) {
scoped { ScopeA() }
scoped { ScopeB() }
}
And here's the expected output:
['ComponentA', 'ComponentB', 'FactoryA', 'FactoryB', 'ViewModelA', 'ViewModelB', 'ScopeA', 'ScopeB']
Full test: https://github.com/tentenponce/KoinGraph/blob/master/test/domain/DependencyReaderHelperTest.js
How exactly the bug behave?
The scope that I don't see are those that have parameters in body.
only i see router and use case, not the presenter. I try with one little project with the same struct and it works
Hi, i try with another example and i found the error, when i use one Activity extend of on BaseActivity like this :
class BaseMvpActivity<V, T : BaseMvpPresenter<V>>() : AppCompatActivity()
the tool not work correctly.
but if i change to
class BaseMvpActivity<V>() : AppCompatActivity()
works
I will have a look on this, this will surely help.
Hi, KoinGraph still works fine even the class has generics on it. I've created tests for it:
https://github.com/tentenponce/KoinGraph/pull/11/files#diff-13bc62182156aa4b3f2e463c77513f9e
Can you share your ProfilePresenter
class?
https://gist.github.com/mibaldi/5b3390b5a745edc698a7d57ad6f9a61e isn't my original profilepresenter but is the same case
Fixed on https://github.com/tentenponce/KoinGraph/pull/11.
Problem is with the ClassCastHelper
, it returns true even the class is parameter instead of extension or interface. Tests included on ClassCastHelperTest
.
I use also injection with scope in activities like this: the tool support this type of annotation?