Ignore unused libraries included in lib_deps

Hi!

I have an ini file that I’m using for test codes from topics in Arduino forum and the file has a long list of libraries under lib_deps.

The problem is:

When I have a new code to compile I have to comment out all unused libraries under lib_deps.

How I can make dependency scanner look only for libraries included on sketch?

Thanks in advance.

Best regards.

Have you tried lib_ldf_mode = chain+?

Hi!

Thanks for your answer!

I’m not sure if I did in the right way but I think it doesn’t worked.

I did in this way:

[common]
upload_port = /dev/ttyUSB0
monitor_speed = 115200
monitor_port = /dev/ttyUSB0
lib_ldf_mode = chain+
build_flags = -D
lib_deps = ; Many libraries
             

[env:mega2560]
framework = arduino
platform = atmelavr
board = megaatmega2560
upload_port = ${common.upload_port}
monitor_speed = ${common.monitor_speed}
monitor_port = ${common.monitor_port}
lib_ldf_mode = ${common.lib_ldf_mode}
build_flags = ${common.build_flags}
lib_deps = 
    ${common.lib_deps}

After install all libraries in lib_deps the compiling message was:

PACKAGES: 
 - framework-arduino-avr @ 5.1.0 
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain+, Compatibility ~ soft
Found 50 compatible libraries
Scanning dependencies...
Dependency Graph ; long list

Then this errors even with only bounce2 library included on code.

Best regards.

Hi!

There’s any other suggestion for this problem?

Best regards.