feat: S30.02 consumer-friendly CMake umbrellas + dogfood BDD targets#571
Conversation
Each Pattern-B platform pack (FreeRtos, PlusTcp, LwipRaw, MbedTls, FatFs, PlusFat) now CARRIES its adapter sources via target_sources(<pack> INTERFACE ...): a consumer that links the pack compiles the adapter .c files into its own target, seeing its own config header — no per-file listing. Each pack also exports its Source include dir (for its *Private.h) and Core/Source (for the internal pool-allocator helper), links SolidSyslogTunables (Core/Interface), and gains a namespaced SolidSyslog::<Pack> ALIAS. The umbrella = adapters that compile in ANY valid config. The lwIP DNS resolver is config-gated (needs LWIP_DNS=1), so it is kept OUT of the LwipRaw umbrella and exposed as a separate opt-in SolidSyslog::LwipRawDnsResolver component that links the umbrella. A numeric-only lwIP build never has to enable DNS. Nothing linked these targets before, so this stage is inert until the consumers are switched over (next commit). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Switch the two FreeRTOS BDD targets from hand-listing Platform/*/Source/*.c (and
their Platform include dirs) to linking the pack umbrellas the way a CMake
consumer would:
- FreeRtos (Plus-TCP): SolidSyslog::{PlusTcp,FreeRtos,MbedTls,PlusFat}
- FreeRtosLwip: SolidSyslog::{LwipRawDnsResolver,FreeRtos,MbedTls,FatFs}
(LwipRawDnsResolver pulls the LwipRaw umbrella transitively)
Behaviour-neutral: the same sources compile with the same per-target config and
defines. The lwIP target now also compiles the umbrella's numeric resolver, but
it is unreferenced and dead-strips under -Wl,--gc-sections (verified absent from
the linked ELF). Both ARM cross ELFs build and link; the freertos-host TDD suite
passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update getting-started.md Path A to show the now-available SolidSyslog::<Pack> umbrella targets and the SolidSyslog::LwipRawDnsResolver opt-in component (replacing the S30.01 "lands in S30.02" placeholder). Add the DEVLOG entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughPlatform adapter packs now export implementation sources and include paths via INTERFACE libraries with consumer-friendly ChangesPlatform pack umbrella targets and BDD consumption
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 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 |
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1521 passed) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
DEVLOG.md (1)
20-25: ⚡ Quick winClarify the distinction between DNS and numeric resolvers.
The Decisions section mentions the "lwIP DNS resolver" being kept out of the umbrella (line 21-22), but the Verification section references a "numeric resolver" being compiled from the umbrella and dead-stripped (line 35-36). The relationship between these two resolvers is unclear:
- Are they different components (one always-compilable but conditionally used, the other requiring LWIP_DNS=1)?
- If the numeric resolver is always dead-stripped, why include it in the umbrella?
Adding a brief clarification in the Decisions section would help future readers understand the lwIP resolver architecture and the rationale for the umbrella composition.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@DEVLOG.md` around lines 20 - 25, Clarify in the Decisions text that the "lwIP DNS resolver" (SolidSyslog::LwipRawDnsResolver) is a conditional component requiring LWIP_DNS=1 and is intentionally kept out of the LwipRaw umbrella, while the "numeric resolver" is a minimal always-compilable resolver compiled into the LwipRaw umbrella and expected to be dead-stripped when unused; update the paragraph referencing LwipRaw, SolidSyslog::LwipRawDnsResolver, and "numeric resolver" to state their differences (conditional vs always-compiled), why the numeric resolver is included (link-time availability and dead-strip behavior), and the rationale for keeping the DNS resolver opt-in.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@DEVLOG.md`:
- Around line 20-25: Clarify in the Decisions text that the "lwIP DNS resolver"
(SolidSyslog::LwipRawDnsResolver) is a conditional component requiring
LWIP_DNS=1 and is intentionally kept out of the LwipRaw umbrella, while the
"numeric resolver" is a minimal always-compilable resolver compiled into the
LwipRaw umbrella and expected to be dead-stripped when unused; update the
paragraph referencing LwipRaw, SolidSyslog::LwipRawDnsResolver, and "numeric
resolver" to state their differences (conditional vs always-compiled), why the
numeric resolver is included (link-time availability and dead-strip behavior),
and the rationale for keeping the DNS resolver opt-in.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7bdd24d3-7f62-4e07-8649-80fb8f1ec6d3
📒 Files selected for processing (10)
Bdd/Targets/FreeRtos/CMakeLists.txtBdd/Targets/FreeRtosLwip/CMakeLists.txtDEVLOG.mdPlatform/FatFs/CMakeLists.txtPlatform/FreeRtos/CMakeLists.txtPlatform/LwipRaw/CMakeLists.txtPlatform/MbedTls/CMakeLists.txtPlatform/PlusFat/CMakeLists.txtPlatform/PlusTcp/CMakeLists.txtdocs/getting-started.md
Purpose
E30 (#566), the CI-guardrail story. Make CMake consumers link one umbrella
per platform instead of hand-listing
.cfiles, keep the upstream-config-gatedlwIP DNS resolver opt-in, and prove the consumer path in CI by dogfooding the
FreeRTOS BDD targets onto the packs.
Closes #568
Change Description
Packs carry their sources (commit 1, inert). Each Pattern-B pack
(
FreeRtos,PlusTcp,LwipRaw,MbedTls,FatFs,PlusFat) now carries itsadapter sources via
target_sources(<pack> INTERFACE …), so linking the packcompiles the adapter
.cinto the consumer's target against the consumer'sconfig header. Each pack exports its
Interface+Sourceinclude dirs plusCore/Source(the adapters consume the internalSolidSyslogPoolAllocator.h;MbedTls also
SolidSyslogMacros.h), linksSolidSyslogTunables, and gains aSolidSyslog::<Pack>ALIAS.LwipRawumbrella (needsLWIP_DNS=1); shipped asSolidSyslog::LwipRawDnsResolver, which links theumbrella. A numeric-only lwIP build links
SolidSyslog::LwipRawand neverenables DNS.
confirmed not to split (epic defers fine-grained components).
Nobody linked these
INTERFACEtargets before, so commit 1 is inert on its own.Dogfood the BDD targets (commit 2). Both FreeRTOS BDD targets stop
hand-listing
Platform/*/Source/*.c(and the matching Platform include dirs) andlink the umbrellas the way a customer would:
SolidSyslog::{PlusTcp,FreeRtos,MbedTls,PlusFat}SolidSyslog::{LwipRawDnsResolver,FreeRtos,MbedTls,FatFs}Docs (commit 3).
getting-started.mdPath A now documents the umbrellas(replacing the S30.01 "lands in S30.02" placeholder); DEVLOG updated.
Test Evidence
Behaviour-neutral build refactor (CMake-only; no
.c/.hchanged, so noformat/tidy/cppcheck surface). Verified locally in the
freertos-targetandfreertos-hostcontainers:freertos-cross(Plus-TCP) ARM ELF — builds + links via the umbrellas.freertos-cross-lwipARM ELF — builds + links; the DnsResolver componentpulls the umbrella; the umbrella's numeric resolver compiles but is
dead-stripped (
arm-none-eabi-nmconfirmsSolidSyslogLwipRawResolver_Createis absent from the linked ELF, DnsResolver present) — so the ELF is identical in
behaviour.
freertos-hostdebug TDD suite — configures + tests pass (pack CMake nowexecutes on a host compiler; tests unaffected, they keep hand-listing subsets).
The full QEMU BDD lanes (
bdd-freertos-qemu-plustcp,bdd-freertos-qemu-lwip)and cross-build lanes run in CI; the ELFs are behaviourally identical so they are
expected green.
Areas Affected
Platform/{FreeRtos,PlusTcp,LwipRaw,MbedTls,FatFs,PlusFat}/CMakeLists.txt,Bdd/Targets/FreeRtos/CMakeLists.txt,Bdd/Targets/FreeRtosLwip/CMakeLists.txt,docs/getting-started.md,DEVLOG.md. No Core/Platform source, no public header,no test source changed. New public CMake surface: the
SolidSyslog::*umbrella +SolidSyslog::LwipRawDnsResolvertargets.Summary by CodeRabbit
Release Notes
Chores
SolidSyslog::*) that consolidate platform adapter management, reducing boilerplate in consumer configurations.Documentation