From 9e1ff422498c1398a5c2ae7a0327b062e421ef60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 23 Jun 2024 15:50:58 +0200 Subject: [PATCH] [BREAKING] Rename CSQLite to GRDBSQLite Fix #1528 --- .../xcschemes/GRDB-Package.xcscheme | 134 ------------------ GRDB/Core/Configuration.swift | 2 +- GRDB/Core/Database+Schema.swift | 2 +- GRDB/Core/Database+Statements.swift | 2 +- GRDB/Core/Database.swift | 2 +- GRDB/Core/DatabaseCollation.swift | 2 +- GRDB/Core/DatabaseError.swift | 2 +- GRDB/Core/DatabaseFunction.swift | 2 +- GRDB/Core/DatabaseSnapshotPool.swift | 2 +- GRDB/Core/DatabaseValue.swift | 2 +- GRDB/Core/Row.swift | 2 +- GRDB/Core/RowDecodingError.swift | 2 +- GRDB/Core/Statement.swift | 2 +- GRDB/Core/StatementAuthorizer.swift | 2 +- GRDB/Core/StatementColumnConvertible.swift | 2 +- GRDB/Core/Support/Foundation/Data.swift | 2 +- .../Foundation/DatabaseDateComponents.swift | 2 +- GRDB/Core/Support/Foundation/Date.swift | 2 +- GRDB/Core/Support/Foundation/Decimal.swift | 2 +- GRDB/Core/Support/Foundation/UUID.swift | 2 +- .../Support/StandardLibrary/Optional.swift | 2 +- .../StandardLibrary/StandardLibrary.swift | 2 +- GRDB/Core/TransactionObserver.swift | 2 +- GRDB/Core/WALSnapshot.swift | 2 +- GRDB/Dump/DumpFormats/DebugDumpFormat.swift | 2 +- GRDB/Dump/DumpFormats/JSONDumpFormat.swift | 2 +- GRDB/Dump/DumpFormats/LineDumpFormat.swift | 2 +- GRDB/Dump/DumpFormats/ListDumpFormat.swift | 2 +- GRDB/Dump/DumpFormats/QuoteDumpFormat.swift | 2 +- GRDB/FTS/FTS5.swift | 2 +- GRDB/FTS/FTS5CustomTokenizer.swift | 2 +- GRDB/FTS/FTS5Tokenizer.swift | 2 +- GRDB/FTS/FTS5WrapperTokenizer.swift | 2 +- GRDB/Record/FetchableRecord+Decodable.swift | 2 +- Package.swift | 6 +- README.md | 2 +- .../{CSQLite => GRDBSQLite}/module.modulemap | 2 +- Sources/{CSQLite => GRDBSQLite}/shim.h | 0 .../AssociationPrefetchingRowTests.swift | 2 +- Tests/GRDBTests/DataMemoryTests.swift | 2 +- .../DatabaseConfigurationTests.swift | 2 +- Tests/GRDBTests/DatabaseDumpTests.swift | 2 +- .../DatabasePoolReleaseMemoryTests.swift | 2 +- Tests/GRDBTests/DatabasePoolTests.swift | 2 +- Tests/GRDBTests/DatabaseRegionTests.swift | 2 +- Tests/GRDBTests/DatabaseWriterTests.swift | 2 +- Tests/GRDBTests/FTS5TokenizerTests.swift | 2 +- Tests/GRDBTests/GRDBTestCase.swift | 2 +- ...StatementColumnConvertibleFetchTests.swift | 2 +- Tests/GRDBTests/TableDefinitionTests.swift | 2 +- Tests/GRDBTests/UpdateStatementTests.swift | 2 +- 51 files changed, 51 insertions(+), 185 deletions(-) delete mode 100644 .swiftpm/xcode/xcshareddata/xcschemes/GRDB-Package.xcscheme rename Sources/{CSQLite => GRDBSQLite}/module.modulemap (65%) rename Sources/{CSQLite => GRDBSQLite}/shim.h (100%) diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/GRDB-Package.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/GRDB-Package.xcscheme deleted file mode 100644 index b60345c20..000000000 --- a/.swiftpm/xcode/xcshareddata/xcschemes/GRDB-Package.xcscheme +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/GRDB/Core/Configuration.swift b/GRDB/Core/Configuration.swift index 8314b55cb..2c6e62498 100644 --- a/GRDB/Core/Configuration.swift +++ b/GRDB/Core/Configuration.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Database+Schema.swift b/GRDB/Core/Database+Schema.swift index f3d9257d1..3cdf75c82 100644 --- a/GRDB/Core/Database+Schema.swift +++ b/GRDB/Core/Database+Schema.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Database+Statements.swift b/GRDB/Core/Database+Statements.swift index 1238e79bb..b83006a19 100644 --- a/GRDB/Core/Database+Statements.swift +++ b/GRDB/Core/Database+Statements.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Database.swift b/GRDB/Core/Database.swift index 4a20d19be..7d1e6c2f8 100644 --- a/GRDB/Core/Database.swift +++ b/GRDB/Core/Database.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/DatabaseCollation.swift b/GRDB/Core/DatabaseCollation.swift index 18d89e143..38c0dba68 100644 --- a/GRDB/Core/DatabaseCollation.swift +++ b/GRDB/Core/DatabaseCollation.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/DatabaseError.swift b/GRDB/Core/DatabaseError.swift index 902fd1a4a..524c18d63 100644 --- a/GRDB/Core/DatabaseError.swift +++ b/GRDB/Core/DatabaseError.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/DatabaseFunction.swift b/GRDB/Core/DatabaseFunction.swift index f1e821b6c..2fb1301f5 100644 --- a/GRDB/Core/DatabaseFunction.swift +++ b/GRDB/Core/DatabaseFunction.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/DatabaseSnapshotPool.swift b/GRDB/Core/DatabaseSnapshotPool.swift index 162b2ab6b..d17f67240 100644 --- a/GRDB/Core/DatabaseSnapshotPool.swift +++ b/GRDB/Core/DatabaseSnapshotPool.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_SNAPSHOT || (!GRDBCUSTOMSQLITE && !GRDBCIPHER) // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/DatabaseValue.swift b/GRDB/Core/DatabaseValue.swift index 934861154..1c8e721f9 100644 --- a/GRDB/Core/DatabaseValue.swift +++ b/GRDB/Core/DatabaseValue.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Row.swift b/GRDB/Core/Row.swift index ccb2405ec..5b1c130a5 100644 --- a/GRDB/Core/Row.swift +++ b/GRDB/Core/Row.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/RowDecodingError.swift b/GRDB/Core/RowDecodingError.swift index c550c28c0..ed82c1f89 100644 --- a/GRDB/Core/RowDecodingError.swift +++ b/GRDB/Core/RowDecodingError.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Statement.swift b/GRDB/Core/Statement.swift index 7ae4c8962..698855b19 100644 --- a/GRDB/Core/Statement.swift +++ b/GRDB/Core/Statement.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/StatementAuthorizer.swift b/GRDB/Core/StatementAuthorizer.swift index 971a46146..d2427ac30 100644 --- a/GRDB/Core/StatementAuthorizer.swift +++ b/GRDB/Core/StatementAuthorizer.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/StatementColumnConvertible.swift b/GRDB/Core/StatementColumnConvertible.swift index 281ebbb1e..d16c03842 100644 --- a/GRDB/Core/StatementColumnConvertible.swift +++ b/GRDB/Core/StatementColumnConvertible.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/Foundation/Data.swift b/GRDB/Core/Support/Foundation/Data.swift index 67367c5fa..55d6bdb20 100644 --- a/GRDB/Core/Support/Foundation/Data.swift +++ b/GRDB/Core/Support/Foundation/Data.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/Foundation/DatabaseDateComponents.swift b/GRDB/Core/Support/Foundation/DatabaseDateComponents.swift index 879729d74..fb861feb8 100644 --- a/GRDB/Core/Support/Foundation/DatabaseDateComponents.swift +++ b/GRDB/Core/Support/Foundation/DatabaseDateComponents.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/Foundation/Date.swift b/GRDB/Core/Support/Foundation/Date.swift index 16b31164f..6676c065a 100644 --- a/GRDB/Core/Support/Foundation/Date.swift +++ b/GRDB/Core/Support/Foundation/Date.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/Foundation/Decimal.swift b/GRDB/Core/Support/Foundation/Decimal.swift index ecff4b68d..e200c6c59 100644 --- a/GRDB/Core/Support/Foundation/Decimal.swift +++ b/GRDB/Core/Support/Foundation/Decimal.swift @@ -1,7 +1,7 @@ #if !os(Linux) // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/Foundation/UUID.swift b/GRDB/Core/Support/Foundation/UUID.swift index 30b1e3dbe..1a8bdff2a 100644 --- a/GRDB/Core/Support/Foundation/UUID.swift +++ b/GRDB/Core/Support/Foundation/UUID.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/StandardLibrary/Optional.swift b/GRDB/Core/Support/StandardLibrary/Optional.swift index 969202018..0902097d9 100644 --- a/GRDB/Core/Support/StandardLibrary/Optional.swift +++ b/GRDB/Core/Support/StandardLibrary/Optional.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/Support/StandardLibrary/StandardLibrary.swift b/GRDB/Core/Support/StandardLibrary/StandardLibrary.swift index c1d1b8dff..8a4c5a7d8 100644 --- a/GRDB/Core/Support/StandardLibrary/StandardLibrary.swift +++ b/GRDB/Core/Support/StandardLibrary/StandardLibrary.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/TransactionObserver.swift b/GRDB/Core/TransactionObserver.swift index c18442de6..99fb4dcfd 100644 --- a/GRDB/Core/TransactionObserver.swift +++ b/GRDB/Core/TransactionObserver.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Core/WALSnapshot.swift b/GRDB/Core/WALSnapshot.swift index b56956fee..a8c0168a7 100644 --- a/GRDB/Core/WALSnapshot.swift +++ b/GRDB/Core/WALSnapshot.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_SNAPSHOT || (!GRDBCUSTOMSQLITE && !GRDBCIPHER) // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Dump/DumpFormats/DebugDumpFormat.swift b/GRDB/Dump/DumpFormats/DebugDumpFormat.swift index bb4354ff4..b3ae31248 100644 --- a/GRDB/Dump/DumpFormats/DebugDumpFormat.swift +++ b/GRDB/Dump/DumpFormats/DebugDumpFormat.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Dump/DumpFormats/JSONDumpFormat.swift b/GRDB/Dump/DumpFormats/JSONDumpFormat.swift index 62ffce35a..027cca379 100644 --- a/GRDB/Dump/DumpFormats/JSONDumpFormat.swift +++ b/GRDB/Dump/DumpFormats/JSONDumpFormat.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Dump/DumpFormats/LineDumpFormat.swift b/GRDB/Dump/DumpFormats/LineDumpFormat.swift index 3b010cb94..a71b05ca6 100644 --- a/GRDB/Dump/DumpFormats/LineDumpFormat.swift +++ b/GRDB/Dump/DumpFormats/LineDumpFormat.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Dump/DumpFormats/ListDumpFormat.swift b/GRDB/Dump/DumpFormats/ListDumpFormat.swift index a9415dbfd..dc7bfdb6c 100644 --- a/GRDB/Dump/DumpFormats/ListDumpFormat.swift +++ b/GRDB/Dump/DumpFormats/ListDumpFormat.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Dump/DumpFormats/QuoteDumpFormat.swift b/GRDB/Dump/DumpFormats/QuoteDumpFormat.swift index 813cc237e..3818c7c17 100644 --- a/GRDB/Dump/DumpFormats/QuoteDumpFormat.swift +++ b/GRDB/Dump/DumpFormats/QuoteDumpFormat.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/FTS/FTS5.swift b/GRDB/FTS/FTS5.swift index 8fefc2608..e6dce2abb 100644 --- a/GRDB/FTS/FTS5.swift +++ b/GRDB/FTS/FTS5.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_FTS5 // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/FTS/FTS5CustomTokenizer.swift b/GRDB/FTS/FTS5CustomTokenizer.swift index 5fdd2e839..370f1256c 100644 --- a/GRDB/FTS/FTS5CustomTokenizer.swift +++ b/GRDB/FTS/FTS5CustomTokenizer.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_FTS5 // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/FTS/FTS5Tokenizer.swift b/GRDB/FTS/FTS5Tokenizer.swift index f2d912c26..e4aecc36f 100644 --- a/GRDB/FTS/FTS5Tokenizer.swift +++ b/GRDB/FTS/FTS5Tokenizer.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_FTS5 // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/FTS/FTS5WrapperTokenizer.swift b/GRDB/FTS/FTS5WrapperTokenizer.swift index 5159a2ac8..5851866be 100644 --- a/GRDB/FTS/FTS5WrapperTokenizer.swift +++ b/GRDB/FTS/FTS5WrapperTokenizer.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_FTS5 // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/GRDB/Record/FetchableRecord+Decodable.swift b/GRDB/Record/FetchableRecord+Decodable.swift index 5f4118e90..9fbf0cfab 100644 --- a/GRDB/Record/FetchableRecord+Decodable.swift +++ b/GRDB/Record/FetchableRecord+Decodable.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Package.swift b/Package.swift index 5d546af48..52e4c335a 100644 --- a/Package.swift +++ b/Package.swift @@ -40,18 +40,18 @@ let package = Package( .watchOS(.v7), ], products: [ - .library(name: "CSQLite", targets: ["CSQLite"]), + .library(name: "GRDBSQLite", targets: ["GRDBSQLite"]), .library(name: "GRDB", targets: ["GRDB"]), .library(name: "GRDB-dynamic", type: .dynamic, targets: ["GRDB"]), ], dependencies: dependencies, targets: [ .systemLibrary( - name: "CSQLite", + name: "GRDBSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", - dependencies: ["CSQLite"], + dependencies: ["GRDBSQLite"], path: "GRDB", resources: [.copy("PrivacyInfo.xcprivacy")], cSettings: cSettings, diff --git a/README.md b/README.md index 93dde995d..a27d198d7 100644 --- a/README.md +++ b/README.md @@ -348,7 +348,7 @@ GRDB offers two libraries, `GRDB` and `GRDB-dynamic`. Pick only one. When in dou > **Note**: Linux is not currently supported. > -> **Warning**: Due to an Xcode bug, you will get "No such module 'CSQLite'" errors when you want to embed the GRDB package in other targets than the main application (watch extensions, for example). UI and Unit testing targets are OK, though. See [#642](https://github.com/groue/GRDB.swift/issues/642#issuecomment-575994093) for more information. +> **Warning**: Due to an Xcode bug, you will get "No such module 'GRDBSQLite'" errors when you want to embed the GRDB package in other targets than the main application (watch extensions, for example). UI and Unit testing targets are OK, though. See [#642](https://github.com/groue/GRDB.swift/issues/642#issuecomment-575994093) and [#1424](https://github.com/groue/GRDB.swift/issues/1424#issuecomment-1774088155) for more information. ## CocoaPods diff --git a/Sources/CSQLite/module.modulemap b/Sources/GRDBSQLite/module.modulemap similarity index 65% rename from Sources/CSQLite/module.modulemap rename to Sources/GRDBSQLite/module.modulemap index 0a291b5e2..95e4e886f 100644 --- a/Sources/CSQLite/module.modulemap +++ b/Sources/GRDBSQLite/module.modulemap @@ -1,4 +1,4 @@ -module CSQLite [system] { +module GRDBSQLite [system] { header "shim.h" link "sqlite3" export * diff --git a/Sources/CSQLite/shim.h b/Sources/GRDBSQLite/shim.h similarity index 100% rename from Sources/CSQLite/shim.h rename to Sources/GRDBSQLite/shim.h diff --git a/Tests/GRDBTests/AssociationPrefetchingRowTests.swift b/Tests/GRDBTests/AssociationPrefetchingRowTests.swift index 2792e3238..ead7d89b9 100644 --- a/Tests/GRDBTests/AssociationPrefetchingRowTests.swift +++ b/Tests/GRDBTests/AssociationPrefetchingRowTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DataMemoryTests.swift b/Tests/GRDBTests/DataMemoryTests.swift index 2a996e2f9..3f572fc30 100644 --- a/Tests/GRDBTests/DataMemoryTests.swift +++ b/Tests/GRDBTests/DataMemoryTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DatabaseConfigurationTests.swift b/Tests/GRDBTests/DatabaseConfigurationTests.swift index aa2f8c188..fccf86e9d 100644 --- a/Tests/GRDBTests/DatabaseConfigurationTests.swift +++ b/Tests/GRDBTests/DatabaseConfigurationTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DatabaseDumpTests.swift b/Tests/GRDBTests/DatabaseDumpTests.swift index 1a50d566d..432177ed9 100644 --- a/Tests/GRDBTests/DatabaseDumpTests.swift +++ b/Tests/GRDBTests/DatabaseDumpTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DatabasePoolReleaseMemoryTests.swift b/Tests/GRDBTests/DatabasePoolReleaseMemoryTests.swift index 40bd4ec6b..09dfde405 100644 --- a/Tests/GRDBTests/DatabasePoolReleaseMemoryTests.swift +++ b/Tests/GRDBTests/DatabasePoolReleaseMemoryTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DatabasePoolTests.swift b/Tests/GRDBTests/DatabasePoolTests.swift index 391c8da29..2e42bb5cc 100644 --- a/Tests/GRDBTests/DatabasePoolTests.swift +++ b/Tests/GRDBTests/DatabasePoolTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DatabaseRegionTests.swift b/Tests/GRDBTests/DatabaseRegionTests.swift index eff5d1a73..848187ed0 100644 --- a/Tests/GRDBTests/DatabaseRegionTests.swift +++ b/Tests/GRDBTests/DatabaseRegionTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/DatabaseWriterTests.swift b/Tests/GRDBTests/DatabaseWriterTests.swift index 2ddfdc485..581f7d307 100644 --- a/Tests/GRDBTests/DatabaseWriterTests.swift +++ b/Tests/GRDBTests/DatabaseWriterTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/FTS5TokenizerTests.swift b/Tests/GRDBTests/FTS5TokenizerTests.swift index a6d147796..d7efff5c0 100644 --- a/Tests/GRDBTests/FTS5TokenizerTests.swift +++ b/Tests/GRDBTests/FTS5TokenizerTests.swift @@ -1,7 +1,7 @@ #if SQLITE_ENABLE_FTS5 // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/GRDBTestCase.swift b/Tests/GRDBTests/GRDBTestCase.swift index e2ad23760..837cf89b4 100644 --- a/Tests/GRDBTests/GRDBTestCase.swift +++ b/Tests/GRDBTests/GRDBTestCase.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/StatementColumnConvertibleFetchTests.swift b/Tests/GRDBTests/StatementColumnConvertibleFetchTests.swift index 09fb4f709..cee0f6e95 100644 --- a/Tests/GRDBTests/StatementColumnConvertibleFetchTests.swift +++ b/Tests/GRDBTests/StatementColumnConvertibleFetchTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/TableDefinitionTests.swift b/Tests/GRDBTests/TableDefinitionTests.swift index 8a831882c..1079b39d6 100644 --- a/Tests/GRDBTests/TableDefinitionTests.swift +++ b/Tests/GRDBTests/TableDefinitionTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER diff --git a/Tests/GRDBTests/UpdateStatementTests.swift b/Tests/GRDBTests/UpdateStatementTests.swift index 859f662a7..64b9c23c3 100644 --- a/Tests/GRDBTests/UpdateStatementTests.swift +++ b/Tests/GRDBTests/UpdateStatementTests.swift @@ -1,6 +1,6 @@ // Import C SQLite functions #if SWIFT_PACKAGE -import CSQLite +import GRDBSQLite #elseif GRDBCIPHER import SQLCipher #elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER