Add library.json with an explicit Adafruit BusIO dependency - #516
Open
langerma wants to merge 2 commits into
Open
Add library.json with an explicit Adafruit BusIO dependency#516langerma wants to merge 2 commits into
langerma wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope of the change
Adds a
library.jsonPlatformIO manifest at the repository root. No sourcefiles 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
REQUIRESfrom alibrary.jsondependenciesfield. Thedepends=Adafruit BusIOline inlibrary.propertiesis not consumed, so anyESPHome project using this library currently fails with:
(That include was added in #389 for the same underlying reason — to make
PlatformIO's dependency finder pull in BusIO.)
Since PlatformIO gives
library.jsonprecedence overlibrary.propertieswhen both exist, the manifest mirrors all existing metadata (description,
authors, license, frameworks, platforms) so the PlatformIO registry listing
loses nothing.
Known limitations
versionfield inlibrary.jsonmust be bumped together withlibrary.propertieson release. If your release tooling only toucheslibrary.properties, the two can drift; happy to adjust if you'd prefer adifferent approach.
library.properties).Testing