Skip to content

Commit 19f6c21

Browse files
Add changelog entry
1 parent a190531 commit 19f6c21

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 1.5.1 (unreleased)
44

55
* Update core extension to 0.4.5 ([changelog](https://github.com/powersync-ja/powersync-sqlite-core/releases/tag/v0.4.5))
6+
* Additional Swift 6 Strict Concurrency Checking declarations added for remaining protocols.
67

78
## 1.5.0
89

Sources/PowerSync/Protocol/LoggerProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public enum LogSeverity: Int, CaseIterable, Sendable {
3434
/// A protocol for writing log messages to a specific backend or output.
3535
///
3636
/// Conformers handle the actual writing or forwarding of log messages.
37-
public protocol LogWriterProtocol {
37+
public protocol LogWriterProtocol: Sendable {
3838
/// Logs a message with the given severity and optional tag.
3939
///
4040
/// - Parameters:

Sources/PowerSync/Protocol/sync/DownloadProgress.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/// Information about a progressing download.
2-
///
2+
///
33
/// This reports the ``totalOperations`` amount of operations to download, how many of them
44
/// have already been downloaded as ``downloadedOperations`` and finally a ``fraction`` indicating
55
/// relative progress.
6-
///
6+
///
77
/// To obtain a ``ProgressWithOperations`` instance, either use ``SyncStatusData/downloadProgress``
88
/// for global progress or ``SyncDownloadProgress/untilPriority(priority:)``.
9-
public protocol ProgressWithOperations {
9+
public protocol ProgressWithOperations: Sendable {
1010
/// How many operations need to be downloaded in total for the current download
1111
/// to complete.
1212
var totalOperations: Int32 { get }
@@ -18,42 +18,42 @@ public protocol ProgressWithOperations {
1818
public extension ProgressWithOperations {
1919
/// The relative amount of ``totalOperations`` to items in ``downloadedOperations``, as a
2020
/// number between `0.0` and `1.0` (inclusive).
21-
///
21+
///
2222
/// When this number reaches `1.0`, all changes have been received from the sync service.
2323
/// Actually applying these changes happens before the ``SyncStatusData/downloadProgress``
2424
/// field is cleared though, so progress can stay at `1.0` for a short while before completing.
2525
var fraction: Float {
26-
if (self.totalOperations == 0) {
26+
if totalOperations == 0 {
2727
return 0.0
2828
}
2929

30-
return Float.init(self.downloadedOperations) / Float.init(self.totalOperations)
30+
return Float(downloadedOperations) / Float(totalOperations)
3131
}
3232
}
3333

3434
/// Provides realtime progress on how PowerSync is downloading rows.
35-
///
35+
///
3636
/// This type reports progress by extending ``ProgressWithOperations``, meaning that the
3737
/// ``ProgressWithOperations/totalOperations``, ``ProgressWithOperations/downloadedOperations``
3838
/// and ``ProgressWithOperations/fraction`` properties are available on this instance.
3939
/// Additionally, it's possible to obtain progress towards a specific priority only (instead
4040
/// of tracking progress for the entire download) by using ``untilPriority(priority:)``.
41-
///
41+
///
4242
/// The reported progress always reflects the status towards the end of a sync iteration (after
4343
/// which a consistent snapshot of all buckets is available locally).
44-
///
44+
///
4545
/// In rare cases (in particular, when a [compacting](https://docs.powersync.com/usage/lifecycle-maintenance/compacting-buckets)
4646
/// operation takes place between syncs), it's possible for the returned numbers to be slightly
4747
/// inaccurate. For this reason, ``SyncDownloadProgress`` should be seen as an approximation of progress.
4848
/// The information returned is good enough to build progress bars, but not exaxt enough to track
4949
/// individual download counts.
50-
///
50+
///
5151
/// Also note that data is downloaded in bulk, which means that individual counters are unlikely
5252
/// to be updated one-by-one.
5353
public protocol SyncDownloadProgress: ProgressWithOperations {
5454
/// Returns download progress towardss all data up until the specified `priority`
5555
/// being received.
56-
///
56+
///
5757
/// The returned ``ProgressWithOperations`` instance tracks the target amount of operations that
5858
/// need to be downloaded in total and how many of them have already been received.
5959
func untilPriority(priority: BucketPriority) -> ProgressWithOperations

Sources/PowerSync/Protocol/sync/PriorityStatusEntry.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22

33
/// Represents the status of a bucket priority, including synchronization details.
4-
public struct PriorityStatusEntry {
4+
public struct PriorityStatusEntry: Sendable {
55
/// The priority of the bucket.
66
public let priority: BucketPriority
77

0 commit comments

Comments
 (0)