forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Optional alternative to javax.inject #2721
Comments
I don't think we can do the same thing for |
Yes, that would solve the issue as well. 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per spec, Dagger is
Now I'm wondering, if the same behaviour would be feasible for
@Inject
,@Named
, ... annotation as well?The reason why I'm proposing this change is simply, because we can not expect
javax.inject
to declare an automatic module name any time soon. This effectively stops Dagger users from publishing named modules without relying on a filename-based module name forjavax.inject
.If Dagger accepted these annotations from any package, users could exclude the
javax.inject
dependency and use e.g.jakarta.inject
instead.javax.inject
could still remain the default dependency, so this change wouldn't break anything. But it would add some flexibility when dealing with the module system.The text was updated successfully, but these errors were encountered: