diff --git a/GRDB.xcodeproj/project.pbxproj b/GRDB.xcodeproj/project.pbxproj index 2087b6d01..82b51b9c9 100755 --- a/GRDB.xcodeproj/project.pbxproj +++ b/GRDB.xcodeproj/project.pbxproj @@ -815,7 +815,7 @@ 56BF2281241781C5003D86EB /* UtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilsTests.swift; sourceTree = ""; }; 56C3F7521CF9F12400F6A361 /* DatabaseSavepointTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseSavepointTests.swift; sourceTree = ""; }; 56C48E731C9A9923005DF1D9 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; - 56C494401ED7255500CC72AF /* GRDBDeploymentTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = GRDBDeploymentTarget.xcconfig; sourceTree = ""; }; + 56C494401ED7255500CC72AF /* GRDBBase.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = GRDBBase.xcconfig; sourceTree = ""; }; 56CB43A02BD9880D001C8ED9 /* PersistenceContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistenceContainer.swift; sourceTree = ""; }; 56CC922B201DFFB900CB597E /* DropWhileCursorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropWhileCursorTests.swift; sourceTree = ""; }; 56CC9242201E034D00CB597E /* PrefixWhileCursorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrefixWhileCursorTests.swift; sourceTree = ""; }; @@ -862,6 +862,7 @@ 56F0B98E1B6001C600A2F135 /* FoundationNSDateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FoundationNSDateTests.swift; sourceTree = ""; }; 56F34FB924B094B6007513FC /* SQLExpressionIsConstantTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLExpressionIsConstantTests.swift; sourceTree = ""; }; 56F34FC124B0A0B7007513FC /* SQLIdentifyingColumnsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLIdentifyingColumnsTests.swift; sourceTree = ""; }; + 56F3B70A2C1DB120001A6C5B /* GRDBTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = GRDBTests.xcconfig; sourceTree = ""; }; 56F3E7481E66F83A00BF0F01 /* ResultCodeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResultCodeTests.swift; sourceTree = ""; }; 56F61DD0283D344D00AF9884 /* GRDBTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "GRDBTests-Bridging-Header.h"; path = "GRDBTests/GRDBTests-Bridging-Header.h"; sourceTree = ""; }; 56F61DD3283D344E00AF9884 /* getThreadsCount.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = getThreadsCount.h; sourceTree = ""; }; @@ -1864,7 +1865,8 @@ 56C48E731C9A9923005DF1D9 /* module.modulemap */, DC3773F719C8CBB3004FCF85 /* Info.plist */, 56B8F49A1B4E2F3600C24296 /* GRDB.xcconfig */, - 56C494401ED7255500CC72AF /* GRDBDeploymentTarget.xcconfig */, + 56C494401ED7255500CC72AF /* GRDBBase.xcconfig */, + 56F3B70A2C1DB120001A6C5B /* GRDBTests.xcconfig */, ); name = "Supporting Files"; path = ../Support; @@ -2452,7 +2454,7 @@ /* Begin XCBuildConfiguration section */ 56E5D8021B4D422E00430942 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 56C494401ED7255500CC72AF /* GRDBDeploymentTarget.xcconfig */; + baseConfigurationReference = 56F3B70A2C1DB120001A6C5B /* GRDBTests.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; @@ -2482,7 +2484,7 @@ }; 56E5D8031B4D422E00430942 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 56C494401ED7255500CC72AF /* GRDBDeploymentTarget.xcconfig */; + baseConfigurationReference = 56F3B70A2C1DB120001A6C5B /* GRDBTests.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; diff --git a/GRDBCustom.xcodeproj/project.pbxproj b/GRDBCustom.xcodeproj/project.pbxproj index e9b88fc68..1b5068eea 100755 --- a/GRDBCustom.xcodeproj/project.pbxproj +++ b/GRDBCustom.xcodeproj/project.pbxproj @@ -833,7 +833,7 @@ 56C0538E22ACEECD0029D27D /* Map.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Map.swift; sourceTree = ""; }; 56C0538F22ACEECD0029D27D /* RemoveDuplicates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoveDuplicates.swift; sourceTree = ""; }; 56C3F7521CF9F12400F6A361 /* DatabaseSavepointTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseSavepointTests.swift; sourceTree = ""; }; - 56C494421ED726C500CC72AF /* GRDBDeploymentTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = GRDBDeploymentTarget.xcconfig; path = SQLiteCustom/GRDBDeploymentTarget.xcconfig; sourceTree = ""; }; + 56C494421ED726C500CC72AF /* GRDBBase.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = GRDBBase.xcconfig; path = SQLiteCustom/GRDBBase.xcconfig; sourceTree = ""; }; 56C9EB9A2495324700FE5D55 /* grdb_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = grdb_config.h; path = SQLiteCustom/grdb_config.h; sourceTree = ""; }; 56CB43A22BD9884A001C8ED9 /* PersistenceContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersistenceContainer.swift; sourceTree = ""; }; 56CC9231201DFFF600CB597E /* DropWhileCursorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DropWhileCursorTests.swift; sourceTree = ""; }; @@ -904,7 +904,7 @@ F3BA805A1CFB2BB2003DC1BA /* GRDB.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GRDB.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F3BA809B1CFB2F6F003DC1BA /* GRDBCustomTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRDBCustomTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F3BA813A1CFB3402003DC1BA /* GRDBCustomSQLite-USER.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "GRDBCustomSQLite-USER.xcconfig"; path = "SQLiteCustom/GRDBCustomSQLite-USER.xcconfig"; sourceTree = ""; }; - F3BA813B1CFB3770003DC1BA /* GRDBCustomSQLite-Testing.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "GRDBCustomSQLite-Testing.xcconfig"; path = "SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig"; sourceTree = ""; }; + F3BA813B1CFB3770003DC1BA /* GRDBTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = GRDBTests.xcconfig; path = SQLiteCustom/GRDBTests.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1890,8 +1890,8 @@ F3BA7FF01CFB23C9003DC1BA /* sqlite3.h */, F3BA7FEF1CFB23BF003DC1BA /* module.modulemap */, F3BA7FEE1CFB23B7003DC1BA /* GRDB.xcconfig */, - F3BA813B1CFB3770003DC1BA /* GRDBCustomSQLite-Testing.xcconfig */, - 56C494421ED726C500CC72AF /* GRDBDeploymentTarget.xcconfig */, + 56C494421ED726C500CC72AF /* GRDBBase.xcconfig */, + F3BA813B1CFB3770003DC1BA /* GRDBTests.xcconfig */, F3BA7FF31CFB23E4003DC1BA /* SQLiteLib.xcodeproj */, EED476F41CFD174D0026A4EC /* Customize */, ); @@ -2707,7 +2707,7 @@ }; F3BA80A41CFB2F6F003DC1BA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F3BA813B1CFB3770003DC1BA /* GRDBCustomSQLite-Testing.xcconfig */; + baseConfigurationReference = F3BA813B1CFB3770003DC1BA /* GRDBTests.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_MODULES = YES; @@ -2738,7 +2738,7 @@ }; F3BA80A51CFB2F6F003DC1BA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F3BA813B1CFB3770003DC1BA /* GRDBCustomSQLite-Testing.xcconfig */; + baseConfigurationReference = F3BA813B1CFB3770003DC1BA /* GRDBTests.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ENABLE_MODULES = YES; diff --git a/Package.swift b/Package.swift index b2490b393..9a769b1d7 100644 --- a/Package.swift +++ b/Package.swift @@ -79,7 +79,10 @@ let package = Package( .copy("GRDBTests/Issue1383.sqlite"), ], cSettings: cSettings, - swiftSettings: swiftSettings) + swiftSettings: swiftSettings + [ + // TODO: move to base settings once https://github.com/apple/swift/issues/73313 is fixed. + .enableUpcomingFeature("InferSendableFromCaptures"), + ]) ], swiftLanguageVersions: [.v5] ) diff --git a/SQLiteCustom/GRDB.xcconfig b/SQLiteCustom/GRDB.xcconfig index bb0c76999..0941badf9 100755 --- a/SQLiteCustom/GRDB.xcconfig +++ b/SQLiteCustom/GRDB.xcconfig @@ -1,6 +1,6 @@ CUSTOM_OTHER_SWIFT_FLAGS= // do not modify -#include "GRDBDeploymentTarget.xcconfig" +#include "GRDBBase.xcconfig" // Build once to generate this file: #include "GRDBCustomSQLite-USER.xcconfig" #include "src/SQLiteLib-USER.xcconfig" diff --git a/SQLiteCustom/GRDBDeploymentTarget.xcconfig b/SQLiteCustom/GRDBBase.xcconfig similarity index 81% rename from SQLiteCustom/GRDBDeploymentTarget.xcconfig rename to SQLiteCustom/GRDBBase.xcconfig index 3a0726764..cbb18003f 100644 --- a/SQLiteCustom/GRDBDeploymentTarget.xcconfig +++ b/SQLiteCustom/GRDBBase.xcconfig @@ -3,3 +3,5 @@ MACOSX_DEPLOYMENT_TARGET = 10.13 TVOS_DEPLOYMENT_TARGET = 12.0 WATCHOS_DEPLOYMENT_TARGET = 7.0 XROS_DEPLOYMENT_TARGET = 1.0 + +SWIFT_STRICT_CONCURRENCY = complete diff --git a/SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig b/SQLiteCustom/GRDBTests.xcconfig similarity index 69% rename from SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig rename to SQLiteCustom/GRDBTests.xcconfig index 62178e5d3..dd966d4bc 100755 --- a/SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig +++ b/SQLiteCustom/GRDBTests.xcconfig @@ -3,10 +3,13 @@ CUSTOM_OTHER_SWIFT_FLAGS= // do not modify -#include "GRDBDeploymentTarget.xcconfig" +#include "GRDBBase.xcconfig" // Build once to generate this file: #include "GRDBCustomSQLite-USER.xcconfig" #include "src/SQLiteLib-USER.xcconfig" OTHER_CFLAGS = -DUSING_BUILTIN_SQLITE -DGRDBCUSTOMSQLITE $(CUSTOM_SQLLIBRARY_CFLAGS) // Do not modify. OTHER_SWIFT_FLAGS = -D USING_BUILTIN_SQLITE -D GRDBCUSTOMSQLITE $(CUSTOM_OTHER_SWIFT_FLAGS) // Do not modify. + +// TODO: move to GRDBBase.xcconfig once https://github.com/apple/swift/issues/73313 is fixed. +OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature InferSendableFromCaptures diff --git a/Support/GRDB.xcconfig b/Support/GRDB.xcconfig index b90824a6d..272e38e34 100644 --- a/Support/GRDB.xcconfig +++ b/Support/GRDB.xcconfig @@ -1,4 +1,5 @@ -#include "GRDBDeploymentTarget.xcconfig" +#include "GRDBBase.xcconfig" + INFOPLIST_FILE = Support/Info.plist PRODUCT_NAME = GRDB PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.$(PRODUCT_NAME:rfc1034identifier) @@ -6,5 +7,3 @@ MODULEMAP_FILE = $(SRCROOT)/Support/module.modulemap // Slow compilation hunt: // OTHER_SWIFT_FLAGS = $(inherited) -Xfrontend -warn-long-expression-type-checking=100 -Xfrontend -warn-long-function-bodies=100 - -SWIFT_STRICT_CONCURRENCY = complete diff --git a/Support/GRDBDeploymentTarget.xcconfig b/Support/GRDBBase.xcconfig similarity index 95% rename from Support/GRDBDeploymentTarget.xcconfig rename to Support/GRDBBase.xcconfig index 9abddd624..191f7b76f 100644 --- a/Support/GRDBDeploymentTarget.xcconfig +++ b/Support/GRDBBase.xcconfig @@ -13,3 +13,5 @@ OTHER_SWIFT_FLAGS = $(inherited) -D SQLITE_ENABLE_FTS5 // https://twitter.com/olebegemann/status/1421144304127463427?lang=en // Those as commented out by default, until minimum support Xcode version can handle them. // OTHER_SWIFT_FLAGS = $(inherited) -Xfrontend -warn-concurrency -Xfrontend -enable-actor-data-race-checks + +SWIFT_STRICT_CONCURRENCY = complete diff --git a/Support/GRDBTests.xcconfig b/Support/GRDBTests.xcconfig new file mode 100644 index 000000000..d9245b5e3 --- /dev/null +++ b/Support/GRDBTests.xcconfig @@ -0,0 +1,4 @@ +#include "GRDBBase.xcconfig" + +// TODO: move to GRDBBase.xcconfig once https://github.com/apple/swift/issues/73313 is fixed. +OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature InferSendableFromCaptures