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

+23 -23
View File
@@ -14,8 +14,8 @@
#include <Void/Testing/JUnitReporter.hpp>
#include <Void/Time/Format.hpp>
#ifdef VOID_HAS_CONCURRENCY
#include <Void/Concurrency/ThreadPool.hpp>
#ifdef VOID_HAS_ASYNC
#include <Void/Async/ThreadPool.hpp>
#include <future>
#endif
@@ -25,15 +25,15 @@
#include <cstdlib>
#endif
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
#include <Void/Log/LoggingAdapter.hpp>
#include <Void/Logging/ConsoleLogger.hpp>
#include <Void/Logging/FileLogger.hpp>
#include <Void/Logging/Level.hpp>
#include <Void/Log/ConsoleLogger.hpp>
#include <Void/Log/FileLogger.hpp>
#include <Void/Log/Level.hpp>
#endif
#ifdef VOID_HAS_STR
#include <Void/Str/Str.hpp>
#ifdef VOID_HAS_TEXT
#include <Void/Text/Str.hpp>
#endif
#include <algorithm>
@@ -345,7 +345,7 @@ namespace Void::Testing
constexpr std::size_t OPT_WIDTH = 23;
auto opt = [&](std::string_view name) {
#ifdef VOID_HAS_STR
#ifdef VOID_HAS_TEXT
return apply(green, Void::Str::pad_right(name, OPT_WIDTH));
#else
std::string s{name};
@@ -377,13 +377,13 @@ namespace Void::Testing
<< "\n"
<< " " << opt("--output <file>")
<< apply(dim, "Write reporter output to a file") << "\n"
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
<< " " << opt("--log-file <file>")
<< apply(dim,
"Mirror test events to <file> via Void::Logging")
<< "\n"
#endif
#ifdef VOID_HAS_CONCURRENCY
#ifdef VOID_HAS_ASYNC
<< " " << opt("--parallel <n>")
<< apply(dim,
"Run tests across n threads (no crash detection)")
@@ -414,7 +414,7 @@ namespace Void::Testing
auto reporter = create_reporter(config);
// ── Optional: file logger sink (requires Void::Logging) ──────────────────
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
std::unique_ptr<Void::Logging::FileLogger> log_sink;
if (!config.log_file.empty()) {
try {
@@ -433,7 +433,7 @@ namespace Void::Testing
#endif
// ── Optional: VOID_LOG_LEVEL auto-sink ───────────────────────────────────
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
std::unique_ptr<Void::Logging::ConsoleLogger> env_log;
{
#ifdef VOID_HAS_CONFIGURATION
@@ -463,7 +463,7 @@ namespace Void::Testing
Void::Log::set_sink(Void::Log::make_sink(*env_log));
}
}
#endif // VOID_HAS_LOGGING
#endif // VOID_HAS_LOG
if (config.list_only) {
for (const auto& t : tests) {
@@ -485,7 +485,7 @@ namespace Void::Testing
}
auto log_result = [&](const TestResult& r, const std::string& q) {
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
if (!log_sink) {
return;
}
@@ -523,7 +523,7 @@ namespace Void::Testing
// ── Optional: parallel execution (requires Void::Concurrency) ────────────
bool run_parallel = config.parallel_threads > 0;
#ifndef VOID_HAS_CONCURRENCY
#ifndef VOID_HAS_ASYNC
if (run_parallel) {
std::cerr << "warning: --parallel requires Void::Concurrency "
"(not linked); running sequentially\n";
@@ -532,9 +532,9 @@ namespace Void::Testing
#endif
if (run_parallel) {
#ifdef VOID_HAS_CONCURRENCY
#ifdef VOID_HAS_ASYNC
reporter->on_run_start(config, static_cast<int>(tests.size()));
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
if (log_sink) {
log_sink->info(std::format(
"run start (parallel, {} threads): {} test(s)",
@@ -575,10 +575,10 @@ namespace Void::Testing
suite_results[suite_index[test.suite]].tests.push_back(
std::move(result));
}
#endif // VOID_HAS_CONCURRENCY
#endif // VOID_HAS_ASYNC
} else {
reporter->on_run_start(config, static_cast<int>(tests.size()));
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
if (log_sink) {
log_sink->info(std::format("run start: {} test(s) discovered",
tests.size()));
@@ -587,7 +587,7 @@ namespace Void::Testing
if (config.shuffle) {
std::shuffle(tests.begin(), tests.end(),
std::mt19937{config.random_seed});
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
if (log_sink) {
log_sink->info(std::format("shuffle enabled (seed = {})",
config.random_seed));
@@ -609,7 +609,7 @@ namespace Void::Testing
[&](const auto& t) {
return t.suite == suite.name;
}));
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
if (log_sink) {
log_sink->info(std::format("suite start: {}",
suite.name));
@@ -653,7 +653,7 @@ namespace Void::Testing
}
run_result.total_duration = end_time - start_time;
reporter->on_run_end(run_result);
#ifdef VOID_HAS_LOGGING
#ifdef VOID_HAS_LOG
if (log_sink) {
log_sink->info(
std::format("run end: {} total / {} passed / {} failed / {} "