Skip to content

refactor(build): restructure include/ to include/libstats/, drop the shim (#83) - #89

Merged
OldCrow merged 2 commits into
mainfrom
feature/83-include-restructure
Jul 27, 2026
Merged

refactor(build): restructure include/ to include/libstats/, drop the shim (#83)#89
OldCrow merged 2 commits into
mainfrom
feature/83-include-restructure

Conversation

@OldCrow

@OldCrow OldCrow commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Executes the full change list from #83: all 79 headers move include/include/libstats/ as pure renames (zero content change), and the include-shim machinery is deleted — the configure-time symlink on macOS/Linux, and the flat copy + libstats_refresh_shim ALL-target + per-target ordering dependencies that dodged MSBuild copy/read races on Windows.

The build tree now serves the installed package's dual include contract directly (LIBSTATS_BUILD_INCLUDE_DIRS: <src>/include, <src>/include/libstats, <build>/generated); the generated libstats_version.h moves to <build>/generated/. Beyond the issue's explicit list, the repo-wide audit caught two load-bearing touch-points: examples/CMakeLists.txt (same shim-dir replacement) and avx512-compilation.yml's two ad-hoc compiles (-I build/include_shim-I include; neither TU needs the version header or the bare umbrella).

Verification gates (1–3 local, evidence held by the orchestrating reviewer)

  • Gate 1 — install byte-diff (primary oracle): post-change install vs a clean build of pre-change main: identical in all 83 non-binary files, including the entire installed include/ tree, the CMake config/targets files, and libstats.pc. The four binaries differ only in LC_UUID + ad-hoc code-signature (DWARF embeds header paths under the Dev preset's -g; nm -g symbol diff is empty) — irreducible for any header move.
  • Gate 2 — flag-multiset diff: 135/135 TUs show exactly the predicted hunk — -I<build>/include_shim replaced by the three dirs above. Nothing else.
  • Gate 3 — tests + consumers: ctest -LE "timing|benchmark" 49/49; consumer_example (find_package against a scratch install) and consumer_example_fetchcontent (BUILD_INTERFACE paths from source) both build and run to verified output.

Found in passing, pre-existing and out of scope (recorded in PLAN.md Known Gaps): detect_threading_systems()'s cache guard skips find_package(Threads) on reconfigure of an existing build dir, silently dropping Threads::Threads from the PUBLIC link and installed export.

Gate 4 — this PR

Full CI green including Windows (proves the deleted copy/ordering machinery wasn't load-bearing), both AVX-512 workflows, and Documentation (gates the Doxygen path behavior).

Closes #83.

🤖 Generated with Claude Code

…shim (#83)

Moves all 79 headers include/ -> include/libstats/ (pure renames, zero
content change) so the source tree mirrors the install tree, and deletes
the include-shim machinery it existed to paper over: the configure-time
symlink on macOS/Linux, and the flat copy + libstats_refresh_shim
ALL-target + per-target ordering dependencies that dodged MSBuild
copy/read races on Windows.

The build tree now serves the installed package's dual include contract
directly (LIBSTATS_BUILD_INCLUDE_DIRS: <src>/include,
<src>/include/libstats, <build>/generated); the generated
libstats_version.h moves from the shim root to <build>/generated/.
Non-CMake touch-points updated: avx512-compilation.yml ad-hoc compiles,
Doxyfile confirmed no-op (RECURSIVE), AGENTS/CONTRIBUTING ad-hoc compile
templates gain -I./include/libstats, docs/tools/scripts path references.

Verification (issue #83 gates):
- Install byte-diff vs clean pre-change main: identical except the four
  binaries' LC_UUID/code-signature (DWARF embeds header paths under -g;
  nm -g symbol diff is empty).
- compile_commands.json: 135/135 TUs show only the predicted hunk
  (-I<build>/include_shim -> the three dirs above).
- ctest -LE 'timing|benchmark': 49/49; consumer_example (find_package vs
  scratch install) and consumer_example_fetchcontent both build and run.

Found in passing (pre-existing, not addressed here, recorded in PLAN.md):
detect_threading_systems()'s cache guard skips find_package(Threads) on
reconfigure, silently dropping Threads::Threads from the PUBLIC link and
installed export of an already-configured build dir.

Closes #83.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@OldCrow
OldCrow merged commit 0a9ecd9 into main Jul 27, 2026
23 checks passed
@OldCrow
OldCrow deleted the feature/83-include-restructure branch July 27, 2026 00:57
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.

Restructure include/ to include/libstats/ and remove the include shim

1 participant