-
Notifications
You must be signed in to change notification settings - Fork 152
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
Updating Guice
to 4.0 and deleting temporary injections
#3644
Conversation
29a76cd
to
ca809a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some context involved here. Guice 4.0 includes an option to disable injection of zero argument constructors implicitly. The plan was to enable this option and then explicitly inject everything that was previously being injected implicitly. You probably don't want to delete those constructors unless you do this, otherwise you might accidentally inject the wrong values for options if your guice configuration has a bug, rather than reporting an error. I wholeheartedly agree with updating to the release of guice though.
Hey @dwightguth, to make sure that we're on the same page here. Do you mean the requireAtInjectOnConstructors, right? |
…va` and propagating changes
…and propagating these modifications
Hey @dwightguth, I still have some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great assuming you can get it to work with every class extending AbstractModule being modified.
Hey @dwightguth, all the modules that extend the |
This modification aimed to update the Guice version from
4.0-beta5
to4.0
, deleting the constructors with one void parameter toAnd applying the
requireAtInjectOnConstructors
on everyconstructor()
inside a class that extends theAbstractModule
for consistency. These modifications made it necessary to explicitly create constructors with zero parameters and within the@Injector
annotation.