Skip to content

feat: use KCENON feature detection for jthread and source_location#251

Merged
kcenon merged 8 commits into
mainfrom
feature/use-kcenon-feature-detection
Dec 22, 2025
Merged

feat: use KCENON feature detection for jthread and source_location#251
kcenon merged 8 commits into
mainfrom
feature/use-kcenon-feature-detection

Conversation

@kcenon

@kcenon kcenon commented Dec 22, 2025

Copy link
Copy Markdown
Owner

Summary

  • Use unified KCENON_HAS_SOURCE_LOCATION and KCENON_HAS_JTHREAD from common_system
  • Include feature_flags.h for standardized feature detection
  • Keep LOGGER_HAS_* macros as legacy aliases for backward compatibility

Changes

  • error_handling_utils.h: Use KCENON_HAS_SOURCE_LOCATION for source_location detection
  • jthread_compat.h: Use KCENON_HAS_JTHREAD for jthread detection

Test Plan

  • CI builds pass on all platforms (Linux, macOS, Windows)
  • Legacy code using LOGGER_HAS_* macros still compiles

Related Issues

Closes #250
Parent: kcenon/common_system#223

- Replace LOGGER_HAS_SOURCE_LOCATION with KCENON_HAS_SOURCE_LOCATION
- Replace LOGGER_HAS_JTHREAD with KCENON_HAS_JTHREAD
- Include kcenon/common/config/feature_flags.h for unified detection
- Keep LOGGER_HAS_* as legacy aliases for backward compatibility

Closes #250
…0.0 compatibility

The file/line/function overload of log() was removed from
common::interfaces::ILogger in common_system v3.0.0 (Issue #217).
This method is preserved for backward compatibility but no longer
overrides the interface method.

This fixes the build error:
  'log(...)' marked 'override', but does not override
The file/line/function overload of log() was removed from
ILogger interface in common_system v3.0.0 (Issue #217).

Update test to call the backward-compatible method directly on
logger class instead of through ILogger pointer.
Document the fix for the deprecated log method override issue
and test file update.
kcenon added a commit to kcenon/thread_system that referenced this pull request Dec 22, 2025
When building thread_system as a submodule, the KCENON_HAS_COMMON_EXECUTOR
flag was not being defined, causing class layout mismatch between
thread_system and consuming projects like logger_system.

This resulted in Windows MSVC LNK2019 unresolved external symbol errors
for thread_pool::is_running() because the header declaration (with
override) and library implementation had different class layouts.

Changes:
- Add KCENON_HAS_COMMON_EXECUTOR=1 and KCENON_HAS_COMMON_RESULT=1
  definitions in core/CMakeLists.txt when executor_interface.h exists
- Ensures consistent class layout across all compilation units

Fixes: kcenon/logger_system#251
Update CI workflows to use thread_system feature branch that includes
the fix for KCENON_HAS_COMMON_EXECUTOR definition in submodule builds.

This resolves the Windows MSVC LNK2019 unresolved external symbol error
for thread_pool::is_running() that was caused by inconsistent class
layout between logger_system and thread_system builds.

Temporary change until thread_system PR is merged to main.
Enable UNIFIED_USE_LOCAL=ON in CI workflows to use locally checked out
common_system and thread_system instead of FetchContent downloading
from main branch.

This ensures that the thread_system feature branch with
KCENON_HAS_COMMON_EXECUTOR fix is used in the build.
Document the fix for Windows MSVC LNK2019 unresolved external symbol
error for thread_pool::is_running().

Root cause: KCENON_HAS_COMMON_EXECUTOR was not defined when
thread_system was built as submodule, causing class layout mismatch.

Solution:
- thread_system core/CMakeLists.txt defines KCENON_HAS_COMMON_EXECUTOR=1
- CI workflows use UNIFIED_USE_LOCAL=ON for local dependencies
@kcenon kcenon merged commit ad4f1d3 into main Dec 22, 2025
29 checks passed
@kcenon kcenon deleted the feature/use-kcenon-feature-detection branch December 22, 2025 14:48
kcenon added a commit that referenced this pull request Apr 13, 2026
)

* feat: use KCENON feature detection for jthread and source_location

- Replace LOGGER_HAS_SOURCE_LOCATION with KCENON_HAS_SOURCE_LOCATION
- Replace LOGGER_HAS_JTHREAD with KCENON_HAS_JTHREAD
- Include kcenon/common/config/feature_flags.h for unified detection
- Keep LOGGER_HAS_* as legacy aliases for backward compatibility

Closes #250

* docs: update changelog for KCENON feature detection migration

* fix: remove override from deprecated log method for common_system v3.0.0 compatibility

The file/line/function overload of log() was removed from
common::interfaces::ILogger in common_system v3.0.0 (Issue #217).
This method is preserved for backward compatibility but no longer
overrides the interface method.

This fixes the build error:
  'log(...)' marked 'override', but does not override

* test: update ilogger_interface_test for common_system v3.0.0 API changes

The file/line/function overload of log() was removed from
ILogger interface in common_system v3.0.0 (Issue #217).

Update test to call the backward-compatible method directly on
logger class instead of through ILogger pointer.

* docs: update CHANGELOG for common_system v3.0.0 compatibility fix

Document the fix for the deprecated log method override issue
and test file update.

* ci: use thread_system feature branch for KCENON_HAS_COMMON_EXECUTOR fix

Update CI workflows to use thread_system feature branch that includes
the fix for KCENON_HAS_COMMON_EXECUTOR definition in submodule builds.

This resolves the Windows MSVC LNK2019 unresolved external symbol error
for thread_pool::is_running() that was caused by inconsistent class
layout between logger_system and thread_system builds.

Temporary change until thread_system PR is merged to main.

* ci: use UNIFIED_USE_LOCAL for local checkout dependencies

Enable UNIFIED_USE_LOCAL=ON in CI workflows to use locally checked out
common_system and thread_system instead of FetchContent downloading
from main branch.

This ensures that the thread_system feature branch with
KCENON_HAS_COMMON_EXECUTOR fix is used in the build.

* docs: update changelog with Windows MSVC linker fix

Document the fix for Windows MSVC LNK2019 unresolved external symbol
error for thread_pool::is_running().

Root cause: KCENON_HAS_COMMON_EXECUTOR was not defined when
thread_system was built as submodule, causing class layout mismatch.

Solution:
- thread_system core/CMakeLists.txt defines KCENON_HAS_COMMON_EXECUTOR=1
- CI workflows use UNIFIED_USE_LOCAL=ON for local dependencies
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.

Use KCENON feature detection (jthread/source_location)

1 participant