Skip to content

feat(channels): pre-bind legacy clockless to BusTraits singleton (Phase 5b of #2428) - #2441

Merged
zackees merged 1 commit into
masterfrom
feat/channels-bloat-fix
May 10, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/channels-bloat-fix

Conversation

@zackees

@zackees zackees commented May 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Phase 5b of #2428. Lays the foundation for the binary-bloat fix from #2420 / #2421. Adds an opt-in ChannelManager-bypass for legacy addLeds<>-style controllers, gated behind FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY=1 so default behavior is unchanged.

Mechanism

1. Channel::setDriver(shared_ptr<IChannelDriver>) — new protected setter that records a pre-bound driver AND sets mDriverPreBound = true.

2. Channel::showPixels() — when mDriverPreBound is true, uses the cached mDriver directly and bypasses ChannelManager::selectDriverForChannel(). When false (the default for Channel::create(cfg)-created channels), the existing per-frame manager re-selection runs as before — preserves the swap drivers at runtime by changing priorities contract that the Channel API: Non-affinity channel re-binds when driver priorities swap test depends on.

3. Per-platform legacy clockless controllers pre-bind their default Bus's driver in their constructor, gated by the new opt-in macro:

  • src/platforms/esp/32/drivers/rmt/rmt_5/idf5_clockless.h → Bus::RMT
  • src/platforms/stub/clockless_channel_stub.h → Bus::STUB

Naming BusTraits<Bus::X>::instancePtr() here is the ODR-use that lets the linker keep ONLY the platform-default driver TU when the user enables the macro. Combined with future per-driver opt-in aggregator gating (Phase 5c), this delivers the binary-size fix from #2420.

4. FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY defined centrally in fl/channels/bus.h (default 0) so all consumers see the same value.

Phase 5c (next, not in this PR)

Verification

  • bash lint clean.
  • bash test fastled_core --debug --clean — passes 46/46 in isolation, proving the manager re-selection contract is preserved.
  • bash test --cpp full suite shows pre-existing test-order flakes inherited from master HEAD (fastled_core: Channel API: Non-affinity channel re-binds and a few stl tests). All affected tests pass when run in isolation. Verified by stashing my changes and re-running on bare master HEAD — same fastled_core failure shows up. None of the failures are caused by this PR.
  • mDriverPreBound default-initialized to false, so Channel::create(cfg) behavior is byte-for-byte identical to pre-PR.

Test plan

  • Singleton-identity preserved (Phase 5a regression test still passes).
  • Manager re-selection contract preserved (fastled_core isolated pass).
  • Default behavior unchanged (macro 0 → original code paths).
  • Phase 5c will exercise FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY=1 and measure binary size.

Related

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Optimization
    • Added support for driver pre-binding to improve channel initialization performance in supported configurations.
    • Introduced optional compile-time toggle to enable direct driver path selection, reducing unnecessary re-selection overhead.

Review Change Stack

…se 5b of #2428)

Phase 5b lays the foundation for the binary-bloat fix from #2420 / #2421.
Adds an opt-in ManagerChannelManager-bypass for legacy `addLeds<>`-style
controllers, gated behind `FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY=1` so the
default behavior is unchanged.

Mechanism:

1) `Channel::setDriver(shared_ptr<IChannelDriver>)` - new protected setter
   that records a pre-bound driver AND sets `mDriverPreBound = true`.

2) `Channel::showPixels()` - when `mDriverPreBound` is true, uses the cached
   `mDriver` directly and bypasses `ChannelManager::selectDriverForChannel()`.
   When false (the default for `Channel::create(cfg)`-created channels), the
   existing per-frame manager re-selection runs as before -- preserves the
   "swap drivers at runtime by changing priorities" contract that the
   `Channel API: Non-affinity channel re-binds when driver priorities swap`
   test in fastled_core.cpp depends on.

3) Per-platform legacy clockless controllers pre-bind their default Bus's
   driver in their constructor, gated by the new opt-in macro:
   - `src/platforms/esp/32/drivers/rmt/rmt_5/idf5_clockless.h` -> Bus::RMT
   - `src/platforms/stub/clockless_channel_stub.h` -> Bus::STUB

   Naming `BusTraits<Bus::X>::instancePtr()` here is the ODR-use that lets
   the linker keep ONLY the platform-default driver TU when the user enables
   the macro. Combined with future per-driver opt-in aggregator gating
   (Phase 5c), this delivers the binary-size fix from #2420.

4) `FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY` is now defined centrally in
   `fl/channels/bus.h` (defaulting to 0) so all consumers see the same value.

Phase 5c will:
- Modify `_build.cpp.hpp` aggregators to gate per-driver subdir includes
  behind the macro, so unused driver TUs aren't even compiled.
- Wire up other ESP32 legacy clockless paths (RMT4, ClocklessSPI fallback,
  ClocklessBlocking fallback).
- Measure binary size on the #2420 reproducer (expect ~783 KB -> ~344 KB
  on NEOPIXEL ESP32-S3).

Verification:
- bash lint clean.
- bash test --cpp full suite has the same pre-existing test-order flakes
  as master HEAD (`fastled_core: Channel API: Non-affinity channel re-binds`
  and a few stl tests). All affected tests pass when run in isolation. None
  of the failures are caused by this PR.
- bash test fastled_core --debug --clean: passes 46/46 in isolation,
  proving the manager re-selection contract is preserved.
- New mDriverPreBound flag is initialized to false by default, so
  `Channel::create(cfg)` behavior is byte-for-byte identical to pre-PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 10, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR introduces an opt-in compile-time toggle and pre-binding infrastructure to allow legacy clockless controllers to bind their drivers at construction instead of selecting drivers dynamically at each showPixels() call. When enabled, the flag causes platform-specific controllers to pre-bind via a new Channel::setDriver() method, bypassing ChannelManager selection.

Changes

Legacy Driver Registry Pre-Binding

Layer / File(s) Summary
Feature Toggle Definition
src/fl/channels/bus.h
Introduces FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY macro (default 0) to control whether legacy controllers use pre-binding or runtime driver selection.
Channel Driver Pre-Binding Interface
src/fl/channels/channel.h
Adds protected setDriver(fl::shared_ptr<IChannelDriver>) method and mDriverPreBound boolean flag to support driver pre-binding at construction time.
Conditional Driver Selection
src/fl/channels/channel.cpp.hpp
Updates showPixels() to check mDriverPreBound; if true, uses pre-bound driver directly; otherwise performs existing ChannelManager-based per-call selection.
ESP32 RMT5 Pre-Binding
src/platforms/esp/32/drivers/rmt/rmt_5/idf5_clockless.h
Adds RMT bus traits header and conditionally pre-binds RMT5 driver via setDriver(BusTraits<Bus::RMT>::instancePtr()) in ClocklessIdf5 constructor when toggle is enabled.
Stub Platform Pre-Binding
src/platforms/stub/clockless_channel_stub.h
Adds bus and bus_traits header includes; conditionally pre-binds stub driver via setDriver(BusTraits<Bus::STUB>::instancePtr()) in ClocklessController constructor when toggle is enabled.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2429: Uses the new fl::Bus/BusTraits foundation that this PR integrates with via compile-time toggle and pre-binding.
  • FastLED/FastLED#2435: Modifies the fl::Channel subsystem infrastructure that this PR extends with pre-binding support.

Poem

🐰 A toggle now graces the registry's door,
Pre-binding drivers—no ChannelManager chore!
From RMT to Stub, the controllers align,
Skipping selection at each pixel design. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: pre-binding legacy clockless controllers to BusTraits singletons as Phase 5b of a larger effort. It is specific, related to the changeset, and accurately reflects the primary architectural improvement.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/channels-bloat-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/fl/channels/channel.cpp.hpp (1)

316-331: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Pre-bound channels are silently broken after removeFromDrawList().

Channel::removeFromDrawList() at line 499 unconditionally does mDriver.reset(). For a pre-bound channel (mDriverPreBound == true), the next showPixels() will hit line 322-323, get a null driver from mDriver.lock(), and bail out at line 328 with the generic "No compatible driver found" error — even though the BusTraits singleton is still very much alive.

Two follow-ups worth considering:

  1. In removeFromDrawList(), skip the mDriver.reset() when mDriverPreBound is true (or re-pre-bind on next add).
  2. When mDriverPreBound && !driver, log a more specific error (e.g. "pre-bound driver weak_ptr expired") so users opting into FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY=1 get an actionable message instead of being told no compatible driver exists.

This is unlikely to bite typical addLeds<> users (they don't churn the draw list) but it's a real latent bug for the opt-in path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/fl/channels/channel.cpp.hpp` around lines 316 - 331, The pre-bound driver
gets dropped by Channel::removeFromDrawList() via mDriver.reset(), causing
showPixels() to observe mDriverPreBound==true but mDriver.lock() returning null
and emit a misleading "No compatible driver found" error; fix by (1) changing
Channel::removeFromDrawList() to skip mDriver.reset() when mDriverPreBound is
true (so pre-bound BusTraits singletons remain bound), and (2) in the
showPixels()/driver-selection block (the code using mDriverPreBound,
mDriver.lock(), and ChannelManager::selectDriverForChannel), detect the case
where mDriverPreBound is true but lock() returned null and emit a specific error
message like "pre-bound driver weak_ptr expired" (instead of the generic "No
compatible driver found") so users get an actionable hint.
🧹 Nitpick comments (4)
src/platforms/stub/clockless_channel_stub.h (2)

49-50: 💤 Low value

Unusual line break in constructor declaration.

The opening FL_NOEXCEPT { is split awkwardly onto its own line:

ClocklessController()
 FL_NOEXCEPT {

This appears to be a stray formatting artifact from the diff — the rest of this file (and idf5_clockless.h) keeps the noexcept specifier on the same line. Worth normalizing.

♻️ Proposed fix
-    ClocklessController()
- FL_NOEXCEPT {
+    ClocklessController() FL_NOEXCEPT {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platforms/stub/clockless_channel_stub.h` around lines 49 - 50, Normalize
the constructor declaration for ClocklessController by moving the FL_NOEXCEPT
specifier onto the same line as the constructor signature so it matches the rest
of the file and idf5_clockless.h; update the ClocklessController() FL_NOEXCEPT {
split to a single-line declaration "ClocklessController() FL_NOEXCEPT {" to
remove the stray line break and keep formatting consistent.

54-63: ⚖️ Poor tradeoff

Architectural inconsistency with ClocklessIdf5's pre-bind path.

ClocklessIdf5 (in idf5_clockless.h) inherits from fl::Channel and uses the new Channel::setDriver() API that flips mDriverPreBound to true, so its showPixels() takes a hard fast-path that skips ChannelManager entirely.

This stub controller, however, does not inherit from fl::Channel — it inherits from CPixelLEDController and maintains its own mDriver weak_ptr (line 42). Assigning to that local mDriver here doesn't set any "pre-bound" flag, so showPixels() (lines 71-84) still has the fallback to ChannelManager::selectDriverForChannel() if the weak_ptr ever expires. In practice the BusTraits<Bus::STUB>::instancePtr() singleton lives forever, so the fallback is unreachable, but the code shapes are now noticeably divergent for what the comment claims is the same Phase 5b pre-bind mechanism.

Worth either (a) refactoring this stub controller to inherit from Channel like ClocklessIdf5 so both share the pre-bound path, or (b) adding a comment clarifying that the stub's "pre-binding" is purely caching and the manager fallback is intentionally retained.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/platforms/stub/clockless_channel_stub.h` around lines 54 - 63, The stub
controller’s assignment of BusTraits<Bus::STUB>::instancePtr() to its local
mDriver (in the CPixelLEDController-derived stub) does not flip
Channel::mDriverPreBound like Channel::setDriver() does in ClocklessIdf5,
creating an architectural mismatch where showPixels() still retains the
ChannelManager::selectDriverForChannel() fallback; either refactor the stub to
inherit from fl::Channel and call Channel::setDriver() so mDriverPreBound is set
and the pre-bound fast-path is consistent with ClocklessIdf5, or, if keeping
CPixelLEDController, add a clear comment near the stub’s mDriver assignment and
in showPixels() stating this is only a cached pointer (singleton-backed) and
that the manager fallback is intentionally retained.
src/fl/channels/channel.h (2)

208-211: 💤 Low value

Consider passing the shared_ptr by const reference.

setDriver takes fl::shared_ptr<IChannelDriver> by value but only assigns it to mDriver (a weak_ptr), so the strong reference is unnecessarily incremented and decremented. A const fl::shared_ptr<IChannelDriver>& would avoid the temporary refcount churn. Minor since it's called once per controller construction.

♻️ Proposed refactor
-    void setDriver(fl::shared_ptr<IChannelDriver> driver) FL_NOEXCEPT {
+    void setDriver(const fl::shared_ptr<IChannelDriver>& driver) FL_NOEXCEPT {
         mDriver = driver;
         mDriverPreBound = true;
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/fl/channels/channel.h` around lines 208 - 211, The setter setDriver
currently takes fl::shared_ptr<IChannelDriver> by value causing an unnecessary
increment/decrement of the shared_ptr refcount; change its parameter to const
fl::shared_ptr<IChannelDriver>& and assign that to mDriver (a weak_ptr), leaving
the rest (setting mDriverPreBound = true) unchanged — update the declaration and
definition of setDriver and ensure references to IChannelDriver, mDriver, and
mDriverPreBound are used accordingly.

196-211: 💤 Low value

No way to undo pre-binding once set.

setDriver() only flips mDriverPreBound to true; there's no symmetric clearDriver() or reset path. If a future caller (or test fixture) needs to revert a pre-bound channel back to the manager-selection path, they cannot. Given this is a protected hook used only at construction today, it's acceptable, but consider documenting this one-way contract or adding a reset method when Phase 5c lands.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/fl/channels/channel.h` around lines 196 - 211, setDriver() makes
pre-binding one-way by setting mDriver and mDriverPreBound=true with no way to
revert; add a symmetric reset/clear API (e.g., clearDriver() or
setDriver(nullptr)) that resets mDriver (release/reset the weak_ptr) and sets
mDriverPreBound=false so the Channel can return to manager selection, and update
any uses/tests and documentation to reflect the new reversible contract;
reference setDriver, mDriver, and mDriverPreBound when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/fl/channels/bus.h`:
- Around line 18-34: The header must document and enforce that
FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY be set consistently at build-system scope
(not per-TU) because it changes template constructor bodies (e.g.,
ClocklessIdf5::ClocklessIdf5() and ClocklessController::ClocklessController()),
so update the comment to require using a -D flag or project-wide user config and
add a small compile-time guard: introduce a companion build-only marker macro
(e.g., FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY_FROM_BUILD) that build systems set
alongside FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY, and emit a `#pragma` message or
`#warning` when FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY is defined without that
build marker to tell users to move the define to their build system; also
document the required practice in the header near the
FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY definition.

---

Outside diff comments:
In `@src/fl/channels/channel.cpp.hpp`:
- Around line 316-331: The pre-bound driver gets dropped by
Channel::removeFromDrawList() via mDriver.reset(), causing showPixels() to
observe mDriverPreBound==true but mDriver.lock() returning null and emit a
misleading "No compatible driver found" error; fix by (1) changing
Channel::removeFromDrawList() to skip mDriver.reset() when mDriverPreBound is
true (so pre-bound BusTraits singletons remain bound), and (2) in the
showPixels()/driver-selection block (the code using mDriverPreBound,
mDriver.lock(), and ChannelManager::selectDriverForChannel), detect the case
where mDriverPreBound is true but lock() returned null and emit a specific error
message like "pre-bound driver weak_ptr expired" (instead of the generic "No
compatible driver found") so users get an actionable hint.

---

Nitpick comments:
In `@src/fl/channels/channel.h`:
- Around line 208-211: The setter setDriver currently takes
fl::shared_ptr<IChannelDriver> by value causing an unnecessary
increment/decrement of the shared_ptr refcount; change its parameter to const
fl::shared_ptr<IChannelDriver>& and assign that to mDriver (a weak_ptr), leaving
the rest (setting mDriverPreBound = true) unchanged — update the declaration and
definition of setDriver and ensure references to IChannelDriver, mDriver, and
mDriverPreBound are used accordingly.
- Around line 196-211: setDriver() makes pre-binding one-way by setting mDriver
and mDriverPreBound=true with no way to revert; add a symmetric reset/clear API
(e.g., clearDriver() or setDriver(nullptr)) that resets mDriver (release/reset
the weak_ptr) and sets mDriverPreBound=false so the Channel can return to
manager selection, and update any uses/tests and documentation to reflect the
new reversible contract; reference setDriver, mDriver, and mDriverPreBound when
making the change.

In `@src/platforms/stub/clockless_channel_stub.h`:
- Around line 49-50: Normalize the constructor declaration for
ClocklessController by moving the FL_NOEXCEPT specifier onto the same line as
the constructor signature so it matches the rest of the file and
idf5_clockless.h; update the ClocklessController() FL_NOEXCEPT { split to a
single-line declaration "ClocklessController() FL_NOEXCEPT {" to remove the
stray line break and keep formatting consistent.
- Around line 54-63: The stub controller’s assignment of
BusTraits<Bus::STUB>::instancePtr() to its local mDriver (in the
CPixelLEDController-derived stub) does not flip Channel::mDriverPreBound like
Channel::setDriver() does in ClocklessIdf5, creating an architectural mismatch
where showPixels() still retains the ChannelManager::selectDriverForChannel()
fallback; either refactor the stub to inherit from fl::Channel and call
Channel::setDriver() so mDriverPreBound is set and the pre-bound fast-path is
consistent with ClocklessIdf5, or, if keeping CPixelLEDController, add a clear
comment near the stub’s mDriver assignment and in showPixels() stating this is
only a cached pointer (singleton-backed) and that the manager fallback is
intentionally retained.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 046bbe63-21cc-43aa-bb9a-73bd5d8321c2

📥 Commits

Reviewing files that changed from the base of the PR and between a2f6190 and 6396e65.

📒 Files selected for processing (5)
  • src/fl/channels/bus.h
  • src/fl/channels/channel.cpp.hpp
  • src/fl/channels/channel.h
  • src/platforms/esp/32/drivers/rmt/rmt_5/idf5_clockless.h
  • src/platforms/stub/clockless_channel_stub.h

Comment thread src/fl/channels/bus.h
Comment on lines +18 to +34
// FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY: opt-in macro that, when set to 1,
// disables the legacy `initChannelDrivers()` auto-registration AND switches
// per-platform legacy clockless controllers (stub `ClocklessController`,
// ESP32 `ClocklessIdf5`, etc.) to pre-bind directly to their default
// `BusTraits<Bus::X>::instancePtr()` -- bypassing `ChannelManager` entirely.
//
// This is the toggle that lets `--gc-sections` drop unreferenced driver TUs
// (the binary-size fix from #2420). Default 0 for backward compatibility;
// users opting in must call `fl::enableDrivers<fl::Bus::X...>()` explicitly
// for any non-default driver they need at runtime.
//
// Defined here (early-included by every channels TU) so all consumers see the
// same value -- the macro is checked from per-platform legacy clockless
// headers as well as channel_manager_esp32.cpp.hpp.
#ifndef FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY
#define FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY 0
#endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

ODR risk: macro must be defined consistently across all translation units.

FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY gates inline code inside templated classes (ClocklessIdf5::ClocklessIdf5() and stub ClocklessController::ClocklessController()). If different TUs include those headers with different macro values (e.g., user #defines it in one .cpp after a system include but not another, or only some build files set -DFASTLED_DISABLE_LEGACY_DRIVER_REGISTRY=1), the resulting template instantiations will differ in their constructor bodies — a classic ODR violation that the linker will silently merge into one definition.

Recommend documenting (and ideally enforcing) that this macro must be set as a build-system-level definition (e.g., a -D flag or a project-wide FastLED_user.h) and not via per-TU #define. A #pragma message/#warning if the user defines it after <FastLED.h> would also help.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/fl/channels/bus.h` around lines 18 - 34, The header must document and
enforce that FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY be set consistently at
build-system scope (not per-TU) because it changes template constructor bodies
(e.g., ClocklessIdf5::ClocklessIdf5() and
ClocklessController::ClocklessController()), so update the comment to require
using a -D flag or project-wide user config and add a small compile-time guard:
introduce a companion build-only marker macro (e.g.,
FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY_FROM_BUILD) that build systems set
alongside FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY, and emit a `#pragma` message or
`#warning` when FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY is defined without that
build marker to tell users to move the define to their build system; also
document the required practice in the header near the
FASTLED_DISABLE_LEGACY_DRIVER_REGISTRY definition.

@zackees
zackees merged commit fe623d8 into master May 10, 2026
7 of 9 checks passed
@zackees
zackees deleted the feat/channels-bloat-fix branch May 30, 2026 20:01
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