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
E.g. we could define a fruit::MultibindingProvider<T> class that allows to get a vector of the multibindings for that type, and allow injecting that as a dependency.
This will have the caveat that injection dependency loops involving a MultibindingProvider will only be detected at runtime.
To print the actual loop, maybe we can have an on-this-error-only, slow code path where we walk the injection graph at runtime, looking for in-progress injections, to find the loop; then we can print a more useful error message with the types involved in the loop. TBD if there's enough information available to determine the loop.
The text was updated successfully, but these errors were encountered:
Hi, sorry for the delay.
Yes, exactly.
ATM you need to get the multi binders from the injector directly then pass them down to the method/object that needs them.
E.g. we could define a
fruit::MultibindingProvider<T>
class that allows to get a vector of the multibindings for that type, and allow injecting that as a dependency.This will have the caveat that injection dependency loops involving a
MultibindingProvider
will only be detected at runtime.To print the actual loop, maybe we can have an on-this-error-only, slow code path where we walk the injection graph at runtime, looking for in-progress injections, to find the loop; then we can print a more useful error message with the types involved in the loop. TBD if there's enough information available to determine the loop.
The text was updated successfully, but these errors were encountered: