Throw if injecting Subcomponent.Builder without a provider
See original GitHub issueInjecting Provider<SubcomponentInteface.Builder>
lets you build a subcomponent.
However, Dagger also lets you inject SubcomponentInterface.Builder
directly, leading to concurrency bugs if subcomponents are created from the same partially initialized builder.
Dagger should make it impossible to inject Subcomponentinteface.Builder
directly.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Dagger: Is it possible to automatically expose Subcomponent ...
Yes, by specifying a component dependency, you can effectively have every "provision method" (zero-arg getter) on the target component added ...
Read more >Hierarchical injectors - Angular
With hierarchical dependency injection, you can isolate sections of the application and ... If Angular still doesn't find the provider, it throws an...
Read more >Dependency Injection with Dagger 2 - CodePath Cliffnotes
Subcomponent builders allow the creator of the subcomponent to be de-coupled from the parent component, by removing the need to have a subcomponent...
Read more >Advanced Dagger Semantics
Dagger is a fully static, compile-time dependency injection framework for both Java and Android. It is developed by the Java Core Libraries Team...
Read more >Dagger & Android Thoughts: Dependency Injection in Android
All subcomponents extend from the ApplicationComponent. Because of the above point, all the components will need to declare which modules they use without...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW
@Subcomponent.Factory
, which should be in the next Dagger release, doesn’t have this issue.I’m going to close this - @cgdecker’s point is a good one, and the SPI plugin should live outside of Dagger.