You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apply asset-declared build defines (embedded_fs_defines) to the compile configuration #4020
ci/compiler/asset_scanner.embedded_fs_defines() decides which preprocessor defines a sketch's assets require, and nothing applies them. An asset declaring storage=littlefs is reported (in green) but cannot actually turn a backend on.
Why it is not simply wired up
Two independent reasons, and the second is the blocking one:
1. Defines are per-board, this is per-sketch. Build defines are assembled from Board.defines in ci/boards.py and rendered into the generated platformio.ini. Asset scanning happens later, in copy_example_source(), which returns bool and has no path back to the build configuration. Threading it through means changing that contract and its three call sites in ci/compiler/pio.py.
2. Applying it today would break the builds it targets. The only define currently produced is FL_ESP8266_EMBEDDED_FS, and the ESP8266 embedded backend does not compile — fbuild caches the ESP8266 core without its littlefs submodule, so <LittleFS.h> resolves and then fails on its own #include "../lib/littlefs/lfs.h" (FastLED/fbuild#1380). Enabling it in response to an asset declaration would turn a working build into a broken one.
So the plumbing is blocked behind fbuild#1380 regardless of effort.
Worth noting: ESP32 already works
On ESP32 — the platform people actually use LittleFS on — no define is needed. platforms/embedded_fs.h selects the backend automatically, so a sketch declaring storage=littlefs gets a working filesystem today and the green message is accurate. The gap is ESP8266-only.
Give copy_example_source() a return type that can carry build requirements instead of bool, and thread it to where platformio.ini defines are assembled.
Apply embedded_fs_defines() output there.
Test that a sketch declaring storage=littlefs produces the define in the generated ini.
Not a silent failure
embedded_fs_defines() is tested and correct in isolation; it is simply not consumed yet. The reporting function deliberately returns nothing so no caller can appear to apply defines it is dropping — an earlier revision returned them from the reporting path and the caller discarded the value, which read as if the build were acting on it.
Activity
fix: address review — macro prefix, guard scope, and two honest contr…
fix(ci): stop announcing an embedded filesystem the build never enabled
feat(pins): declare ESP32's clockless default; document the FL_PIN_ c…
fix(compiler): apply asset build defines
fix(compiler): apply asset build defines (#4073)