Skip to content

samples: merge samples/ into examples/ canonical directory #1091

Description

@kcenon

What

Merge the samples/ directory into examples/ so the repository has a single canonical examples directory, matching the ecosystem convention from Master EPIC kcenon/common_system#657 (Phase 1 pacs_system precedent).

Part of #1083.

Current state

  • samples/ — 17 files (15 .cpp + CMakeLists.txt + Makefile + READMEs) plus subdirectories messaging_system_integration/, migration/.
  • examples/ — 16 .cpp files + CMakeLists.txt + README.md.
  • Only one filename collision: grpc_service_example.cpp (verify byte-equality).
  • Semantic overlaps that need a merge decision: samples/quic_client_example.cpp + samples/quic_server_example.cppexamples/quic_facade_example.cpp; samples/tcp_server_client.cppexamples/tcp_client.cpp + examples/tcp_echo_server.cpp; samples/udp_echo_demo.cppexamples/udp_echo.cpp; samples/simple_http_*examples/http_facade_example.cpp.

Why

Two parallel example trees confuse newcomers ("which one is current?") and double the maintenance cost when an API changes. The Master EPIC #657 ecosystem standard adopts a single canonical directory; pacs_system already merged in this direction.

Where

  • samples/ (remove after merge)
  • examples/ (target — receives merged content)
  • Root CMakeLists.txt (BUILD_SAMPLES/BUILD_EXAMPLES options consolidated to BUILD_EXAMPLES)
  • README.md (line 871 reference: "samples/ directory" → "examples/ directory")
  • docs/PROJECT_STRUCTURE.md (if structure tree references samples/)

How

Technical approach

  1. Build a merge map (samples-file → examples-file action: keep/replace/rename):
    • For pure duplicates: drop the samples/ copy.
    • For richer demos in samples/: move into examples/ with a clear name, keep the simpler examples/ version only if its public-API surface differs.
    • For unique files in either: move/keep as-is.
  2. Move samples/messaging_system_integration/ and samples/migration/ subdirectories under examples/ preserving their READMEs.
  3. Consolidate the build flag: BUILD_SAMPLES removed, BUILD_EXAMPLES becomes the single switch (default ON since samples were ON by default).
  4. Update README.md, README.kr.md, docs/PROJECT_STRUCTURE.md references.
  5. Delete samples/.

Acceptance criteria

  • samples/ directory removed
  • examples/ contains the union of both prior trees with no semantic regressions
  • Single build option BUILD_EXAMPLES; BUILD_SAMPLES removed
  • All README/structure-doc references updated
  • CI green on PR

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions