Exclude utility/pigpio from PlatformIO package export - #1078
Merged
Merged
Conversation
The `export.exclude` list in library.json strips every Linux/SBC-specific
backend under `utility/` from the packaged PlatformIO library (wiringPi, MRAA,
LittleWire, RPi, SPIDEV, rp2, ATXMegaD3) — but `utility/pigpio` was missed.
`utility/pigpio/{compatibility,gpio,interrupt,spi}.cpp` include <pigpio.h>,
which is a Raspberry-Pi-only dependency. When RF24 is consumed as a PlatformIO
dependency on Arduino targets, classic PlatformIO's Library Dependency Finder
prunes these files via the `#if !defined(ARDUINO)` guards, so the omission is
harmless there. However, build systems that compile all packaged sources
without running the LDF (e.g. ESPHome's ESP32 arduino/pioarduino -> ESP-IDF
converter, which globs every source file in a dependency) attempt to compile
the pigpio backend and fail with "pigpio.h: No such file or directory".
Excluding `utility/pigpio/*` from the export — consistent with the other
Linux-only backends already listed — fixes those builds and has no effect on
platforms that relied on LDF pruning.
2bndy5
approved these changes
Aug 12, 2026
2bndy5
left a comment
Member
There was a problem hiding this comment.
Thanks. FYI, the pigpio driver was added after the platform io support was added. We just missed it when merging the pigpio driver to master branch.
Contributor
Author
|
Thanks a lot @2bndy5 ! I made a ESPHome external component for the nRF24L01+ that works on ESP32 and ESP8266: https://github.com/kuralabs/esphome-nrf24 That's why found this issue. Currently its pointing to my fork, as soon as this is released (no pressure, just a statement) I'll update it to pull from upstream. Thanks. |
Member
|
I think we can push a release, right @TMRh20 ? |
Member
|
@2bndy5 Yes! Thank you @carlos-jenkins |
Member
|
Deployed v1.6.2. Should be live already on PIO registry. |
carlos-jenkins
added a commit
to kuralabs/esphome-nrf24
that referenced
this pull request
Aug 13, 2026
RF24 v1.6.2 was released with the fix from nRF24/RF24#1078 Changes: - __init__.py: pull `nRF24/RF24@1.6.2` from the PlatformIO registry instead of our fork's git branch. - README: rewrite the RF24 dependency section to describe the registry dependency and the >=1.6.2 requirement; remove all references to the fork. Verified: `tox -e validate` and `tox -e compile` (ESP32 + ESP8266) pass, with RF24 installed from the registry (Library Manager: nRF24/RF24 @ 1.6.2).
Contributor
Author
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.
Summary
library.json'sexport.excludestrips every Linux/SBC-specific backend underutility/from the packaged PlatformIO library - wiringPi , MRAA , LittleWire , RPi , SPIDEV , rp2 , ATXMegaD3 - but utility/pigpio was missed. This one-line change adds it, consistent with the sibling backends.Why it matters
utility/pigpio/{compatibility,gpio,interrupt,spi}.cpp#include <pigpio.h>, a Raspberry-Pi–only dependency. Because it isn't excluded, it ships in the packaged library and is the only remainingutility/backend with .cpp sources that a non-LDF consumer will try to compile.#if !defined(ARDUINO)guards, so they're never compiled on Arduino targets.pigpio.h: No such file or directory.A concrete case is ESPHome on ESP32: current ESPHome builds the Arduino framework through the IDF-based
pioarduinoplatform, whose PlatformIO -> ESP-IDF converter globs every source file in a dependency (no LDF). Pulling RF24 via lib_deps /cg.add_library("nRF24/RF24")therefore compilesutility/pigpio/*.cppand fails on ESP32. ESP8266 (classic PlatformIO) is unaffected.