Skip to content

Commit 73e14d2

Browse files
doozMenStijn Willems
authored andcommitted
wip local dependencies for structured queries (#3)
1 parent 4f5e784 commit 73e14d2

6 files changed

Lines changed: 143 additions & 221 deletions

File tree

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(swift --version:*)",
5+
"Bash(~/.swiftly/bin/swiftly list:*)",
6+
"Bash(~/.swiftly/bin/swiftly use:*)"
7+
]
8+
}
9+
}

Package.resolved

Lines changed: 5 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 90 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,110 @@
1-
// swift-tools-version: 6.1
1+
// swift-tools-version: 6.2.1
22

33
import PackageDescription
44

55
let package = Package(
6-
name: "sqlite-data",
7-
platforms: [
8-
.macOS(.v15),
9-
],
10-
products: [
11-
.library(
12-
name: "SQLiteData",
13-
targets: ["SQLiteData"]
14-
),
15-
.library(
16-
name: "SQLiteDataTestSupport",
17-
targets: ["SQLiteDataTestSupport"]
18-
),
19-
],
20-
traits: [
21-
.trait(
22-
name: "SQLiteDataTagged",
23-
description: "Introduce SQLiteData conformances to the swift-tagged package."
24-
)
25-
],
26-
dependencies: [
27-
.package(url: "https://github.com/apple/swift-collections", from: "1.0.0"),
28-
.package(url: "https://github.com/groue/GRDB.swift", from: "7.6.0"),
29-
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.0.0"),
30-
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.3"),
31-
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.9.0"),
6+
name: "sqlite-data",
7+
platforms: [
8+
.macOS(.v15)
9+
],
10+
products: [
11+
.library(
12+
name: "SQLiteData",
13+
targets: ["SQLiteData"]
14+
),
15+
.library(
16+
name: "SQLiteDataTestSupport",
17+
targets: ["SQLiteDataTestSupport"]
18+
),
19+
],
20+
traits: [
21+
.trait(
22+
name: "SQLiteDataTagged",
23+
description: "Introduce SQLiteData conformances to the swift-tagged package."
24+
)
25+
],
26+
dependencies: [
27+
.package(url: "https://github.com/apple/swift-collections", from: "1.0.0"),
28+
.package(name: "GRDB.swift", path: "../GRDB-swift"),
29+
.package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.0.0"),
30+
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.3.3"),
31+
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.9.0"),
3232
.package(url: "https://github.com/pointfreeco/swift-perception", from: "2.0.0"),
33-
.package(url: "https://github.com/pointfreeco/swift-sharing", from: "2.3.0"),
34-
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.4"),
35-
.package(
36-
url: "https://github.com/pointfreeco/swift-structured-queries",
37-
from: "0.24.0",
38-
traits: [
39-
.trait(name: "StructuredQueriesTagged", condition: .when(traits: ["SQLiteDataTagged"]))
40-
]
41-
),
42-
.package(url: "https://github.com/pointfreeco/swift-tagged", from: "0.10.0"),
43-
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.5.0"),
44-
],
45-
targets: [
46-
.target(
47-
name: "SQLiteData",
48-
dependencies: [
49-
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
50-
.product(name: "Dependencies", package: "swift-dependencies"),
51-
.product(name: "GRDB", package: "GRDB.swift"),
52-
.product(name: "IssueReporting", package: "xctest-dynamic-overlay"),
53-
.product(name: "OrderedCollections", package: "swift-collections"),
33+
.package(url: "https://github.com/pointfreeco/swift-sharing", from: "2.3.0"),
34+
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.4"),
35+
.package(
36+
path: "../swift-structured-queries",
37+
traits: [
38+
.trait(
39+
name: "StructuredQueriesTagged",
40+
condition: .when(traits: ["SQLiteDataTagged"]))
41+
]
42+
),
43+
.package(url: "https://github.com/pointfreeco/swift-tagged", from: "0.10.0"),
44+
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.5.0"),
45+
],
46+
targets: [
47+
.target(
48+
name: "SQLiteData",
49+
dependencies: [
50+
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
51+
.product(name: "Dependencies", package: "swift-dependencies"),
52+
.product(name: "GRDB", package: "GRDB.swift"),
53+
.product(name: "IssueReporting", package: "xctest-dynamic-overlay"),
54+
.product(name: "OrderedCollections", package: "swift-collections"),
55+
.product(name: "Sharing", package: "swift-sharing"),
56+
.product(name: "StructuredQueriesSQLite", package: "swift-structured-queries"),
57+
.product(
58+
name: "Tagged",
59+
package: "swift-tagged",
60+
condition: .when(traits: ["SQLiteDataTagged"])
61+
),
62+
]
63+
),
64+
.target(
65+
name: "SQLiteDataTestSupport",
66+
dependencies: [
67+
"SQLiteData",
68+
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
69+
.product(name: "CustomDump", package: "swift-custom-dump"),
5470
.product(name: "Perception", package: "swift-perception"),
5571
.product(name: "Sharing", package: "swift-sharing"),
5672
.product(name: "StructuredQueriesSQLite", package: "swift-structured-queries"),
57-
.product(
58-
name: "Tagged",
73+
]
74+
),
75+
.testTarget(
76+
name: "SQLiteDataTests",
77+
dependencies: [
78+
"SQLiteData",
79+
"SQLiteDataTestSupport",
80+
.product(name: "DependenciesTestSupport", package: "swift-dependencies"),
81+
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
5982
package: "swift-tagged",
60-
condition: .when(traits: ["SQLiteDataTagged"])
83+
.product(name: "SnapshotTestingCustomDump", package: "swift-snapshot-testing"),
84+
.product(name: "StructuredQueries", package: "swift-structured-queries"),
85+
]
6186
),
62-
]
63-
),
64-
.target(
65-
name: "SQLiteDataTestSupport",
66-
dependencies: [
67-
"SQLiteData",
68-
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
69-
.product(name: "CustomDump", package: "swift-custom-dump"),
70-
.product(name: "Dependencies", package: "swift-dependencies"),
71-
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
72-
.product(name: "StructuredQueriesTestSupport", package: "swift-structured-queries"),
73-
]
74-
),
75-
.testTarget(
76-
name: "SQLiteDataTests",
77-
dependencies: [
78-
"SQLiteData",
79-
"SQLiteDataTestSupport",
80-
.product(name: "DependenciesTestSupport", package: "swift-dependencies"),
81-
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
82-
.product(name: "SnapshotTestingCustomDump", package: "swift-snapshot-testing"),
83-
.product(name: "StructuredQueries", package: "swift-structured-queries"),
84-
]
85-
),
86-
],
87-
swiftLanguageModes: [.v6]
87+
],
88+
swiftLanguageModes: [.v6]
8889
)
8990

9091
let swiftSettings: [SwiftSetting] = [
91-
.enableUpcomingFeature("MemberImportVisibility")
92-
// .unsafeFlags([
93-
// "-Xfrontend",
94-
// "-warn-long-function-bodies=50",
95-
// "-Xfrontend",
96-
// "-warn-long-expression-type-checking=50",
97-
// ])
92+
.enableUpcomingFeature("MemberImportVisibility")
93+
// .unsafeFlags([
94+
// "-Xfrontend",
95+
// "-warn-long-function-bodies=50",
96+
// "-Xfrontend",
97+
// "-warn-long-expression-type-checking=50",
98+
// ])
9899
]
99100

100101
for index in package.targets.indices {
101-
package.targets[index].swiftSettings = swiftSettings
102+
package.targets[index].swiftSettings = swiftSettings
102103
}
103104

104105
#if !os(Windows)
105-
// Add the documentation compiler plugin if possible
106-
package.dependencies.append(
107-
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
108-
)
106+
// Add the documentation compiler plugin if possible
107+
package.dependencies.append(
108+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
109+
)
109110
#endif

Package@swift-6.0.swift

Lines changed: 0 additions & 89 deletions
This file was deleted.

Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284

285285
self.userModificationTime = other.userModificationTime
286286
for column in T.TableColumns.writableColumns {
287-
func open<Root, Value>(_ column: some WritableTableColumnExpression<Root, Value>) {
287+
func open<Value>(_ column: some WritableTableColumnExpression<T, Value>) {
288288
let key = column.name
289289
let keyPath = column.keyPath as! KeyPath<T, Value.QueryOutput>
290290
let didSet: Bool

0 commit comments

Comments
 (0)