Repository navigation
fix(stl): rename index_sequence_concat params that collide with pin macros - #4427
Conversation
…acros The SparkFun XRP controller's pins_arduino.h (arduino-pico) defines S1..S4 as servo pin macros. index_sequence_concat, added with the log-depth make_index_sequence in #4412, used S1/S2 as its template parameter names. The macros expanded them and every sketch on that board failed to compile. The rp2350B SparkfunXRP workflow has been red on master since. Rename them to LhsSeq/RhsSeq (and the I1/I2 packs to Lhs/Rhs). Co-Authored-By: Claude Opus 5 (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: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change renames internal template parameters in ChangesTemplate Parameter Naming
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This is a low-risk naming-only change with no identified impact on supported behavior. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
The rp2350B SparkfunXRP workflow has failed on every master run since #4412 (e.g. 35329223587). Every sketch fails:
Cause
arduino-pico's
sparkfun_xrp_controllervariant definesS1..S4as servo pin macros.index_sequence_concat, added with the log-depthmake_index_sequencein #4412, usedS1/S2as template parameter names, so the preprocessor expanded them. This is the same class of bug as #4416 (Zephyr'smin3macro).Fix
Rename the parameters to
LhsSeq/RhsSeq(and the packsI1/I2toLhs/Rhs), with a comment explaining why short names are avoided there. I also checked every other macro that variant defines (M3_IN_1,ML_ENC_A, …) againstsrc/and found no other collisions.Validation
bash compile sparkfun_xrp_controller all: all examples compile locally (before: every example failed).bash test type_traitsandbash test gamma_lutpass (gamma_lut.hbuilds its table withmake_index_sequence).bash lint --cpppasses.🤖 Generated with Claude Code
Summary by CodeRabbit