-
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
Change config headers include order #37550
Conversation
Move `CHIPConfig.h` after `CHIP_DEVICE_PROJECT_CONFIG_INCLUDE` as it defines default configuration values that may be overriden by project specific config. This may result in macro redefined warning when `CHIP_DEVICE_PROJECT_CONFIG_INCLUDE` is not included before `CHIPDeviceConfig.h`. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
PR #37550: Size comparison from 92f9f0b to 07c5183 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@@ -41,6 +39,8 @@ | |||
#include CHIP_DEVICE_PROJECT_CONFIG_INCLUDE | |||
#endif | |||
|
|||
#include <lib/core/CHIPConfig.h> |
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.
Needs a comment that ordering is intentional, so that nobody moves it after. it is not immediately obvious about this dependency.
Is it implied that "chipconfig" depends on "projectconfig"? Given previous order, are there no cases where "project config depends on chipconfig"?
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 was wrong, this change won't be needed, details in comment: #37513 (comment)
Move
CHIPConfig.h
afterCHIP_DEVICE_PROJECT_CONFIG_INCLUDE
as it defines default configuration values that may be overriden by project specific config. This may result in macro redefined warning whenCHIP_DEVICE_PROJECT_CONFIG_INCLUDE
is not included beforeCHIPDeviceConfig.h
.Problem was found during development of #37513 in
tv-casting-app
example:Testing
Tested by CI.