Skip to content

refactor(modules): update C++20 module files for upstream ecosystem changes (#223)#234

Merged
kcenon merged 2 commits intomainfrom
refactor/issue-223-update-cpp20-module-files
Feb 13, 2026
Merged

refactor(modules): update C++20 module files for upstream ecosystem changes (#223)#234
kcenon merged 2 commits intomainfrom
refactor/issue-223-update-cpp20-module-files

Conversation

@kcenon
Copy link
Copy Markdown
Owner

@kcenon kcenon commented Feb 13, 2026

Closes #223

Summary

Changes

core.cppm

  • Added messaging_error_category class and make_messaging_error_code() factory function after the existing error codes section

integration.cppm

  • Transport API alignment: Replaced outdated transport_options with transport_config + transport_statistics structs matching transport_interface.h
  • transport_interface: Fixed disconnect() to return VoidResult, renamed state() to get_state(), replaced send_async() with send_binary(), added set_binary_handler()/set_state_handler(), added get_statistics()/reset_statistics()
  • websocket_transport: Now uses websocket_transport_config, includes topic subscription methods (subscribe, unsubscribe, unsubscribe_all, get_subscriptions), send_text(), ping(), set_disconnect_handler()
  • http_transport: Added http_content_type enum, http_transport_config, post()/get() methods, set_header()/remove_header()
  • resilient_transport: Complete rewrite with retry_config, resilient_transport_config, resilience_statistics, circuit breaker control methods, PIMPL pattern
  • Health check adapters: Added map_health_status(), messaging_health_check, queue_health_check, transport_health_check, create_messaging_composite_check(), register_messaging_health_checks()
  • Added <format>, <map>, <set> to global module fragment

Test Plan

  • Regular build passes (cmake --build)
  • All existing tests pass (168/171, 3 pre-existing failures)
  • Health check tests pass (test_messaging_health_checks)
  • Module build with MESSAGING_BUILD_MODULES=ON (requires CMake 3.28+ and upstream module targets in CI)

…hanges (Issue #223)

- Update transport_interface to match actual header API:
  disconnect() returns VoidResult, rename state() to get_state(),
  replace send_async() with send_binary(), add statistics methods
- Replace transport_options with transport_config/transport_statistics
- Rewrite websocket_transport with proper config and topic methods
- Rewrite http_transport with http_content_type and config structs
- Replace resilient_transport with retry_config, circuit_breaker_config,
  resilient_transport_config, and resilience_statistics from Issue #221
- Add messaging_error_category and make_messaging_error_code to core
  partition from Issue #229
- Add health check adapter exports (messaging_health_check,
  queue_health_check, transport_health_check) from Issue #222
- Add composite check and registration helper exports
- Fix INTERFACE library target handling in UnifiedDependencies.cmake
  (use INTERFACE keyword instead of PUBLIC for INTERFACE targets)
- Link messaging_system_modules to messaging_system_core for proper
  upstream include path propagation during dependency scanning
- Remove non-existent kcenon.logger module import (logging is part
  of kcenon.common:logging partition)
- Replace kcenon.database import with kcenon.monitoring (database_system
  has upstream CMake module build bug)
- Use foreach loop for cleaner upstream module target linking
@kcenon
Copy link
Copy Markdown
Owner Author

kcenon commented Feb 13, 2026

Module Build Verification Results

Configuration Summary

Component Status Notes
CMake configure (Ninja + LLVM Clang 21) Pass All module targets created
common_system_modules Configured COMMON_BUILD_MODULES=ON
thread_system_modules Configured THREAD_BUILD_MODULES=ON
container_system_modules Configured CONTAINER_BUILD_MODULES=ON
network_system_modules Configured NETWORK_BUILD_MODULES=ON
monitoring_system_modules Configured MONITORING_ENABLE_MODULES=ON
messaging_system_modules Configured MESSAGING_BUILD_MODULES=ON

Issues Found & Fixed

  1. INTERFACE library target handling (cmake/UnifiedDependencies.cmake:485):

    • target_compile_definitions() used PUBLIC on INTERFACE library targets
    • Fixed: check TYPE property and use INTERFACE keyword for INTERFACE targets
  2. Module target missing upstream include paths (CMakeLists.txt):

    • messaging_system_modules only had its own include/ directory
    • The global module fragment #include <core/container.h> couldn't resolve
    • Fixed: link messaging_system_modules PRIVATE to messaging_system_core for transitive include propagation
  3. Non-existent module imports (messaging.cppm, integration.cppm):

    • export import kcenon.logger; — no such module (logging is kcenon.common:logging partition)
    • Fixed: removed kcenon.logger, added kcenon.monitoring

Build Results

Phase Status Details
Dependency scanning (clang-scan-deps) Pass All 5 .cppm files scan successfully
Upstream module compilation Blocked thread_system_modules has naming errors (lockfree_queue vs is_lockfree_queue)
database_system_modules Blocked CMake file set base directory bug (upstream)
Header-based build + tests Pass 168/171 tests pass (3 pre-existing failures)

Conclusion

The messaging_system module files are correctly configured and scan successfully. Full end-to-end module compilation is blocked by upstream module file bugs in thread_system and database_system, which need separate upstream fixes. This is consistent with the test plan note: "requires upstream module targets in CI".

@kcenon kcenon merged commit e0ce540 into main Feb 13, 2026
12 checks passed
@kcenon kcenon deleted the refactor/issue-223-update-cpp20-module-files branch February 13, 2026 14:46
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] Update C++20 module files for upstream ecosystem changes

1 participant