Hello, for some reason, PlatformIO ignores dependency platforms when installing dependencies from library.json from an actual dependency defined in platformio.ini.
My platformio.ini
[platformio]
default_envs = esp32dev
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_ldf_mode = chain+
lib_deps =
sandeepmistry/LoRa@^0.8.0
ottowinter/ESPAsyncWebServer-esphome @ ^2.1.0
board_build.f_cpu = 80000000L
monitor_speed = 115200
[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
Here is a library.json from ESPAsyncWebServer-esphome
{
"name":"ESPAsyncWebServer-esphome",
"description":"Asynchronous HTTP and WebSocket Server Library for ESP8266 and ESP32",
"keywords":"http,async,websocket,webserver",
"authors":
{
"name": "ESPHome Team",
"maintainer": true
},
"repository":
{
"type": "git",
"url": "https://github.com/esphome/ESPAsyncWebServer.git"
},
"version": "2.1.0",
"license": "LGPL-3.0",
"frameworks": "arduino",
"platforms": ["espressif8266", "espressif32"],
"dependencies": [
{
"owner": "ottowinter",
"name": "ESPAsyncTCP-esphome",
"platforms": "espressif8266"
},
{
"owner": "esphome",
"name": "AsyncTCP-esphome",
"platforms": "espressif32"
},
{
"name": "Hash",
"platforms": "espressif8266"
},
{
"name": "ESP8266WiFi",
"platforms": "espressif8266"
}
]
}
For some reason, PlatformIO installs all the dependencies ignoring the “platforms” despite me tryingto build it only for platform “espressif32”. When I manually remove these dependencies from the file the libraries no longer install.
What can I do to fix it? Thank you