Restructure into umbrella modules (~55 -> 16 targets)

Headers move, CMake targets merge, C++ namespaces stay unchanged:
- Core: Scope, Lazy, Counted, Flags, Hash, Bits, Uuid, TypeList, TypeMap, Variant
- Functional: Pipeline, Either, Result, Retry
- Containers: Ring, Pool, PriorityQueue, LRU, Trie, Graph, DisjointSet, Bitset, Interval
- Math: +Matrix, Numeric, Random, Histogram
- Text: Str, Format, Tokenizer, Diff, Encoding, Semver
- Data: Json, Csv, Ini
- Async: Coro, Concurrency, EventBus, Observable
- Time: +Bench
- Log: Log facade + Logging framework (facade now header-only, breaking
  the Stacktrace<->Log link cycle the merge would have created)
- System: FileSystem + Process
- Configuration: +Argparse
- Unchanged: Stacktrace, Plugin, StateMachine, Testing, TestingMock, Detail

Module system fixes:
- OPTIONAL_DEPS resolution deferred to void_finalize_modules() so it no
  longer depends on the alphabetical discovery order of src/ subdirs
  (Testing -> Text would have been silently dropped).
- Every header-only module now has a tracked module.cmake; previously the
  empty src/<Name> marker dirs were untracked, so a fresh clone would have
  silently skipped those modules.
- VOID_HAS_LOGGING/CONCURRENCY/STR consumers renamed to LOG/ASYNC/TEXT.

Tests move to tests/standalone/<Umbrella>/<Feature>.cpp (Result suite files
prefixed: ResultBasic etc.). Test count verified identical (831) before and
after. README/CLAUDE.md module tables updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Fable 5 committed 2026-06-12 18:50:02 +03:00
1 parent da2e93c405
commit 28b94883fd
156 files changed
+278 -220

No files matched your search

+24 -12
View File
@@ -20,8 +20,8 @@ cmake --build build
# Run all tests
ctest --test-dir build
# Run a single standalone test binary directly
./build/tests/test_standalone_Logging_FileLogger
# Or run the test binary directly (per-suite filtering, parallel mode, ...)
./build/tests/VoidTests --filter "Json*"
```
### Optional build flags
@@ -46,16 +46,28 @@ Format code with `clang-format -i <file>`.
## Modules
| Module | Namespace | Description |
|---------------|-----------------------|-----------------------------------------------------------------------------|
| `Logging` | `Void::Logging` | Thread-safe `Logger` ABC with buffering, scopes, presets; ships `FileLogger` and `ConsoleLogger` sinks. |
| `Testing` | `Void::Testing` | Self-registering test framework with fixtures, tags, JUnit/console reporters, signal-handler crash capture. |
| `TestingMock` | `Void::TestingMock` | Header-only mock framework: `MockFunction`, `Mock<Derived>` CRTP base, matchers (`Eq`/`_`/`Lt`/`Le`/`Gt`/`Ge`/`Range`/`Pred`/`StartsWith`/`Contains`), move-only actions. |
| `Stacktrace` | `Void::Stacktrace` | Stack capture + source-snippet rendering via Boost.Stacktrace; ANSI color helpers. |
| `Result` | `Void::Result` | Header-only `Result<T,E> = std::expected<T,E>` plus `Error` with cause-chain context, `with_context()` helper, reflection-based struct `repr` (C++26 `<meta>`). |
| `FileSystem` | `Void::FileSystem` | Header-only path utilities returning `Result<T,E>`: `read_file`, `write_file`, `atomic_write`, `ensure_directory`, `remove_path`, RAII `TempDir`. |
| `Concurrency` | `Void::Concurrency` | Header-only `ThreadPool`, bounded MPMC `Channel<T>`, and `parallel_for` built on the pool. Testing runner uses the pool for `--parallel <n>` mode. |
| `Log` | `Void::Log` | Thin global log-sink layer used internally by all modules. Install any callable via `set_sink(fn)`; include `LoggingAdapter.hpp` to bridge to `Void::Logging`. |
Functionality is grouped into umbrella modules (one CMake target each).
The C++ namespaces of the absorbed components are unchanged — e.g.
`Void::Ring` lives in `Void::Containers`' headers.
| Module | Type | Contents (namespaces) |
|-----------------|-----------|-----------------------------------------------------------------------------|
| `Core` | INTERFACE | Scope guards, Lazy, Counted, Flags, Hash, Bits, Uuid, TypeList, TypeMap, Variant helpers. |
| `Functional` | INTERFACE | Pipeline (+Curry, +Memo), Either (+Opt), Result (`std::expected` + Error cause chains, reflection `repr`), Retry. |
| `Containers` | INTERFACE | Ring, Pool, PriorityQueue, LRU, Trie, Graph, DisjointSet, Bitset, Interval. |
| `Math` | INTERFACE | Vec/Mat, Matrix, Numeric, Random, Histogram. |
| `Text` | INTERFACE | Str, Format, Tokenizer, Diff, Encoding (Base64/Hex), Semver. |
| `Data` | INTERFACE | Json, Csv, Ini. |
| `Async` | INTERFACE | Coro (Task, Generator), Concurrency (ThreadPool, MPMC Channel, parallel_for), EventBus, Observable. |
| `Time` | INTERFACE | Stopwatch (+ScopedTimer), duration/ISO-8601 formatting, Bench. |
| `Log` | SHARED | `Void::Log` header-only facade (global sink, used by all modules) + `Void::Logging` framework (`Logger` ABC, ConsoleLogger, FileLogger). |
| `System` | SHARED | FileSystem path utilities (`Result`-based, RAII TempDir) + Process. |
| `Configuration` | SHARED | Layered key-value Config, Env + Argparse. |
| `Stacktrace` | SHARED | Stack capture + source snippets via Boost.Stacktrace; ANSI color helpers. |
| `Plugin` | SHARED | dlopen-based plugin loader with C ABI, hot reload, state transfer. |
| `StateMachine` | INTERFACE | Compile-time variant-based FSM. |
| `Testing` | STATIC | Self-registering test framework with fixtures, tags, JUnit/console reporters, crash capture. |
| `TestingMock` | INTERFACE | Mock framework: `MockFunction`, `Mock<Derived>`, matchers, move-only actions. |
## Adding a module