Skip to content

Rename the sparse_linalg library to sparsediff_linalg - #141

Merged
dance858 merged 1 commit into
mainfrom
rename-sparsediff-linalg
Oct 11, 2026
Merged

dance858 merged 1 commit into
mainfrom
rename-sparsediff-linalg

Conversation

@dance858

Copy link
Copy Markdown
Collaborator

The library is about to become its own repository, consumed back as a submodule, so its repository name, submodule mount path, CMake target and include prefix should all agree. sparsediff_linalg says what the library is for, follows the organization's SparseDiff naming, and removes the collision risk of a generic sparse_linalg/matrix.h in a shared include path. Doing it in-tree, before the split, keeps it a single mechanical PR verifiable by byte-identical objects.

Mechanical rename, no C symbol changes:

before after
directory sparse_linalg/ sparsediff_linalg/
include prefix "sparse_linalg/<name>.h" "sparsediff_linalg/<name>.h"
target / alias sparse_linalg, sparse_linalg::sparse_linalg sparsediff_linalg, sparsediff_linalg::sparsediff_linalg
options SPARSE_LINALG_BUILD_TESTS, SPARSE_LINALG_WARNINGS_AS_ERRORS SPARSEDIFF_LINALG_* (SP_TRACK_MEMORY unchanged)
test executable build/sparse_linalg/sparse_linalg_tests build/sparsediff_linalg/sparsediff_linalg_tests
ctest entry SparseLinalgTests SparseDiffLinalgTests

317 include lines across 118 files, the two CMakeLists, six workflows (binary path and standalone -S dir), two comments and the test banner strings.

Verified locally (macOS):

  • all 76 library and engine Release .o files byte-identical to main; the only differing object is the library test main, whose banner strings changed
  • all_tests 310/310, sparsediff_linalg_tests 159/159, ctest 2/2; with SP_TRACK_MEMORY=ON 310 + 162
  • PROFILE_ONLY build runs all 7 profiles
  • standalone cmake -S sparsediff_linalg in Release and Debug: builds, ctest 1/1
  • injected violations (library → expr.h, public header → internal/, test → problem.h, standalone library → expr.h) each fail configure; clean tree configures
  • clang-format 0 violations; SparseDiffPy pip install -e . builds and passes its recipe smoke test against this checkout

🤖 Generated with Claude Code

The library will become its own repository, consumed back as a submodule, so
its repository name, submodule mount path, CMake target and include prefix
should agree. sparsediff_linalg says what the library is for, follows the
organization's SparseDiff naming, and removes the collision risk of a generic
"sparse_linalg/matrix.h" in a shared include path.

Mechanical rename, no C symbol changes:
  directory       sparse_linalg/           -> sparsediff_linalg/
  include prefix  "sparse_linalg/<name>.h" -> "sparsediff_linalg/<name>.h"
  target/alias    sparse_linalg(::)        -> sparsediff_linalg(::)
  options         SPARSE_LINALG_*          -> SPARSEDIFF_LINALG_*  (SP_TRACK_MEMORY kept)
  test executable sparse_linalg_tests      -> sparsediff_linalg_tests
  ctest entry     SparseLinalgTests        -> SparseDiffLinalgTests

Workflows follow the new binary path and standalone source dir.

Verified: all 76 library and engine Release objects byte-identical to main (only
the test main differs, by its banner strings); 310 + 159 tests, 162 with
SP_TRACK_MEMORY; ctest 2/2; 7 profiles; standalone Release and Debug; injected
layering violations still fail configure; clang-format clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dance858
dance858 merged commit 43f0341 into main Oct 11, 2026
14 checks passed
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