-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[DRAFT/EXAMPLE] Cleaner interface split for ServerClusterInterface #37791
Conversation
/gemini summary |
/gemini review |
Summary of ChangesThis pull request aims to improve the interface for Highlights
ChangelogClick here to see the changelog
Activity
|
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.
Code Review
This pull request introduces a cleaner interface split for ServerClusterInterface. The changes look good overall, but I have a few suggestions for improvement, particularly around consistency and documentation.
Summary of Findings
- Method Naming Consistency: The renaming of
Invoke
toInvokeCommand
should be consistently applied across all relevant interfaces and implementations to avoid confusion. - Code Coverage: Ensure adequate unit tests are added or updated to cover the new
DefaultServerCluster
class and its functionalities. - Error Code Documentation: Provide a clear explanation of when the new
CHIP_ERROR_IN_USE
error code should be used.
Assessment
The pull request introduces a cleaner interface split for ServerClusterInterface, aiming to reduce intrusiveness and improve modularity. The changes include renaming a method, adding a new error code, and introducing a DefaultServerCluster class. While the changes seem well-structured, there are a few areas that could benefit from further clarification or refinement. I recommend addressing the comments before merging, and users should have others review and approve this code before merging.
Unsure about the comments: asks for coverage and coverage is quite good. The only addressable one may be the better details on error code meaning.
PR #37791: Size comparison from a8e2ae5 to ae9ddf7 Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Closing: this was merged back into #37541 |
This is a more "clean interface" version of #37541:
This uses slightly more RAM since the linked list is not intrusive: uses heap instead of BSS and 4 bytes extra per cluster. However this may be ok since small devices will have less than 20 clusters.
Testing
Covered by unit tests. Test coverage for new code is 100%: