Repository navigation
refactor(rpc): delete unused JsonTo*Visitor classes (#3251 / #3244 Tier 3I) - #3261
Conversation
…er 3I) PR #3253 (closes #3247 / Tier 2E Phase 2) moved every JsonToType<T> specialization onto the non-template `json_convert_to_X_core` dispatch layer. The original `JsonToIntegerVisitor<T>`, `JsonToFloatVisitor<T>`, `JsonToBoolVisitor`, and `JsonToStringVisitor` classes in `fl/remote/rpc/json_visitors.h` lost all callers in the process. Removes: - `src/fl/remote/rpc/json_visitors.h` (347 lines, all dead) - stale `#include "fl/remote/rpc/json_visitors.h"` from `json_to_type.h` Updates the `json_dispatch.h` header comment to record where the visitor classes used to live and that #3251 deleted them. Flash impact (LPC845 / AutoResearch): - Master baseline: 46,840 B - This branch: 46,840 B - Delta: 0 B The audit's predicted ~1-2 KB savings for #3251 was already captured when #3247 outlined the per-(visitor x alternative) dispatch into the shared non-template cores -- the linker has been stripping the unreferenced visitor classes for several releases. This PR is the follow-up cleanup that removes the now-dead source. No flash drop because there was nothing left to drop, but the codebase is 347 lines lighter and the include graph drops one stale entry. Closes #3251 (deletes the artifact the issue named; the byte target was captured by #3247). Refs #3244, #3247, #3235 Tier 3I. 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 (3)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughRemoves ChangesJSON visitor removal and dispatch rewire
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
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
Deletes 347 lines of dead code that no caller references after PR #3253 (#3247) moved every
JsonToType<T>specialization onto the non-templatejson_convert_to_X_coredispatch layer.Removed:
src/fl/remote/rpc/json_visitors.h-- definedJsonToIntegerVisitor<T>,JsonToFloatVisitor<T>,JsonToBoolVisitor,JsonToStringVisitor. Zero remaining callers acrosssrc/,tests/,examples/(verified by grep).#include "fl/remote/rpc/json_visitors.h"fromjson_to_type.h.json_dispatch.hto record where the visitors used to live and that [Type-Erasure] json: outline visitor warning-string formatter (#3244 Tier 3I) #3251 removed them.Flash impact -- LPC845-BRK / AutoResearch
The byte target for #3251 was already captured by #3247 / PR #3253. When the per-(visitor x alternative) dispatch was outlined into the shared
json_convert_to_X_corefunctions, the linker started stripping the unreferenced visitor classes. This PR is the follow-up cleanup that removes the now-dead source so the file no longer carries 347 lines of code with no callers. The reading-flash-bytes test doesn't move because there's nothing left to strip; the codebase is just cleaner.Closes #3251
The issue asked for "outline visitor warning-string formatter". The outlining itself happened in #3247 (warnings now live in non-template
json_dispatch.cpp.hppcores). What was left was deleting the artifact named in the issue body. That's what this PR does.Test plan
bash test rpc-- 1/1 test binary passes (all RPC test cases).bash lint --cpp-- 0 violations../compile lpc845brk --examples AutoResearch(Flash 71.5% unchanged).grep -rn JsonTo*Visitorinsrc//tests//examples/-- only this PR's edited comment injson_dispatch.hremains.Refs #3244, #3247, #3235 Tier 3I.
🤖 Generated with Claude Code
Summary by CodeRabbit