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
Is your feature request related to a problem? Please describe.
As of Koin 2.0.0-RC2, it was possible to pass a Scope instance to KoinJavaComponent.get() to retrieve an instance associated to a scope. However, as of 2.0.0-GA2, KoinJavaComponent.get() no longer allows a scope as a parameter, making it impossible to inject instances associated to a scope in Java code.
Describe the solution you'd like
A simple and elegant solution would be to prevent this breaking change by putting back the scope parameter in KoinJavaComponent.get() (and probably inject() function too).
Describe alternatives you've considered
For now, I created my own function which converts a Java class to a KClass instance, making it possible to call the usual get() function from Java code.
Thanks for your help! It would be cool if this can make its way to the release of 2.0.0!
The text was updated successfully, but these errors were encountered:
There seems to be a regression with the 2.0.0 release, as this was fixed in 2.0.0-GA3 and 2.0.0-GA4, but in 2.0.0 and 2.0.1, the KoinJavaComponent does not accept any scope parameter, although it is mentioned in the changelog of 2.0.0 this issue was fixed.
I just checked the code of KoinJavaComponent in master, and there is no more scope parameter.
Is your feature request related to a problem? Please describe.
As of Koin 2.0.0-RC2, it was possible to pass a
Scope
instance toKoinJavaComponent.get()
to retrieve an instance associated to a scope. However, as of 2.0.0-GA2,KoinJavaComponent.get()
no longer allows a scope as a parameter, making it impossible to inject instances associated to a scope in Java code.Describe the solution you'd like
A simple and elegant solution would be to prevent this breaking change by putting back the scope parameter in
KoinJavaComponent.get()
(and probablyinject()
function too).Describe alternatives you've considered
For now, I created my own function which converts a Java class to a
KClass
instance, making it possible to call the usualget()
function from Java code.Thanks for your help! It would be cool if this can make its way to the release of 2.0.0!
The text was updated successfully, but these errors were encountered: