From b565f24c6e074edd60b414544499e454641be1cd Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 29 Oct 2026 18:44:16 +0100 Subject: [PATCH] Keep sqlite3ext.h and sqlite-vec.h out of the public CSQLiteVec module The bundled sqlite3ext.h defines sqlite3_api_routines for the bundled SQLite. When an app also imports the SDK's SQLite3 module, whose sqlite3ext.h comes from a different SQLite version, Clang rejects the two definitions of the struct ("has different definitions in different modules"). Xcode 27.1 ships SQLite 3.54.0 against the bundled 3.51.0, so any target importing both fails. The Swift wrapper only needs extinit.h, and sqlite-vec.c and extinit.c include these headers with quotes, so they now sit next to the sources instead of in include/. deps.sh copies them there too. Co-Authored-By: Claude --- Sources/CSQLiteVec/{include => }/sqlite-vec.h | 0 Sources/CSQLiteVec/{include => }/sqlite3ext.h | 0 deps.sh | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename Sources/CSQLiteVec/{include => }/sqlite-vec.h (100%) rename Sources/CSQLiteVec/{include => }/sqlite3ext.h (100%) diff --git a/Sources/CSQLiteVec/include/sqlite-vec.h b/Sources/CSQLiteVec/sqlite-vec.h similarity index 100% rename from Sources/CSQLiteVec/include/sqlite-vec.h rename to Sources/CSQLiteVec/sqlite-vec.h diff --git a/Sources/CSQLiteVec/include/sqlite3ext.h b/Sources/CSQLiteVec/sqlite3ext.h similarity index 100% rename from Sources/CSQLiteVec/include/sqlite3ext.h rename to Sources/CSQLiteVec/sqlite3ext.h diff --git a/deps.sh b/deps.sh index 2c879ed..1ff233b 100755 --- a/deps.sh +++ b/deps.sh @@ -12,7 +12,7 @@ unzip -q sqlite-amalgamation.zip SQLITE_DIR=$(unzip -l sqlite-amalgamation.zip | grep -m1 "sqlite-amalgamation-" | awk '{print $4}' | cut -d/ -f1) cp ${SQLITE_DIR}/sqlite3.c Sources/CSQLiteVec/ cp ${SQLITE_DIR}/sqlite3.h Sources/CSQLiteVec/include/ -cp ${SQLITE_DIR}/sqlite3ext.h Sources/CSQLiteVec/include/ +cp ${SQLITE_DIR}/sqlite3ext.h Sources/CSQLiteVec/ rm -rf ${SQLITE_DIR} rm sqlite-amalgamation.zip @@ -21,5 +21,5 @@ rm sqlite-amalgamation.zip curl -o sqlite-vec-amalgamation.zip -L https://github.com/asg017/sqlite-vec/releases/download/v${SQLITE_VEC_VERSION}/sqlite-vec-${SQLITE_VEC_VERSION}-amalgamation.zip unzip -q sqlite-vec-amalgamation.zip mv sqlite-vec.c Sources/CSQLiteVec/ -mv sqlite-vec.h Sources/CSQLiteVec/include/ +mv sqlite-vec.h Sources/CSQLiteVec/ rm sqlite-vec-amalgamation.zip