compile-sketches icon indicating copy to clipboard operation
compile-sketches copied to clipboard

Automatically load libraries from `depends` field in `library.propreties`

Open aliphys opened this issue 2 years ago • 2 comments
trafficstars

Describe the request

When a library is declared in the depends field of library.properties, it is included as part of the compilation.

In other words, when the following is part of library.properties

depends=Arduino_POSIXStorage,ArduinoRS485,Arduino_USBHostMbed5

Then this should be redundent in the comple-examples.yml workflow

libraries: |
    - name: Arduino_USBHostMbed5
    - name: Arduino_POSIXStorage
    - name: ArduinoRS485

Describe the current behavior

The dependant libraries need to be defined in the compile-sketches.yml workflow, regardless of what is defined inside the library.properties file of the library.

'arduino/compile-sketches' version

latest

Additional context

Inside the IDE, when a library is declared in the depends field of library.properties and is not installed the user is prompted to install them. This prevents dependancies issues when using the library functions or examples. As shown in this screenshot provided by @jcarolinares image

Issue checklist

  • [X] I searched for previous requests in the issue tracker
  • [X] I verified the feature was still missing when using the latest version
  • [X] My request contains all necessary details

aliphys avatar Nov 17 '23 17:11 aliphys

Demonstration of this issue: https://github.com/arduino-libraries/Arduino_UnifiedStorage/pull/30#issuecomment-1816693328

aliphys avatar Nov 17 '23 17:11 aliphys

Rough proof of concept: https://github.com/aliphys/compile-sketches/tree/addLibrary

aliphys avatar Nov 18 '23 12:11 aliphys