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

Should throw error for incorrect module type #183

Closed
chrisjenx opened this issue Jan 28, 2021 · 2 comments
Closed

Should throw error for incorrect module type #183

chrisjenx opened this issue Jan 28, 2021 · 2 comments

Comments

@chrisjenx
Copy link

chrisjenx commented Jan 28, 2021

Noticed that Anvil doesn't throw or fail when trying to do this, which subsequently caused dagger to fail downstream.

@Module
@ContributesTo(AppScope::class)
interface LibraryModule {
    @Provides
    fun providesSomeEndpoint(retrofit: Retrofit): SomeEndpoint = retrofit.create()
}

Not sure if Anvil should ignore this or throw an error?

@chrisjenx chrisjenx changed the title Should throw error for incorrect module Should throw error for incorrect module type Jan 28, 2021
@vRallev
Copy link
Collaborator

vRallev commented Jan 28, 2021

Does Dagger throw an error? I never tried this before.

@chrisjenx
Copy link
Author

Ahh thanks for fixing! Was literally just following up on this when you closed it 👍

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

No branches or pull requests

2 participants