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

Feature Request: Support javax.inject.Provider interop with LazyKt.lazy and dagger.Lazy #104

Open
andreasnomikos opened this issue Aug 11, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@andreasnomikos
Copy link

Motif promotes a coding model comprised of a big tree of small nested scopes so using some form of Lazy is usually not required.

javax.inject.Provider can be a direct standin replacement of Lazy as long as the original provider for Foo is not annotated with @DoNotCache

There might however still be cases where for interop reasons with Dagger libraries or kotlin libraries we might want to provide kotlin.Lazy or dagger.Lazy bindings or at a minimum some extensions to convert motif Providers to the above interfaces.

From an optimizations perspective the only dagger opt I am aware of that is relevant is that if you try to prime a dagger.Lazy with a javax.inject.Provider that is already a dagger.Lazy then the implementation will avoid stacking the 2 lazies and will only use the original

@Leland-Takamine Leland-Takamine added the enhancement New feature or request label Aug 21, 2019
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

No branches or pull requests

2 participants