From ad82dc43778e8e22412c0477c32dc6639ada2891 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Fri, 26 Jun 2026 11:13:03 -0700 Subject: [PATCH 1/2] Add `CasePaths` and `Tagged` traits The existing `SQLiteDataTagged` trait will serve as a deprecated alias to `Tagged`, while `CasePaths` will allow SQLiteData users to enable enum tables without an explicit dependency on `swift-structured-queries`. --- Package.resolved | 10 +++++----- Package.swift | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Package.resolved b/Package.resolved index 14b83a31..b0538ea6 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "0ab18ed31f19c7e2b527b6bcc8ba2fc8708fcc9962e7bd79c8d049cb9595154d", + "originHash" : "e2cc6c054d5cb45b58ddae48858b3338ce4fc9283457edb40b284849c3914ed5", "pins" : [ { "identity" : "combine-schedulers", @@ -60,8 +60,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-dependencies", "state" : { - "revision" : "16f7dd14ee28d04617090f2a73198b8b316ffa12", - "version" : "1.13.1" + "revision" : "f80552807ec92f72fe3fe4543d71879182b0bfd5", + "version" : "1.13.0" } }, { @@ -123,8 +123,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-structured-queries", "state" : { - "revision" : "8da8818fccd9959bd683934ddc62cf45bb65b3c8", - "version" : "0.31.1" + "revision" : "859958c7cf76918abf5aa5d6ce8b068e00a77eb2", + "version" : "0.32.0" } }, { diff --git a/Package.swift b/Package.swift index d7265075..6b5807a9 100644 --- a/Package.swift +++ b/Package.swift @@ -22,9 +22,18 @@ let package = Package( ], traits: [ .trait( - name: "SQLiteDataTagged", + name: "CasePaths", + description: "Introduce support for enum tables." + ), + .trait( + name: "Tagged", description: "Introduce SQLiteData conformances to the swift-tagged package." - ) + ), + .trait( + name: "SQLiteDataTagged", + description: "A deprecated alias for the 'Tagged' trait.", + enabledTraits: ["Tagged"] + ), ], dependencies: [ .package(url: "https://github.com/apple/swift-collections", from: "1.0.0"), @@ -37,9 +46,10 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.4"), .package( url: "https://github.com/pointfreeco/swift-structured-queries", - from: "0.31.0", + from: "0.32.0", traits: [ - .trait(name: "StructuredQueriesTagged", condition: .when(traits: ["SQLiteDataTagged"])) + .trait(name: "CasePaths", condition: .when(traits: ["CasePaths"])), + .trait(name: "Tagged", condition: .when(traits: ["Tagged"])), ] ), .package(url: "https://github.com/pointfreeco/swift-tagged", from: "0.10.0"), @@ -60,7 +70,7 @@ let package = Package( .product( name: "Tagged", package: "swift-tagged", - condition: .when(traits: ["SQLiteDataTagged"]) + condition: .when(traits: ["Tagged"]) ), ] ), From 2a7de28a8550f5e62979375f6d72314ee00c448d Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Sat, 27 Jun 2026 12:33:18 -0700 Subject: [PATCH 2/2] wip --- Sources/SQLiteData/Traits/Tagged.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SQLiteData/Traits/Tagged.swift b/Sources/SQLiteData/Traits/Tagged.swift index e1354f63..17f3de61 100644 --- a/Sources/SQLiteData/Traits/Tagged.swift +++ b/Sources/SQLiteData/Traits/Tagged.swift @@ -1,4 +1,4 @@ -#if SQLiteDataTagged +#if Tagged public import Tagged extension Tagged: IdentifierStringConvertible where RawValue: IdentifierStringConvertible {