Skip to content

Add library.json with an explicit Adafruit BusIO dependency - #516

Open
langerma wants to merge 2 commits into
adafruit:masterfrom
langerma:master
Open

Add library.json with an explicit Adafruit BusIO dependency#516
langerma wants to merge 2 commits into
adafruit:masterfrom
langerma:master

Conversation

@langerma

@langerma langerma commented Aug 2, 2026

Copy link
Copy Markdown

Scope of the change

Adds a library.json PlatformIO manifest at the repository root. No source
files are modified — this is a metadata-only change.

Motivation: ESPHome's native ESP-IDF toolchain (ESPHome 2026.5.0 and later,
which builds ESP32 Arduino projects with idf.py instead of PlatformIO)
converts each Arduino library into an ESP-IDF component and only wires
inter-component REQUIRES from a library.json dependencies field. The
depends=Adafruit BusIO line in library.properties is not consumed, so any
ESPHome project using this library currently fails with:

Adafruit_GFX.h:12:10: fatal error: Adafruit_I2CDevice.h: No such file or directory

(That include was added in #389 for the same underlying reason — to make
PlatformIO's dependency finder pull in BusIO.)

Since PlatformIO gives library.json precedence over library.properties
when both exist, the manifest mirrors all existing metadata (description,
authors, license, frameworks, platforms) so the PlatformIO registry listing
loses nothing.

Known limitations

  • The version field in library.json must be bumped together with
    library.properties on release. If your release tooling only touches
    library.properties, the two can drift; happy to adjust if you'd prefer a
    different approach.
  • Arduino IDE users are unaffected (the Arduino library manager reads only
    library.properties).

Testing

  • tested with ESPHome 2026.7 (ESP-IDF 5.5.5, ESP32 Arduino): a project that previously failed with the include error now compiles with this fork as the library source.

ESPHome's native ESP-IDF library converter (2026.5.0+) only wires
component REQUIRES from a library.json dependencies field and ignores
the depends= line in library.properties, so Adafruit_GFX fails to
compile with 'Adafruit_I2CDevice.h: No such file or directory'.
Since PlatformIO prefers library.json over library.properties when both
are present, carry over all metadata (description, authors, license,
frameworks, platforms) so the registry listing does not lose fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant