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 EasyTCP, reference main (a97d79), with Swift 6.0 for macOS (SPM) on 3 Nov 2024 18:23:13 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/FlorianHubl/EasyTCP.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/FlorianHubl/EasyTCP
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at a97d791 support for mac
Cloned https://github.com/FlorianHubl/EasyTCP.git
Revision (git rev-parse @):
a97d7918b623a05b5e244b85d010904f8f21609c
SUCCESS checkout https://github.com/FlorianHubl/EasyTCP.git at main
========================================
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": "easytcp",
      "name": "EasyTCP",
      "url": "https://github.com/FlorianHubl/EasyTCP.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/EasyTCP",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/FlorianHubl/EasyTCP.git
[1/112] Fetching easytcp
Fetched https://github.com/FlorianHubl/EasyTCP.git from cache (0.70s)
Creating working copy for https://github.com/FlorianHubl/EasyTCP.git
Working copy of https://github.com/FlorianHubl/EasyTCP.git resolved at main (a97d791)
warning: '.resolve-product-dependencies': dependency 'easytcp' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/FlorianHubl/EasyTCP.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/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/4] Emitting module EasyTCP
[4/4] Compiling EasyTCP EasyTCP.swift
/Users/admin/builder/spi-builder-workspace/Sources/EasyTCP/EasyTCP.swift:55:44: warning: converting non-sendable function value to '@Sendable (NWConnection.State) -> Void' may introduce data races
 53 |             print("EasyTCP started")
 54 |         }
 55 |         self.connection.stateUpdateHandler = self.didChange(state:)
    |                                            `- warning: converting non-sendable function value to '@Sendable (NWConnection.State) -> Void' may introduce data races
 56 |         self.startReceive()
 57 |         self.connection.start(queue: .main)
/Users/admin/builder/spi-builder-workspace/Sources/EasyTCP/EasyTCP.swift:99:27: warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  3 |
  4 | @available(iOS 13.0, macOS 10.15, *)
  5 | public class EasyTCP: ObservableObject {
    |              `- note: class 'EasyTCP' does not conform to the 'Sendable' protocol
  6 |
  7 |     public init(hostName: String, port: Int, using parameters: NWParameters? = nil, result: @escaping Completion) {
    :
 97 |         self.resultData.append(oldData)
 98 |         Timer.scheduledTimer(withTimeInterval: waitTime!, repeats: false) { _ in
 99 |             if oldData == self.resultData {
    |                           `- warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
100 |                 if let completion = self.completion {
101 |                     self.resultData.removeLast()
/Users/admin/builder/spi-builder-workspace/Sources/EasyTCP/EasyTCP.swift:127:20: warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  3 |
  4 | @available(iOS 13.0, macOS 10.15, *)
  5 | public class EasyTCP: ObservableObject {
    |              `- note: class 'EasyTCP' does not conform to the 'Sendable' protocol
  6 |
  7 |     public init(hostName: String, port: Int, using parameters: NWParameters? = nil, result: @escaping Completion) {
    :
125 |         self.connection.receive(minimumIncompleteLength: 1, maximumLength: 65536) { data, _, isDone, error in
126 |             if let data = data, !data.isEmpty {
127 |                 if self.lastKey == nil {
    |                    `- warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
128 |                     self.checkData(oldData: self.resultData)
129 |                 }else {
/Users/admin/builder/spi-builder-workspace/Sources/EasyTCP/EasyTCP.swift:199:17: warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  3 |
  4 | @available(iOS 13.0, macOS 10.15, *)
  5 | public class EasyTCP: ObservableObject {
    |              `- note: class 'EasyTCP' does not conform to the 'Sendable' protocol
  6 |
  7 |     public init(hostName: String, port: Int, using parameters: NWParameters? = nil, result: @escaping Completion) {
    :
197 |             if let error = error {
198 |                 print("did send, error: %@", "\(error)")
199 |                 self.stop()
    |                 `- warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
200 |             } else {
201 |                 self.completion = completion
/Users/admin/builder/spi-builder-workspace/Sources/EasyTCP/EasyTCP.swift:201:35: warning: capture of 'completion' with non-sendable type 'EasyTCP.Completion' (aka '(Data) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
199 |                 self.stop()
200 |             } else {
201 |                 self.completion = completion
    |                                   |- warning: capture of 'completion' with non-sendable type 'EasyTCP.Completion' (aka '(Data) -> ()') 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'
202 |             }
203 |         })
/Users/admin/builder/spi-builder-workspace/Sources/EasyTCP/EasyTCP.swift:215:17: warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  3 |
  4 | @available(iOS 13.0, macOS 10.15, *)
  5 | public class EasyTCP: ObservableObject {
    |              `- note: class 'EasyTCP' does not conform to the 'Sendable' protocol
  6 |
  7 |     public init(hostName: String, port: Int, using parameters: NWParameters? = nil, result: @escaping Completion) {
    :
213 |             if let error = error {
214 |                 print("did send, error: %@", "\(error)")
215 |                 self.stop()
    |                 `- warning: capture of 'self' with non-sendable type 'EasyTCP' in a `@Sendable` closure; this is an error in the Swift 6 language mode
216 |             } else {
217 |                 let str = String(data: data, encoding: .utf8)!
Build complete! (6.98s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "EasyTCP",
  "name" : "EasyTCP",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "EasyTCP",
      "targets" : [
        "EasyTCP"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "EasyTCPTests",
      "module_type" : "SwiftTarget",
      "name" : "EasyTCPTests",
      "path" : "Tests/EasyTCPTests",
      "sources" : [
        "EasyTCPTests.swift"
      ],
      "target_dependencies" : [
        "EasyTCP"
      ],
      "type" : "test"
    },
    {
      "c99name" : "EasyTCP",
      "module_type" : "SwiftTarget",
      "name" : "EasyTCP",
      "path" : "Sources/EasyTCP",
      "product_memberships" : [
        "EasyTCP"
      ],
      "sources" : [
        "EasyTCP.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.8"
}
Done.