Repository navigation
feat(noexcept): annotate hot-path functions with FL_NOEXCEPT - #2998
Conversation
Add FL_NOEXCEPT to CRGB operators, fl::stl containers, math/gamma helpers, delay routines, and clockless/SPI platform drivers to satisfy the FL_NOEXCEPT lint ratchet (#2987) and enable noexcept optimizations. Co-Authored-By: Claude Opus 4.7 <[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 (38)
📝 WalkthroughWalkthroughThis PR systematically adds or corrects ChangesComprehensive FL_NOEXCEPT annotation consolidation
🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Poem
✨ 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 |
…r real-DMA semantics (FastLED#2992 follow-up) After FastLED#2992 ("feat: add ISR-backed channel poll wakeups"), `ParlioEngine` runs `beginTransmission()` in ASYNC mode: the last txDone ISR sets `mStreamComplete=true` and the *next* `poll()` tick observes that flag and clears `mTransmitting` (the gate that begins a new transmission). The old engine cleared `mTransmitting` directly in the ISR, so callers that issued back-to-back `beginTransmission()` calls without an intervening `poll()` still worked. After FastLED#2992 they no longer do. Two `parlio_driver` unit tests issue exactly that pattern and have been failing on master since 2026-06-09 (every CI run on PRs FastLED#2998, FastLED#3001, and the just-merged FastLED#3003 fails the same way): FAIL: ParlioEngine mock - transmission history clearing at tests/platforms/esp/32/drivers/parlio/parlio_driver.cpp:671 :694: count2 > 0 :695: mock.getTransmitCount() > count1 REQUIRE FAILED: parlio_driver.cpp:1029: tx_ok On real hardware the engine's own line-1845 drain pattern (`mPeripheral->waitAllDone(100)` at the top of `beginTransmission()`) gives the ISR a chance to fire and then a `poll()` tick can clear `mTransmitting`. The mock, by contrast, fires txDone callbacks synchronously inside `transmit()` and used to noop `waitAllDone()`, so no `poll()` tick ever ran — `mTransmitting` stayed stuck at true forever and the second `beginTransmission()` short-circuited with "transmission already in progress". Fix the mock, not the test (per the maintainer's "gap in the mock vs the real thing" framing): drive one `ParlioEngine::poll()` tick from the mock's `waitAllDone()` and `deinitialize()`. Those are the two real-hardware-faithful boundaries where "no active DMA" is the contract — `waitAllDone()` is the engine's own pre-transmission drain point, and `deinitialize()` is what the engine calls from its config-match re-init path at parlio_engine.cpp.hpp:1411 (the route test 1029 takes). A single `mSettlingEngine` re-entrancy flag breaks the obvious recursion (`poll()` itself calls `waitAllDone(0)`). The mock stays fully synchronous and single-threaded — no new threads, no new deferred-callback states, no churn in the existing pumpDeferredCallbacks/mFiringCallbacks machinery. Only the engine async-state contract gets one extra tick at each transmit boundary. No engine changes. No test changes. Verified: - `bash test parlio_driver` passes (both originally failing tests) - `bash test parlio_driver --debug` passes (ASAN/LSAN/UBSAN clean) - `bash lint --cpp` clean Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
FL_NOEXCEPTtoCRGBoperators,fl::stlcontainers (span, basic_vector, function, string, strstream), math/gamma helpers, delay routines, and clockless/SPI platform drivers (ARM, ESP32/ESP8266, Teensy, SAM, RP, etc.)Test plan
bash lintpasses (including thecheck_noexcept.pyAST ratchet)bash test --cpp: 309/310 pass; the one failure (parlio_drivermock transmission test, line 1029) is pre-existing on master and unrelated to these changes (verified by reproducing on a clean tree)🤖 Generated with Claude Code
Summary by CodeRabbit
Note: This release contains internal maintenance updates with no user-visible feature changes or behavioral modifications.