refactor(di): migrate from lightweight_di_container to common_system service_container#447
Merged
Merged
Conversation
Remove internal DI container files that are superseded by common_system's service_container. These files were only used in test code and are no longer needed. Removed files: - src/impl/di/di_container_interface.h - src/impl/di/lightweight_container.h - src/impl/di/lightweight_di_container.h - src/impl/di/thread_system_di_adapter.h Part of kcenon/common_system#367
Replace lightweight_di_container tests with service_container integration tests. The new tests validate: - Singleton and transient lifetime registration/resolution - Instance registration - Factory and simple factory patterns - Duplicate registration prevention - Unregister and clear operations - Concurrent resolve thread safety (8 threads) - Service descriptor introspection - Container freeze behavior Also fix test build configuration: - Link to LoggerSystem instead of non-existent 'logger' target - Add test definition to main tests/CMakeLists.txt Part of kcenon/common_system#367
Replace internal DI implementation file listing with a note about using common_system's service_container for dependency injection. Part of kcenon/common_system#367
3 tasks
Contributor
Performance Regression Check
Threshold: >5% regression triggers warning |
Owner
Author
Test Plan Verification ✅Remaining unchecked test plan item verified post-merge:
|
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
…service_container (#447) * refactor(di): remove legacy lightweight_di_container implementation Remove internal DI container files that are superseded by common_system's service_container. These files were only used in test code and are no longer needed. Removed files: - src/impl/di/di_container_interface.h - src/impl/di/lightweight_container.h - src/impl/di/lightweight_di_container.h - src/impl/di/thread_system_di_adapter.h Part of kcenon/common_system#367 * test(di): rewrite DI tests to use common_system service_container Replace lightweight_di_container tests with service_container integration tests. The new tests validate: - Singleton and transient lifetime registration/resolution - Instance registration - Factory and simple factory patterns - Duplicate registration prevention - Unregister and clear operations - Concurrent resolve thread safety (8 threads) - Service descriptor introspection - Container freeze behavior Also fix test build configuration: - Link to LoggerSystem instead of non-existent 'logger' target - Add test definition to main tests/CMakeLists.txt Part of kcenon/common_system#367 * docs(di): update PROJECT_STRUCTURE.md after DI container removal Replace internal DI implementation file listing with a note about using common_system's service_container for dependency injection. Part of kcenon/common_system#367
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
lightweight_di_containerand related internal DI headers (4 files, 587 LOC deleted)common_system::di::service_containerLoggerSystemtarget instead of non-existentloggertargetPROJECT_STRUCTURE.mdto reflect the new DI architectureCloses kcenon/common_system#367
Context
This is Phase 3 of the DI container consolidation effort (kcenon/common_system#363).
The
lightweight_di_containerwas only used in test code and is now fully replacedby the unified
service_containerfromcommon_system.Changes
Removed
src/impl/di/di_container_interface.h- Template DI interfacesrc/impl/di/lightweight_container.h- Simple type-based containersrc/impl/di/lightweight_di_container.h- String-based template containersrc/impl/di/thread_system_di_adapter.h- Thread system adapterAdded/Modified
tests/unit/di_test/di_container_test.cpp- 20 tests usingservice_containertests/CMakeLists.txt- Adddi_container_testto build (was never built before)tests/unit/di_test/CMakeLists.txt- LinkLoggerSysteminstead ofloggerdocs/PROJECT_STRUCTURE.md- Update DI sectionTest Plan