Skip to content

fix(channels): include fl/stl/string.h in config.h (fixes teensy41 CI) - #2499

Merged
zackees merged 1 commit into
masterfrom
fix-teensy41-config-string-include
May 23, 2026
Merged

zackees merged 1 commit into
masterfrom
fix-teensy41-config-string-include

Conversation

@zackees

@zackees zackees commented May 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Bug: ChannelConfig::mName is declared as fl::optional<fl::string> — a data member that requires a complete fl::string type to lay out (via Optional<T>'s internal fl::variant<T, Empty> calling sizeof(T) and alignof(T)). config.h only included fl/stl/optional.h, which forward-declares fl::string but never defines it.
  • Why teensy41 specifically: Most platforms transitively pick up fl/stl/string.h through an earlier include in their chain, so the bug stays latent. The teensy41 include order doesn't, and every example in the teensy41 workflow has been failing for over a month with the same diagnostic:
    fl/stl/type_traits.h:927:18: error: invalid application of
        '__alignof__' to incomplete type 'fl::string'
    
    (61+ consecutive failing runs going back to mid-April, per gh run list --workflow=teensy41.)
  • Fix: Add #include \"fl/stl/string.h\" to config.h with IWYU pragma: keep so the linter doesn't strip it on the assumption that only a forward declaration is needed.

Test plan

  • bash lint --cpp passes (IWYU pragma block check).
  • CI: teensy41 workflow goes green (was the only blocker).
  • CI: full matrix passes (other platforms shouldn't be affected — they already get fl::string complete via their include chain).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Minor internal header file update to ensure proper type resolution.

Review Change Stack

…ring> is well-formed

ChannelConfig::mName is declared as `fl::optional<fl::string>`, a data
member whose storage layout requires `sizeof(fl::string)` and
`alignof(fl::string)` -- evaluated through `Optional<T>`'s internal
`fl::variant<T, Empty>` and `max_size<T,...>` / `max_align<T,...>`
helpers. config.h previously only included `fl/stl/optional.h`, which
forward-declares `fl::string` but doesn't define it. On most platforms
something earlier in the include chain provides the full definition,
so the bug stays latent; teensy41's chain doesn't, and every example
in the teensy41 workflow has been failing for the past month with:

    fl/stl/type_traits.h:927:18: error: invalid application of
        '__alignof__' to incomplete type 'fl::string'

Add the missing include (with `IWYU pragma: keep` since IWYU otherwise
treats it as only forward-needed).

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

coderabbitai Bot commented May 23, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5060344f-e3b5-4d65-a0ce-9b31773bdc4d

📥 Commits

Reviewing files that changed from the base of the PR and between 8d4e8ef and 90a07ab.

📒 Files selected for processing (1)
  • src/fl/channels/config.h

📝 Walkthrough

Walkthrough

src/fl/channels/config.h adds the missing fl/stl/string.h include with an IWYU keep annotation to provide the complete type definition for fl::string required by fl::optional<fl::string> declarations later in the file.

Changes

Include Completeness Fix

Layer / File(s) Summary
Add fl/stl/string.h include
src/fl/channels/config.h
Include fl/stl/string.h with IWYU keep pragma to ensure fl::string is a complete type for fl::optional<fl::string> usage.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • FastLED/FastLED#2449: This PR adds ChannelConfigOf with an fl::optional<fl::string> member to src/fl/channels/config.h, and the current PR adds the missing fl/stl/string.h include required to make that fl::string usage complete.

Poem

🐰 A header file once stood alone,
With optionals that needed known
String types complete from head to toe—
One tiny include steals the show! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding a missing include to fix a teensy41 CI issue, which is the primary objective of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 fix-teensy41-config-string-include

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.

@zackees
zackees merged commit 433da0a into master May 23, 2026
6 of 8 checks passed
@zackees
zackees deleted the fix-teensy41-config-string-include branch May 23, 2026 18:14
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