The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of CloudSyncSession, reference 0.2.0 (94c2d5), with Swift 6.0 for macOS (SPM) on 4 Nov 2024 05:06:01 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ryanashcraft/CloudSyncSession.git
Reference: 0.2.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/ryanashcraft/CloudSyncSession
 * tag               0.2.0      -> FETCH_HEAD
HEAD is now at 94c2d57 Improve rate limiting behavior (#6)
Cloned https://github.com/ryanashcraft/CloudSyncSession.git
Revision (git rev-parse @):
94c2d5720641f3fcbcf9395945c2de736d879029
SUCCESS checkout https://github.com/ryanashcraft/CloudSyncSession.git at 0.2.0
Fetching https://github.com/ryanashcraft/swift-pid.git
Fetching https://github.com/apple/swift-collections.git
[1/46] Fetching swift-pid
[47/15521] Fetching swift-pid, swift-collections
Fetched https://github.com/apple/swift-collections.git from cache (1.94s)
Fetched https://github.com/ryanashcraft/swift-pid.git from cache (1.94s)
Computing version for https://github.com/ryanashcraft/swift-pid.git
Computed https://github.com/ryanashcraft/swift-pid.git at 0.0.3 (0.50s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.0.6 (3.41s)
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.0.6
Creating working copy for https://github.com/ryanashcraft/swift-pid.git
Working copy of https://github.com/ryanashcraft/swift-pid.git resolved at 0.0.3
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "cloudsyncsession",
      "name": "CloudSyncSession",
      "url": "https://github.com/ryanashcraft/CloudSyncSession.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/CloudSyncSession",
      "dependencies": [
        {
          "identity": "swift-pid",
          "name": "swift-pid",
          "url": "https://github.com/ryanashcraft/swift-pid.git",
          "version": "0.0.3",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-pid",
          "dependencies": [
            {
              "identity": "swift-collections",
              "name": "swift-collections",
              "url": "https://github.com/apple/swift-collections.git",
              "version": "1.1.4",
              "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/swift-collections",
              "dependencies": [
              ]
            }
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/ryanashcraft/CloudSyncSession.git
[6/553] Fetching cloudsyncsession
Fetched https://github.com/ryanashcraft/CloudSyncSession.git from cache (1.23s)
Fetching https://github.com/ryanashcraft/swift-pid.git from cache
Fetched https://github.com/ryanashcraft/swift-pid.git from cache (0.44s)
Computing version for https://github.com/ryanashcraft/swift-pid.git
Computed https://github.com/ryanashcraft/swift-pid.git at 0.0.3 (0.02s)
Fetching https://github.com/apple/swift-collections.git from cache
Fetched https://github.com/apple/swift-collections.git from cache (0.54s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.1.4 (0.79s)
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.1.4
Creating working copy for https://github.com/ryanashcraft/swift-pid.git
Working copy of https://github.com/ryanashcraft/swift-pid.git resolved at 0.0.3
Creating working copy for https://github.com/ryanashcraft/CloudSyncSession.git
Working copy of https://github.com/ryanashcraft/CloudSyncSession.git resolved at 0.2.0 (94c2d57)
warning: '.resolve-product-dependencies': dependency 'cloudsyncsession' is not used by any target
Found 1 product dependencies
  - swift-pid
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/ryanashcraft/CloudSyncSession.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/6] Write sources
[5/6] Write swift-version--7754E27361AE5C74.txt
[7/73] Compiling OrderedCollections OrderedSet+Hashable.swift
[8/73] Compiling OrderedCollections OrderedSet+Initializers.swift
[9/75] Compiling OrderedCollections OrderedDictionary+Hashable.swift
[10/75] Compiling OrderedCollections OrderedDictionary+Initializers.swift
[11/75] Compiling OrderedCollections OrderedDictionary+Invariants.swift
[12/75] Compiling OrderedCollections OrderedDictionary+Partial MutableCollection.swift
[13/75] Compiling OrderedCollections OrderedDictionary+Partial RangeReplaceableCollection.swift
[14/75] Compiling OrderedCollections _HashTable.swift
[15/75] Compiling OrderedCollections _Hashtable+Header.swift
[16/75] Compiling OrderedCollections OrderedDictionary+Codable.swift
[17/75] Compiling OrderedCollections OrderedDictionary+CustomDebugStringConvertible.swift
[18/75] Compiling OrderedCollections OrderedDictionary+CustomReflectable.swift
[19/75] Compiling OrderedCollections OrderedDictionary+CustomStringConvertible.swift
[20/80] Emitting module OrderedCollections
[21/80] Compiling OrderedCollections OrderedSet+CustomDebugStringConvertible.swift
[22/80] Compiling OrderedCollections OrderedSet+CustomReflectable.swift
[23/80] Compiling OrderedCollections OrderedSet+Equatable.swift
[24/80] Compiling OrderedCollections OrderedSet+ExpressibleByArrayLiteral.swift
[25/80] Compiling OrderedCollections _HashTable+Testing.swift
[26/80] Compiling OrderedCollections _HashTable+UnsafeHandle.swift
[27/80] Compiling OrderedCollections OrderedSet+Partial MutableCollection.swift
[28/80] Compiling OrderedCollections OrderedSet+Partial RangeReplaceableCollection.swift
[29/80] Compiling OrderedCollections OrderedSet+CustomStringConvertible.swift
[30/80] Compiling OrderedCollections OrderedSet+Diffing.swift
[31/80] Compiling OrderedCollections OrderedSet+Insertions.swift
[32/80] Compiling OrderedCollections OrderedSet+Invariants.swift
[33/80] Compiling OrderedCollections OrderedDictionary+Deprecations.swift
[34/80] Compiling OrderedCollections OrderedDictionary+Elements+SubSequence.swift
[35/80] Compiling OrderedCollections OrderedDictionary+Elements.swift
[36/80] Compiling OrderedCollections OrderedDictionary+Equatable.swift
[37/80] Compiling OrderedCollections OrderedDictionary+ExpressibleByDictionaryLiteral.swift
[38/80] Compiling OrderedCollections _HashTable+Constants.swift
[39/80] Compiling OrderedCollections _HashTable+CustomStringConvertible.swift
[40/80] Compiling OrderedCollections _HashTable+Bucket.swift
[41/80] Compiling OrderedCollections _HashTable+BucketIterator.swift
[43/80] Emitting module DequeModule
[49/80] Compiling OrderedCollections OrderedDictionary+Sendable.swift
[50/80] Compiling OrderedCollections OrderedDictionary+Sequence.swift
[51/80] Compiling OrderedCollections OrderedDictionary+Values.swift
[52/80] Compiling OrderedCollections OrderedDictionary.swift
[53/80] Compiling OrderedCollections OrderedSet+Codable.swift
[54/80] Compiling OrderedCollections OrderedSet+RandomAccessCollection.swift
[55/80] Compiling OrderedCollections OrderedSet+ReserveCapacity.swift
[56/80] Compiling OrderedCollections OrderedSet+Sendable.swift
[57/80] Compiling OrderedCollections OrderedSet+SubSequence.swift
[58/80] Compiling OrderedCollections OrderedSet+Testing.swift
[59/80] Compiling DequeModule _DequeSlot.swift
[60/80] Compiling DequeModule _UnsafeWrappedBuffer.swift
[75/80] Compiling OrderedCollections OrderedSet+Partial SetAlgebra+Predicates.swift
[76/80] Compiling OrderedCollections OrderedSet+UnorderedView.swift
[77/80] Compiling OrderedCollections OrderedSet+UnstableInternals.swift
[78/80] Compiling OrderedCollections OrderedSet.swift
[79/80] Compiling OrderedCollections RandomAccessCollection+Offsets.swift
[80/80] Compiling OrderedCollections _UnsafeBitset.swift
[81/82] Emitting module Collections
[82/82] Compiling Collections Collections.swift
[83/85] Compiling PID PIDController.swift
[84/85] Emitting module PID
[85/85] Compiling PID RateLimitPIDController.swift
[86/101] Compiling CloudSyncSession SplittingMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:8:20: warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 6 |     func run(next: (SyncEvent) -> SyncEvent, event: SyncEvent) -> SyncEvent {
 7 |         DispatchQueue.main.async {
 8 |             switch event {
   |                    `- warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 9 |             case let .workSuccess(work, result):
10 |                 switch result {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncEvent.swift:3:13: note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 1 | import CloudKit
 2 |
 3 | public enum SyncEvent {
   |             `- note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 4 |     /// Should be dispatched when the session starts.
 5 |     case start
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:13:25: warning: capture of 'self' with non-sendable type 'SubjectMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | struct SubjectMiddleware: Middleware {
   |        `- note: consider making struct 'SubjectMiddleware' conform to the 'Sendable' protocol
 4 |     var session: CloudSyncSession
 5 |
   :
11 |                 case let .fetch(response):
12 |                     if case let .fetch(operation) = work {
13 |                         session.fetchWorkCompletedSubject.send((operation, response))
   |                         `- warning: capture of 'self' with non-sendable type 'SubjectMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
14 |                     }
15 |                 case let .modify(response):
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:8:20: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
 6 |     func run(next: (SyncEvent) -> SyncEvent, event: SyncEvent) -> SyncEvent {
 7 |         DispatchQueue.main.async {
 8 |             switch event {
   |                    |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
   |                    `- note: task-isolated 'event' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 9 |             case let .workSuccess(work, result):
10 |                 switch result {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:13:25: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
11 |                 case let .fetch(response):
12 |                     if case let .fetch(operation) = work {
13 |                         session.fetchWorkCompletedSubject.send((operation, response))
   |                         |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
   |                         `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
14 |                     }
15 |                 case let .modify(response):
[87/101] Compiling CloudSyncSession SubjectMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:8:20: warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 6 |     func run(next: (SyncEvent) -> SyncEvent, event: SyncEvent) -> SyncEvent {
 7 |         DispatchQueue.main.async {
 8 |             switch event {
   |                    `- warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 9 |             case let .workSuccess(work, result):
10 |                 switch result {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncEvent.swift:3:13: note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 1 | import CloudKit
 2 |
 3 | public enum SyncEvent {
   |             `- note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 4 |     /// Should be dispatched when the session starts.
 5 |     case start
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:13:25: warning: capture of 'self' with non-sendable type 'SubjectMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 1 | import Foundation
 2 |
 3 | struct SubjectMiddleware: Middleware {
   |        `- note: consider making struct 'SubjectMiddleware' conform to the 'Sendable' protocol
 4 |     var session: CloudSyncSession
 5 |
   :
11 |                 case let .fetch(response):
12 |                     if case let .fetch(operation) = work {
13 |                         session.fetchWorkCompletedSubject.send((operation, response))
   |                         `- warning: capture of 'self' with non-sendable type 'SubjectMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
14 |                     }
15 |                 case let .modify(response):
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:8:20: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
 6 |     func run(next: (SyncEvent) -> SyncEvent, event: SyncEvent) -> SyncEvent {
 7 |         DispatchQueue.main.async {
 8 |             switch event {
   |                    |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
   |                    `- note: task-isolated 'event' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 9 |             case let .workSuccess(work, result):
10 |                 switch result {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/SubjectMiddleware.swift:13:25: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
11 |                 case let .fetch(response):
12 |                     if case let .fetch(operation) = work {
13 |                         session.fetchWorkCompletedSubject.send((operation, response))
   |                         |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
   |                         `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
14 |                     }
15 |                 case let .modify(response):
[88/102] Compiling CloudSyncSession SyncEvent.swift
[89/102] Compiling CloudSyncSession SyncState.swift
[90/102] Compiling CloudSyncSession AccountStatusMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/AccountStatusMiddleware.swift:31:83: warning: capture of 'self' with non-sendable type 'AccountStatusMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 3 |
 4 | /// Middleware that looks up the account status when the session starts and dispatches `accountStatusChanged` events.
 5 | public struct AccountStatusMiddleware: Middleware {
   |               `- note: consider making struct 'AccountStatusMiddleware' conform to the 'Sendable' protocol
 6 |     public var session: CloudSyncSession
 7 |     let ckContainer: CKContainer
   :
29 |                 ckContainer.accountStatus { status, error in
30 |                     if let error = error {
31 |                         os_log("Failed to fetch account status: %{public}@", log: self.log, type: .error, String(describing: error))
   |                                                                                   `- warning: capture of 'self' with non-sendable type 'AccountStatusMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
32 |                     }
33 |
[91/102] Compiling CloudSyncSession ErrorMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/AccountStatusMiddleware.swift:31:83: warning: capture of 'self' with non-sendable type 'AccountStatusMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 3 |
 4 | /// Middleware that looks up the account status when the session starts and dispatches `accountStatusChanged` events.
 5 | public struct AccountStatusMiddleware: Middleware {
   |               `- note: consider making struct 'AccountStatusMiddleware' conform to the 'Sendable' protocol
 6 |     public var session: CloudSyncSession
 7 |     let ckContainer: CKContainer
   :
29 |                 ckContainer.accountStatus { status, error in
30 |                     if let error = error {
31 |                         os_log("Failed to fetch account status: %{public}@", log: self.log, type: .error, String(describing: error))
   |                                                                                   `- warning: capture of 'self' with non-sendable type 'AccountStatusMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
32 |                     }
33 |
[92/102] Compiling CloudSyncSession OperationHandler.swift
[93/102] Compiling CloudSyncSession WorkMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/WorkMiddleware.swift:21:21: warning: capture of 'self' with non-sendable type 'WorkMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 4 | private let workDelay = DispatchTimeInterval.milliseconds(60)
 5 |
 6 | struct WorkMiddleware: Middleware {
   |        `- note: consider making struct 'WorkMiddleware' conform to the 'Sendable' protocol
 7 |     var session: CloudSyncSession
 8 |
   :
19 |             if prevWork?.id != work.id || prevWork?.retryCount != work.retryCount {
20 |                 dispatchQueue.asyncAfter(deadline: .now() + workDelay) {
21 |                     self.doWork(work)
   |                     `- warning: capture of 'self' with non-sendable type 'WorkMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |                 }
23 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/WorkMiddleware.swift:21:33: warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 |             if prevWork?.id != work.id || prevWork?.retryCount != work.retryCount {
20 |                 dispatchQueue.asyncAfter(deadline: .now() + workDelay) {
21 |                     self.doWork(work)
   |                                 `- warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |                 }
23 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncWork.swift:5:13: note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  3 | public let maxRecommendedRecordsPerOperation = 400
  4 |
  5 | public enum SyncWork: Identifiable {
    |             `- note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  6 |     public enum Result {
  7 |         case modify(ModifyOperation.Response)
[94/102] Compiling CloudSyncSession ZoneMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/WorkMiddleware.swift:21:21: warning: capture of 'self' with non-sendable type 'WorkMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 4 | private let workDelay = DispatchTimeInterval.milliseconds(60)
 5 |
 6 | struct WorkMiddleware: Middleware {
   |        `- note: consider making struct 'WorkMiddleware' conform to the 'Sendable' protocol
 7 |     var session: CloudSyncSession
 8 |
   :
19 |             if prevWork?.id != work.id || prevWork?.retryCount != work.retryCount {
20 |                 dispatchQueue.asyncAfter(deadline: .now() + workDelay) {
21 |                     self.doWork(work)
   |                     `- warning: capture of 'self' with non-sendable type 'WorkMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |                 }
23 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/WorkMiddleware.swift:21:33: warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 |             if prevWork?.id != work.id || prevWork?.retryCount != work.retryCount {
20 |                 dispatchQueue.asyncAfter(deadline: .now() + workDelay) {
21 |                     self.doWork(work)
   |                                 `- warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |                 }
23 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncWork.swift:5:13: note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  3 | public let maxRecommendedRecordsPerOperation = 400
  4 |
  5 | public enum SyncWork: Identifiable {
    |             `- note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  6 |     public enum Result {
  7 |         case modify(ModifyOperation.Response)
[95/102] Compiling CloudSyncSession LoggerMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/RetryMiddleware.swift:32:21: warning: capture of 'self' with non-sendable type 'RetryMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 8 | }
 9 |
10 | struct RetryMiddleware: Middleware {
   |        `- note: consider making struct 'RetryMiddleware' conform to the 'Sendable' protocol
11 |     var session: CloudSyncSession
12 |
   :
30 |
31 |                 dispatchQueue.asyncAfter(deadline: .now() + retryInterval) {
32 |                     session.dispatch(event: .retryWork(work))
   |                     `- warning: capture of 'self' with non-sendable type 'RetryMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |                 }
34 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/RetryMiddleware.swift:32:56: warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
30 |
31 |                 dispatchQueue.asyncAfter(deadline: .now() + retryInterval) {
32 |                     session.dispatch(event: .retryWork(work))
   |                                                        `- warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |                 }
34 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncWork.swift:5:13: note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  3 | public let maxRecommendedRecordsPerOperation = 400
  4 |
  5 | public enum SyncWork: Identifiable {
    |             `- note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  6 |     public enum Result {
  7 |         case modify(ModifyOperation.Response)
[96/102] Compiling CloudSyncSession RetryMiddleware.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/RetryMiddleware.swift:32:21: warning: capture of 'self' with non-sendable type 'RetryMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 8 | }
 9 |
10 | struct RetryMiddleware: Middleware {
   |        `- note: consider making struct 'RetryMiddleware' conform to the 'Sendable' protocol
11 |     var session: CloudSyncSession
12 |
   :
30 |
31 |                 dispatchQueue.asyncAfter(deadline: .now() + retryInterval) {
32 |                     session.dispatch(event: .retryWork(work))
   |                     `- warning: capture of 'self' with non-sendable type 'RetryMiddleware' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |                 }
34 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/Middleware/RetryMiddleware.swift:32:56: warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
30 |
31 |                 dispatchQueue.asyncAfter(deadline: .now() + retryInterval) {
32 |                     session.dispatch(event: .retryWork(work))
   |                                                        `- warning: capture of 'work' with non-sendable type 'SyncWork' in a `@Sendable` closure; this is an error in the Swift 6 language mode
33 |                 }
34 |             }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncWork.swift:5:13: note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  3 | public let maxRecommendedRecordsPerOperation = 400
  4 |
  5 | public enum SyncWork: Identifiable {
    |             `- note: consider making enum 'SyncWork' conform to the 'Sendable' protocol
  6 |     public enum Result {
  7 |         case modify(ModifyOperation.Response)
[97/102] Compiling CloudSyncSession CKErrorExtensions.swift
[98/102] Compiling CloudSyncSession Middleware.swift
[99/102] Compiling CloudSyncSession CloudKitOperationHandler.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:94:13: warning: capture of 'self' with non-sendable type 'CloudKitOperationHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 27 |
 28 | /// An object that handles all of the key operations (fetch, modify, create zone, and create subscription) using the standard CloudKit APIs.
 29 | public class CloudKitOperationHandler: OperationHandler {
    |              `- note: class 'CloudKitOperationHandler' does not conform to the 'Sendable' protocol
 30 |     static let minThrottleDuration: TimeInterval = 1
 31 |     static let maxThrottleDuration: TimeInterval = 60 * 10
    :
 92 |
 93 |         DispatchQueue.main.asyncAfter(deadline: deadline) {
 94 |             self.operationQueue.addOperation(operation)
    |             `- warning: capture of 'self' with non-sendable type 'CloudKitOperationHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 95 |         }
 96 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:141:19: warning: 'modifyRecordsCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordsResultBlock instead
139 |         )
140 |
141 |         operation.modifyRecordsCompletionBlock = { serverRecords, deletedRecordIDs, error in
    |                   `- warning: 'modifyRecordsCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordsResultBlock instead
142 |             if let error = error {
143 |                 self.onOperationError(error)
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:193:19: warning: 'recordChangedBlock' was deprecated in macOS 12.0: Use recordWasChangedBlock instead, which surfaces per-record errors
191 |         }
192 |
193 |         operation.recordChangedBlock = { record in
    |                   `- warning: 'recordChangedBlock' was deprecated in macOS 12.0: Use recordWasChangedBlock instead, which surfaces per-record errors
194 |             changedRecords.append(record)
195 |         }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:201:19: warning: 'recordZoneFetchCompletionBlock' was deprecated in macOS 12.0: Use recordZoneFetchResultBlock instead
199 |         }
200 |
201 |         operation.recordZoneFetchCompletionBlock = { [weak self] _, newToken, _, newHasMore, _ in
    |                   `- warning: 'recordZoneFetchCompletionBlock' was deprecated in macOS 12.0: Use recordZoneFetchResultBlock instead
202 |             guard let self = self else {
203 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:219:19: warning: 'fetchRecordZoneChangesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZoneChangesResultBlock instead
217 |         }
218 |
219 |         operation.fetchRecordZoneChangesCompletionBlock = { [weak self] error in
    |                   `- warning: 'fetchRecordZoneChangesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZoneChangesResultBlock instead
220 |             guard let self = self else {
221 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:352:19: warning: 'fetchRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZonesResultBlock instead
350 |         let operation = CKFetchRecordZonesOperation(recordZoneIDs: [zoneID])
351 |
352 |         operation.fetchRecordZonesCompletionBlock = { ids, error in
    |                   `- warning: 'fetchRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZonesResultBlock instead
353 |             if let error = error {
354 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:398:19: warning: 'modifyRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordZonesResultBlock instead
396 |         )
397 |
398 |         operation.modifyRecordZonesCompletionBlock = { _, _, error in
    |                   `- warning: 'modifyRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordZonesResultBlock instead
399 |             if let error = error {
400 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:426:19: warning: 'fetchSubscriptionCompletionBlock' was deprecated in macOS 12.0: Use fetchSubscriptionsResultBlock instead
424 |         let operation = CKFetchSubscriptionsOperation(subscriptionIDs: [subscriptionID])
425 |
426 |         operation.fetchSubscriptionCompletionBlock = { ids, error in
    |                   `- warning: 'fetchSubscriptionCompletionBlock' was deprecated in macOS 12.0: Use fetchSubscriptionsResultBlock instead
427 |             if let error = error {
428 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:477:19: warning: 'modifySubscriptionsCompletionBlock' was deprecated in macOS 12.0: Use modifySubscriptionsResultBlock instead
475 |         )
476 |
477 |         operation.modifySubscriptionsCompletionBlock = { _, _, error in
    |                   `- warning: 'modifySubscriptionsCompletionBlock' was deprecated in macOS 12.0: Use modifySubscriptionsResultBlock instead
478 |             if let error = error {
479 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudSyncSession.swift:114:17: warning: capture of 'self' with non-sendable type 'CloudSyncSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  9 |
 10 | /// An object that manages a long-lived series of CloudKit syncing operations.
 11 | public class CloudSyncSession {
    |              `- note: class 'CloudSyncSession' does not conform to the 'Sendable' protocol
 12 |     /// Represents the state of the session.
 13 |     @Published public var state = SyncState()
    :
112 |         dispatchQueue.async {
113 |             func next(event: SyncEvent, middlewaresToRun: [AnyMiddleware]) -> SyncEvent {
114 |                 self.eventsPublisher.send(event)
    |                 `- warning: capture of 'self' with non-sendable type 'CloudSyncSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
115 |
116 |                 if let middleware = middlewaresToRun.last {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudSyncSession.swift:130:29: warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
128 |             }
129 |
130 |             _ = next(event: event, middlewaresToRun: Array(self.middlewares.reversed()))
    |                             `- warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
131 |         }
132 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncEvent.swift:3:13: note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 1 | import CloudKit
 2 |
 3 | public enum SyncEvent {
   |             `- note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 4 |     /// Should be dispatched when the session starts.
 5 |     case start
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudSyncSession.swift:114:17: warning: capture of 'self' with non-sendable type 'CloudSyncSession' in an isolated local function; this is an error in the Swift 6 language mode
  9 |
 10 | /// An object that manages a long-lived series of CloudKit syncing operations.
 11 | public class CloudSyncSession {
    |              `- note: class 'CloudSyncSession' does not conform to the 'Sendable' protocol
 12 |     /// Represents the state of the session.
 13 |     @Published public var state = SyncState()
    :
112 |         dispatchQueue.async {
113 |             func next(event: SyncEvent, middlewaresToRun: [AnyMiddleware]) -> SyncEvent {
114 |                 self.eventsPublisher.send(event)
    |                 `- warning: capture of 'self' with non-sendable type 'CloudSyncSession' in an isolated local function; this is an error in the Swift 6 language mode
115 |
116 |                 if let middleware = middlewaresToRun.last {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:94:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 92 |
 93 |         DispatchQueue.main.asyncAfter(deadline: deadline) {
 94 |             self.operationQueue.addOperation(operation)
    |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 95 |         }
 96 |     }
[100/102] Compiling CloudSyncSession CloudSyncSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:94:13: warning: capture of 'self' with non-sendable type 'CloudKitOperationHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 27 |
 28 | /// An object that handles all of the key operations (fetch, modify, create zone, and create subscription) using the standard CloudKit APIs.
 29 | public class CloudKitOperationHandler: OperationHandler {
    |              `- note: class 'CloudKitOperationHandler' does not conform to the 'Sendable' protocol
 30 |     static let minThrottleDuration: TimeInterval = 1
 31 |     static let maxThrottleDuration: TimeInterval = 60 * 10
    :
 92 |
 93 |         DispatchQueue.main.asyncAfter(deadline: deadline) {
 94 |             self.operationQueue.addOperation(operation)
    |             `- warning: capture of 'self' with non-sendable type 'CloudKitOperationHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 95 |         }
 96 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:141:19: warning: 'modifyRecordsCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordsResultBlock instead
139 |         )
140 |
141 |         operation.modifyRecordsCompletionBlock = { serverRecords, deletedRecordIDs, error in
    |                   `- warning: 'modifyRecordsCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordsResultBlock instead
142 |             if let error = error {
143 |                 self.onOperationError(error)
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:193:19: warning: 'recordChangedBlock' was deprecated in macOS 12.0: Use recordWasChangedBlock instead, which surfaces per-record errors
191 |         }
192 |
193 |         operation.recordChangedBlock = { record in
    |                   `- warning: 'recordChangedBlock' was deprecated in macOS 12.0: Use recordWasChangedBlock instead, which surfaces per-record errors
194 |             changedRecords.append(record)
195 |         }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:201:19: warning: 'recordZoneFetchCompletionBlock' was deprecated in macOS 12.0: Use recordZoneFetchResultBlock instead
199 |         }
200 |
201 |         operation.recordZoneFetchCompletionBlock = { [weak self] _, newToken, _, newHasMore, _ in
    |                   `- warning: 'recordZoneFetchCompletionBlock' was deprecated in macOS 12.0: Use recordZoneFetchResultBlock instead
202 |             guard let self = self else {
203 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:219:19: warning: 'fetchRecordZoneChangesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZoneChangesResultBlock instead
217 |         }
218 |
219 |         operation.fetchRecordZoneChangesCompletionBlock = { [weak self] error in
    |                   `- warning: 'fetchRecordZoneChangesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZoneChangesResultBlock instead
220 |             guard let self = self else {
221 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:352:19: warning: 'fetchRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZonesResultBlock instead
350 |         let operation = CKFetchRecordZonesOperation(recordZoneIDs: [zoneID])
351 |
352 |         operation.fetchRecordZonesCompletionBlock = { ids, error in
    |                   `- warning: 'fetchRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use fetchRecordZonesResultBlock instead
353 |             if let error = error {
354 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:398:19: warning: 'modifyRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordZonesResultBlock instead
396 |         )
397 |
398 |         operation.modifyRecordZonesCompletionBlock = { _, _, error in
    |                   `- warning: 'modifyRecordZonesCompletionBlock' was deprecated in macOS 12.0: Use modifyRecordZonesResultBlock instead
399 |             if let error = error {
400 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:426:19: warning: 'fetchSubscriptionCompletionBlock' was deprecated in macOS 12.0: Use fetchSubscriptionsResultBlock instead
424 |         let operation = CKFetchSubscriptionsOperation(subscriptionIDs: [subscriptionID])
425 |
426 |         operation.fetchSubscriptionCompletionBlock = { ids, error in
    |                   `- warning: 'fetchSubscriptionCompletionBlock' was deprecated in macOS 12.0: Use fetchSubscriptionsResultBlock instead
427 |             if let error = error {
428 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:477:19: warning: 'modifySubscriptionsCompletionBlock' was deprecated in macOS 12.0: Use modifySubscriptionsResultBlock instead
475 |         )
476 |
477 |         operation.modifySubscriptionsCompletionBlock = { _, _, error in
    |                   `- warning: 'modifySubscriptionsCompletionBlock' was deprecated in macOS 12.0: Use modifySubscriptionsResultBlock instead
478 |             if let error = error {
479 |                 os_log(
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudSyncSession.swift:114:17: warning: capture of 'self' with non-sendable type 'CloudSyncSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  9 |
 10 | /// An object that manages a long-lived series of CloudKit syncing operations.
 11 | public class CloudSyncSession {
    |              `- note: class 'CloudSyncSession' does not conform to the 'Sendable' protocol
 12 |     /// Represents the state of the session.
 13 |     @Published public var state = SyncState()
    :
112 |         dispatchQueue.async {
113 |             func next(event: SyncEvent, middlewaresToRun: [AnyMiddleware]) -> SyncEvent {
114 |                 self.eventsPublisher.send(event)
    |                 `- warning: capture of 'self' with non-sendable type 'CloudSyncSession' in a `@Sendable` closure; this is an error in the Swift 6 language mode
115 |
116 |                 if let middleware = middlewaresToRun.last {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudSyncSession.swift:130:29: warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
128 |             }
129 |
130 |             _ = next(event: event, middlewaresToRun: Array(self.middlewares.reversed()))
    |                             `- warning: capture of 'event' with non-sendable type 'SyncEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
131 |         }
132 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/SyncEvent.swift:3:13: note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 1 | import CloudKit
 2 |
 3 | public enum SyncEvent {
   |             `- note: consider making enum 'SyncEvent' conform to the 'Sendable' protocol
 4 |     /// Should be dispatched when the session starts.
 5 |     case start
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudSyncSession.swift:114:17: warning: capture of 'self' with non-sendable type 'CloudSyncSession' in an isolated local function; this is an error in the Swift 6 language mode
  9 |
 10 | /// An object that manages a long-lived series of CloudKit syncing operations.
 11 | public class CloudSyncSession {
    |              `- note: class 'CloudSyncSession' does not conform to the 'Sendable' protocol
 12 |     /// Represents the state of the session.
 13 |     @Published public var state = SyncState()
    :
112 |         dispatchQueue.async {
113 |             func next(event: SyncEvent, middlewaresToRun: [AnyMiddleware]) -> SyncEvent {
114 |                 self.eventsPublisher.send(event)
    |                 `- warning: capture of 'self' with non-sendable type 'CloudSyncSession' in an isolated local function; this is an error in the Swift 6 language mode
115 |
116 |                 if let middleware = middlewaresToRun.last {
/Users/admin/builder/spi-builder-workspace/Sources/CloudSyncSession/CloudKitOperationHandler.swift:94:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 92 |
 93 |         DispatchQueue.main.asyncAfter(deadline: deadline) {
 94 |             self.operationQueue.addOperation(operation)
    |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 95 |         }
 96 |     }
[101/102] Emitting module CloudSyncSession
[102/102] Compiling CloudSyncSession SyncWork.swift
Build complete! (25.95s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-pid",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "0.0.1",
            "upper_bound" : "1.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/ryanashcraft/swift-pid.git"
    }
  ],
  "manifest_display_name" : "CloudSyncSession",
  "name" : "CloudSyncSession",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "watchos",
      "version" : "8.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "CloudSyncSession",
      "targets" : [
        "CloudSyncSession"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CloudSyncSessionTests",
      "module_type" : "SwiftTarget",
      "name" : "CloudSyncSessionTests",
      "path" : "Tests/CloudSyncSessionTests",
      "sources" : [
        "CloudSyncSessionTests.swift",
        "SyncStateTests.swift"
      ],
      "target_dependencies" : [
        "CloudSyncSession"
      ],
      "type" : "test"
    },
    {
      "c99name" : "CloudSyncSession",
      "module_type" : "SwiftTarget",
      "name" : "CloudSyncSession",
      "path" : "Sources/CloudSyncSession",
      "product_dependencies" : [
        "PID"
      ],
      "product_memberships" : [
        "CloudSyncSession"
      ],
      "sources" : [
        "CloudKitOperationHandler.swift",
        "CloudSyncSession.swift",
        "Extensions/CKErrorExtensions.swift",
        "Middleware.swift",
        "Middleware/AccountStatusMiddleware.swift",
        "Middleware/ErrorMiddleware.swift",
        "Middleware/LoggerMiddleware.swift",
        "Middleware/RetryMiddleware.swift",
        "Middleware/SplittingMiddleware.swift",
        "Middleware/SubjectMiddleware.swift",
        "Middleware/WorkMiddleware.swift",
        "Middleware/ZoneMiddleware.swift",
        "OperationHandler.swift",
        "SyncEvent.swift",
        "SyncState.swift",
        "SyncWork.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.