Skip to content

Build the C ABI from the root and in CI; drop the committed __pycache__ - #8

Merged
tap merged 1 commit into
mainfrom
claude/repository-inconsistencies-nkocvd
Jul 28, 2026
Merged

Build the C ABI from the root and in CI; drop the committed __pycache__#8
tap merged 1 commit into
mainfrom
claude/repository-inconsistencies-nkocvd

Conversation

@tap

@tap tap commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What this changes

  • Adds a TAP_DSP_BUILD_CAPI option to the root CMakeLists.txt, matching the BUILD_CAPI option every sibling library already carries
  • Turns it ON in the build-test CI matrix, so the C ABI is compiled on Linux, Windows and macOS on every push
  • Removes notebooks/__pycache__/dsptap_py.cpython-311.pyc and adds __pycache__/ to .gitignore

Why

The C ABI was never compiled by anything automated. tools/capi builds standalone (cmake -B build_capi -S tools/capi), which is what the ctypes bridge does on first import — but the root build had no way to compile it and no CI job touched it. So the verification layer, the thing notebooks drive the shipping C++ through and therefore the thing every measured claim rests on, could break silently until someone re-ran a notebook by hand.

The committed .pyc was a build artifact of the bridge and the only such file in the family; .gitignore didn't cover it.

Verification

Built in exactly the configuration CI will now run-DCMAKE_BUILD_TYPE=Release -DTAP_DSP_WERROR=ON -DTAP_DSP_BUILD_CAPI=ON:

configure exit=0   build exit=0   errors: 0
libdsptap_capi.so produced
100% tests passed, 0 tests failed out of 99

Cross-platform safety checked by inspection rather than assumed: dsptap_capi.h already selects __declspec(dllexport) on Windows and __attribute__((visibility("default"))) elsewhere, and the capi target does not link tap_dsp_warnings, so TAP_DSP_WERROR doesn't apply to it. The standalone path is untouched — tools/capi still declares its own project and pulls the repo root in when tap::dsp doesn't already exist.

Notes for the reviewer

The audit item that led here was partly wrong, and the real finding is bigger. I had flagged this repo's capi as "orphaned from the root build," implying it was the outlier. It isn't: the standalone-only arrangement is deliberate and documented, and the capi CMakeLists already handles both modes. What's actually true is that all six library repos default BUILD_CAPI to OFF and no workflow in any of them enables it — so none of their C ABIs is compiled by CI either. This PR closes the gap here; the identical one-flag change would close it in AmbiTap, MuTap, SampleRateTap, RatioTap and TapTools. Happy to do that sweep if you want it.

One thing I deliberately did not do: the capi target isn't warning-checked, since it doesn't link tap_dsp_warnings. Adding that would be a genuine improvement but could surface warnings and turn CI red, so it belongs in its own change rather than riding along here.


Generated by Claude Code

Three small hygiene fixes found in a cross-repo consistency sweep.

**The C ABI was never compiled by anything automated.** tools/capi builds
standalone (`cmake -B build_capi -S tools/capi`), which is what the ctypes
bridge does on first import, but the root CMakeLists had no way to build it and
no CI job touched it. So the verification layer -- the thing the notebooks drive
the shipping C++ through, and therefore the thing every measured claim rests on
-- could break and nobody would find out until someone re-ran a notebook by
hand. Adds a TAP_DSP_BUILD_CAPI option, matching the BUILD_CAPI option every
sibling library already carries, and turns it ON in the build-test matrix so the
ABI is compiled on Linux, Windows and macOS on every push. The standalone path
is untouched: tools/capi still declares its own project and pulls the repo root
in when tap::dsp does not already exist.

This is safe on all three platforms: dsptap_capi.h already selects
__declspec(dllexport) on Windows and visibility("default") elsewhere, and the
capi target does not link tap_dsp_warnings, so TAP_DSP_WERROR does not apply to
it.

**notebooks/__pycache__/dsptap_py.cpython-311.pyc was committed** -- a build
artifact of the ctypes bridge, and the only such file in the family. Removed,
and __pycache__/ added to .gitignore, which did not cover it.

Verified in exactly the configuration CI will now run
(-DTAP_DSP_WERROR=ON -DTAP_DSP_BUILD_CAPI=ON, Release): configure and build
clean with zero errors, libdsptap_capi.so produced, ctest 99/99 passing.

Worth recording: this CI gap is family-wide, not specific to this repo. All six
library repos default their BUILD_CAPI option OFF and no workflow in any of them
enables it, so none of their C ABIs is compiled by CI either. This commit closes
it here; the same one-flag change would close it in AmbiTap, MuTap,
SampleRateTap, RatioTap and TapTools.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JhhQ93r2E1QTnCx46YfX8j
@tap
tap merged commit 804cb17 into main Jul 28, 2026
12 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.

2 participants