Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,17 @@ jobs:

- name: Build
run: swift build --swift-sdk wasm32-unknown-wasi -Xlinker -z -Xlinker stack-size=$((1024 * 1024))

compatibility:
name: Compatibility
strategy:
matrix:
xcode: ['15.2']
config: ['debug', 'release']
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run ${{ matrix.config }} tests
run: swift build -c ${{ matrix.config }}
2 changes: 1 addition & 1 deletion Examples/GRDBDemo/FetchKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension DependencyValues {
static var testValue: any DatabaseWriter {
reportIssue(
"""
A blank, in-memory database is being used. To set the database that is used by the 'query' \
A blank, in-memory database is being used. To set the database that is used by the 'fetch' \
key you can use the 'prepareDependencies' tool as soon as your app launches, such as in \
your app or scene delegate in UIKit, or the app entry point in SwiftUI:

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sharing/Internal/Reference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ extension _PersistentReference: MutableReference, Equatable where Key: SharedKey
func save() async throws {
saveError = nil
do {
try await withUnsafeThrowingContinuation { continuation in
_ = try await withUnsafeThrowingContinuation { continuation in
let key = key
key.save(
lock.withLock { value },
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sharing/SharedContinuations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private final class ContinuationBox<Value>: Sendable {
}

deinit {
let isComplete = resumeCount.withLock(\.self) > 0
let isComplete = resumeCount.withLock { $0 } > 0
if !isComplete {
reportIssue(
"""
Expand Down
10 changes: 5 additions & 5 deletions Sources/Sharing/SharedKeys/FileStorageKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
guard let self else { return }
state.withValue { state in
let modificationDate =
(try? storage.attributesOfItemAtPath(url.path)[.modificationDate]
(try? self.storage.attributesOfItemAtPath(self.url.path)[.modificationDate]
as? Date)
?? Date.distantPast
guard
Expand All @@ -145,7 +145,7 @@
guard state.workItem == nil
else { return }

subscriber.yield(with: Result { try decode(storage.load(url)) })
subscriber.yield(with: Result { try self.decode(self.storage.load(self.url)) })
}
}
let deleteCancellable = try storage.fileSystemSource(url, [.delete, .rename]) {
Expand Down Expand Up @@ -199,12 +199,12 @@
}
guard
let value = state.value,
let data = try? encode(value)
let data = try? self.encode(value)
else { return }
let result = Result {
try save(
try self.save(
data: data,
url: url,
url: self.url,
modificationDates: &state.modificationDates
)
}
Expand Down
Loading