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 SwiftTor, reference main (c21063), with Swift 6.0 for macOS (SPM) on 4 Nov 2024 10:37:08 UTC.

Swift 6 data race errors: 2

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/SwiftTor.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/FlorianHubl/SwiftTor
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at c210638 Merge remote-tracking branch 'refs/remotes/origin/main'
Cloned https://github.com/FlorianHubl/SwiftTor.git
Revision (git rev-parse @):
c2106380621945d578ead18c5d72b1170f02dbcc
SUCCESS checkout https://github.com/FlorianHubl/SwiftTor.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": "swifttor",
      "name": "SwiftTor",
      "url": "https://github.com/FlorianHubl/SwiftTor.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftTor",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/FlorianHubl/SwiftTor.git
[4/158] Fetching swifttor
Fetched https://github.com/FlorianHubl/SwiftTor.git from cache (2.58s)
Creating working copy for https://github.com/FlorianHubl/SwiftTor.git
Working copy of https://github.com/FlorianHubl/SwiftTor.git resolved at main (c210638)
warning: '.resolve-product-dependencies': dependency 'swifttor' 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/SwiftTor.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/3] Write sources
[1/3] Copying Tor.framework
[2/3] Write swift-version--7754E27361AE5C74.txt
[4/6] Compiling SwiftTor SwiftTor.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/SwiftTor.swift:16:13: warning: capture of 'self' with non-sendable type 'SwiftTor' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 2 |
 3 | @available(iOS 13.0, macOS 13, *)
 4 | public class SwiftTor: ObservableObject {
   |              `- note: class 'SwiftTor' does not conform to the 'Sendable' protocol
 5 |     public var tor: TorHelper
 6 |
   :
14 |         }
15 |         Timer.scheduledTimer(withTimeInterval: 0.3, repeats: true) { _ in
16 |             self.state = self.tor.state
   |             `- warning: capture of 'self' with non-sendable type 'SwiftTor' in a `@Sendable` closure; this is an error in the Swift 6 language mode
17 |         }
18 |         if hiddenServicePort != nil {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/SwiftTor.swift:20:17: warning: capture of 'self' with non-sendable type 'SwiftTor' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 2 |
 3 | @available(iOS 13.0, macOS 13, *)
 4 | public class SwiftTor: ObservableObject {
   |              `- note: class 'SwiftTor' does not conform to the 'Sendable' protocol
 5 |     public var tor: TorHelper
 6 |
   :
18 |         if hiddenServicePort != nil {
19 |             Timer.scheduledTimer(withTimeInterval: 3, repeats: false) { _ in
20 |                 self.onionAddress = self.tor.onionAddress
   |                 `- warning: capture of 'self' with non-sendable type 'SwiftTor' in a `@Sendable` closure; this is an error in the Swift 6 language mode
21 |             }
22 |         }
[5/6] Emitting module SwiftTor
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:20:14: warning: non-final class 'TorHelper' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 18 |
 19 | @available(iOS 13.0, macOS 13, *)
 20 | public class TorHelper: NSObject, URLSessionDelegate, ObservableObject {
    |              `- warning: non-final class 'TorHelper' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 21 |
 22 |     @Published public var state: TorState = .none
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:22:27: warning: stored property '_state' of 'Sendable'-conforming class 'TorHelper' is mutable; this is an error in the Swift 6 language mode
 20 | public class TorHelper: NSObject, URLSessionDelegate, ObservableObject {
 21 |
 22 |     @Published public var state: TorState = .none
    |                           `- warning: stored property '_state' of 'Sendable'-conforming class 'TorHelper' is mutable; this is an error in the Swift 6 language mode
 23 |     public var cert: Data?
 24 |     private var config: TorConfiguration = TorConfiguration()
[6/6] Compiling SwiftTor TorHelper.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:20:14: warning: non-final class 'TorHelper' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 18 |
 19 | @available(iOS 13.0, macOS 13, *)
 20 | public class TorHelper: NSObject, URLSessionDelegate, ObservableObject {
    |              `- warning: non-final class 'TorHelper' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
 21 |
 22 |     @Published public var state: TorState = .none
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:22:27: warning: stored property '_state' of 'Sendable'-conforming class 'TorHelper' is mutable; this is an error in the Swift 6 language mode
 20 | public class TorHelper: NSObject, URLSessionDelegate, ObservableObject {
 21 |
 22 |     @Published public var state: TorState = .none
    |                           `- warning: stored property '_state' of 'Sendable'-conforming class 'TorHelper' is mutable; this is an error in the Swift 6 language mode
 23 |     public var cert: Data?
 24 |     private var config: TorConfiguration = TorConfiguration()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:137:17: warning: initialization of variable 'torrcPath' was never used; consider replacing with assignment to '_' or removing it
135 |             }
136 |             self.config.dataDirectory = URL(fileURLWithPath: self.torPath())
137 |             var torrcPath = "\(self.torPath())/.torrc"
    |                 `- warning: initialization of variable 'torrcPath' was never used; consider replacing with assignment to '_' or removing it
138 |             self.config.arguments = ["-f", "\(self.torPath())/.torrc"]
139 |             self.config.controlSocket = self.config.dataDirectory?.appendingPathComponent("cp")
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:190:37: warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  3 | import Tor
  4 |
  5 | protocol OnionManagerDelegate: AnyObject {
    |          `- note: protocol 'OnionManagerDelegate' does not conform to the 'Sendable' protocol
  6 |     func torConnProgress(_ progress: Int)
  7 |     func torConnFinished()
    :
188 |                                 if arguments!["PROGRESS"] != nil {
189 |                                     let progress = Int(arguments!["PROGRESS"]!)!
190 |                                     weakDelegate?.torConnProgress(progress)
    |                                     `- warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
191 |                                     if progress >= 100 {
192 |                                         self.controller?.removeObserver(progressObs)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:190:37: warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in an isolated closure; this is an error in the Swift 6 language mode
  3 | import Tor
  4 |
  5 | protocol OnionManagerDelegate: AnyObject {
    |          `- note: protocol 'OnionManagerDelegate' does not conform to the 'Sendable' protocol
  6 |     func torConnProgress(_ progress: Int)
  7 |     func torConnFinished()
    :
188 |                                 if arguments!["PROGRESS"] != nil {
189 |                                     let progress = Int(arguments!["PROGRESS"]!)!
190 |                                     weakDelegate?.torConnProgress(progress)
    |                                     `- warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in an isolated closure; this is an error in the Swift 6 language mode
191 |                                     if progress >= 100 {
192 |                                         self.controller?.removeObserver(progressObs)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:190:37: warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in an isolated closure; this is an error in the Swift 6 language mode
  3 | import Tor
  4 |
  5 | protocol OnionManagerDelegate: AnyObject {
    |          `- note: protocol 'OnionManagerDelegate' does not conform to the 'Sendable' protocol
  6 |     func torConnProgress(_ progress: Int)
  7 |     func torConnFinished()
    :
188 |                                 if arguments!["PROGRESS"] != nil {
189 |                                     let progress = Int(arguments!["PROGRESS"]!)!
190 |                                     weakDelegate?.torConnProgress(progress)
    |                                     `- warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in an isolated closure; this is an error in the Swift 6 language mode
191 |                                     if progress >= 100 {
192 |                                         self.controller?.removeObserver(progressObs)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:190:37: warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
188 |                                 if arguments!["PROGRESS"] != nil {
189 |                                     let progress = Int(arguments!["PROGRESS"]!)!
190 |                                     weakDelegate?.torConnProgress(progress)
    |                                     `- warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
191 |                                     if progress >= 100 {
192 |                                         self.controller?.removeObserver(progressObs)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:204:33: warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in an isolated closure; this is an error in the Swift 6 language mode
  3 | import Tor
  4 |
  5 | protocol OnionManagerDelegate: AnyObject {
    |          `- note: protocol 'OnionManagerDelegate' does not conform to the 'Sendable' protocol
  6 |     func torConnProgress(_ progress: Int)
  7 |     func torConnFinished()
    :
202 |                             if established {
203 |                                 self.state = .connected
204 |                                 weakDelegate?.torConnFinished()
    |                                 `- warning: capture of 'weakDelegate' with non-sendable type '(any OnionManagerDelegate)?' in an isolated closure; this is an error in the Swift 6 language mode
205 |                                 self.controller?.removeObserver(observer)
206 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:204:33: warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
202 |                             if established {
203 |                                 self.state = .connected
204 |                                 weakDelegate?.torConnFinished()
    |                                 `- warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
205 |                                 self.controller?.removeObserver(observer)
206 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:209:33: warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
207 |                             } else if self.state == .refreshing {
208 |                                 self.state = .connected
209 |                                 weakDelegate?.torConnFinished()
    |                                 `- warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
210 |                                 self.controller?.removeObserver(observer)
211 |                             }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:215:21: warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
213 |                     }
214 |                 } catch {
215 |                     weakDelegate?.torConnDifficulties()
    |                     `- warning: reference to captured var 'weakDelegate' in concurrently-executing code; this is an error in the Swift 6 language mode
216 |                     self.state = .none
217 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/TorHelper.swift:190:37: warning: sending 'weakDelegate' risks causing data races; this is an error in the Swift 6 language mode
188 |                                 if arguments!["PROGRESS"] != nil {
189 |                                     let progress = Int(arguments!["PROGRESS"]!)!
190 |                                     weakDelegate?.torConnProgress(progress)
    |                                     |- warning: sending 'weakDelegate' risks causing data races; this is an error in the Swift 6 language mode
    |                                     `- note: task-isolated 'weakDelegate' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
191 |                                     if progress >= 100 {
192 |                                         self.controller?.removeObserver(progressObs)
Build complete! (6.22s)
warning: 'spi-builder-workspace': found 18 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64/Tor.framework/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-maccatalyst/Tor.framework/Resources/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-maccatalyst/Tor.framework/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-simulator/Tor.framework/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/macos-arm64_x86_64/Tor.framework/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-maccatalyst/Tor.framework/Versions/Current/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64/Tor.framework/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/macos-arm64_x86_64/Tor.framework/Resources/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-maccatalyst/Tor.framework/Versions/Current/Resources/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/macos-arm64_x86_64/Tor.framework/Versions/A/Resources/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-maccatalyst/Tor.framework/Versions/A/Resources/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/macos-arm64_x86_64/Tor.framework/Versions/Current/Resources/Info.plist
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-simulator/Tor.framework/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/macos-arm64_x86_64/Tor.framework/Versions/Current/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-maccatalyst/Tor.framework/Versions/A/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/macos-arm64_x86_64/Tor.framework/Versions/A/Tor
    /Users/admin/builder/spi-builder-workspace/Sources/SwiftTor/Tor.xcframework/ios-arm64_x86_64-simulator/Tor.framework/_CodeSignature/CodeResources
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftTor",
  "name" : "SwiftTor",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "SwiftTor",
      "targets" : [
        "SwiftTor"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "Tor",
      "module_type" : "BinaryTarget",
      "name" : "Tor",
      "path" : "Sources/SwiftTor/Tor.xcframework",
      "product_memberships" : [
        "SwiftTor"
      ],
      "sources" : [
      ],
      "type" : "binary"
    },
    {
      "c99name" : "SwiftTorTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftTorTests",
      "path" : "Tests/SwiftTorTests",
      "sources" : [
        "SwiftTorTests.swift"
      ],
      "target_dependencies" : [
        "SwiftTor"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftTor",
      "module_type" : "SwiftTarget",
      "name" : "SwiftTor",
      "path" : "Sources/SwiftTor",
      "product_memberships" : [
        "SwiftTor"
      ],
      "sources" : [
        "SwiftTor.swift",
        "TorHelper.swift"
      ],
      "target_dependencies" : [
        "Tor"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.8"
}
Done.