diff --git a/Package.swift b/Package.swift index a296279c7e..36937d039a 100644 --- a/Package.swift +++ b/Package.swift @@ -6,15 +6,10 @@ import PackageDescription var swiftSettings: [SwiftSetting] = [ .define("SQLITE_ENABLE_FTS5"), - .enableUpcomingFeature("InferSendableFromCaptures"), - .enableUpcomingFeature("GlobalActorIsolatedTypesUsability"), ] var cSettings: [CSetting] = [] var dependencies: [PackageDescription.Package.Dependency] = [] -// For Swift 5.8+ -//swiftSettings.append(.enableUpcomingFeature("ExistentialAny")) - // Don't rely on those environment variables. They are ONLY testing conveniences: // $ SQLITE_ENABLE_PREUPDATE_HOOK=1 make test_SPM if ProcessInfo.processInfo.environment["SQLITE_ENABLE_PREUPDATE_HOOK"] == "1" { @@ -81,7 +76,12 @@ let package = Package( .copy("GRDBTests/Issue1383.sqlite"), ], cSettings: cSettings, - swiftSettings: swiftSettings) + swiftSettings: swiftSettings + [ + // Tests still use the Swift 5 language mode. + .swiftLanguageMode(.v5), + .enableUpcomingFeature("InferSendableFromCaptures"), + .enableUpcomingFeature("GlobalActorIsolatedTypesUsability"), + ]) ], - swiftLanguageModes: [.v5] + swiftLanguageModes: [.v6] ) diff --git a/SQLiteCustom/GRDB.xcconfig b/SQLiteCustom/GRDB.xcconfig index bb0c769992..85a9b53165 100755 --- a/SQLiteCustom/GRDB.xcconfig +++ b/SQLiteCustom/GRDB.xcconfig @@ -13,3 +13,4 @@ OTHER_CFLAGS = -DUSING_BUILTIN_SQLITE -DGRDBCUSTOMSQLITE $(CUSTOM_SQLLIBRARY_CFL GCC_PREPROCESSOR_DEFINITIONS = "GRDBCUSTOMSQLITE=1" OTHER_SWIFT_FLAGS = -D USING_BUILTIN_SQLITE -D GRDBCUSTOMSQLITE $(CUSTOM_OTHER_SWIFT_FLAGS) HEADER_SEARCH_PATHS = $(SRCROOT)/SQLiteCustom/src +SWIFT_VERSION = 6.0 diff --git a/SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig b/SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig index 62178e5d3c..41762aa8c8 100755 --- a/SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig +++ b/SQLiteCustom/GRDBCustomSQLite-Testing.xcconfig @@ -10,3 +10,7 @@ CUSTOM_OTHER_SWIFT_FLAGS= // do not modify 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. + +// Tests still use the Swift 5 language mode. +SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES +OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature GlobalActorIsolatedTypesUsability diff --git a/SQLiteCustom/GRDBDeploymentTarget.xcconfig b/SQLiteCustom/GRDBDeploymentTarget.xcconfig index b4c8e9ed72..045b596962 100644 --- a/SQLiteCustom/GRDBDeploymentTarget.xcconfig +++ b/SQLiteCustom/GRDBDeploymentTarget.xcconfig @@ -2,5 +2,3 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.0 MACOSX_DEPLOYMENT_TARGET = 10.15 TVOS_DEPLOYMENT_TARGET = 13.0 WATCHOS_DEPLOYMENT_TARGET = 7.0 -SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES -OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature GlobalActorIsolatedTypesUsability diff --git a/Support/GRDB.xcconfig b/Support/GRDB.xcconfig index 5303f7a071..a3fabb0887 100644 --- a/Support/GRDB.xcconfig +++ b/Support/GRDB.xcconfig @@ -3,6 +3,7 @@ INFOPLIST_FILE = Support/Info.plist PRODUCT_NAME = GRDB PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.$(PRODUCT_NAME:rfc1034identifier) MODULEMAP_FILE = $(SRCROOT)/Support/module.modulemap +SWIFT_VERSION = 6.0 // Slow compilation hunt: // OTHER_SWIFT_FLAGS = $(inherited) -Xfrontend -warn-long-expression-type-checking=100 -Xfrontend -warn-long-function-bodies=100 diff --git a/Support/GRDBDeploymentTarget.xcconfig b/Support/GRDBDeploymentTarget.xcconfig index 76035ab53d..eb0e48eac5 100644 --- a/Support/GRDBDeploymentTarget.xcconfig +++ b/Support/GRDBDeploymentTarget.xcconfig @@ -3,8 +3,6 @@ MACOSX_DEPLOYMENT_TARGET = 10.15 TVOS_DEPLOYMENT_TARGET = 13.0 WATCHOS_DEPLOYMENT_TARGET = 7.0 OTHER_SWIFT_FLAGS = $(inherited) -D SQLITE_ENABLE_FTS5 -SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES -OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature GlobalActorIsolatedTypesUsability //// Compile with all opt-in APIs //GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GRDB_SQLITE_ENABLE_PREUPDATE_HOOK=1 diff --git a/Support/GRDBTests.xcconfig b/Support/GRDBTests.xcconfig index 6cbc57782d..94ad777847 100644 --- a/Support/GRDBTests.xcconfig +++ b/Support/GRDBTests.xcconfig @@ -1 +1,5 @@ #include "GRDBDeploymentTarget.xcconfig" + +// Tests still use the Swift 5 language mode. +SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES +OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature GlobalActorIsolatedTypesUsability