doesn’t support multibindings or qualifiers. Is support planned (or will be accepted if someone contributes), or there are some issues with it/it’s not in the scope of the library?
r
ralf
08/08/2020, 6:29 PM
It’s by design that these use cases aren’t supported and it’s easier to create a Dagger module in these cases. I believe that these scenarios can’t be modeled nicely in an annotation.
w
wasyl
08/08/2020, 8:41 PM
I suppose it's not easy accommodating all Dagger features 😕 so in your codebases you're fine with the boilerplate required for multi bindings and qualified provisions, or you're looking into possible solutions?
wasyl
08/08/2020, 8:43 PM
Btw would allowing the user to add any annotations to the generated binding be possible? Like having "annotations" property on the
ContributesBinding
that'd contain annotations to pass onto the binding site?
r
ralf
08/08/2020, 9:04 PM
To be very clear: we don’t want to replace Dagger or change how it works in any way. Modules are fine, binding and provider methods are fine. It’s just the “pure” binding methods that felt like boilerplate and that’s the majority in our codebase. So this annotation is still a win.
No, a separate
annotations
property wouldn’t work, because the qualifier annotations can attributes themselves, e.g.
@SingleIn(AppScope::class)
. You can’t express that in an attribute.
w
wasyl
08/09/2020, 4:28 PM
I totally understand the boilerplate argument, I’m just wondering because we do have quite a lot of multibindings and qualified bindings I was hoping to also reduce. Thanks for explanation! 🙂