I am developing an open source library for ESP’s on Github. The library itself has libdeps to other libraries, in particular ESPAsyncWebserver. Now I am adding my library to a new project with the following line in plarformio.ini.
lib_deps = https://github.com/...
If I just add the ESPAsyncWebserver dependency to my library.json, I get some compile errors. I also have some compile errors for missing files like Wifi.h or EEprom.h and sometimes FS.h. At the moment it’s compiling with the following dependecies in my library.json.
"dependencies":[
{ "name":"ESP8266WiFi", "platforms":"espressif8266" },
{ "name":"WiFi", "platforms":"espressif32" },
{ "name":"EEPROM", "platforms":["espressif32","espressif8266"] },
{ "name":"ESPAsyncTCP", "owner": "me-no-dev"},
{ "name":"ESP Async WebServer", "owner": "me-no-dev", "version" : "^1.2.3"},
]
The question is why do I have to add stuff like WiFi, EEprom (included in some files in my own library) to this list and what is the recommended way to add ESPAsyncWebserver with all chained dependencies. I also experienced that a working solution of the above dependency list did not work anymore when I changed something in my own code which has nothing to do with this at all. Maybe because of a different compilation order of cpp’s? Anyway I would highly appreciate some advise on how to properly do this.