-
Notifications
You must be signed in to change notification settings - Fork 59
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
Pass ExtensionsRunner instance to createComponents #477
Pass ExtensionsRunner instance to createComponents #477
Conversation
485360d
to
9cd14cd
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #477 +/- ##
============================================
+ Coverage 65.96% 66.17% +0.20%
- Complexity 183 186 +3
============================================
Files 35 35
Lines 808 813 +5
Branches 24 24
============================================
+ Hits 533 538 +5
Misses 264 264
Partials 11 11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
9cd14cd
to
afefeae
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.
We might need to revisit this logic while working on #467. Approved for now.
* Pass ExtensionsRunner instance to createComponents Signed-off-by: Daniel Widdis <[email protected]> * Add more getters Signed-off-by: Daniel Widdis <[email protected]> --------- Signed-off-by: Daniel Widdis <[email protected]> (cherry picked from commit b68bf20) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Agreed. Here's the overall logical constraints (which probably should find its way into code comments): Order matters:
|
* Pass ExtensionsRunner instance to createComponents * Add more getters --------- (cherry picked from commit b68bf20) Signed-off-by: Daniel Widdis <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…t#477) * Pass ExtensionsRunner instance to createComponents Signed-off-by: Daniel Widdis <[email protected]> * Add more getters Signed-off-by: Daniel Widdis <[email protected]> --------- Signed-off-by: Daniel Widdis <[email protected]>
Description
Guice has not finished initializing the injector when calling
createComponents
as the return objects need to be injected. Components which require objects from theExtensionsRunner
for instantiation need a copy of them available.While the constructor could be filled with a long list of these parameters (as is done in plugins) this creates a hard API dependency on the parameters, and changing the number of parameters would break compatibility.
By passing the ExtensionsRunner, additional objects can be made available via getters without changing the API.
Issues Resolved
Improves on #466
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.