This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 NWWebSocket with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/pusher/NWWebSocket.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/pusher/NWWebSocket
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 1e545fc Change CocoaPods secret name to PUSHER_CI_COCOAPODS_TOKEN (#49)
Cloned https://github.com/pusher/NWWebSocket.git
Revision (git rev-parse @):
1e545fcb53966272fc042aa17ae932f11239e00f
SUCCESS checkout https://github.com/pusher/NWWebSocket.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/pusher/NWWebSocket.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
[3/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 non-isolated 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 non-isolated 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: annotate '_intentionalDisconnection' with '@MainActor' if property should only be accessed from the main actor
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 4 |
 5 | internal extension NWConnection {
[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 non-isolated 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 non-isolated 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: annotate '_intentionalDisconnection' with '@MainActor' if property should only be accessed from the main actor
   |                 `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 4 |
 5 | internal extension NWConnection {
[5/6] Compiling NWWebSocket NWWebSocket.swift
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:96:17: 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
    :
 94 |             connection = NWConnection(to: endpoint, using: parameters)
 95 |             connection?.stateUpdateHandler = { [weak self] state in
 96 |                 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
 97 |             }
 98 |             connection?.betterPathUpdateHandler = { [weak self] isAvailable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:99:17: 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
    :
 97 |             }
 98 |             connection?.betterPathUpdateHandler = { [weak self] isAvailable in
 99 |                 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
100 |             }
101 |             connection?.viabilityUpdateHandler = { [weak self] isViable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:102:17: 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
    :
100 |             }
101 |             connection?.viabilityUpdateHandler = { [weak self] isViable in
102 |                 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
103 |             }
104 |             listen()
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:137: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
    :
135 |     public func listen() {
136 |         connection?.receiveMessage { [weak self] (data, context, _, error) in
137 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
138 |                 return
139 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:157: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
    :
155 |     open func ping(interval: TimeInterval) {
156 |         pingTimer = .scheduledTimer(withTimeInterval: interval, repeats: true) { [weak self] _ in
157 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
158 |                 return
159 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:170: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
    :
168 |         let metadata = NWProtocolWebSocket.Metadata(opcode: .ping)
169 |         metadata.setPongHandler(connectionQueue) { [weak self] error in
170 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
171 |                 return
172 |             }
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:279: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
    :
277 |         connection = NWConnection(to: endpoint, using: parameters)
278 |         connection?.stateUpdateHandler = { [weak self] state in
279 |             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
280 |         }
281 |         connection?.betterPathUpdateHandler = { [weak self] isAvailable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:282: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
    :
280 |         }
281 |         connection?.betterPathUpdateHandler = { [weak self] isAvailable in
282 |             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
283 |         }
284 |         connection?.viabilityUpdateHandler = { [weak self] isViable in
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:285: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
    :
283 |         }
284 |         connection?.viabilityUpdateHandler = { [weak self] isViable in
285 |             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
286 |         }
287 |         listen()
/Users/admin/builder/spi-builder-workspace/Sources/NWWebSocket/Model/Client/NWWebSocket.swift:338: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
    :
336 |                          isComplete: true,
337 |                          completion: .contentProcessed({ [weak self] error in
338 |             guard let self = self else {
    |                              `- warning: capture of 'self' with non-sendable type 'NWWebSocket?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
339 |                 return
340 |             }
[6/6] Compiling NWWebSocket WebSocketConnection.swift
Build complete! (17.22s)
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.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.