Skip to content

refactor(container): deprecate legacy include/container/ forwarding headers#539

Merged
kcenon merged 1 commit intodevelopfrom
feat/issue-534-deprecate-legacy-forwarders
May 1, 2026
Merged

refactor(container): deprecate legacy include/container/ forwarding headers#539
kcenon merged 1 commit intodevelopfrom
feat/issue-534-deprecate-legacy-forwarders

Conversation

@kcenon
Copy link
Copy Markdown
Owner

@kcenon kcenon commented May 1, 2026

What

Summary

Mark every legacy forwarding header in include/container/ as deprecated and document the removal target in both CHANGELOG.md (downstream-tooling SSOT) and docs/CHANGELOG.md (registry SSOT). Migrate the only in-repo translation unit that still used the legacy path so the in-repo build itself stays warning-free.

Change Type

  • Refactor (no functional changes)
  • Documentation (CHANGELOG entries)

Affected Components

  • include/container/optimizations/fast_parser.h — the only file currently under the legacy include/container/ tree
  • tests/fast_parser_integration_tests.cpp — in-repo legacy include migrated to canonical path
  • CHANGELOG.md — new "Deprecated" entry under [Unreleased]
  • docs/CHANGELOG.md — mirrored "Deprecated" entry under [Unreleased]

Why

Problem Solved

The legacy include/container/ path predates the canonical include/kcenon/container/ layout. Today the same headers can be reached via two roots, and downstream consumers keep depending on the legacy path because nothing has signalled that it is going away. After this PR:

  • Downstream code that still uses <container/...> gets a portable build-time warning to migrate.
  • CHANGELOG.md records the deprecation and the planned hard-removal release.
  • The path is cleared for the actual physical removal at the planned future minor release (out of scope for this PR — deprecation only).

Related Issues

Where

File Change
include/container/optimizations/fast_parser.h Add #pragma message("warning: …") deprecation notice + Doxygen @deprecated block
tests/fast_parser_integration_tests.cpp Migrate <include/container/...><kcenon/container/...>
CHANGELOG.md Add ### Deprecated section under [Unreleased]
docs/CHANGELOG.md Mirror the ### Deprecated entry under [Unreleased]

How

Per-header deprecation mechanism

The single forwarding header that currently exists in include/container/ is a pure #include forwarder (no own type aliases / using-decls / function declarations). The C++ [[deprecated]] attribute cannot attach to an #include directive, so attribute-based deprecation is not applicable here. The portable alternative is #pragma message("warning: ..."), which works on GCC, Clang, and MSVC. (#warning is intentionally avoided because not all toolchains in CI accept it consistently — MSVC requires #pragma message.)

Mechanism per header:

Header Mechanism Reason
include/container/optimizations/fast_parser.h #pragma message("warning: …") Pure #include forwarder; attribute cannot attach

If future sub-issues introduce additional forwarders that re-export type aliases or function declarations, those should prefer [[deprecated("...")]] on the declaration; only fall back to #pragma message when the construct cannot carry an attribute.

Removal target version

Project version is currently 1.0.0 (released 2026-04-16, see CHANGELOG.md ## [1.0.0], vcpkg.json version-semver: "1.0.0", and CMakeLists.txt VERSION 1.0.0). The next minor release is therefore v1.1.0. Per the issue brief, the removal target is documented as "the next minor release after v1.1.0" so the deprecation gets at least one full minor release for downstream consumers to migrate before the legacy path is removed.

This wording is recorded in three places:

  • include/container/optimizations/fast_parser.h Doxygen block + #pragma message text
  • Root CHANGELOG.md [Unreleased] > Deprecated bullet
  • docs/CHANGELOG.md [Unreleased] > Deprecated bullet

In-repo legacy use migration

grep swept the entire repo for #include <container/...> / #include "container/..." patterns that are not the canonical <kcenon/container/...> path. The only hit was tests/fast_parser_integration_tests.cpp:21, which is migrated in this PR to <kcenon/container/optimizations/fast_parser.h>. After this PR the in-repo build will not emit the new deprecation warning, and the warning is reserved for external consumers.

Testing Done

Breaking Changes

None. This is a deprecation-only PR — the legacy header still functions and forwards to the canonical location. Downstream consumers will simply see a new build-time warning until they migrate.

Rollback Plan

Revert this single squash commit. The forwarder reverts to its pre-PR pure #include form; the test reverts to the legacy include; the CHANGELOG entries are removed.

Out of Scope (sibling sub-issues of EPIC #531)

Checklist

  • Every header under include/container/ carries a deprecation marker (#pragma message for the only existing pure #include forwarder)
  • CHANGELOG.md lists deprecated header + replacement + removal target version
  • docs/CHANGELOG.md mirrors the same entry (per the SSOT mirroring note in CHANGELOG.md)
  • No in-repo translation unit uses the legacy paths anymore
  • Self-review completed
  • Conventional Commits format
  • No Claude/AI/Anthropic attribution
  • No emojis
  • Issue linked with Closes #534 and Part of #531

…eaders

Mark every forwarding header under include/container/ with a deprecation
notice and document the removal target in CHANGELOG.md.

Currently only one forwarding header remains:
- include/container/optimizations/fast_parser.h

Because this header is a pure '#include' forwarder, the C++ '[[deprecated]]'
attribute cannot attach to it. Use '#pragma message("warning: ...")'
instead — portable across GCC, Clang, and MSVC — so downstream consumers
get a build-time warning when they include the legacy path.

Migrate the only in-repo legacy use (tests/fast_parser_integration_tests.cpp)
to the canonical '<kcenon/container/optimizations/fast_parser.h>' so the
in-repo build does not generate the new warning.

Add a 'Deprecated' entry under [Unreleased] in both CHANGELOG.md
(downstream-tooling SSOT) and docs/CHANGELOG.md (registry SSOT) listing
the deprecated header, the canonical replacement, and the removal target
(next minor release after v1.1.0).

Closes #534
Part of #531
@kcenon kcenon merged commit 8b2b96a into develop May 1, 2026
5 checks passed
@kcenon kcenon deleted the feat/issue-534-deprecate-legacy-forwarders branch May 1, 2026 14:16
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.

1 participant