Repository navigation
fix(channels): include fl/stl/string.h in config.h (fixes teensy41 CI) - #2499
Conversation
…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]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesInclude Completeness Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
ChannelConfig::mNameis declared asfl::optional<fl::string>— a data member that requires a completefl::stringtype to lay out (viaOptional<T>'s internalfl::variant<T, Empty>callingsizeof(T)andalignof(T)).config.honly includedfl/stl/optional.h, which forward-declaresfl::stringbut never defines it.fl/stl/string.hthrough 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:gh run list --workflow=teensy41.)#include \"fl/stl/string.h\"toconfig.hwithIWYU pragma: keepso the linter doesn't strip it on the assumption that only a forward declaration is needed.Test plan
bash lint --cpppasses (IWYU pragma block check).fl::stringcomplete via their include chain).🤖 Generated with Claude Code
Summary by CodeRabbit