eclipse-paho / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
https://eclipse.org/paho
Other
1.37k stars 757 forks source link

Move includes to a subdirectory #236

Closed Equidamoid closed 12 months ago

Equidamoid commented 2 years ago

Hello,

The current code requies includes like #include <MQTTClient.h>, which can lead to a mess if you happen to have multiple mqtt-related dependencies.

How about prefixing the includes with something like paho/ or paho-embedded/?

I'm willing to prepare a PR for this if the maintainers agree (and if this repo isn't as abandoned as it looks).

CIPop commented 1 year ago

I found that most embedded projects do not have folder-separated include files (e.g. STMicro's BSP, ARM's CMSIS all expect single-level includes and a properly defined INCLUDE path). That said, because the name is generic (i.e. does not include "Paho"), I see how name collisions could appear. I never tried it but attempting to install the build on Linux side-by-side with Paho Linux will likely cause issues.

My preference is towards paho-embedded/ or similar to disambiguate from the paho.mqtt.c's "MQTTClient.h". We could also change the name of the client to include "Paho" or "PahoEmbedded" although I find that a bigger breaking change.

CIPop commented 1 year ago

Similar / duplicate to #156.

icraggs commented 12 months ago

Close as duplicate of #156