Skip to content

Allow injection of multibinding providers #51

@poletti-marco

Description

@poletti-marco

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions