Set lib_ldf_mode for libraries (library.json only)

I try to set up travis-ci integration for a library that depends on other library that depends on other …etc… Somewhere the choosen platform makes a difference, so it is necessary to use the “chain+” mode for lib_ldf_mode, when compiling projects using this library. However, it seems not possible to set the lib_ldf_mode when using “platformio ci” to compile.

In detail:

My project (GitHub - euphi/HomieLoggerNode: A logging mechanism for depends on Homie that depends on “ESP Async WebServer” so there is a dependency to ESPAsyncTCP on ESP8266 and AsyncTCP on ESP32.
To install necessary libraries, I use
pio lib -g install This also installs “AsyncTCP” even if I don’t plan to compile for ESP32. Even worse, if the lib is installed, pio tries to compile it also for ESP8266 which results in an error.
This issue has been discussed in various projects, e.g. lib_deps piolibdeps issue creates dependences on all platforms · Issue #1153 · platformio/platformio-core · GitHub . However, the solution to set “lib_ldf_mode=chain+” seems to be not available for “platformio ci”.

Whats the correct way to have CI integration for libraries with complex dependencies?

This should be fixed in latest PIO Core 3.5 version. Try in CI config Redirecting...