2.9 KiB
2.9 KiB
P0 Module Closures, Header Ownership, and Consumer Matrix
Task ID: X-BASE-03 Phase: P0 Status: APPROVED
1. Context and baseline
Audit of src/*/module.cmake vs #include <Void/...> reveals:
<Void/Log/Log.hpp>is used byLogState,Async,System,Stacktrace,Configuration,Plugin, andService, yet is installed only byVoid_Log.- Undeclared acyclic internal dependencies in
Containers,Data,Configuration,Service,Plugin,Fsm,Testing,TestingMock, andLog. Core/Uuid.hppstill leaks<Void/Math/Random.hpp>(resolved inM-CORE-02);Functional/Detail/Repr.hppincludes<Void/Core/Meta.hpp>.tests/CMakeLists.txtfails whenVOID_ENABLED_MODULESbuilds subsets, andInstalledComponents.cmakelacks foundation, embedded, static, and relocated checks.
2. Deliverables
- Extend
cmake/Module.cmakewithEXTRA_HEADERS/EXCLUDE_HEADERS; transfer<Void/Log/Log.hpp>ownership toLogState. - Reconcile acyclic
INTERNAL_DEPSacrosssrc/*/module.cmakefiles and introduceVoid::FunctionalCoreFormatting. - Filter
VoidTestssources intests/CMakeLists.txtby requiredACTIVE_MODULESand forwardACTIVE_MODULES,CMAKE_GENERATOR, andCMAKE_MAKE_PROGRAMtoInstalledComponents.cmake. - Add
tests/package/Foundation,tests/package/Embedded, and relocated-prefix validation inInstalledComponents.cmake.
3. Exact files and interfaces
cmake/Module.cmake,src/LogState/module.cmake,src/Log/module.cmakesrc/Containers/module.cmake,src/Data/module.cmake,src/Configuration/module.cmake,src/Service/module.cmake,src/Plugin/module.cmake,src/Fsm/module.cmake,src/Testing/module.cmake,src/TestingMock/module.cmakeinclude/Void/FunctionalCoreFormatting/Repr.hpp,src/FunctionalCoreFormatting/module.cmaketests/CMakeLists.txt,tests/package/InstalledComponents.cmake,tests/package/Foundation/*,tests/package/Embedded/*
4. Edge cases
- Do not add
MathtoCore/module.cmake(violates C-01); keepCore -> Mathdocumented untilM-CORE-02. - Keep
Void/Functional/Detail/Repr.hppinstalled withFunctionalfor Wave A+B while providingVoid::FunctionalCoreFormatting. - Fail loudly if
VOID_ENABLE_TESTING=ONwithoutTestingenabled or if 0 package consumers run.
5. Acceptance criteria
- Full
ctest(including relocatedVoidInstalledComponentConsumers) passes with-Werror. - Minimal foundation subset (
Time;Math;Text;Binary;Functional;Testing) builds and passes with external packages disabled. System;TestingwithoutLoginstallsinclude/Void/Log/Log.hppand passesProcess*.- Static (
-DBUILD_SHARED_LIBS=OFF) and embeddedadd_subdirectory(tests/package/Embedded) consumers build and pass.
6. Verification commands
See VERIFICATION.md commands for /tmp/void-p0-closures, /tmp/void-p0-minimal, /tmp/void-p0-system, /tmp/void-p0-embedded, and /tmp/void-p0-static.