refactor!: prefix the public error sources - #801
Conversation
Every <Class>_Initialise and <Class>_Cleanup has external linkage and is declared in a *Private.h header, so docs/NAMING.md puts it at Tier 1 and requires the SolidSyslog prefix. Eighty-seven functions across Core and the nine platform packs carried the Tier 2 form instead. The _Report helpers in the same headers are static inline, so they keep the Tier 2 form and are untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every *ErrorSource object is declared in a public *Errors.h header, so docs/NAMING.md puts it at Tier 1 and requires the SolidSyslog prefix. Only the whole-library SolidSyslogErrorSource carried it; the other forty-four did not. NAMING.md had no rule to cite: Tier 1 covered functions, types and tag names, but not exported objects. It now states the form - the class name runs straight into the object's own name, no underscore, since that separator introduces a function name. BREAKING CHANGE: every *ErrorSource object declared in a public *Errors.h header gains the SolidSyslog prefix, so UdpSenderErrorSource becomes SolidSyslogUdpSenderErrorSource and the rest follow. An error handler that matches on source identity, event->Source == &UdpSenderErrorSource, must be updated to the new name. The matching rule itself is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
☀️ Quality Summary Created by Quality Monitor v4.15.0 (#82d77af). More details are shown in the GitHub Checks Result. |
Purpose
The second half of the naming work #800 began, and the half that costs an API
break. Every
*ErrorSourceobject is declared in a public*Errors.hheader, sodocs/NAMING.mdputs it at Tier 1 and requires theSolidSyslogprefix. Only thewhole-library
SolidSyslogErrorSourcecarried it.This has to land in the 0.2.0 window. Integrators match on source identity —
event->Source == &UdpSenderErrorSource— so renaming these objects breaks theAPI, and E39 is the one break 0.2.0 gets. Deferring it either costs a second break
later or leaves the violation permanent.
No issue behind this; it was found reviewing #799.
Stacked on #800. The branch is #800's branch plus one commit, but the base is
feature/tls-rework: CI triggers only on pull requests targetingmainor thatbranch, so a PR based on #800's branch would get no checks at all. The cost is that
the diff below carries #800's rename too until #800 merges — read the two commits
separately,
refactor!: prefix the public error sourcesis this PR's own work.Change Description
Forty-four objects renamed to
SolidSyslog<Class>ErrorSourceacross the publicheaders, the vtable translation units that define them, the
_Reportinlines thatreference them, and the tests that match on them. Mechanical prefix addition — the
matching rule, the error events and the detail enums are untouched.
docs/NAMING.mdhad no rule to cite. Tier 1 covered functions, types and tag namesbut said nothing about exported objects, so the rename would have rested on
inference. It now states the form: the class name runs straight into the object's
own name, with no underscore, because that separator introduces a function name and
an object has none.
SolidSyslogUdpSender_ErrorSourceis named as the spellingthat is wrong, which is how the page teaches everywhere else.
CLAUDE.md's*Errors.hrow is corrected to match.No documentation page names any of these objects — checked before assuming it —
so
docs/needs nothing else.misra_suppressions.txtneeded no renumbering:nothing the sweep touched moved a suppressed line.
Test Evidence
No new tests — a rename with no behaviour change, covered by the existing suites.
debugpreset, gcc image: 1526 tests, 3659 checks, 0 failures.debugpreset,cpputest-freertosimage: eleven suites, all green, covering theFreeRTOS, lwIP, Plus-TCP, Plus-FAT, FatFs and mbedTLS trees the gcc image skips.
cppcheck-misrainvocation reproduced locally: exit 0, the same sixpre-existing findings as refactor: prefix the cross-TU lifecycle functions #800 and no new ones.
check_references.py,check_platform_docs.py,check_spdx_headers.py,check_headers_c89.py: green.are the SPDX headers and long-standing comments, identical to refactor: prefix the cross-TU lifecycle functions #800's tree.
refactor!was verified to work rather than assumed, sincerefactorishidden: trueinrelease-please-config.json. Running release-please 17.11.2 —the version range the pinned action declares — against this repository's own
changelog sections: a breaking
refactor!bumps 0.1.0 to 0.2.0 exactly asfeat!does, and renders both a
⚠ BREAKING CHANGESentry and aRefactoringentry,because the preset keeps any commit carrying notes whatever its section says. A
non-breaking
refactoris still dropped.One thing to confirm: if the E39 branch reaches
mainas a single squashed commit,release-please sees that PR's title and not this one, so the
!and the breakingnote have to be carried there too.
Areas Affected
Public: every
Core/Interface/*Errors.handPlatform/*/Interface/*Errors.h.Internal: the matching source trees and unit tests. Documentation:
docs/NAMING.md,CLAUDE.md. The example repositories vendor the library and are regenerated fromtheir commit stack, so they pick this up with the rest of 0.2.0.