-
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
Fix include checking for src/include/platform/internal/*.cpp #15121
Conversation
This does not fix the cycle or revert the change that added it. That needs to be done before this will pass CI. |
353ade0
to
d65b3d6
Compare
PR #15121: Size comparison from f2b344c to d65b3d6 Full report (11 builds for cyw30739, k32w, linux, qpg, telink)
|
d65b3d6
to
aad5e2c
Compare
PR #15121: Size comparison from f2b344c to aad5e2c Full report (41 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Fast tracking, given this has had enough time for review. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Since these .cpp files are included instead of being listed in sources, they are not processed by the include checker. This has allowed the introduction of a dependency cycle in 1e8ed9d ("Updated Device to Get PASE Verifier from Memory. (project-chip#14676)") which in turn result in the following build flake: FAILED: obj/src/platform/Darwin/Darwin.ConfigurationManagerImpl.cpp.o g++ -MMD -MF obj/src/platform/Darwin/Darwin.ConfigurationManagerImpl.cpp.o.d -target x86_64-apple-macos10.15 -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-cast-function-type -fno-strict-aliasing -target x86_64-apple-macos10.15 -arch arm64 -arch x86_64 -fobjc-arc -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1 -I../../../../../../../../src/include -I../../../../../../../../src -Igen/include -I../../../../../../../../zzz_generated/app-common -I../../../../../../../../config/standalone -I../../../../../../../../third_party/nlassert/repo/include -I../../../../../../../../third_party/nlio/repo/include -I../../../../../../../../third_party/mbedtls/repo/include -c ../../../../../../../../src/platform/Darwin/ConfigurationManagerImpl.cpp -o obj/src/platform/Darwin/Darwin.ConfigurationManagerImpl.cpp.o In file included from ../../../../../../../../src/platform/Darwin/ConfigurationManagerImpl.cpp:31: In file included from ../../../../../../../../src/include/platform/internal/GenericConfigurationManagerImpl.cpp:38: In file included from ../../../../../../../../src/protocols/secure_channel/PASESession.h:34: In file included from ../../../../../../../../src/messaging/ExchangeContext.h:31: In file included from ../../../../../../../../src/messaging/ExchangeDelegate.h:27: In file included from ../../../../../../../../src/messaging/ApplicationExchangeDispatch.h:28: In file included from ../../../../../../../../src/messaging/ExchangeMessageDispatch.h:27: In file included from ../../../../../../../../src/transport/SessionManager.h:39: In file included from ../../../../../../../../src/transport/GroupSession.h:22: In file included from ../../../../../../../../src/transport/Session.h:19: In file included from ../../../../../../../../src/credentials/FabricTable.h:27: In file included from ../../../../../../../../src/credentials/CHIPCert.h:34: ../../../../../../../../src/lib/asn1/ASN1.h:30:10: fatal error: 'asn1/ASN1OID.h' file not found #include <asn1/ASN1OID.h> ^~~~~~~~~~~~~~~~ 1 error generated. The requisite dependency for this include cannot be added, because it results in a cycle: ERROR Dependency cycle: //src/platform:platform -> //src/protocols/secure_channel:secure_channel -> //src/messaging:messaging -> //src/platform:platform Fix the diagnostic so that dependency errors in these files are caught: ERROR at //src/include/platform/internal/GenericConfigurationManagerImpl.ipp:38:11: Include not allowed. #include <protocols/secure_channel/PASESession.h> ^------------------------------------- It is not in any dependency of //src/platform:platform The include file is in the target(s): //src/protocols/secure_channel:secure_channel which should somehow be reachable.
aad5e2c
to
82e81d9
Compare
PR #15121: Size comparison from 2e658fb to 82e81d9 Full report (38 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
…-chip#15121) Since these .cpp files are included instead of being listed in sources, they are not processed by the include checker. This has allowed the introduction of a dependency cycle in 1e8ed9d ("Updated Device to Get PASE Verifier from Memory. (project-chip#14676)") which in turn result in the following build flake: FAILED: obj/src/platform/Darwin/Darwin.ConfigurationManagerImpl.cpp.o g++ -MMD -MF obj/src/platform/Darwin/Darwin.ConfigurationManagerImpl.cpp.o.d -target x86_64-apple-macos10.15 -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-cast-function-type -fno-strict-aliasing -target x86_64-apple-macos10.15 -arch arm64 -arch x86_64 -fobjc-arc -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DCHIP_HAVE_CONFIG_H=1 -I../../../../../../../../src/include -I../../../../../../../../src -Igen/include -I../../../../../../../../zzz_generated/app-common -I../../../../../../../../config/standalone -I../../../../../../../../third_party/nlassert/repo/include -I../../../../../../../../third_party/nlio/repo/include -I../../../../../../../../third_party/mbedtls/repo/include -c ../../../../../../../../src/platform/Darwin/ConfigurationManagerImpl.cpp -o obj/src/platform/Darwin/Darwin.ConfigurationManagerImpl.cpp.o In file included from ../../../../../../../../src/platform/Darwin/ConfigurationManagerImpl.cpp:31: In file included from ../../../../../../../../src/include/platform/internal/GenericConfigurationManagerImpl.cpp:38: In file included from ../../../../../../../../src/protocols/secure_channel/PASESession.h:34: In file included from ../../../../../../../../src/messaging/ExchangeContext.h:31: In file included from ../../../../../../../../src/messaging/ExchangeDelegate.h:27: In file included from ../../../../../../../../src/messaging/ApplicationExchangeDispatch.h:28: In file included from ../../../../../../../../src/messaging/ExchangeMessageDispatch.h:27: In file included from ../../../../../../../../src/transport/SessionManager.h:39: In file included from ../../../../../../../../src/transport/GroupSession.h:22: In file included from ../../../../../../../../src/transport/Session.h:19: In file included from ../../../../../../../../src/credentials/FabricTable.h:27: In file included from ../../../../../../../../src/credentials/CHIPCert.h:34: ../../../../../../../../src/lib/asn1/ASN1.h:30:10: fatal error: 'asn1/ASN1OID.h' file not found #include <asn1/ASN1OID.h> ^~~~~~~~~~~~~~~~ 1 error generated. The requisite dependency for this include cannot be added, because it results in a cycle: ERROR Dependency cycle: //src/platform:platform -> //src/protocols/secure_channel:secure_channel -> //src/messaging:messaging -> //src/platform:platform Fix the diagnostic so that dependency errors in these files are caught: ERROR at //src/include/platform/internal/GenericConfigurationManagerImpl.ipp:38:11: Include not allowed. #include <protocols/secure_channel/PASESession.h> ^------------------------------------- It is not in any dependency of //src/platform:platform The include file is in the target(s): //src/protocols/secure_channel:secure_channel which should somehow be reachable.
Problem
Since these .cpp files are included instead of being listed in sources,
they are not processed by the include checker. This has allowed the
introduction of a dependency cycle in
1e8ed9d ("Updated Device to Get PASE Verifier from Memory. (#14676)")
which in turn result in the following build flake:
The requisite dependency for this include cannot be added, because it
results in a cycle:
Change overview
Fix the diagnostic so that dependency errors in these files are caught:
Testing