-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Split apart component infra to allow for abstract class integration #5017
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5017 +/- ##
==========================================
+ Coverage 68.50% 68.52% +0.01%
==========================================
Files 156 156
Lines 10129 10140 +11
==========================================
+ Hits 6939 6948 +9
- Misses 3190 3192 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 might be good to add an "advanced" section to the to config part of the docs with examples on how to use this e.g. for abstract classes.
Thanks.
Agreed but I want to use it and make sure it works before we document it. Just in case. |
This PR addresses some shortcomings in the way the component infra was defined. Essentially, it is fixing the fact that the
T
inComponent[T]
had to be invariant before. Now, a consumer can consume just the pieces required and create an abstract base class that can just beComponentToConfig[BaseModel]
andComponentLoader
and still have the subclasses use the concrete types.This does not break any usage of creating component. The only things it breaks is:
ComponentConfigImpl
Component
type. These checks should now be done withis_component_class
I consider these to be incredibly specific and implementation details, especially this early. Therefore, it is not a breaking change.