project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.48k stars 2k forks source link

[Silabs] dependency inversion on platform depending on app/server/Server.h #30598

Open andy31415 opened 11 months ago

andy31415 commented 11 months ago

We have:

src/platform/silabs/efr32/wifi/wfx_notify.cpp
44:#include <app/server/Server.h>

src/platform/silabs/SiWx917/wifi/wfx_notify.cpp
37:#include <app/server/Server.h>

It does not seem right that a platform file (low level) depends on app (highest level). This breaks layering and dependencies. Found while checking #30596

andy31415 commented 11 months ago

We also seem to #include <app/server/Dnssd.h> which is not ok.

Also having #include "AppConfig.h" is unclear to me since I am not sure where AppConfig.h resides and what generates it.