Work around `@_exported`-`public import` bug (#477) · structuredpath/sqlite-data@f8f2311 · GitHub
Skip to content

Commit f8f2311

Browse files
authored
Work around @_exported-public import bug (pointfreeco#477)
We've relied on fine-grained GRDB exports via, e.g.: ```swift @_exported import class GRDB.Database ``` But it turns out this breaks as soon as you have an explicit `public import` in the same module: ```swift public import class GRDB.Database ``` To work around this bug, we can use `#if` blocks to make each mutually exclusive.
1 parent 98fa1de commit f8f2311

20 files changed

Lines changed: 106 additions & 78 deletions

‎Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved‎

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

‎Examples/Reminders/RemindersApp.swift‎

Lines changed: 3 additions & 3 deletions

‎Examples/Reminders/RemindersDetail.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class RemindersDetailModel: HashableObject {
8888
}
8989
}
9090

91-
private var remindersQuery: some StructuredQueriesCore.Statement<Row> {
91+
private var remindersQuery: some Statement<Row> & Sendable {
9292
Reminder
9393
.where {
9494
if !showCompleted {

‎Examples/Reminders/Schema.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ nonisolated func handleReminderStatusUpdate() {
390390

391391
@DatabaseFunction
392392
nonisolated func createDefaultRemindersList() {
393-
Task {
393+
_ = Task {
394394
@Dependency(\.defaultDatabase) var database
395395
try await database.write { db in
396396
try RemindersList.insert {

‎Examples/Reminders/SearchReminders.swift‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import GRDB
21
import IssueReporting
32
import SQLiteData
43
import SwiftUI
@@ -227,7 +226,7 @@ struct SearchRemindersView: View {
227226
}
228227
Spacer()
229228
Button(model.showCompletedInSearchResults ? "Hide" : "Show") {
230-
Task { try await model.showCompletedButtonTapped() }
229+
_ = Task { try await model.showCompletedButtonTapped() }
231230
}
232231
}
233232
}

‎Examples/Reminders/TagsForm.swift‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import GRDB
21
import SQLiteData
32
import SwiftUI
43
import SwiftUINavigation

‎Package.resolved‎

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

‎Sources/SQLiteData/CloudKit/CloudKitSharing.swift‎

Lines changed: 7 additions & 5 deletions

0 commit comments

Comments
 (0)