The Swift Package Index logo.Swift Package Index

Build Information

Successful build of NWWebSocket, reference 0.5.10 (3d3b8a), with Swift 6.1 for macOS (SPM) on 5 Mar 2026 23:47:11 UTC.

Swift 6 data race errors: 1

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.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/pusher/NWWebSocket.git
Reference: 0.5.10
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/pusher/NWWebSocket
 * tag               0.5.10     -> FETCH_HEAD
HEAD is now at 3d3b8a2 Fix ENODATA and unrecognised POSIX errors not treated as disconnections
Cloned https://github.com/pusher/NWWebSocket.git
Revision (git rev-parse @):
3d3b8a24b17a0f079195031ca86af117fc158bef
SUCCESS checkout https://github.com/pusher/NWWebSocket.git at 0.5.10
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/pusher/NWWebSocket.git
https://github.com/pusher/NWWebSocket.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "NWWebSocket",
  "name" : "NWWebSocket",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "NWWebSocket",
      "targets" : [
        "NWWebSocket"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "NWWebSocketTests",
      "module_type" : "SwiftTarget",
      "name" : "NWWebSocketTests",
      "path" : "Tests/NWWebSocketTests",
      "sources" : [
        "NWWebSocketTests.swift",
        "Server/NWServerConnection.swift",
        "Server/NWWebSocketServer.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "NWWebSocket"
      ],
      "type" : "test"
    },
    {
      "c99name" : "NWWebSocket",
      "module_type" : "SwiftTarget",
      "name" : "NWWebSocket",
      "path" : "Sources/NWWebSocket",
      "product_memberships" : [
        "NWWebSocket"
      ],
      "sources" : [
        "Extension/NWConnection+Extension.swift",
        "Model/Client/NWWebSocket.swift",
        "Protocol/WebSocketConnection.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
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/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/6] Compiling NWWebSocket NWWebSocket.swift
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:145:13: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
143 |         connection = NWConnection(to: endpoint, using: parameters)
144 |         connection?.stateUpdateHandler = { [weak self] state in
145 |             self?.stateDidChange(to: state)
    |             `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
146 |         }
147 |         connection?.betterPathUpdateHandler = { [weak self] isAvailable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:148:13: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
146 |         }
147 |         connection?.betterPathUpdateHandler = { [weak self] isAvailable in
148 |             self?.betterPath(isAvailable: isAvailable)
    |             `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 |         }
150 |         connection?.viabilityUpdateHandler = { [weak self] isViable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:151:13: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
149 |         }
150 |         connection?.viabilityUpdateHandler = { [weak self] isViable in
151 |             self?.viabilityDidChange(isViable: isViable)
    |             `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
152 |         }
153 |         listen()
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:186:30: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
184 |
185 |         connection?.receiveMessage { [weak self] (data, context, _, error) in
186 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
187 |                 return
188 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:211:30: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
209 |
210 |         pingTimer = .scheduledTimer(withTimeInterval: interval, repeats: true) { [weak self] _ in
211 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
212 |                 return
213 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:224:30: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
222 |         let metadata = NWProtocolWebSocket.Metadata(opcode: .ping)
223 |         metadata.setPongHandler(connectionQueue) { [weak self] error in
224 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
225 |                 return
226 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:349:30: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
347 |         connection = NWConnection(to: endpoint, using: parameters)
348 |         connection?.stateUpdateHandler = { [weak self] state in
349 |             guard let self = self else { return }
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
350 |             self.stateDidChange(to: state)
351 |
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:355:17: warning: capture of 'completionHandler' with non-sendable type '(Result<any WebSocketConnection, NWError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
353 |             switch state {
354 |             case .ready:
355 |                 completionHandler(.success(self))
    |                 |- warning: capture of 'completionHandler' with non-sendable type '(Result<any WebSocketConnection, NWError>) -> Void' in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
356 |             case .failed(let error):
357 |                 completionHandler(.failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:363:13: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
361 |         }
362 |         connection?.betterPathUpdateHandler = { [weak self] isAvailable in
363 |             self?.betterPath(isAvailable: isAvailable)
    |             `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
364 |         }
365 |         connection?.viabilityUpdateHandler = { [weak self] isViable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:366:13: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
364 |         }
365 |         connection?.viabilityUpdateHandler = { [weak self] isViable in
366 |             self?.viabilityDidChange(isViable: isViable)
    |             `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
367 |         }
368 |         listen()
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:425:30: warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
  3 |
  4 | /// A WebSocket client that manages a socket connection.
  5 | open class NWWebSocket: WebSocketConnection {
    |            `- note: class 'NWWebSocket' does not conform to the 'Sendable' protocol
  6 |
  7 |     // MARK: - Public properties
    :
423 |                          isComplete: true,
424 |                          completion: .contentProcessed({ [weak self] error in
425 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a '@Sendable' closure
426 |                 return
427 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:503:40: warning: reference to captured var 'connectionToTearDown' in concurrently-executing code
501 |             // Small delay to let any in-flight callbacks complete
502 |             DispatchQueue.global().asyncAfter(deadline: .now() + 0.1) {
503 |                 guard let connection = connectionToTearDown else { return }
    |                                        `- warning: reference to captured var 'connectionToTearDown' in concurrently-executing code
504 |
505 |                 // Only cancel if not already cancelled
[4/6] Compiling NWWebSocket NWConnection+Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Extension/NWConnection+Extension.swift:3:17: warning: var '_intentionalDisconnection' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 1 | import Network
 2 |
 3 | fileprivate var _intentionalDisconnection: Bool = false
   |                 |- warning: var '_intentionalDisconnection' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                 |- note: convert '_intentionalDisconnection' to a 'let' constant to make 'Sendable' shared state immutable
   |                 |- note: add '@MainActor' to make var '_intentionalDisconnection' part of global actor 'MainActor'
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 4 |
 5 | internal extension NWConnection {
[5/6] Emitting module NWWebSocket
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Extension/NWConnection+Extension.swift:3:17: warning: var '_intentionalDisconnection' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 1 | import Network
 2 |
 3 | fileprivate var _intentionalDisconnection: Bool = false
   |                 |- warning: var '_intentionalDisconnection' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                 |- note: convert '_intentionalDisconnection' to a 'let' constant to make 'Sendable' shared state immutable
   |                 |- note: add '@MainActor' to make var '_intentionalDisconnection' part of global actor 'MainActor'
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 4 |
 5 | internal extension NWConnection {
[6/6] Compiling NWWebSocket WebSocketConnection.swift
Build complete! (3.48s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "NWWebSocket",
  "name" : "NWWebSocket",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "NWWebSocket",
      "targets" : [
        "NWWebSocket"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "NWWebSocketTests",
      "module_type" : "SwiftTarget",
      "name" : "NWWebSocketTests",
      "path" : "Tests/NWWebSocketTests",
      "sources" : [
        "NWWebSocketTests.swift",
        "Server/NWServerConnection.swift",
        "Server/NWWebSocketServer.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "NWWebSocket"
      ],
      "type" : "test"
    },
    {
      "c99name" : "NWWebSocket",
      "module_type" : "SwiftTarget",
      "name" : "NWWebSocket",
      "path" : "Sources/NWWebSocket",
      "product_memberships" : [
        "NWWebSocket"
      ],
      "sources" : [
        "Extension/NWConnection+Extension.swift",
        "Model/Client/NWWebSocket.swift",
        "Protocol/WebSocketConnection.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Done.