You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(api): add deprecation markers for v1.0 API freeze (#676)
* refactor(api): add deprecation markers for v1.0 API freeze
Mark legacy APIs scheduled for removal in v2.0.0 so consumers see compiler
warnings during the migration window. The v3.0.0 pass removed legacy types
but left transitional surfaces without [[deprecated]] attributes.
- compatibility.h: emit #pragma message for thread_system/thread_module/
thread_namespace/utility_module aliases (namespace aliases cannot carry
a portable [[deprecated]] attribute). Suppressible via
THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING.
- thread_logger.h: attach [[deprecated]] to user-facing methods
(log/log_error/set_level/set_enabled/set_lightweight_mode). Keep the
SDOF-safe helpers (instance/is_shutting_down/prepare_shutdown) stable
because thread_context still depends on them. Leave log_level enum
without an attribute to avoid internal self-warnings from member
declarations; its deprecation propagates through the deprecated
methods that accept it.
- lockfree/lockfree_queue.h: emit #pragma message on include of the
forwarding header. Suppressible via
THREAD_SUPPRESS_LEGACY_LOCKFREE_QUEUE_WARNING.
- queue.cppm: define the suppression macro before including
lockfree_queue.h so the module re-export path stays quiet.
Part of #670Closes#672
* docs(migration): document v1.0.0 API freeze and deprecation policy
Add a v1.0.0 section to MIGRATION.md that records the frozen public
surface, the deprecated APIs scheduled for removal in v2.0.0, and the
migration paths and suppression macros consumers can use during the
migration window.
Previously the document only described the v3.0.0 common_system
transition. With v1.0.0 being an API stability commitment, consumers
need a single place that lists what is frozen, what remains
transitional, and how to silence legacy include warnings without
editing upstream headers.
Part of #670Closes#672
### Deprecated in v1.0.0 (slated for removal in v2.0.0)
61
+
62
+
The following APIs emit compiler warnings in v1.0.0 and will be removed in v2.0.0.
63
+
64
+
| Symbol | Replacement | Trigger |
65
+
|--------|-------------|---------|
66
+
|`thread_system::` / `thread_module::` / `thread_namespace::` namespace aliases | Use `kcenon::thread::` directly |`#pragma message` on `compatibility.h` include |
67
+
|`utility_module::` namespace alias | Use `kcenon::thread::utils::` directly |`#pragma message` on `compatibility.h` include |
68
+
|`kcenon::thread::log_level` (enum in `thread_logger.h`) |`kcenon::thread::log_level_v2` or `common::interfaces::log_level`| Warnings via the deprecated `thread_logger` methods that consume it |
#pragma message("thread_system/thread_module/thread_namespace/utility_module namespace aliases are deprecated since v1.0.0 and will be removed in v2.0.0. Use 'kcenon::thread' directly. Define THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING to silence this warning.")
48
+
#elif defined(__GNUC__) || defined(__clang__)
49
+
#pragma message "thread_system/thread_module/thread_namespace/utility_module namespace aliases are deprecated since v1.0.0 and will be removed in v2.0.0. Use 'kcenon::thread' directly. Define THREAD_SUPPRESS_LEGACY_NAMESPACE_WARNING to silence this warning."
#pragma message("<kcenon/thread/lockfree/lockfree_queue.h> is deprecated since v1.0.0 and will be removed in v2.0.0. Include <kcenon/thread/concurrent/concurrent_queue.h> instead. Define THREAD_SUPPRESS_LEGACY_LOCKFREE_QUEUE_WARNING to silence this warning.")
56
+
#elif defined(__GNUC__) || defined(__clang__)
57
+
#pragma message "<kcenon/thread/lockfree/lockfree_queue.h> is deprecated since v1.0.0 and will be removed in v2.0.0. Include <kcenon/thread/concurrent/concurrent_queue.h> instead. Define THREAD_SUPPRESS_LEGACY_LOCKFREE_QUEUE_WARNING to silence this warning."
0 commit comments