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 sXPC, reference main (6d743b), with Swift 6.1 for macOS (SPM) on 28 Apr 2025 07:36:41 UTC.

Swift 6 data race errors: 2

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Alkenso/sXPC.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Alkenso/sXPC
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 6d743ba Update README.md
Cloned https://github.com/Alkenso/sXPC.git
Revision (git rev-parse @):
6d743ba952197e02468f2a3a51bf13be27ddbdee
SUCCESS checkout https://github.com/Alkenso/sXPC.git at main
Fetching https://github.com/Alkenso/SwiftSpellbook.git
[1/3379] Fetching swiftspellbook
Fetched https://github.com/Alkenso/SwiftSpellbook.git from cache (0.85s)
Computing version for https://github.com/Alkenso/SwiftSpellbook.git
Computed https://github.com/Alkenso/SwiftSpellbook.git at 0.4.2 (1.44s)
Creating working copy for https://github.com/Alkenso/SwiftSpellbook.git
Working copy of https://github.com/Alkenso/SwiftSpellbook.git resolved at 0.4.2
========================================
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": "sxpc",
      "name": "sXPC",
      "url": "https://github.com/Alkenso/sXPC.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/sXPC",
      "dependencies": [
        {
          "identity": "swiftspellbook",
          "name": "SwiftSpellbook",
          "url": "https://github.com/Alkenso/SwiftSpellbook.git",
          "version": "0.4.2",
          "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftSpellbook",
          "dependencies": [
          ]
        }
      ]
    }
  ]
}
Fetching https://github.com/Alkenso/sXPC.git
[1/509] Fetching sxpc
Fetched https://github.com/Alkenso/sXPC.git from cache (0.65s)
Fetching https://github.com/Alkenso/SwiftSpellbook.git from cache
Fetched https://github.com/Alkenso/SwiftSpellbook.git from cache (0.44s)
Computing version for https://github.com/Alkenso/SwiftSpellbook.git
Computed https://github.com/Alkenso/SwiftSpellbook.git at 0.4.2 (0.49s)
Creating working copy for https://github.com/Alkenso/sXPC.git
Working copy of https://github.com/Alkenso/sXPC.git resolved at main (6d743ba)
Creating working copy for https://github.com/Alkenso/SwiftSpellbook.git
Working copy of https://github.com/Alkenso/SwiftSpellbook.git resolved at 0.4.2
warning: '.resolve-product-dependencies': dependency 'sxpc' is not used by any target
Found 1 product dependencies
  - SwiftSpellbook
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/Alkenso/sXPC.git
https://github.com/Alkenso/sXPC.git
{
  "dependencies" : [
    {
      "identity" : "swiftspellbook",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "0.3.3",
            "upper_bound" : "1.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/Alkenso/SwiftSpellbook.git"
    }
  ],
  "manifest_display_name" : "sXPC",
  "name" : "sXPC",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "sXPC",
      "targets" : [
        "sXPC"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "sXPCTests",
      "module_type" : "SwiftTarget",
      "name" : "sXPCTests",
      "path" : "Tests/sXPCTests",
      "product_dependencies" : [
        "SpellbookFoundation",
        "SpellbookTestUtils"
      ],
      "sources" : [
        "XPCClientTests.swift",
        "XPCTransportTests.swift"
      ],
      "target_dependencies" : [
        "sXPC"
      ],
      "type" : "test"
    },
    {
      "c99name" : "sXPC",
      "module_type" : "SwiftTarget",
      "name" : "sXPC",
      "path" : "Sources/sXPC",
      "product_dependencies" : [
        "SpellbookFoundation"
      ],
      "product_memberships" : [
        "sXPC"
      ],
      "sources" : [
        "XPC Transport/XPCTransportConnection.swift",
        "XPC Transport/XPCTransportListener.swift",
        "XPC Transport/XPCTransportMessage.swift",
        "XPC Transport/XPCTransportUtils.swift",
        "XPCConnection/Utils.swift",
        "XPCConnection/XPCClient.swift",
        "XPCConnection/XPCConnection.swift",
        "XPCConnection/XPCInterface.swift",
        "XPCConnection/XPCListener.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/4] Write sources
[2/4] Write swift-version-2F0A5646E1D333AE.txt
[3/4] Compiling SpellbookFoundationObjC SpellbookObjC.mm
[5/59] Emitting module SpellbookFoundation
[6/65] Compiling SpellbookFoundation Extensions - DispatchQueue.swift
[7/65] Compiling SpellbookFoundation Extensions - Locks.swift
[8/65] Compiling SpellbookFoundation Extensions - Task.swift
[9/65] Compiling SpellbookFoundation PosixLocks.swift
[10/65] Compiling SpellbookFoundation SynchronizationUtils.swift
[11/65] Compiling SpellbookFoundation Synchronized.swift
[12/65] Compiling SpellbookFoundation BinaryParsingError.swift
[13/65] Compiling SpellbookFoundation BinaryReader.swift
[14/65] Compiling SpellbookFoundation BinaryReaderInput.swift
[15/65] Compiling SpellbookFoundation BinaryWriter.swift
[16/65] Compiling SpellbookFoundation BinaryWriterOutput.swift
[17/65] Compiling SpellbookFoundation Extensions - Publisher.swift
[18/65] Compiling SpellbookFoundation Types.swift
[19/65] Compiling SpellbookFoundation EventAsk.swift
[20/65] Compiling SpellbookFoundation EventNotify.swift
[21/65] Compiling SpellbookFoundation Observable.swift
[22/65] Compiling SpellbookFoundation ValueObserving.swift
[23/65] Compiling SpellbookFoundation ValueStore.swift
[24/65] Compiling SpellbookFoundation Unsafe.swift
[25/65] Compiling SpellbookFoundation Exceptions.swift
[26/65] Compiling SpellbookFoundation DeviceInfo.swift
[27/65] Compiling SpellbookFoundation Atomic.swift
[28/65] Compiling SpellbookFoundation BlockingQueue.swift
[29/65] Compiling SpellbookFoundation ConcurrentBlockOperation.swift
[30/65] Compiling SpellbookFoundation SynchronousExecutor.swift
[31/65] Compiling SpellbookFoundation Boxing.swift
[32/65] Compiling SpellbookFoundation Closure.swift
[33/65] Compiling SpellbookFoundation CommonError.swift
[34/65] Compiling SpellbookFoundation Refreshable.swift
[35/65] Compiling SpellbookFoundation Resource (RAII).swift
[36/65] Compiling SpellbookFoundation DictionaryWriter.swift
[37/65] Compiling SpellbookFoundation Extensions - Bundle.swift
[38/65] Compiling SpellbookFoundation Extensions - FileManager.swift
[39/65] Compiling SpellbookFoundation FileEnumerator.swift
[40/65] Compiling SpellbookFoundation FileStore.swift
[41/65] Compiling SpellbookFoundation TemporaryDirectory.swift
[42/65] Compiling SpellbookFoundation Extensions - Comparable.swift
[43/65] Compiling SpellbookFoundation Extensions - Formatters.swift
[44/65] Compiling SpellbookFoundation Extensions - NSError.swift
[45/65] Compiling SpellbookFoundation Extensions - Other.swift
[46/65] Compiling SpellbookFoundation Extensions - StandardTypes.swift
[47/65] Compiling SpellbookFoundation ObjectBuilder.swift
[48/65] Compiling SpellbookFoundation SBUnit.swift
[49/65] Compiling SpellbookFoundation SpellbookLog.swift
[50/65] Compiling SpellbookFoundation Utils.swift
[51/65] Compiling SpellbookFoundation WildcardExpression.swift
[52/65] Compiling SpellbookFoundation DictionaryCodingKey.swift
[53/65] Compiling SpellbookFoundation DictionaryReader.swift
[54/65] Compiling SpellbookFoundation Extensions - CoreGraphics.swift
[55/65] Compiling SpellbookFoundation AuditToken.swift
[56/65] Compiling SpellbookFoundation BridgedCEnum.swift
[57/65] Compiling SpellbookFoundation IOKitError.swift
[58/65] Compiling SpellbookFoundation Mach.swift
[59/65] Compiling SpellbookFoundation POD+Swift.swift
[60/65] Compiling SpellbookFoundation Proxies.swift
[61/65] Compiling SpellbookFoundation Benchmark.swift
[62/65] Compiling SpellbookFoundation CancellationToken.swift
[63/65] Compiling SpellbookFoundation Environment.swift
[64/65] Compiling SpellbookFoundation Extensions - Codable.swift
[65/65] Compiling SpellbookFoundation Extensions - Collections.swift
[66/75] Compiling sXPC XPCConnection.swift
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCConnection.swift:186:13: warning: let '_currentConnectionStorage' is not concurrency-safe because non-'Sendable' type 'Synchronized<[ObjectIdentifier : Weak<AnyObject>]>' may have shared mutable state; this is an error in the Swift 6 language mode
184 | }
185 |
186 | private let _currentConnectionStorage = Synchronized<[ObjectIdentifier: Weak<AnyObject>]>(.serial)
    |             `- warning: let '_currentConnectionStorage' is not concurrency-safe because non-'Sendable' type 'Synchronized<[ObjectIdentifier : Weak<AnyObject>]>' may have shared mutable state; this is an error in the Swift 6 language mode
187 |
188 | extension XPCConnection {
/Users/admin/builder/spi-builder-workspace/.build/checkouts/SwiftSpellbook/Sources/SpellbookFoundation/Threading & Concurrency/Synchronized.swift:35:20: note: generic class 'Synchronized' does not conform to the 'Sendable' protocol
 33 |
 34 | /// Wrapper around DispatchQueue for convenient and safe multithreaded access to any value.
 35 | public final class Synchronized<Value> {
    |                    `- note: generic class 'Synchronized' does not conform to the 'Sendable' protocol
 36 |     private let _queue: DispatchQueue
 37 |     private var _value: Value
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCConnection.swift:26:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'SpellbookFoundation'
 24 |
 25 | import Foundation
 26 | import SpellbookFoundation
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'SpellbookFoundation'
 27 |
 28 | /// Bidirectional XPC Connection
    :
184 | }
185 |
186 | private let _currentConnectionStorage = Synchronized<[ObjectIdentifier: Weak<AnyObject>]>(.serial)
    |             |- note: add '@MainActor' to make let '_currentConnectionStorage' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
187 |
188 | extension XPCConnection {
[67/75] Compiling sXPC XPCListener.swift
[68/75] Compiling sXPC XPCInterface.swift
[69/75] Compiling sXPC Utils.swift
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/Utils.swift:56:24: warning: static property 'defaultClasses' is not concurrency-safe because non-'Sendable' type 'Set<NSObject>' may have shared mutable state; this is an error in the Swift 6 language mode
 54 |
 55 | extension NSXPCInterface {
 56 |     private static let defaultClasses = NSSet(array: [
    |                        `- warning: static property 'defaultClasses' is not concurrency-safe because non-'Sendable' type 'Set<NSObject>' may have shared mutable state; this is an error in the Swift 6 language mode
 57 |         NSArray.self,
 58 |         NSString.self,
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/objc/NSObject.h:53:12: note: class 'NSObject' does not conform to the 'Sendable' protocol
 51 | OBJC_ROOT_CLASS
 52 | OBJC_EXPORT
 53 | @interface NSObject <NSObject> {
    |            `- note: class 'NSObject' does not conform to the 'Sendable' protocol
 54 | #pragma clang diagnostic push
 55 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/Utils.swift:25:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ObjectiveC'
 23 |  */
 24 |
 25 | import Foundation
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ObjectiveC'
 26 |
 27 | extension NSCoder {
    :
 54 |
 55 | extension NSXPCInterface {
 56 |     private static let defaultClasses = NSSet(array: [
    |                        |- note: add '@MainActor' to make static property 'defaultClasses' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 57 |         NSArray.self,
 58 |         NSString.self,
[70/75] Compiling sXPC XPCTransportUtils.swift
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportUtils.swift:51:36: warning: capture of 'reply' with non-sendable type '(Result<T, any Error>) -> Void' in a '@Sendable' closure
49 |                     return value
50 |                 }
51 |                 finalQueue.async { reply(decodedResult) }
   |                                    |- warning: capture of 'reply' with non-sendable type '(Result<T, any Error>) -> Void' in a '@Sendable' closure
   |                                    `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
52 |             }
53 |         }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportUtils.swift:51:36: warning: capture of 'reply' with non-sendable type '(Result<T, any Error>) -> Void' in a '@Sendable' closure
49 |                     return value
50 |                 }
51 |                 finalQueue.async { reply(decodedResult) }
   |                                    |- warning: capture of 'reply' with non-sendable type '(Result<T, any Error>) -> Void' in a '@Sendable' closure
   |                                    `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
52 |             }
53 |         }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportUtils.swift:51:42: warning: capture of 'decodedResult' with non-sendable type 'Result<T, any Error>' in a '@Sendable' closure
41 |
42 | extension XPCReply {
43 |     static func decode<T: Decodable>(_ type: T.Type, reply: @escaping (Result<T, Error>) -> Void) -> XPCReply {
   |                        `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
44 |         self.init { processingQueue, finalQueue, rawResult in
45 |             processingQueue.async {
   :
49 |                     return value
50 |                 }
51 |                 finalQueue.async { reply(decodedResult) }
   |                                          `- warning: capture of 'decodedResult' with non-sendable type 'Result<T, any Error>' in a '@Sendable' closure
52 |             }
53 |         }
[71/75] Compiling sXPC XPCTransportListener.swift
[72/75] Compiling sXPC XPCTransportMessage.swift
[73/75] Compiling sXPC XPCClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCClient.swift:96:13: warning: capture of 'self' with non-sendable type 'XPCClient<RemoteInterface, ExportedInterface, ConnectedState>' in a '@Sendable' closure
 27 |
 28 | /// XPCClient is a wrapper around XPCConnection that provide KeepAlive ability for the connection.
 29 | public class XPCClient<RemoteInterface, ExportedInterface, ConnectedState> {
    |              `- note: generic class 'XPCClient' does not conform to the 'Sendable' protocol
 30 |     private typealias Connection = XPCConnection<RemoteInterface, ExportedInterface>
 31 |
    :
 94 |     public func invalidate() {
 95 |         queue.async { [self] in
 96 |             requestEndpointHandler = nil
    |             `- warning: capture of 'self' with non-sendable type 'XPCClient<RemoteInterface, ExportedInterface, ConnectedState>' in a '@Sendable' closure
 97 |             connection.invalidate()
 98 |         }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCClient.swift:157:17: warning: capture of 'self' with non-sendable type 'XPCClient<RemoteInterface, ExportedInterface, ConnectedState>' in a '@Sendable' closure
 27 |
 28 | /// XPCClient is a wrapper around XPCConnection that provide KeepAlive ability for the connection.
 29 | public class XPCClient<RemoteInterface, ExportedInterface, ConnectedState> {
    |              `- note: generic class 'XPCClient' does not conform to the 'Sendable' protocol
 30 |     private typealias Connection = XPCConnection<RemoteInterface, ExportedInterface>
 31 |
    :
155 |         queue.async { [self] in
156 |             if dropState {
157 |                 connectedStateStore.update(nil)
    |                 `- warning: capture of 'self' with non-sendable type 'XPCClient<RemoteInterface, ExportedInterface, ConnectedState>' in a '@Sendable' closure
158 |             }
159 |
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCClient.swift:163:17: warning: capture of 'requestEndpointHandler' with non-sendable type '(@escaping (XPCConnectionInit?) -> Void) -> Void' in a '@Sendable' closure
161 |
162 |             queue.asyncAfter(deadline: .now() + (immediately ? 0 : reconnectDelay)) {
163 |                 requestEndpointHandler { [weak self] endpoint in
    |                 |- warning: capture of 'requestEndpointHandler' with non-sendable type '(@escaping (XPCConnectionInit?) -> Void) -> Void' in a '@Sendable' closure
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
164 |                     guard let self = self else { return }
165 |                     if let endpoint {
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCClient.swift:163:48: warning: capture of 'self' with non-sendable type 'XPCClient<RemoteInterface, ExportedInterface, ConnectedState>' in a '@Sendable' closure
 27 |
 28 | /// XPCClient is a wrapper around XPCConnection that provide KeepAlive ability for the connection.
 29 | public class XPCClient<RemoteInterface, ExportedInterface, ConnectedState> {
    |              `- note: generic class 'XPCClient' does not conform to the 'Sendable' protocol
 30 |     private typealias Connection = XPCConnection<RemoteInterface, ExportedInterface>
 31 |
    :
161 |
162 |             queue.asyncAfter(deadline: .now() + (immediately ? 0 : reconnectDelay)) {
163 |                 requestEndpointHandler { [weak self] endpoint in
    |                                                `- warning: capture of 'self' with non-sendable type 'XPCClient<RemoteInterface, ExportedInterface, ConnectedState>' in a '@Sendable' closure
164 |                     guard let self = self else { return }
165 |                     if let endpoint {
[74/75] Emitting module sXPC
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/Utils.swift:56:24: warning: static property 'defaultClasses' is not concurrency-safe because non-'Sendable' type 'Set<NSObject>' may have shared mutable state; this is an error in the Swift 6 language mode
 54 |
 55 | extension NSXPCInterface {
 56 |     private static let defaultClasses = NSSet(array: [
    |                        `- warning: static property 'defaultClasses' is not concurrency-safe because non-'Sendable' type 'Set<NSObject>' may have shared mutable state; this is an error in the Swift 6 language mode
 57 |         NSArray.self,
 58 |         NSString.self,
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/objc/NSObject.h:53:12: note: class 'NSObject' does not conform to the 'Sendable' protocol
 51 | OBJC_ROOT_CLASS
 52 | OBJC_EXPORT
 53 | @interface NSObject <NSObject> {
    |            `- note: class 'NSObject' does not conform to the 'Sendable' protocol
 54 | #pragma clang diagnostic push
 55 | #pragma clang diagnostic ignored "-Wobjc-interface-ivars"
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/Utils.swift:25:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ObjectiveC'
 23 |  */
 24 |
 25 | import Foundation
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'ObjectiveC'
 26 |
 27 | extension NSCoder {
    :
 54 |
 55 | extension NSXPCInterface {
 56 |     private static let defaultClasses = NSSet(array: [
    |                        |- note: add '@MainActor' to make static property 'defaultClasses' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 57 |         NSArray.self,
 58 |         NSString.self,
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCConnection.swift:186:13: warning: let '_currentConnectionStorage' is not concurrency-safe because non-'Sendable' type 'Synchronized<[ObjectIdentifier : Weak<AnyObject>]>' may have shared mutable state; this is an error in the Swift 6 language mode
184 | }
185 |
186 | private let _currentConnectionStorage = Synchronized<[ObjectIdentifier: Weak<AnyObject>]>(.serial)
    |             `- warning: let '_currentConnectionStorage' is not concurrency-safe because non-'Sendable' type 'Synchronized<[ObjectIdentifier : Weak<AnyObject>]>' may have shared mutable state; this is an error in the Swift 6 language mode
187 |
188 | extension XPCConnection {
/Users/admin/builder/spi-builder-workspace/.build/checkouts/SwiftSpellbook/Sources/SpellbookFoundation/Threading & Concurrency/Synchronized.swift:35:20: note: generic class 'Synchronized' does not conform to the 'Sendable' protocol
 33 |
 34 | /// Wrapper around DispatchQueue for convenient and safe multithreaded access to any value.
 35 | public final class Synchronized<Value> {
    |                    `- note: generic class 'Synchronized' does not conform to the 'Sendable' protocol
 36 |     private let _queue: DispatchQueue
 37 |     private var _value: Value
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCConnection.swift:26:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'SpellbookFoundation'
 24 |
 25 | import Foundation
 26 | import SpellbookFoundation
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'SpellbookFoundation'
 27 |
 28 | /// Bidirectional XPC Connection
    :
184 | }
185 |
186 | private let _currentConnectionStorage = Synchronized<[ObjectIdentifier: Weak<AnyObject>]>(.serial)
    |             |- note: add '@MainActor' to make let '_currentConnectionStorage' part of global actor 'MainActor'
    |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
187 |
188 | extension XPCConnection {
[75/75] Compiling sXPC XPCTransportConnection.swift
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:96:99: warning: type '(UUID, Result<XPCPayload, any Error>) -> ()' does not conform to the 'Sendable' protocol
 94 |     public func setReceiveMessageHandler<Message: Decodable>(_ type: Message.Type = Message.self, handler: @escaping (Message) -> Void) {
 95 |         let decoder = JSONDecoder()
 96 |         decoder.userInfo[.replySender] = { [weak self] in self?.sendReply(id: $0, response: $1) } as XPCTransportMessageReplySender
    |                                                                                                   |- warning: type '(UUID, Result<XPCPayload, any Error>) -> ()' does not conform to the 'Sendable' protocol
    |                                                                                                   `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 97 |
 98 |         receiveDataHandler = { [queue] in
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:100:27: warning: capture of 'handler' with non-sendable type '(Message) -> Void' in a '@Sendable' closure
 98 |         receiveDataHandler = { [queue] in
 99 |             let value = try decoder.decode(Message.self, from: $0)
100 |             queue.async { handler(value) }
    |                           |- warning: capture of 'handler' with non-sendable type '(Message) -> Void' in a '@Sendable' closure
    |                           `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
101 |         }
102 |     }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:100:35: warning: capture of 'value' with non-sendable type 'Message' in a '@Sendable' closure
 92 |     public var stateHandler: ((XPCTransportConnectionState) -> Void)?
 93 |
 94 |     public func setReceiveMessageHandler<Message: Decodable>(_ type: Message.Type = Message.self, handler: @escaping (Message) -> Void) {
    |                                          `- note: consider making generic parameter 'Message' conform to the 'Sendable' protocol
 95 |         let decoder = JSONDecoder()
 96 |         decoder.userInfo[.replySender] = { [weak self] in self?.sendReply(id: $0, response: $1) } as XPCTransportMessageReplySender
    :
 98 |         receiveDataHandler = { [queue] in
 99 |             let value = try decoder.decode(Message.self, from: $0)
100 |             queue.async { handler(value) }
    |                                   `- warning: capture of 'value' with non-sendable type 'Message' in a '@Sendable' closure
101 |         }
102 |     }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:140:13: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
138 |     public func invalidate() {
139 |         queue.async {
140 |             self.xpc = nil
    |             `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
141 |             self.connection.invalidate()
142 |         }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:153:72: warning: type '(XPCReply) -> ()' does not conform to the 'Sendable' protocol
151 |             let encoder = JSONEncoder()
152 |             var replies: [XPCReply] = []
153 |             encoder.userInfo[.replyCollector] = { replies.append($0) } as XPCTransportMessageReplyCollector
    |                                                                        |- warning: type '(XPCReply) -> ()' does not conform to the 'Sendable' protocol
    |                                                                        `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
154 |
155 |             let data = try encoder.encode(message)
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:171:26: warning: capture of 'response' with non-sendable type 'Result<XPCPayload, any Error>' in a '@Sendable' closure
169 |     private func sendReply(id: UUID, response: Result<XPCPayload, Error>) {
170 |         messageQueue.async {
171 |             let result = response.flatMap { value in Result { try value.data() } }
    |                          `- warning: capture of 'response' with non-sendable type 'Result<XPCPayload, any Error>' in a '@Sendable' closure
172 |             self.connectionQueue.async {
173 |                 self.connection
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportUtils.swift:27:8: note: consider making struct 'XPCPayload' conform to the 'Sendable' protocol
25 | import Foundation
26 |
27 | struct XPCPayload {
   |        `- note: consider making struct 'XPCPayload' conform to the 'Sendable' protocol
28 |     let data: () throws -> Data
29 | }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:172:13: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
170 |         messageQueue.async {
171 |             let result = response.flatMap { value in Result { try value.data() } }
172 |             self.connectionQueue.async {
    |             `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
173 |                 self.connection
174 |                     .remoteObjectProxy()
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:173:17: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
171 |             let result = response.flatMap { value in Result { try value.data() } }
172 |             self.connectionQueue.async {
173 |                 self.connection
    |                 `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
174 |                     .remoteObjectProxy()
175 |                     .sendReply(id: id, data: result.success, error: result.failure)
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:184:44: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
182 |
183 |         messageQueue.async {
184 |             guard let receiveDataHandler = self.receiveDataHandler else {
    |                                            `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
185 |                 confirmation(nil, CommonError.fatal("Receiving is not implemented"))
186 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:185:17: warning: capture of 'confirmation' with non-sendable type '(Data?, (any Error)?) -> Void' in a '@Sendable' closure
183 |         messageQueue.async {
184 |             guard let receiveDataHandler = self.receiveDataHandler else {
185 |                 confirmation(nil, CommonError.fatal("Receiving is not implemented"))
    |                 |- warning: capture of 'confirmation' with non-sendable type '(Data?, (any Error)?) -> Void' in a '@Sendable' closure
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
186 |                 return
187 |             }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:204:43: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
202 |     private func fulfillPendingReply(to ids: [UUID], with response: Result<Data, Error>) {
203 |         connectionQueue.async {
204 |             let replys = ids.compactMap { self.pendingReplies.removeValue(forKey: $0) }
    |                                           `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
205 |             replys.forEach { $0.reply(self.messageQueue, self.queue, response) }
206 |         }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:204:43: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in an isolated closure; this is an error in the Swift 6 language mode
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
202 |     private func fulfillPendingReply(to ids: [UUID], with response: Result<Data, Error>) {
203 |         connectionQueue.async {
204 |             let replys = ids.compactMap { self.pendingReplies.removeValue(forKey: $0) }
    |                                           `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in an isolated closure; this is an error in the Swift 6 language mode
205 |             replys.forEach { $0.reply(self.messageQueue, self.queue, response) }
206 |         }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:205:39: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in an isolated closure; this is an error in the Swift 6 language mode
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
203 |         connectionQueue.async {
204 |             let replys = ids.compactMap { self.pendingReplies.removeValue(forKey: $0) }
205 |             replys.forEach { $0.reply(self.messageQueue, self.queue, response) }
    |                                       `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in an isolated closure; this is an error in the Swift 6 language mode
206 |         }
207 |     }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:214:21: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
212 |             self.connectionQueue.async {
213 |                 if response == serverHello {
214 |                     self.updateState(.connected)
    |                     `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
215 |                 } else if error != nil {
216 |                     self.connection.invalidate()
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:258:13: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
256 |         self.state = state
257 |         queue.async {
258 |             self.stateHandler?(state)
    |             `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
259 |         }
260 |     }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:258:32: warning: capture of 'state' with non-sendable type 'XPCTransportConnectionState' in a '@Sendable' closure
 41 | }
 42 |
 43 | public enum XPCTransportConnectionState: String, Hashable, CaseIterable {
    |             `- note: consider making enum 'XPCTransportConnectionState' conform to the 'Sendable' protocol
 44 |     /// Connection is performing initial handshake (initial connect or reconnect).
 45 |     /// Usually a good point to prepare/reset related program state
    :
256 |         self.state = state
257 |         queue.async {
258 |             self.stateHandler?(state)
    |                                `- warning: capture of 'state' with non-sendable type 'XPCTransportConnectionState' in a '@Sendable' closure
259 |         }
260 |     }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:264:29: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
262 |     private func reconnect() {
263 |         connectionQueue.async {
264 |             guard let xpc = self.xpc, let reconnectDelay = self.reconnectDelay else {
    |                             `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
265 |                 self.updateState(.invalidated)
266 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:269:17: warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
 56 | }
 57 |
 58 | public class XPCTransportConnection {
    |              `- note: class 'XPCTransportConnection' does not conform to the 'Sendable' protocol
 59 |     private let connectionQueue = DispatchQueue(label: "XPCTransportConnection.connection.queue")
 60 |     private var messageQueue = DispatchQueue(label: "XPCTransportConnection.message.queue")
    :
267 |             }
268 |             self.connectionQueue.asyncAfter(deadline: .now() + reconnectDelay) {
269 |                 self.connection = XPCConnection(xpc, remoteInterface: .transport, exportedInterface: .transport)
    |                 `- warning: capture of 'self' with non-sendable type 'XPCTransportConnection' in a '@Sendable' closure
270 |                 self.prepareAndResume(connection: self.connection)
271 |             }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPC Transport/XPCTransportConnection.swift:269:49: warning: capture of 'xpc' with non-sendable type 'XPCConnectionInit' in a '@Sendable' closure
267 |             }
268 |             self.connectionQueue.asyncAfter(deadline: .now() + reconnectDelay) {
269 |                 self.connection = XPCConnection(xpc, remoteInterface: .transport, exportedInterface: .transport)
    |                                                 `- warning: capture of 'xpc' with non-sendable type 'XPCConnectionInit' in a '@Sendable' closure
270 |                 self.prepareAndResume(connection: self.connection)
271 |             }
/Users/admin/builder/spi-builder-workspace/Sources/sXPC/XPCConnection/XPCConnection.swift:215:13: note: consider making enum 'XPCConnectionInit' conform to the 'Sendable' protocol
213 | // MARK: - XPCConnection Auxiliary
214 |
215 | public enum XPCConnectionInit {
    |             `- note: consider making enum 'XPCConnectionInit' conform to the 'Sendable' protocol
216 |     case service(_ name: String)
217 |     case machService(_ name: String, options: NSXPCConnection.Options)
Build complete! (7.35s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swiftspellbook",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "0.3.3",
            "upper_bound" : "1.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/Alkenso/SwiftSpellbook.git"
    }
  ],
  "manifest_display_name" : "sXPC",
  "name" : "sXPC",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "sXPC",
      "targets" : [
        "sXPC"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "sXPCTests",
      "module_type" : "SwiftTarget",
      "name" : "sXPCTests",
      "path" : "Tests/sXPCTests",
      "product_dependencies" : [
        "SpellbookFoundation",
        "SpellbookTestUtils"
      ],
      "sources" : [
        "XPCClientTests.swift",
        "XPCTransportTests.swift"
      ],
      "target_dependencies" : [
        "sXPC"
      ],
      "type" : "test"
    },
    {
      "c99name" : "sXPC",
      "module_type" : "SwiftTarget",
      "name" : "sXPC",
      "path" : "Sources/sXPC",
      "product_dependencies" : [
        "SpellbookFoundation"
      ],
      "product_memberships" : [
        "sXPC"
      ],
      "sources" : [
        "XPC Transport/XPCTransportConnection.swift",
        "XPC Transport/XPCTransportListener.swift",
        "XPC Transport/XPCTransportMessage.swift",
        "XPC Transport/XPCTransportUtils.swift",
        "XPCConnection/Utils.swift",
        "XPCConnection/XPCClient.swift",
        "XPCConnection/XPCConnection.swift",
        "XPCConnection/XPCInterface.swift",
        "XPCConnection/XPCListener.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Done.