Skip to content

Commit 48a17ce

Browse files
authored
Merge pull request #1826 from groue/dev/snapshot-cleanup
Simplify the compiler checks for the availability of SQLite snapshots
2 parents ab09078 + 361a482 commit 48a17ce

File tree

72 files changed

+398
-360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+398
-360
lines changed

.github/workflows/CI.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
1+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
22

33
name: "GRDB CI"
44

@@ -40,17 +40,17 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
include:
43-
- xcode: "Xcode_16.1.app"
44-
runsOn: macOS-14
43+
- xcode: "Xcode_16.4.app"
44+
runsOn: macOS-15
4545
destination: "platform=macOS"
4646
name: "macOS"
47-
- xcode: "Xcode_16.1.app"
48-
runsOn: macOS-14
49-
destination: "OS=18.1,name=iPhone 16 Pro"
47+
- xcode: "Xcode_16.4.app"
48+
runsOn: macOS-15
49+
destination: "OS=18.5,name=iPhone 16 Pro"
5050
name: "iOS"
51-
- xcode: "Xcode_16.1.app"
52-
runsOn: macOS-14
53-
destination: "OS=18.1,name=Apple TV"
51+
- xcode: "Xcode_16.4.app"
52+
runsOn: macOS-15
53+
destination: "OS=18.5,name=Apple TV"
5454
name: "tvOS"
5555
steps:
5656
- uses: actions/checkout@v5
@@ -66,9 +66,9 @@ jobs:
6666
fail-fast: false
6767
matrix:
6868
include:
69-
- xcode: "Xcode_16.1.app"
70-
runsOn: macOS-14
71-
name: "Xcode 16.1"
69+
- xcode: "Xcode_16.4.app"
70+
runsOn: macOS-15
71+
name: "Xcode 16.4"
7272
steps:
7373
- uses: actions/checkout@v5
7474
- name: ${{ matrix.name }}
@@ -83,9 +83,9 @@ jobs:
8383
fail-fast: false
8484
matrix:
8585
include:
86-
- xcode: "Xcode_16.1.app"
87-
runsOn: macOS-14
88-
name: "Xcode 16.1"
86+
- xcode: "Xcode_16.4.app"
87+
runsOn: macOS-15
88+
name: "Xcode 16.4"
8989
steps:
9090
- uses: actions/checkout@v5
9191
- name: ${{ matrix.name }}
@@ -100,9 +100,9 @@ jobs:
100100
fail-fast: false
101101
matrix:
102102
include:
103-
- xcode: "Xcode_16.1.app"
104-
runsOn: macOS-14
105-
name: "Xcode 16.1"
103+
- xcode: "Xcode_16.4.app"
104+
runsOn: macOS-15
105+
name: "Xcode 16.4"
106106
steps:
107107
- uses: actions/checkout@v5
108108
- name: ${{ matrix.name }}
@@ -117,9 +117,9 @@ jobs:
117117
fail-fast: false
118118
matrix:
119119
include:
120-
- xcode: "Xcode_16.1.app"
121-
runsOn: macOS-14
122-
name: "Xcode 16.1"
120+
- xcode: "Xcode_16.4.app"
121+
runsOn: macOS-15
122+
name: "Xcode 16.4"
123123
steps:
124124
- uses: actions/checkout@v5
125125
- name: ${{ matrix.name }}
@@ -134,9 +134,9 @@ jobs:
134134
fail-fast: false
135135
matrix:
136136
include:
137-
- xcode: "Xcode_16.1.app"
138-
runsOn: macOS-14
139-
name: "Xcode 16.1"
137+
- xcode: "Xcode_16.4.app"
138+
runsOn: macOS-15
139+
name: "Xcode 16.4"
140140
steps:
141141
- uses: actions/checkout@v5
142142
- name: ${{ matrix.name }}

.spi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ version: 1
22
builder:
33
configs:
44
- documentation_targets: [GRDB]
5-
swift_version: 6.0
5+
swift_version: 6.1

Documentation/DemoApps/GRDBDemo/GRDBDemo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemo;
383383
PRODUCT_NAME = "$(TARGET_NAME)";
384384
SWIFT_EMIT_LOC_STRINGS = YES;
385-
SWIFT_VERSION = 6.0;
385+
SWIFT_VERSION = 6.1;
386386
TARGETED_DEVICE_FAMILY = "1,2";
387387
};
388388
name = Debug;
@@ -411,7 +411,7 @@
411411
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemo;
412412
PRODUCT_NAME = "$(TARGET_NAME)";
413413
SWIFT_EMIT_LOC_STRINGS = YES;
414-
SWIFT_VERSION = 6.0;
414+
SWIFT_VERSION = 6.1;
415415
TARGETED_DEVICE_FAMILY = "1,2";
416416
};
417417
name = Release;
@@ -427,7 +427,7 @@
427427
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoTests;
428428
PRODUCT_NAME = "$(TARGET_NAME)";
429429
SWIFT_EMIT_LOC_STRINGS = NO;
430-
SWIFT_VERSION = 6.0;
430+
SWIFT_VERSION = 6.1;
431431
TARGETED_DEVICE_FAMILY = "1,2";
432432
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GRDBDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/GRDBDemo";
433433
};
@@ -444,7 +444,7 @@
444444
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoTests;
445445
PRODUCT_NAME = "$(TARGET_NAME)";
446446
SWIFT_EMIT_LOC_STRINGS = NO;
447-
SWIFT_VERSION = 6.0;
447+
SWIFT_VERSION = 6.1;
448448
TARGETED_DEVICE_FAMILY = "1,2";
449449
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GRDBDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/GRDBDemo";
450450
};

GRDB.swift.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
99
s.source = { :git => 'https://github.com/groue/GRDB.swift.git', :tag => "v#{s.version}" }
1010
s.module_name = 'GRDB'
1111

12-
s.swift_versions = ['6']
12+
s.swift_versions = ['6.1']
1313
s.ios.deployment_target = '13.0'
1414
s.osx.deployment_target = '10.15'
1515
s.watchos.deployment_target = '7.0'
@@ -21,7 +21,7 @@ Pod::Spec.new do |s|
2121
ss.framework = 'Foundation'
2222
ss.library = 'sqlite3'
2323
ss.xcconfig = {
24-
'OTHER_SWIFT_FLAGS' => '$(inherited) -D SQLITE_ENABLE_FTS5',
24+
'OTHER_SWIFT_FLAGS' => '$(inherited) -D SQLITE_ENABLE_FTS5 -D GRDBFRAMEWORK',
2525
}
2626
end
2727

GRDB/Core/Configuration.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// Import C SQLite functions
2-
#if SWIFT_PACKAGE
3-
import GRDBSQLite
4-
#elseif GRDBCIPHER
2+
#if GRDBCIPHER // CocoaPods (SQLCipher subspec)
53
import SQLCipher
6-
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
4+
#elseif GRDBFRAMEWORK // GRDB.xcodeproj or CocoaPods (standard subspec)
75
import SQLite3
6+
#elseif GRDBCUSTOMSQLITE // GRDBCustom Framework
7+
// #elseif SomeTrait
8+
// import ...
9+
#else // Default SPM trait must be the default. It impossible to detect from Xcode.
10+
import GRDBSQLite
811
#endif
912

1013
#if !canImport(Darwin)

GRDB/Core/Database+Schema.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// Import C SQLite functions
2-
#if SWIFT_PACKAGE
3-
import GRDBSQLite
4-
#elseif GRDBCIPHER
2+
#if GRDBCIPHER // CocoaPods (SQLCipher subspec)
53
import SQLCipher
6-
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
4+
#elseif GRDBFRAMEWORK // GRDB.xcodeproj or CocoaPods (standard subspec)
75
import SQLite3
6+
#elseif GRDBCUSTOMSQLITE // GRDBCustom Framework
7+
// #elseif SomeTrait
8+
// import ...
9+
#else // Default SPM trait must be the default. It impossible to detect from Xcode.
10+
import GRDBSQLite
811
#endif
912

1013
extension Database {

GRDB/Core/Database+Statements.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// Import C SQLite functions
2-
#if SWIFT_PACKAGE
3-
import GRDBSQLite
4-
#elseif GRDBCIPHER
2+
#if GRDBCIPHER // CocoaPods (SQLCipher subspec)
53
import SQLCipher
6-
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
4+
#elseif GRDBFRAMEWORK // GRDB.xcodeproj or CocoaPods (standard subspec)
75
import SQLite3
6+
#elseif GRDBCUSTOMSQLITE // GRDBCustom Framework
7+
// #elseif SomeTrait
8+
// import ...
9+
#else // Default SPM trait must be the default. It impossible to detect from Xcode.
10+
import GRDBSQLite
811
#endif
912

1013
import Foundation

GRDB/Core/Database.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// Import C SQLite functions
2-
#if SWIFT_PACKAGE
3-
import GRDBSQLite
4-
#elseif GRDBCIPHER
2+
#if GRDBCIPHER // CocoaPods (SQLCipher subspec)
53
import SQLCipher
6-
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
4+
#elseif GRDBFRAMEWORK // GRDB.xcodeproj or CocoaPods (standard subspec)
75
import SQLite3
6+
#elseif GRDBCUSTOMSQLITE // GRDBCustom Framework
7+
// #elseif SomeTrait
8+
// import ...
9+
#else // Default SPM trait must be the default. It impossible to detect from Xcode.
10+
import GRDBSQLite
811
#endif
912

1013
import Foundation

GRDB/Core/DatabaseCollation.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// Import C SQLite functions
2-
#if SWIFT_PACKAGE
3-
import GRDBSQLite
4-
#elseif GRDBCIPHER
2+
#if GRDBCIPHER // CocoaPods (SQLCipher subspec)
53
import SQLCipher
6-
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
4+
#elseif GRDBFRAMEWORK // GRDB.xcodeproj or CocoaPods (standard subspec)
75
import SQLite3
6+
#elseif GRDBCUSTOMSQLITE // GRDBCustom Framework
7+
// #elseif SomeTrait
8+
// import ...
9+
#else // Default SPM trait must be the default. It impossible to detect from Xcode.
10+
import GRDBSQLite
811
#endif
912

1013
import Foundation

GRDB/Core/DatabaseError.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// Import C SQLite functions
2-
#if SWIFT_PACKAGE
3-
import GRDBSQLite
4-
#elseif GRDBCIPHER
2+
#if GRDBCIPHER // CocoaPods (SQLCipher subspec)
53
import SQLCipher
6-
#elseif !GRDBCUSTOMSQLITE && !GRDBCIPHER
4+
#elseif GRDBFRAMEWORK // GRDB.xcodeproj or CocoaPods (standard subspec)
75
import SQLite3
6+
#elseif GRDBCUSTOMSQLITE // GRDBCustom Framework
7+
// #elseif SomeTrait
8+
// import ...
9+
#else // Default SPM trait must be the default. It impossible to detect from Xcode.
10+
import GRDBSQLite
811
#endif
912

1013
import Foundation

0 commit comments

Comments
 (0)