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
I use Dagger 2 and have a lot of Java fields with Inject annotation and package-private or protected access. With Yatagan isn't possible to have the same restrictions in access and I need to make all fields like this public. I found out that the restriction connected with reflection mode, but reflection API has possibility to allow modify not public fields
The text was updated successfully, but these errors were encountered:
Well, Yatagan doesn't generate any factories/injectors in the same package as Dagger does. So even if it is possible to use isAccessible = true with RT mode, the compilation will fail with generated code if the component declaration is in the different package than the class with @Inject constructor/fields being accessed. So there's no point in using this reflection API at all.
Now, what can be done, is more precise access checks instead of conservatively requiring everything to be public/internal. This is more difficult to implement, and may introduce additional performance overhead in RT. This needs more investigation. And, of course, this will not let us to use package-private/protected fields/constructors with components from another packages.
I use Dagger 2 and have a lot of Java fields with Inject annotation and package-private or protected access. With Yatagan isn't possible to have the same restrictions in access and I need to make all fields like this public. I found out that the restriction connected with reflection mode, but reflection API has possibility to allow modify not public fields
The text was updated successfully, but these errors were encountered: