feat(di): implement service registration in unified_bootstrapper#320
Merged
kcenon merged 1 commit intoJan 31, 2026
Merged
Conversation
Add conditional service registration framework for unified_bootstrapper that allows subsystems to register services via adapters. Changes: - Include feature_system_deps.h for feature detection macros - Update register_core_services() with clear documentation - Implement register_optional_services() with conditional compilation - Add support for logger, monitoring, database, and network systems - Use [[maybe_unused]] attribute to avoid compiler warnings - Graceful degradation when subsystems are not available The implementation uses KCENON_WITH_*_SYSTEM macros to detect available subsystems at compile time, allowing the bootstrapper to work with any combination of subsystems. Part of #314 Closes #317
6 tasks
12 tasks
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
Add conditional service registration framework for unified_bootstrapper that allows subsystems to register services via adapters. Changes: - Include feature_system_deps.h for feature detection macros - Update register_core_services() with clear documentation - Implement register_optional_services() with conditional compilation - Add support for logger, monitoring, database, and network systems - Use [[maybe_unused]] attribute to avoid compiler warnings - Graceful degradation when subsystems are not available The implementation uses KCENON_WITH_*_SYSTEM macros to detect available subsystems at compile time, allowing the bootstrapper to work with any combination of subsystems. Part of #314 Closes #317
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the placeholder service registration methods in
unified_bootstrapperto support conditional service registration based on compile-time feature detection and runtime configuration.Changes Made
#include "../config/feature_system_deps.h"for feature detection macrosregister_core_services()with clear documentation about future extensibilityregister_optional_services()with conditional compilation support:KCENON_WITH_LOGGER_SYSTEM)KCENON_WITH_MONITORING_SYSTEM)KCENON_WITH_DATABASE_SYSTEM)KCENON_WITH_NETWORK_SYSTEM)[[maybe_unused]]attribute to prevent compiler warningsTechnical Approach
The implementation uses a two-level conditional check:
bootstrapper_optionsflags (enable_logging, enable_monitoring, etc.)This allows graceful degradation when subsystems are not available, enabling the bootstrapper to work with any combination of subsystems without requiring all dependencies.
Design Pattern
Each subsystem is expected to provide a registration function via adapters:
When adapters are implemented, they can be called within the conditional blocks.
Test Plan
Build Results
Breaking Changes
None - This is a backward-compatible enhancement.
Related Issues
Part of #314 (Epic: Consolidate cross-system infrastructure components)
Closes #317
Files Modified
include/kcenon/common/di/unified_bootstrapper.h: Service registration implementationNext Steps
After this PR:
register_*_services()functionunified_bootstrapperwill be needed for future subsystem additions