Skip to content

Consume sparsediff_linalg as a git submodule - #142

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

dance858 merged 1 commit into
mainfrom
use-sparsediff-linalg-submodule

Conversation

@dance858

Copy link
Copy Markdown
Collaborator

The library now lives in its own repository, SparseDifferentiation/sparsediff_linalg, extracted with git filter-repo so its full history (back to the include/utils era, 96 commits) came along. This PR replaces the in-tree copy with a submodule at the same path, pinned to v0.1.0, so add_subdirectory(sparsediff_linalg) and every target name stay exactly as they were.

Changes:

  • sparsediff_linalg/ is now a submodule (.gitmodules: https URL, so CI and SparseDiffPy clone it without credentials). The pinned commit is the tagged release, whose tree is the merged Rename the sparse_linalg library to sparsediff_linalg #141 tree plus LICENSE/README/CI/VERSION 0.1.0.
  • Root CMakeLists.txt: a plain clone leaves the directory empty, so configure now stops with a FATAL_ERROR that says to run git submodule update --init --recursive.
  • Every workflow that builds checks out with submodules: recursive. formatting.yml prunes ./sparsediff_linalg so the engine's check covers engine files only; the library's own CI formats its files.
  • release.yml's release job (which only creates the GitHub release) keeps a plain checkout.

Workflow from now on: library changes are PRs in the library repo, released by tag; an engine PR then bumps the pin with git -C sparsediff_linalg checkout vX.Y.Z.

Verified locally (macOS):

  • all 77 Release .o files byte-identical to main
  • all_tests 310/310, sparsediff_linalg_tests 159/159, ctest 2/2; SP_TRACK_MEMORY=ON 310 + 162; PROFILE_ONLY runs all 7 profiles
  • a plain clone of this branch fails configure with the hint; after git submodule update --init --recursive (fetched from GitHub, lands on v0.1.0) it configures
  • SparseDiffPy pip install -e . builds against this checkout and passes its recipe smoke test

Follow-up for SparseDiffPy (separate PR there): bump the engine pin, build a local sdist and confirm SparseDiffEngine/sparsediff_linalg/ is inside it, drop the stale include/utils include dir, and re-point the conda-forge BLAS patch at sparsediff_linalg/CMakeLists.txt.

🤖 Generated with Claude Code

The library now lives in its own repository,
https://github.com/SparseDifferentiation/sparsediff_linalg, extracted with its
full history. The in-tree copy is replaced by a submodule at the same path,
pinned to v0.1.0, so the root CMakeLists.txt still does
add_subdirectory(sparsediff_linalg) and nothing else about the build changes.

A plain clone leaves the directory empty, so configure now stops with a hint
to run `git submodule update --init --recursive`. Every workflow that builds
checks out submodules recursively; the formatting check prunes the submodule
so it covers engine files only (the library's own CI formats its files).

Verified: all 77 Release objects byte-identical to main; 310 + 159 tests,
ctest 2/2, 162 with SP_TRACK_MEMORY, 7 profiles; a plain clone fails configure
with the hint and succeeds after submodule init from GitHub; SparseDiffPy builds
and passes its smoke test against this checkout.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dance858
dance858 merged commit 5a061db 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