Skip to content

feat(modules): add C++20 module files for kcenon.monitoring#318

Merged
kcenon merged 2 commits into
mainfrom
feature/310-cpp20-modules
Jan 3, 2026
Merged

feat(modules): add C++20 module files for kcenon.monitoring#318
kcenon merged 2 commits into
mainfrom
feature/310-cpp20-modules

Conversation

@kcenon

@kcenon kcenon commented Jan 3, 2026

Copy link
Copy Markdown
Owner

Summary

Create C++20 module files for kcenon.monitoring as part of the Tier 3 libraries migration effort.

  • Add C++20 module structure with three partitions:
    • kcenon.monitoring.core: Core types, interfaces, concepts, and utilities
    • kcenon.monitoring.collectors: Metric collector implementations and registry
    • kcenon.monitoring.adaptive: Adaptive monitoring, alerts, and load-based adaptation
  • Add primary module interface kcenon.monitoring
  • Update CMakeLists.txt with module support (opt-in via MONITORING_ENABLE_MODULES)
  • Document changes in CHANGELOG (English and Korean)

Related Issues

Closes #310

Part of C++20 Module Migration Epic (common_system#256)

Module Structure

src/modules/
├── monitoring.cppm      # Primary module interface
├── core.cppm            # Core partition
├── collectors.cppm      # Collectors partition
└── adaptive.cppm        # Adaptive partition

CMake Configuration

# Enable C++20 modules (requires CMake 3.28+)
cmake -DMONITORING_ENABLE_MODULES=ON ..

# Use the module library
target_link_libraries(my_app PRIVATE monitoring_system_modules)

Usage Example

import kcenon.monitoring;

using namespace kcenon::monitoring;

// Use core types
metric_sample sample("cpu_usage", 75.5);

// Use collectors
auto& registry = collector_registry::instance();
auto metrics = registry.collect_all();

// Use adaptive monitoring
auto& controller = global_adaptive_controller();
controller.adapt_all(load_metrics);

Prerequisites Status

Note: The module files are ready but dependent module imports are commented out until Tier 0/1/2 modules are available.

Test Plan

  • Verify header-based build still works (default)
  • Verify module build works with CMake 3.28+ and compatible compiler
  • Run existing test suite to ensure no regressions
  • Test module import syntax with supported compilers

Breaking Changes

None. Module support is opt-in and header-based builds remain the default.

kcenon added 2 commits January 3, 2026 18:37
Create C++20 module structure for monitoring_system as part of
the C++20 module migration effort (Issue #310).

Module partitions:
- kcenon.monitoring.core: Core types, interfaces, and utilities
- kcenon.monitoring.collectors: Metric collector implementations
- kcenon.monitoring.adaptive: Adaptive monitoring features
- kcenon.monitoring: Primary module interface

CMake changes:
- Add MONITORING_ENABLE_MODULES option (requires CMake 3.28+)
- Add monitoring_system_modules library target
- Module support is opt-in during transition period

This implementation follows the module structure defined in the
parent epic (common_system#256) and maintains header-based build
compatibility.
Document the C++20 module implementation for kcenon.monitoring
in both English and Korean changelogs.

Changes documented:
- Module partitions (core, collectors, adaptive)
- CMake configuration options
- Transition period support for header-based builds
@kcenon kcenon merged commit 1ca5e07 into main Jan 3, 2026
21 checks passed
@kcenon kcenon deleted the feature/310-cpp20-modules branch January 3, 2026 09:52
kcenon added a commit that referenced this pull request Apr 13, 2026
* feat(modules): add C++20 module files for kcenon.monitoring

Create C++20 module structure for monitoring_system as part of
the C++20 module migration effort (Issue #310).

Module partitions:
- kcenon.monitoring.core: Core types, interfaces, and utilities
- kcenon.monitoring.collectors: Metric collector implementations
- kcenon.monitoring.adaptive: Adaptive monitoring features
- kcenon.monitoring: Primary module interface

CMake changes:
- Add MONITORING_ENABLE_MODULES option (requires CMake 3.28+)
- Add monitoring_system_modules library target
- Module support is opt-in during transition period

This implementation follows the module structure defined in the
parent epic (common_system#256) and maintains header-based build
compatibility.

* docs: add C++20 module support to CHANGELOG

Document the C++20 module implementation for kcenon.monitoring
in both English and Korean changelogs.

Changes documented:
- Module partitions (core, collectors, adaptive)
- CMake configuration options
- Transition period support for header-based builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MODULE] Create C++20 module files for kcenon.monitoring

1 participant