Define NDEBUG for release builds of the SQLCipher C target - #20
Merged
Conversation
SwiftPM does not define NDEBUG for C targets even in release configuration, so sqlite3.c ships with its internal assert()s enabled — SQLite documents roughly a 3x overhead with assertions on. The autoconf and CMake builds of SQLCipher both compile with NDEBUG in production; this brings the SwiftPM build in line, gated on .release so debug builds keep the asserts.
|
Thank you for your pull request and welcome to the Skip community. We require contributors to sign our contributor license agreement (CLA), and we don't seem to have the user(s) @GoodOlClint on file. In order for us to review and merge your code, for each noted user please add your GitHub username to Skip's .clabot file |
GoodOlClint
added a commit
to GoodOlClint/Athena
that referenced
this pull request
Jul 30, 2026
… (ADR 043) Replace Sources/CSQLCipher (SQLCipher 4.6.1, CommonCrypto, 11 releases stale) with skiptools/swift-sqlcipher's raw-C SQLCipher product (4.17.0/SQLite 3.53.3, LibTomCrypt, source-built, cross-platform) at an EXACT 1.11.0 pin — crypto engine bumps are reviewed commits, never resolution drift. Supersedes the M34.3a vendoring decision; kills the Linux port's CC->OPENSSL work item. On-disk format is provider-independent and Athena uses stock cipher settings, so existing stores open unchanged — proven bidirectionally (old-engine binary <-> new engine, encrypted, 8/8). SQLITE_HAS_CODEC is defined on AthenaStore so the Clang importer surfaces sqlite3_key (the package's own SQLiteDB idiom). NDEBUG gap in the package's C target filed upstream (skiptools/swift-sqlcipher#20); asserts-on interim is acceptable for sparse control-plane rows. Verified: Release build green, unit tier 789/0, bidirectional encrypted-store compat 8/8, e2e-rbac 496/0 (incl. phase 26 at-rest + migration, phase 27 doctor posture). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GoodOlClint
added a commit
to GoodOlClint/Athena
that referenced
this pull request
Jul 30, 2026
… (ADR 043) Replace Sources/CSQLCipher (SQLCipher 4.6.1, CommonCrypto, 11 releases stale) with skiptools/swift-sqlcipher's raw-C SQLCipher product (4.17.0/SQLite 3.53.3, LibTomCrypt, source-built, cross-platform) at an EXACT 1.11.0 pin — crypto engine bumps are reviewed commits, never resolution drift. Supersedes the M34.3a vendoring decision; kills the Linux port's CC->OPENSSL work item. On-disk format is provider-independent and Athena uses stock cipher settings, so existing stores open unchanged — proven bidirectionally (old-engine binary <-> new engine, encrypted, 8/8). SQLITE_HAS_CODEC is defined on AthenaStore so the Clang importer surfaces sqlite3_key (the package's own SQLiteDB idiom). NDEBUG gap in the package's C target filed upstream (skiptools/swift-sqlcipher#20); asserts-on interim is acceptable for sparse control-plane rows. Verified: Release build green, unit tier 789/0, bidirectional encrypted-store compat 8/8, e2e-rbac 496/0 (incl. phase 26 at-rest + migration, phase 27 doctor posture). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
|
Great improvement, thanks! |
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.
SwiftPM does not define
NDEBUGfor C targets even in-c releasebuilds, sosqlite3.ccompiles with its internalassert()s enabled — SQLite documents ~3x overhead with assertions on (sqlite.org/compile.html). The autoconf/CMake builds of SQLCipher defineNDEBUGin production; this one-liner brings the SwiftPM build in line, gated on.when(configuration: .release)so debug builds keep the asserts.Verified:
swift build --target SQLCipher(debug) andswift build -c release --target SQLCipherboth green on macOS 15 / Swift 6.1.(Found while adopting swift-sqlcipher as the store engine for a macOS daemon — thanks for maintaining this packaging, it replaced our hand-vendored amalgamation outright.)