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

Evaluate Dropping @Provides #71

Closed
JakeWharton opened this issue Nov 16, 2014 · 6 comments
Closed

Evaluate Dropping @Provides #71

JakeWharton opened this issue Nov 16, 2014 · 6 comments

Comments

@JakeWharton
Copy link

With set and map declaration moving to its own annotation, @Provides can be argued as useless, redundant information. All non-private, non-static methods would become providers. Public methods on modules which are not providers seems like an anti-pattern or erroneous. This also brings a stronger corollary to components.

I briefly discussed this with @gk5885 last week.

@JakeWharton
Copy link
Author

cc/ @swankjesse

@codefromthecrypt
Copy link

sgtm

@swankjesse
Copy link

This is tough. What about methods like equals() and toString() ? What about configure() when a module simultaneously supports Dagger & Guice?

@gk5885
Copy link

gk5885 commented Nov 17, 2014

Yeah, for whatever reason, this one just makes me nervous. There's something about having to look up an annotation on an enclosing class to figure out what's going to happen that leaves me uneasy. Actually, as we introduce @Provides/@Produces it might get a bit worse too…

@codefromthecrypt
Copy link

Supporting dual purpose modules wasn't something I thought about. Good
point.

@JakeWharton
Copy link
Author

I think @Provides/@Produces seals it for me. Just wanted to have the discussion.

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

4 participants