Allow locally installed libraries in sketch profiles. by cmaglie · Pull Request #2930 · arduino/arduino-cli (original) (raw)

Please check if the PR fulfills these requirements

See how to contribute

What kind of change does this PR introduce?

This change allows us to specify libraries in the sketch profile using a path to a local directory by prefixing the path with the string dir: .
It also provides this information in compile --dump-profile

What is the current behavior?

Only libraries in the Arduino Libraries Index could be specified in a sketch profile. A typical example may be the following:

profiles:
  uno:
    fqbn: arduino:avr:uno
    platforms:
      - platform: arduino:avr (1.8.6)
    libraries:
      - Adafruit SSD1306 (2.5.13)
      - Adafruit GFX Library (1.11.11)
      - Adafruit BusIO (1.17.0)

What is the new behavior?

A library installed in the filesystem could be specified as well:

profiles:
  uno:
    fqbn: arduino:avr:uno
    platforms:
      - platform: arduino:avr (1.8.6)
    libraries:
      - dir: libraries/MyLib
      - dir: /path/to/library/MyLibOutsideTheSketch 
      - Adafruit SSD1306 (2.5.13)
      - Adafruit GFX Library (1.11.11)
      - Adafruit BusIO (1.17.0)

In this case the two libraries:

Does this PR introduce a breaking change, and is titled accordingly?

No

Other information