Repository navigation
feat(ci-compile): add --backend={fbuild,platformio} switch - #2409
Conversation
`bash compile` hardcoded fbuild as the board-build backend with no
user-facing knob. Expose a backend selector so PlatformIO's `pio run`
path can be exercised on demand — useful for reproducing
PlatformIO-only size/link behavior and comparing against fbuild output.
Primary flag: --backend={fbuild,platformio} (default: fbuild)
Shortcuts: --platformio / --pio == --backend=platformio
--fbuild == --backend=fbuild
Added to motivate and support investigation of #2406,
where fbuild overflows RAM on teensy30/teensyLC but PlatformIO does
not. Upstream fix tracked in FastLED/fbuild#204 and #205.
- ci/compiler/argument_parser.py: add BuildBackend enum, wire flags
into CompilationConfig.backend.
- ci/compiler/compilation_orchestrator.py: accept optional use_fbuild
kwarg; log active backend in the compile banner.
- ci/ci-compile.py: propagate config.backend through the two
CompilationConfig reconstructions and into compile_board_examples.
Existing test_fbuild_default_selection.py continues to pass (default
is unchanged).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThreads Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI Arguments
participant Parser as Argument Parser
participant Config as CompilationConfig
participant Main as ci/ci-compile.py
participant Orch as Compilation Orchestrator
participant Compiler as PioCompiler
CLI->>Parser: provide --backend / --platformio / --fbuild
Parser->>Parser: resolve backend (enum) and shortcuts
Parser->>Config: create CompilationConfig with backend
Config-->>Main: return config
Main->>Main: derive use_fbuild = (config.backend == FBUILD)
Main->>Orch: call compile_board_examples(..., use_fbuild)
Orch->>Orch: print "BUILD BACKEND" (fbuild or pio)
Orch->>Compiler: instantiate with use_fbuild flag
Compiler-->>Orch: compile using selected backend
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary
--backend={fbuild,platformio}(default:fbuild) tobash compileso users can force PlatformIO's nativepio runbackend instead of fbuild.--platformio/--pio==--backend=platformio;--fbuild==--backend=fbuild(default).BOARD_BUILDS_USE_FBUILD.Why
Previously the board-build backend was hardcoded (
BOARD_BUILDS_USE_FBUILD = Trueincompile_board_examples) with no CLI override. Tracking down #2406 required flipping that constant by hand and rebuilding. The escape hatch also unblocks anyone who needs to keep teensy30/teensyLC green while fbuild upstream fixes land (FastLED/fbuild#204, FastLED/fbuild#205).Usage:
Changes
ci/compiler/argument_parser.py— newBuildBackendenum; three argparse flags (--backend,--platformio/--pio,--fbuild); threadsbackendthroughCompilationConfig.ci/compiler/compilation_orchestrator.py—compile_board_examples(..., use_fbuild: Optional[bool] = None)(defaults toBOARD_BUILDS_USE_FBUILD, which is stillTrue); prints the active backend label in the compile banner.ci/ci-compile.py— propagatesconfig.backendthrough the twoCompilationConfigreconstructions and intocompile_board_examples.Default behavior is unchanged: omitting the flag picks fbuild, exactly as before.
Test plan
uv run pytest ci/tests/test_fbuild_default_selection.py— passes (existing assertion that default stays fbuild still holds).bash compile teensylc Blink --platformio— successfully builds viapio run(RAM 4164 B / 8192, link OK).uv run ci/ci-compile.py --help— shows the new flags.--backend=platformio→ platformio--platformio/--pio→ platformio--fbuild→ fbuild--backend=fbuild --platformio→ platformio (shortcut wins, matches last-flag-wins intuition)bash lint ci/compiler/argument_parser.py ci/compiler/compilation_orchestrator.py ci/ci-compile.py— passes.Related
🤖 Generated with Claude Code
Summary by CodeRabbit