deps: Strengthen optional dependency guards and fallback implementations#191
Merged
Merged
Conversation
- Add KCENON_WITH_MONITORING_SYSTEM macro definition with default value 0 - Add has_monitoring_system() constexpr helper function - Consistent with existing KCENON_WITH_NETWORK_SYSTEM pattern Refs #190
- Add static constexpr bool is_available to http_transport - Add static constexpr bool is_available to websocket_transport - is_available = true when KCENON_WITH_NETWORK_SYSTEM is enabled - is_available = false for stub implementations - Enables compile-time detection of transport availability Refs #190
- Add static constexpr bool is_available to message_bus_collector - is_available = true when KCENON_WITH_MONITORING_SYSTEM is enabled - is_available = false for stub implementation - Enables compile-time detection of monitoring availability Refs #190
- Add 'isolated' configure preset with all optional deps disabled - KCENON_WITH_NETWORK_SYSTEM=OFF - KCENON_WITH_MONITORING_SYSTEM=OFF - Add corresponding build and test presets - Enables verification that fallback implementations work correctly Refs #190
- Add script to verify isolated build works correctly - Configures and builds with all optional deps disabled - Runs tests to verify fallback implementations - Supports --clean and --skip-tests options Refs #190
- Add KCENON_WITH_MONITORING_SYSTEM to build options table - Add Optional Dependency Matrix section with fallback behaviors - Document is_available constexpr usage with code examples - Add Isolated Build section with preset usage instructions - Reference verify_isolated_build.sh script Refs #190
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
static constexpr bool is_availableto all optional components for compile-time detectionKCENON_WITH_MONITORING_SYSTEMmacro support in feature_flags.hhas_monitoring_system()helper function for runtime detectionisolatedpreset for testing fallback implementationsverify_isolated_build.shscript for verificationChanges
feature_flags.h
KCENON_WITH_MONITORING_SYSTEMmacro definitionhas_monitoring_system()constexpr helper functionTransport Classes (http_transport.h, websocket_transport.h)
static constexpr bool is_available = trueto full implementationsstatic constexpr bool is_available = falseto stub implementationsmessage_bus_collector.h
static constexpr bool is_available = trueto full implementationstatic constexpr bool is_available = falseto stub implementationCMakePresets.json
isolatedconfigure preset withKCENON_WITH_NETWORK_SYSTEM=OFFandKCENON_WITH_MONITORING_SYSTEM=OFFscripts/verify_isolated_build.sh
--cleanand--skip-testsoptionsREADME.md
KCENON_WITH_MONITORING_SYSTEMto build options tableis_availableusageTest plan
cmake --preset=isolated)ctest --preset=isolated)is_availableconstexpr is accessible at compile timeCloses #190