-
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
Initial version of Joint Fabric implementation #34637
base: master
Are you sure you want to change the base?
Conversation
Review changes with SemanticDiff. Analyzed 11 of 73 files. Overall, the semantic diff is 1% smaller than the GitHub diff. File Information
|
23027eb
to
feef2f1
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.
Please split this up to something more manageable. A PR of 300K lines added and 240K removed is not reviewable in any practical sense.
I imagine a lot of this is code generated files, so please start with a PR for those (XML for data first, then maybe some commands individually)
namespace { | ||
static constexpr size_t kFabricId = 1; | ||
|
||
ExampleOperationalCredentialsIssuer gOpCredsIssuer(kFabricId); | ||
PersistentStorage gStorage; | ||
|
||
CHIP_ERROR PrepareJointFabricCluster() | ||
{ | ||
SetPersistentStorageDelegate(&gStorage); | ||
SetOperationalCredentialsIssuer(&gOpCredsIssuer); | ||
SetChipToolKvs(LinuxDeviceOptions::GetInstance().chipToolKvs); | ||
return CHIP_NO_ERROR; | ||
} | ||
} // namespace |
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.
Linux apps all share this. Having these global setters and fixed fabric ID breaks other assumptions of the Linux examples
ExampleOperationalCredentialsIssuer gOpCredsIssuer(kFabricId); | ||
PersistentStorage gStorage; | ||
|
||
CHIP_ERROR PrepareJointFabricCluster() |
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.
The entire joint fabric feature should be conditional on build,and should be in a different example, not all-clusters-app. Please do like what Fabric Sync did, and make your own special samples for that whole method that doesn't bloat and complexify the already very complex all-clusters-app
@@ -427,6 +427,7 @@ static_library("app") { | |||
output_name = "libCHIPDataModel" | |||
|
|||
sources = [ | |||
"${chip_root}/src/controller/ExamplePersistentStorage.cpp", |
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 must be a separate library that is NOT a dependency of libCHIPDataModel since it's common code shared by all. Specific examples have to be split AND injectable. Not baked-in.
@@ -473,6 +474,7 @@ static_library("app") { | |||
"${chip_root}/src/messaging", | |||
"${chip_root}/src/protocols/interaction_model", | |||
"${chip_root}/src/system", | |||
"${chip_root}/third_party/inipp", |
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.
Do not add 3rd party deps to libCHIPDataModel without justification
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.
inipp does not seem to make sense for embedded devices
|
||
[[deprecated("This constant is no longer used by common code and should be replaced by kMIN_CSR_Buffer_Size. Checks that a CSR is " | ||
"<= kMAX_CSR_Buffer_size must be updated. This remains to keep valid buffers working from previous public API " | ||
"usage.")]] constexpr size_t kMAX_CSR_Buffer_Size = 255; |
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.
You cannot change this deprecation without justification. Changing this value will break stuff.
@vijs I think the huge delta is due to the kotlin formatter not being run: all kt files changed and all look unformatted (quite ugly) |
feef2f1
to
42f7e5d
Compare
Thank you for your suggestions. I’ve regenerated and restyled the files. Now, only 73 files have changed. |
Regenerated and restyled the files. Now, only 73 files have changed.
PR #34637: Size comparison from b426fde to 42f7e5d Full report (27 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, mbed, nxp, qpg)
|
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.
Please separate out datamodel updates + codegen from implementation in separate PRs. start with xml creation/update and codegen as single stand-alone PR (without any app code).
Review-wise those are very different: on xml we just validate against spec text, for implementation we have to review logic. You can do the first PR and in parallel while it is being reviewed, you can address the comments you received in this PR and fix some compilation issues that seem to exist.
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.
Other reviewers that would typically be scrutinizing the new code are likely engaged with 1.4 tasks. Please do not reach out to them until August 19 at the earliest. I will dismiss my CR on August 19.
Dismissing the CR now that the 1.4 test harness tag has been cut
Initial version of the Joint Fabric implementation 34635
Added support for JCM (5.6.3. Joint Commissioning Method)
Fixes #34635