Skip to content

fix(remote): restore fl/stl/cstdio.h include in transport/serial.h (teensy CI red) - #2686

Merged
zackees merged 1 commit into
masterfrom
fix-teensy-cstdio-include-2026-06-02
Jun 2, 2026
Merged

zackees merged 1 commit into
masterfrom
fix-teensy-cstdio-include-2026-06-02

Conversation

@zackees

@zackees zackees commented Jun 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Re-add direct #include \"fl/stl/cstdio.h\" in src/fl/remote/transport/serial.h that PR fix(build,windows): work around zccache#619 PCH path-spelling drift #2685 removed.
  • That removal relied on a transitive chain (strstream.h → ostream.h → cstdio.h) that doesn't exist — strstream.h never includes ostream.h, so fl::available, fl::read, fl::readLine, fl::println are out of scope on every non-PCH build (all teensy variants, every Arduino ARM/AVR target).

CI symptom (post-#2685, master sha 1a347e9c0e)

Every teensy variant fails on every example with:

fl/remote/transport/serial.h:68:40: error: 'available' is not a member of 'fl'
fl/remote/transport/serial.h:69:29: error: 'read'      is not a member of 'fl'
fl/remote/transport/serial.h:80:16: error: 'readLine'  is not a member of 'fl'

Confirmed across teensy30/31/32/35/36/40/41/41_ofled/LC/octoWS2811 runs.

Why the workaround was wrong

The Windows PCH path-spelling dedup issue is genuinely fixed by the meson.build path-normalization in PR #2685 (replacing meson's / join with literal '+ '/' +'). Removing the direct include was unnecessary belt-and-suspenders that traded the Windows host-build failure for an all-teensy CI failure.

Test plan

  • bash compile teensy41 --examples Apa102 — build succeeded in 129.6s (no errors, ELF + HEX produced)
  • CI green across all teensy variants on the merged commit

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Optimized internal header file dependencies to improve code organization and maintainability.

PR #2685 removed the direct #include "fl/stl/cstdio.h" from
src/fl/remote/transport/serial.h based on a transitive-include chain
("strstream.h -> ostream.h -> cstdio.h") that does not exist —
strstream.h does NOT include ostream.h, so the symbols fl::available,
fl::read, fl::readLine, and fl::println are not in scope on any
non-PCH build.

CI symptom on the post-#2685 master sha (1a347e9), every teensy
variant fails on every example with:

  fl/remote/transport/serial.h:68:40: error: 'available' is not a
                                             member of 'fl'
  fl/remote/transport/serial.h:69:29: error: 'read'      is not a
                                             member of 'fl'
  fl/remote/transport/serial.h:80:16: error: 'readLine'  is not a
                                             member of 'fl'

The Windows PCH path-spelling dedup issue PR #2685 was working
around is already handled by the meson.build path-normalization
change that shipped in the same PR (replacing meson's `/` operator
with literal `'+ '/' +'` concatenation). Dropping the direct include
was an incorrect additional belt-and-suspenders that broke every
non-PCH build.

Verified locally on Windows:
  bash compile teensy41 --examples Apa102
  -> build succeeded in 129.6s
  -> SUCCESS: Apa102

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3576c820-504c-48f7-92eb-3eb6e1d31cb5

📥 Commits

Reviewing files that changed from the base of the PR and between 1a347e9 and afe0f1f.

📒 Files selected for processing (1)
  • src/fl/remote/transport/serial.h

📝 Walkthrough

Walkthrough

The serial transport header is updated to explicitly include the cstdio standard library wrapper with detailed rationale comments explaining the PCH and build behavior requirements, replacing the prior transitive include pattern.

Changes

Include Dependency Fix

Layer / File(s) Summary
Direct cstdio include with PCH rationale
src/fl/remote/transport/serial.h
Header now includes fl/stl/cstdio.h directly with explanatory comments about why the direct include is required for correct builds and precompiled header behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit whispers softly in the dark,
"Include what you need, leave naught but a mark!"
PCH paths now clear, with comments so bright—
Direct includes keep compilers quite right.
🐰✨

✨ 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-teensy-cstdio-include-2026-06-02

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.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 2, 2026
@zackees
zackees merged commit 9e3b9eb into master Jun 2, 2026
7 checks passed
@zackees
zackees deleted the fix-teensy-cstdio-include-2026-06-02 branch June 2, 2026 19:47
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant