I’ve been using Platformio-core for a couple years now and this is my first time using the discussion board. (Sorry – I had a bunch of helpful links but I had to reduce them to 2 because this is my first post).
I have a project I’m developing with Platformio for the ESP32 project that I am having problems with at the moment: Plant133. It uses some libraries that I developed to share between my different projects, mainly my og3 application framework. Lately I’m failing to get this and other projects to compile because of library dependency problems.
In particular, my code is using esp32async/ESPAsyncWebServer and also heman/AsyncMqttClient-esphome.
The library.json file for my og3 library is here (github) and the platform.ini file for the Plant133 project I’m trying to get to work is here on my branch where I’m trying to add a svelte-based web interface.
My code is failing to build because of conflicting dependencies. “pio pkg list” is giving me:
Libraries
├── Adafruit BusIO @ 1.17.4 (required: adafruit/Adafruit BusIO)
├── Adafruit SHTC3 Library @ 1.0.2 (required: adafruit/Adafruit SHTC3 Library)
│ └── Adafruit Unified Sensor @ 1.1.15 (required: Adafruit Unified Sensor)
├── ArduinoJson @ 7.4.2 (required: bblanchon/ArduinoJson @ ^7.0.0)
├── AsyncMqttClient-esphome @ 1.1.1 (required: heman/AsyncMqttClient-esphome @ ^1.0.0)
│ ├── AsyncTCP-esphome @ 2.1.4 (required: esphome/AsyncTCP-esphome @ ^2.0.1)
│ └── ESPAsyncTCP-esphome @ 2.0.0 (required: esphome/ESPAsyncTCP-esphome @ ^2.0.0)
├── CRC32 @ 2.0.0 (required: bakercp/CRC32)
├── ESP8266 and ESP32 OLED driver for SSD1306 displays @ 4.6.1 (required: thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays @ ^4.2.0)
├── ESPAsyncWebServer @ 3.6.0 (required: ESP32Async/ESPAsyncWebServer @ 3.6.0)
│ ├── AsyncTCP @ 3.4.9 (required: ESP32Async/AsyncTCP @ ^3.3.2)
│ ├── AsyncTCP_RP2040W @ 1.2.0 (required: khoih-prog/AsyncTCP_RP2040W @ ^1.2.0)
│ └── ESPAsyncTCP @ 2.0.0 (required: ESP32Async/ESPAsyncTCP @ ^2.0.0)
├── og3 @ 0.3.95 (required: og3 @ ^0.3.95)
│ ├── ArduinoJson @ 7.0.4 (required: bblanchon/ArduinoJson @ ~7.0.0)
│ ├── AsyncMqttClient-esphome @ 1.0.0 (required: heman/AsyncMqttClient-esphome @ ~1.0.0)
│ │ ├── AsyncTCP-esphome @ 1.2.2 (required: esphome/AsyncTCP-esphome @ ^1.1.1)
├── og3x-oled @ 0.3.1 (required: og3x-oled @ ^0.3.1)
└── og3x-shtc3 @ 0.3.0 (required: og3x-shtc3 @ ^0.3.0)
The main source of trouble is all the different Async-TCP packages (4 of them!) that are getting pulled-in, including a version AsyncTCP_RP2040W that is meant for the “raspberrypi” platform and doesn’t build for the ESP32. This is getting pulled-in from ESPAsyncWebServer. Its library.json file codes the dependeny as
{
“owner”: “ayushsharma82”,
“name”: “RPAsyncTCP”,
“version”: “^1.3.2”,
“platforms”: “raspberrypi”
}
Is is possible that the platforms specification is not working because they supplied a string instead of a list?
Do you have any wisdom for cleaning-up dependencies so I can get my projects to build again? I’d really like to have only one version of each library compiled in, or at least to avoid pulling-in libraries for a different platform.