Skip to content

Adopt GRDB with system SQLite for native indexing - #144

Merged
DandyLyons merged 1 commit into
mainfrom
codex/issue-137-grdb-system-sqlite
Sep 16, 2026
Merged

DandyLyons merged 1 commit into
mainfrom
codex/issue-137-grdb-system-sqlite

Conversation

@DandyLyons

Copy link
Copy Markdown
Owner

Summary

Adds an opt-in MarkdownUtilitiesIndex library backed by upstream GRDB 7.11.1 and system SQLite. Opening an index first exercises JSON queries, a JSON expression index, and FTS5 through an in-memory GRDB connection. Failed checks report the runtime and OS/distribution remedy before creating or changing an index file.

Implements the selected option 1 from #137 and prepares the database foundation for #138. Core, WASM, and existing CLI/server products do not depend on the index target. No bundled SQLite or custom C bridge is included. Documentation records option 3 as a SwiftPM fallback and rejects the Xcode custom-framework approach; StructuredQueries remains deferred.

Validation

  • swift build, CLI help, and the full host suite: 1,350 tests passed.
  • macOS root release smoke and isolated release measurements passed using Swift 6.4 with its matching SDK 27, system SQLite 3.54.0.
  • Linux root release smoke and isolated release measurements passed using Swift 6.2.4 on Ubuntu Noble arm64, system SQLite 3.45.1. Downloaded source repository caches avoided a stalled network fetch; no host build products were reused.
  • Seven focused tests passed on both platforms, including failing JSON/FTS statements, file preservation, no file creation on failed probes, and actionable open errors.
  • Direct C consumer coexistence, dynamic system SQLite linkage, absence of embedded SQLite definitions, and execution of stripped binaries passed on both platforms.
  • Core WASM build and smoke passed.
  • Stripped index smoke sizes: 2,751,352 bytes on macOS and 2,993,656 bytes on Linux; measurement method and baseline/build timings are documented.

Limitations

The standalone Swift 6.3.1 compiler crashed while optimizing upstream GRDB's NSUUID.fromDatabaseValue against SDK 27 beta. Debug tests passed; the matching SDK compiler built release successfully. No dependency source patch or Xcode framework workflow was introduced.

All Linux Docker verification steps completed successfully, but the local Docker engine failed with a snapshot I/O error while unpacking the final image. This occurred after compilation, tests, and measurement checks. The new CI workflow exercises macOS and Linux independently.

Refs #137. Indexing, query commands, and server integration remain in their subsequent issues.

@DandyLyons
DandyLyons merged commit 701e03e into main Sep 16, 2026
4 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