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:
1 parent
da2e93c405
commit
28b94883fd
156 files changed
+278
-220
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <Void/Concurrency/ThreadPool.hpp>
|
||||
#include <Void/Async/ThreadPool.hpp>
|
||||
#include <concepts>
|
||||
#include <future>
|
||||
#include <vector>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Configuration/Env.hpp>
|
||||
#include <Void/FileSystem/Path.hpp>
|
||||
#include <Void/System/Path.hpp>
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <format>
|
||||
#include <initializer_list>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <format>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Random/Random.hpp>
|
||||
#include <Void/Hash/Hash.hpp>
|
||||
#include <Void/Math/Random.hpp>
|
||||
#include <Void/Core/Hash.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Either/Either.hpp>
|
||||
#include <Void/Functional/Either.hpp>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <stdexcept>
|
||||
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
|
||||
#include <concepts>
|
||||
#include <expected>
|
||||
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Logging/Logger.hpp>
|
||||
#include <Void/Log/Logger.hpp>
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Logging/Level.hpp>
|
||||
#include <Void/Log/Level.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <source_location>
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Logging/Logger.hpp>
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Log/Logger.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
File renamed without changes.
@@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
namespace Void::Log
|
||||
{
|
||||
@@ -21,14 +24,41 @@ namespace Void::Log
|
||||
using Sink = std::function<void(
|
||||
Level level, std::string_view module, std::string_view message)>;
|
||||
|
||||
namespace Detail
|
||||
{
|
||||
struct SinkState {
|
||||
Sink sink;
|
||||
std::shared_mutex mutex;
|
||||
};
|
||||
|
||||
inline SinkState& sink_state()
|
||||
{
|
||||
static SinkState state;
|
||||
return state;
|
||||
}
|
||||
} // namespace Detail
|
||||
|
||||
/// Install the global sink. Any previously installed sink is replaced.
|
||||
/// Pass a default-constructed (empty) Sink to silence all output.
|
||||
/// Thread-safe: the new sink is visible to all threads after this returns.
|
||||
void set_sink(Sink sink);
|
||||
inline void set_sink(Sink sink)
|
||||
{
|
||||
auto& state = Detail::sink_state();
|
||||
std::unique_lock lock{state.mutex};
|
||||
state.sink = std::move(sink);
|
||||
}
|
||||
|
||||
/// Emit one log event through the global sink.
|
||||
/// No-op (zero allocation) if no sink is installed.
|
||||
/// Thread-safe with respect to set_sink() and concurrent log() calls.
|
||||
void log(Level level, std::string_view module, std::string_view message);
|
||||
inline void log(Level level, std::string_view module,
|
||||
std::string_view message)
|
||||
{
|
||||
auto& state = Detail::sink_state();
|
||||
std::shared_lock lock{state.mutex};
|
||||
if (state.sink) {
|
||||
state.sink(level, module, message);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Void::Log
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Logging/Entry.hpp>
|
||||
#include <Void/Logging/Level.hpp>
|
||||
#include <Void/Log/Entry.hpp>
|
||||
#include <Void/Log/Level.hpp>
|
||||
|
||||
#include <concepts>
|
||||
#include <cstddef>
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <Void/Detail/Enum.hpp>
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include <Void/Logging/Logger.hpp>
|
||||
#include <Void/Log/Logger.hpp>
|
||||
|
||||
// Bridge between Void::Log (the thin emission layer used by all modules) and
|
||||
// Void::Logging::Logger (the full sink implementation).
|
||||
@@ -11,7 +11,7 @@
|
||||
//
|
||||
// Example:
|
||||
// #include <Void/Log/LoggingAdapter.hpp>
|
||||
// #include <Void/Logging/ConsoleLogger.hpp>
|
||||
// #include <Void/Log/ConsoleLogger.hpp>
|
||||
//
|
||||
// Void::Logging::ConsoleLogger logger;
|
||||
// Void::Log::set_sink(Void::Log::make_sink(logger));
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <format>
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include <Void/Result/Error.hpp>
|
||||
#include <Void/Result/Result.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <format>
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/FileSystem/Path.hpp>
|
||||
#include <Void/System/Path.hpp>
|
||||
#include <Void/Log/Log.hpp>
|
||||
|
||||
#include <atomic>
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <Void/Result/Detail/Repr.hpp>
|
||||
#include <Void/Functional/Detail/Repr.hpp>
|
||||
#include <Void/Testing/Config.hpp>
|
||||
#include <Void/Testing/Detail/Registry.hpp>
|
||||
#include <concepts>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user