Skip to content

build: Fix continual PlatformIO re-sets - #125

Merged
mathieucarbou merged 2 commits into
ESP32Async:mainfrom
willmmiles:pio-lib-symlink
Sep 20, 2026
Merged

mathieucarbou merged 2 commits into
ESP32Async:mainfrom
willmmiles:pio-lib-symlink

Conversation

@willmmiles

Copy link
Copy Markdown

When building for examples and CI, treat the example as the "primary project" and the library as an explicit dependency via PlatformIO's "symlink" feature. This fixes some cases where the IDE will re-trigger configuration on any file edit.

lib_dir named the repository root as a library *storage*, so its children were
the libraries and library.json was never read: the build saw an anonymous
folder called src, and .github, logs and idf_component_examples were scanned
as candidate libraries too.  symlink:// installs the repository itself as the
library, so the manifest governs the build.

It also takes .pio back out of the project checksum, which is computed by
walking lib_dir, so what one environment's build leaves behind no longer
invalidates every other environment's.

One limit remains: the dependency finder decides which library owns a header
by testing whether the path sits below that library's root, and this library's
root is the repository, so anything installed under .pio/libdeps is invisible
to it.  Adding a real dependency means moving libdeps_dir out of the tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@willmmiles

Copy link
Copy Markdown
Author

Apologies for the AI-isms in the commit message. I can clean that up if you'd like.

@mathieucarbou

Copy link
Copy Markdown
Member

I was annoyed by that also be never was able to fix it.

About Libretiny: seems like we are facing an update issue since the version of the platform is not fixed, but I dont remember which version we were pointing to. Ideally we should fix that. We had sames issus with RPI so I fixed it also.

@willmmiles

Copy link
Copy Markdown
Author

About Libretiny: seems like we are facing an update issue since the version of the platform is not fixed, but I dont remember which version we were pointing to. Ideally we should fix that. We had sames issus with RPI so I fixed it also.

Yeah, I poked this one yesterday. It looks like a new PlatformIO release broke LibreTiny's build files. We can pin the PlatformIO version (6.1.19, I think, would work).

LibreTiny currently has an incompatibility with the latest PlatformIO
release.  Pin the old version for now.
@willmmiles
willmmiles marked this pull request as ready for review September 20, 2026 21:11
@mathieucarbou
mathieucarbou merged commit d9c3349 into ESP32Async:main Sep 20, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants