Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map multibindings #48

Closed
matejdro opened this issue Oct 17, 2024 · 4 comments
Closed

Map multibindings #48

matejdro opened this issue Oct 17, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@matejdro
Copy link

matejdro commented Oct 17, 2024

Any chance a support for contributing to a map multibinding could be added?

Would adding a key property to the contributes annotation work?

@vRallev vRallev added the enhancement New feature or request label Oct 17, 2024
@vRallev
Copy link
Contributor

vRallev commented Oct 17, 2024

I don't see why not.

@bddckr
Copy link

bddckr commented Jan 25, 2025

This is the last reason I can't move my projects away from Dagger+Anvil yet.

Is anything required to get the linked PR over the finish line and get a release out with it? I can see there's a question in the PR to add support for LazyClassKey, but IMO that can be added another time. The PR seems to resolve the original request of getting maps working for multibindings.

@vRallev
Copy link
Contributor

vRallev commented Feb 3, 2025

I'm sorry for the delay, but this gave me a lot of time to think about this request and #86.

While Map multibindings as a feature makes sense, the the proposed changes would significantly increase the library's API surface, which I'm hesitant to do for long-term maintainability. We don't use this feature and I'm concerned about the potential for future complexity and the ongoing maintenance burden.

But the good thing is, this could be easily implemented as an extension and doesn't need to be part of the core library: https://github.com/amzn/kotlin-inject-anvil?tab=readme-ov-file#custom-symbol-processors For now, I suggest going this route.

@vRallev vRallev closed this as completed Feb 3, 2025
@matejdro
Copy link
Author

matejdro commented Feb 3, 2025

This would be kinda funny and complex situation. Having an addon for an addon for an addon, a 3-tiered dependency injection solution. But I understand your point, thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants