-
Notifications
You must be signed in to change notification settings - Fork 7
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
Change @Component to Guice @Inject #60
Conversation
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.
It is used in every site reports plugin ... I wouldn't do such change
At some point we do want to get rid of the old plexus injection completely. It's worth thinking about how we're going to finish that job. If only we had a monorepo, and if wishes were horses... |
How does this behave with concrete impls? |
They're going to need to change so the injection happens in the subclass and the values are passed up the chain in a call to super. I've already done or am in the process of doing this in other plugins. The difference here is we don't have all the dependents in the same repo. :-( |
We can try field injection as an intermediate step but we should get away from this eventually. It makes classes mutable and bypasses the usual object initialization, which is unnecessarily risky. It's also harder to write tests for. |
Moving to da draft because I cannot estimate the impact... |
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.
Now by fields injection it is safe
Need to check where this code is used. There are many subclasses spread across different plugins. Not sure how to navigate this.