refactor(build): restructure include/ to include/libstats/, drop the shim (#83) - #89
Merged
Conversation
…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>
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.
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_shimALL-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 generatedlibstats_version.hmoves 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) andavx512-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)
main: identical in all 83 non-binary files, including the entire installedinclude/tree, the CMake config/targets files, andlibstats.pc. The four binaries differ only inLC_UUID+ ad-hoc code-signature (DWARF embeds header paths under the Dev preset's-g;nm -gsymbol diff is empty) — irreducible for any header move.-I<build>/include_shimreplaced by the three dirs above. Nothing else.ctest -LE "timing|benchmark"49/49;consumer_example(find_package against a scratch install) andconsumer_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 skipsfind_package(Threads)on reconfigure of an existing build dir, silently droppingThreads::Threadsfrom 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