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
In #11873 (comment), @ValarDragon points out there are cases where a different instance of the same keeper interface needs to be provided to different modules.
Proposed Solution
In #11910, we propose allowing matching depinject interface types to be resolved using a key to enable the "expected keepers" pattern. This could be extended with some sort of "prefers" directives both at the container level and in app config. These prefers directives could be configure container wide and at a module scope.
Note that an alternative way to address this with the current depinject framework is with module-scoped providers. So before we implement this we should first see if that is sufficient
aaronc
changed the title
Allow container interface type resolution to be configured per module
Allow depinject interface type resolution to be configured per module
May 31, 2022
Problem Definition
In #11873 (comment), @ValarDragon points out there are cases where a different instance of the same keeper interface needs to be provided to different modules.
Proposed Solution
In #11910, we propose allowing matching depinject interface types to be resolved using a
key
to enable the "expected keepers" pattern. This could be extended with some sort of "prefers" directives both at the container level and in app config. These prefers directives could be configure container wide and at a module scope.Ex:
The text was updated successfully, but these errors were encountered: