-
Notifications
You must be signed in to change notification settings - Fork 44
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
Reflect compiler not generating default builder class. #145
Comments
We have a bunch of ignored functional tests for the same reason: // TODO reflect-compiler bug! Not generating builder method.
exclude 'dagger/functional/builder/BuilderTest.java'
exclude 'dagger/functional/cycle/DoubleCheckCycleTest.java'
exclude 'dagger/functional/membersinject/MembersInjectionOrderingTest.java'
exclude 'dagger/functional/nullables/NullabilityTest.java'
exclude 'dagger/functional/MultibindingTest.java'
exclude 'dagger/functional/NonComponentDependencyTest.java' |
Is there any workaround that can be used in the meantime for this? Can I provide the dependencies some other way? My setup is roughly like this:
|
We declared @Component.Factory interface to workaround.
…On Wed, Aug 14, 2019, 4:59 PM Rohan Dhruva ***@***.***> wrote:
Is there any workaround that can be used in the meantime for this? Can I
provide the dependencies some other way?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#145?email_source=notifications&email_token=AAWYO27KTCPMSZOGEXMJXDLQESL5FA5CNFSM4IEUY4DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4KOFXA#issuecomment-521462492>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWYO23JZ7S324YHMR5FYOLQESL5FANCNFSM4IEUY4DA>
.
|
Hi @Laimiux , would you share how you used |
You have to explicitly declare a factory @Component(dependencies = [Host::class])
interface MyFeatureComponent {
@Component.Factory
interface Factory {
fun create(host: Host): MyFeatureComponent
}
fun feature(): MyFeature
} |
Thank you! |
By default, dagger-compiler generates a default
Builder
class.With setup such as this:
there will be a generated method
DaggerMyFeatureComponent.builder().dependencies(myDependencies).build()
The text was updated successfully, but these errors were encountered: