Skip to content

feat: S30.02 consumer-friendly CMake umbrellas + dogfood BDD targets#571

Merged
DavidCozens merged 3 commits into
mainfrom
feat/s30-02-cmake-umbrellas
Jun 10, 2026
Merged

feat: S30.02 consumer-friendly CMake umbrellas + dogfood BDD targets#571
DavidCozens merged 3 commits into
mainfrom
feat/s30-02-cmake-umbrellas

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Purpose

E30 (#566), the CI-guardrail story. Make CMake consumers link one umbrella
per platform
instead of hand-listing .c files, keep the upstream-config-gated
lwIP 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 its
adapter sources via target_sources(<pack> INTERFACE …), so linking the pack
compiles the adapter .c into the consumer's target against the consumer's
config header. Each pack exports its Interface + Source include dirs plus
Core/Source (the adapters consume the internal SolidSyslogPoolAllocator.h;
MbedTls also SolidSyslogMacros.h), links SolidSyslogTunables, and gains a
SolidSyslog::<Pack> ALIAS.

  • Umbrella = adapters that compile in any valid config.
  • lwIP DNS resolver is opt-in: kept OUT of the LwipRaw umbrella (needs
    LWIP_DNS=1); shipped as SolidSyslog::LwipRawDnsResolver, which links the
    umbrella. A numeric-only lwIP build links SolidSyslog::LwipRaw and never
    enables DNS.
  • MbedTls umbrella = Stream + both at-rest policies (HMAC-SHA256, AES-GCM) —
    confirmed not to split (epic defers fine-grained components).

Nobody linked these INTERFACE targets 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) and
link the umbrellas the way a customer would:

  • FreeRtos (Plus-TCP) → SolidSyslog::{PlusTcp,FreeRtos,MbedTls,PlusFat}
  • FreeRtosLwip → SolidSyslog::{LwipRawDnsResolver,FreeRtos,MbedTls,FatFs}

Docs (commit 3). getting-started.md Path 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/.h changed, so no
format/tidy/cppcheck surface). Verified locally in the freertos-target and
freertos-host containers:

  • freertos-cross (Plus-TCP) ARM ELF — builds + links via the umbrellas.
  • freertos-cross-lwip ARM ELF — builds + links; the DnsResolver component
    pulls the umbrella; the umbrella's numeric resolver compiles but is
    dead-stripped (arm-none-eabi-nm confirms SolidSyslogLwipRawResolver_Create
    is absent from the linked ELF, DnsResolver present) — so the ELF is identical in
    behaviour.
  • freertos-host debug TDD suite — configures + tests pass (pack CMake now
    executes 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::LwipRawDnsResolver targets.

Summary by CodeRabbit

Release Notes

  • Chores

    • Refactored build system to introduce namespaced CMake umbrella targets (SolidSyslog::*) that consolidate platform adapter management, reducing boilerplate in consumer configurations.
    • Reorganized lwIP DNS resolver as an opt-in target component.
  • Documentation

    • Updated getting-started guide with details on the new umbrella targets and their configuration.

DavidCozens and others added 3 commits June 10, 2026 14:45
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>
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Platform adapter packs now export implementation sources and include paths via INTERFACE libraries with consumer-friendly SolidSyslog::<Pack> aliases. BDD targets refactor to link these umbrellas instead of enumerating adapter files directly. lwIP DNS resolver is split as an opt-in component outside the main lwIP umbrella. Documentation and DEVLOG updated.

Changes

Platform pack umbrella targets and BDD consumption

Layer / File(s) Summary
Core platform pack source export: FreeRtos, PlusTcp, MbedTls, FatFs, PlusFat
Platform/FreeRtos/CMakeLists.txt, Platform/PlusTcp/CMakeLists.txt, Platform/MbedTls/CMakeLists.txt, Platform/FatFs/CMakeLists.txt, Platform/PlusFat/CMakeLists.txt
Five platform adapter packs are each defined as INTERFACE libraries that export adapter source files via target_sources(), include directories via target_include_directories(), link SolidSyslogTunables, and create SolidSyslog::<Pack> namespaced aliases for consumer use.
lwIP Raw adapter pack with DNS resolver opt-in component
Platform/LwipRaw/CMakeLists.txt
SolidSyslogLwipRaw is defined as an INTERFACE source-carrying pack; a separate SolidSyslogLwipRawDnsResolver component is kept outside the main umbrella and linked as opt-in (requires LWIP_DNS=1).
BDD target consumption of umbrella targets
Bdd/Targets/FreeRtos/CMakeLists.txt, Bdd/Targets/FreeRtosLwip/CMakeLists.txt
BDD executables remove explicit Platform adapter source enumeration and include directory paths, replacing them with links to SolidSyslog::* umbrella targets that transitively provide sources and includes.
Documentation and verification updates
DEVLOG.md, docs/getting-started.md
DEVLOG.md documents S30.02 umbrella implementation, CI dogfooding, and verification notes; docs/getting-started.md updates CMake consumer guidance to explain namespaced umbrella targets and lwIP DNS opt-in requirement.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • DavidCozens/solid-syslog#568: This PR directly implements the S30.02 epic objectives — platform packs now carry sources via INTERFACE targets with namespaced SolidSyslog::<Pack> aliases, lwIP DNS is opt-in, and BDD targets dogfood the umbrellas.

Possibly related PRs

  • DavidCozens/solid-syslog#570: Updates the same consumer integration guidance in docs/getting-started.md for the umbrella targets approach and lwIP DNS opt-in.

Poem

🐰 The packs grow wings to carry code,
Each umbrella shades the consumer's road,
No more listing files by hand so slow—
One link per platform lets the builders grow!
DNS dances, opt-in, light and free,
CMake feasts on this harmony.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: introducing consumer-friendly CMake umbrellas and dogfooding BDD targets, which aligns with the PR's primary objective.
Description check ✅ Passed The PR description follows the template structure with all required sections: Purpose, Change Description, Test Evidence, and Areas Affected. It provides comprehensive details about the changes and implementation rationale.
Linked Issues check ✅ Passed The PR fully addresses all coding requirements from issue #568: all Pattern-B packs now carry sources via target_sources(...INTERFACE...), export include dirs, link SolidSyslogTunables, and add SolidSyslog:: ALIAS targets; lwIP DnsResolver is correctly kept opt-in as SolidSyslog::LwipRawDnsResolver; BDD targets dogfood the umbrellas; all required checks remain green with behaviour-neutral builds.
Out of Scope Changes check ✅ Passed All changes are directly in-scope: Pattern-B pack CMakeLists updates, BDD target wiring, documentation (getting-started.md and DEVLOG.md), with no Core/Platform source or public header modifications outside the linked-issue scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/s30-02-cmake-umbrellas

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1521 passed)
   🚦   build-freertos-host-tdd-plustcp: 100% successful (✔️ 1872 passed)
   🚦   build-linux-clang: 100% successful (✔️ 1453 passed)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 1453 passed)
   🚦   integration-linux-openssl: 100% successful (✔️ 16 passed)
   🚦   integration-linux-mbedtls: 100% successful (✔️ 14 passed)
   🚦   integration-windows-openssl: 100% successful (✔️ 16 passed)
   🚦   bdd-linux-syslog-ng: 94% successful (✔️ 49 passed, 🙈 3 skipped)
   🚦   bdd-windows-otel: 88% successful (✔️ 46 passed, 🙈 6 skipped)
   🚦   bdd-freertos-qemu-plustcp: 87% successful (✔️ 45 passed, 🙈 7 skipped)
   🚦   bdd-freertos-qemu-lwip: 87% successful (✔️ 45 passed, 🙈 7 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 1298 passed)
   🚦   build-linux-tunable-override: 100% successful (✔️ 1453 passed)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
DEVLOG.md (1)

20-25: ⚡ Quick win

Clarify 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

📥 Commits

Reviewing files that changed from the base of the PR and between 67f9042 and e9ea7a4.

📒 Files selected for processing (10)
  • Bdd/Targets/FreeRtos/CMakeLists.txt
  • Bdd/Targets/FreeRtosLwip/CMakeLists.txt
  • DEVLOG.md
  • Platform/FatFs/CMakeLists.txt
  • Platform/FreeRtos/CMakeLists.txt
  • Platform/LwipRaw/CMakeLists.txt
  • Platform/MbedTls/CMakeLists.txt
  • Platform/PlusFat/CMakeLists.txt
  • Platform/PlusTcp/CMakeLists.txt
  • docs/getting-started.md

@DavidCozens DavidCozens merged commit 639ab27 into main Jun 10, 2026
27 checks passed
@DavidCozens DavidCozens deleted the feat/s30-02-cmake-umbrellas branch June 10, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S30.02: Consumer-friendly CMake — packs carry sources, per-platform umbrellas, dogfood CI

1 participant