arduino / compile-sketches

GitHub Actions action that checks whether Arduino sketches compile and produces a report of data from the compilations
GNU General Public License v3.0
69 stars 13 forks source link

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

Open aliphys opened 1 year ago

aliphys commented 1 year ago

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

aliphys commented 1 year ago

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

aliphys commented 1 year ago

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