-
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
Switch to having only one struct named LabelStruct. #13380
Switch to having only one struct named LabelStruct. #13380
Conversation
d983a53
to
2d4dbe9
Compare
PR #13380: Size comparison from 585cdcb to 2d4dbe9 Decreases (25 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
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.
I believe the "Application" struct for ApplicationBasicCluster and ApplicationLauncherCluster is also duplicated, is it possible to fix that struct here as well?
/rebase |
This is shared across the fixed label and user label clusters. The struct definition is in the "detail" namespace, with alias namespaces in the two clusters that use it. Consumers are generally expected to use the per-cluster aliases.
2d4dbe9
to
9fc02bf
Compare
PR #13380: Size comparison from c25c4b3 to 9fc02bf Decreases (25 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
That's a different situation: those are different struct definitions in the spec, not a single struct definition used in both clusters. For that one, we should leave them as separate structs in the XML, to match the spec, and I guess we need to change one of the names to disambiguate them... |
This is shared across the fixed label and user label clusters. The struct definition is in the "detail" namespace, with alias namespaces in the two clusters that use it. Consumers are generally expected to use the per-cluster aliases.
This is shared across the fixed label and user label clusters.
The struct definition is in the "detail" namespace, with alias
namespaces in the two clusters that use it. Consumers are generally
expected to use the per-cluster aliases.
Problem
Multiple structs with the same name are a problem, because various places look up structs by name.
Change overview
Have only one struct with that name in XML.
Also have only one struct with that name in C++, so C++ consumers who only have a name without the cluster context (if any) don't necessarily have to guess the right cluster name and we can't get weird divergence between the per-cluster views of this struct.
Testing
Tree compiles, extra assignments are gone in Darwin code.