deps: resolve bidirectional thread_system dependency risk#254
Merged
Conversation
Add CMake function check_bidirectional_dependency_risk() that: - Detects when both LOGGER_USE_THREAD_SYSTEM and BUILD_WITH_LOGGER_SYSTEM are enabled - Inspects thread_system target for BUILD_WITH_LOGGER_SYSTEM compile definition - Emits detailed warning with recommended configuration This addresses Issue #252 by providing early warning for circular dependency risk between logger_system and thread_system. Refs: #252
Add thread_system_integration_test.cpp with tests for: - Compile-time detection (has_thread_system_support) - Default backend state verification - Enable/disable cycle safety - Submit task behavior in both modes - Logger standalone mode operation - Conditional integration pattern Tests run in both LOGGER_HAS_THREAD_SYSTEM enabled and disabled builds. Refs: #252
Add thread_system linking to integration tests CMakeLists.txt to provide include paths required by thread_system_integration.h when LOGGER_HAS_THREAD_SYSTEM is defined. Refs: #252
Update thread_system_integration tests to handle cases where thread pool creation fails (common in CI coverage builds with resource constraints). Tests now skip gracefully instead of failing. Refs: #252
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
* feat(cmake): add bidirectional dependency detection for thread_system Add CMake function check_bidirectional_dependency_risk() that: - Detects when both LOGGER_USE_THREAD_SYSTEM and BUILD_WITH_LOGGER_SYSTEM are enabled - Inspects thread_system target for BUILD_WITH_LOGGER_SYSTEM compile definition - Emits detailed warning with recommended configuration This addresses Issue #252 by providing early warning for circular dependency risk between logger_system and thread_system. Refs: #252 * docs: add dependency configuration section for bidirectional risk Update THREAD_SYSTEM.md (EN/KO) with: - Dependency flow diagram showing both integration directions - Recommended configuration matrix for different use cases - Safe configuration examples with CMake flags - CMake conflict detection documentation - Related issue references (#252) Refs: #252 * test: add integration tests for thread_system dependency configuration Add thread_system_integration_test.cpp with tests for: - Compile-time detection (has_thread_system_support) - Default backend state verification - Enable/disable cycle safety - Submit task behavior in both modes - Logger standalone mode operation - Conditional integration pattern Tests run in both LOGGER_HAS_THREAD_SYSTEM enabled and disabled builds. Refs: #252 * fix(test): link thread_system in integration tests when enabled Add thread_system linking to integration tests CMakeLists.txt to provide include paths required by thread_system_integration.h when LOGGER_HAS_THREAD_SYSTEM is defined. Refs: #252 * fix(test): handle thread pool creation failure gracefully Update thread_system_integration tests to handle cases where thread pool creation fails (common in CI coverage builds with resource constraints). Tests now skip gracefully instead of failing. Refs: #252
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
Changes
CMake Conflict Detection
check_bidirectional_dependency_risk()function that detects when bothLOGGER_USE_THREAD_SYSTEMandBUILD_WITH_LOGGER_SYSTEMare enabledDocumentation Updates
Integration Tests
thread_system_integration_test.cppwith tests for:Related Issues
Test Plan