Skip to content

docs: compile every documentation code block#373

Merged
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/compiled-examples
Jul 24, 2026
Merged

docs: compile every documentation code block#373
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/compiled-examples

Conversation

@sgerbino

Copy link
Copy Markdown
Collaborator

Replace all ~480 hand-typed [source,cpp] blocks across the 45 doc pages with includes of compiled sources, so an example that breaks can no longer render on the site.

  • test/doc/snippets: one TU per page; fragments compile and run as test suites with assertions on the behavior the prose claims
  • test/doc/programs: complete teaching programs, run by exit code; bug demos (races, deadlocks) are built but never executed
  • example/: tagged regions replace duplicated excerpts on the 15 example pages
  • @antora/collector-extension, registered in the library's own playbook, scans example/ and test/doc into the Antora examples family so pages use include::example$...[tag=...] without symlinks or duplication
  • Blocks that intentionally do not compile are explicit: rejected or sketch-level designs carry role=pseudocode (21), other-library comparisons carry role=external (13)

test/tsan.supp suppresses reports from Apple libc++ stream internals, which lack TSan annotations for the concurrent std::cout the standard requires to be race-free.

@cppalliance-bot

cppalliance-bot commented Jul 23, 2026

Copy link
Copy Markdown

An automated preview of the documentation is available at https://373.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-07-23 21:36:57 UTC

@cppalliance-bot

cppalliance-bot commented Jul 23, 2026

Copy link
Copy Markdown

GCOVR code coverage report https://373.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://373.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://373.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-07-23 21:52:51 UTC

Replace all ~480 hand-typed [source,cpp] blocks across the 45 doc
pages with includes of compiled sources, so an example that breaks
can no longer render on the site.

- test/doc/snippets: one TU per page; fragments compile and run as
  test suites with assertions on the behavior the prose claims
- test/doc/programs: complete teaching programs, run by exit code;
  bug demos (races, deadlocks) are built but never executed
- example/: tagged regions replace duplicated excerpts on the
  15 example pages
- @antora/collector-extension, registered in the library's own
  playbook, scans example/ and test/doc into the Antora examples
  family so pages use include::example$...[tag=...] without
  symlinks or duplication
- Blocks that intentionally do not compile are explicit: rejected or
  sketch-level designs carry role=pseudocode (21), other-library
  comparisons carry role=external (13)

test/tsan.supp suppresses reports from Apple libc++ stream internals,
which lack TSan annotations for the concurrent std::cout the standard
requires to be race-free.
@sgerbino
sgerbino force-pushed the pr/compiled-examples branch from 809cb17 to fc17a67 Compare July 23, 2026 21:31
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.09%. Comparing base (70af0fb) to head (fc17a67).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #373      +/-   ##
===========================================
+ Coverage    98.07%   98.09%   +0.01%     
===========================================
  Files          132      132              
  Lines         6230     6288      +58     
===========================================
+ Hits          6110     6168      +58     
  Misses         120      120              
Flag Coverage Δ
linux 98.08% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 12 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70af0fb...fc17a67. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sgerbino
sgerbino merged commit aa1a38c into cppalliance:develop Jul 24, 2026
39 checks passed
@sgerbino
sgerbino deleted the pr/compiled-examples branch July 24, 2026 13:16
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Beast2 Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants