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 PactConsumerSwift, reference v0.10.2 (405dcb), with Swift 6.0 for macOS (SPM) on 28 Nov 2024 05:44:01 UTC.

Swift 6 data race errors: 3

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 -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.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/DiUS/pact-consumer-swift.git
Reference: v0.10.2
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/DiUS/pact-consumer-swift
 * tag               v0.10.2    -> FETCH_HEAD
HEAD is now at 405dcbf chore: Bumping version to 0.10.2
Cloned https://github.com/DiUS/pact-consumer-swift.git
Revision (git rev-parse @):
405dcbf565241b8da08ff3ff329ab493229bae83
SUCCESS checkout https://github.com/DiUS/pact-consumer-swift.git at v0.10.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": "pact-consumer-swift",
      "name": "PactConsumerSwift",
      "url": "https://github.com/DiUS/pact-consumer-swift.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/pact-consumer-swift",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/DiUS/pact-consumer-swift.git
[1/4042] Fetching pact-consumer-swift
Fetched https://github.com/DiUS/pact-consumer-swift.git from cache (11.43s)
Creating working copy for https://github.com/DiUS/pact-consumer-swift.git
Working copy of https://github.com/DiUS/pact-consumer-swift.git resolved at v0.10.2 (405dcbf)
warning: '.resolve-product-dependencies': dependency 'pact-consumer-swift' 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/DiUS/pact-consumer-swift.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 -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--7754E27361AE5C74.txt
[3/9] Compiling PactConsumerSwift ErrorReporterXCTest.swift
[4/9] Compiling PactConsumerSwift ErrorReporter.swift
[5/9] Compiling PactConsumerSwift MockService.swift
[6/9] Compiling PactConsumerSwift Matcher.swift
[7/9] Compiling PactConsumerSwift Interaction.swift
[8/9] Emitting module PactConsumerSwift
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:22:16: warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 20 |
 21 |   enum Router {
 22 |     static var baseURLString = "http://example.com"
    |                |- warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: convert 'baseURLString' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: annotate 'baseURLString' 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
 23 |
 24 |     case clean
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:4:12: warning: non-final class 'PactVerificationService' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
  2 |
  3 | @objc
  4 | open class PactVerificationService: NSObject {
    |            `- warning: non-final class 'PactVerificationService' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
  5 |
  6 |   typealias VoidHandler = (Result<Void, NSError>) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:17:20: warning: stored property '$__lazy_storage_$_session' of 'Sendable'-conforming class 'PactVerificationService' is mutable; this is an error in the Swift 6 language mode
 15 |   }
 16 |
 17 |   private lazy var session = {
    |                    `- warning: stored property '$__lazy_storage_$_session' of 'Sendable'-conforming class 'PactVerificationService' is mutable; this is an error in the Swift 6 language mode
 18 |     return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
 19 |   }()
[9/9] Compiling PactConsumerSwift PactVerificationService.swift
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:22:16: warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 20 |
 21 |   enum Router {
 22 |     static var baseURLString = "http://example.com"
    |                |- warning: static property 'baseURLString' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: convert 'baseURLString' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: annotate 'baseURLString' 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
 23 |
 24 |     case clean
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:4:12: warning: non-final class 'PactVerificationService' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
  2 |
  3 | @objc
  4 | open class PactVerificationService: NSObject {
    |            `- warning: non-final class 'PactVerificationService' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
  5 |
  6 |   typealias VoidHandler = (Result<Void, NSError>) -> Void
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:17:20: warning: stored property '$__lazy_storage_$_session' of 'Sendable'-conforming class 'PactVerificationService' is mutable; this is an error in the Swift 6 language mode
 15 |   }
 16 |
 17 |   private lazy var session = {
    |                    `- warning: stored property '$__lazy_storage_$_session' of 'Sendable'-conforming class 'PactVerificationService' is mutable; this is an error in the Swift 6 language mode
 18 |     return URLSession(configuration: .ephemeral, delegate: self, delegateQueue: .main)
 19 |   }()
/Users/admin/builder/spi-builder-workspace/Sources/PactVerificationService.swift:290:9: warning: capture of 'result' with non-sendable type '(Result<(URLResponse, Data), any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
288 |     return dataTask(with: url) { (data, response, error) in
289 |       guard error == nil else {
290 |         result(.failure(error!))
    |         |- warning: capture of 'result' with non-sendable type '(Result<(URLResponse, Data), any Error>) -> 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'
291 |         return
292 |       }
Build complete! (13.81s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "PactConsumerSwift",
  "name" : "PactConsumerSwift",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "ios",
      "version" : "9.0"
    },
    {
      "name" : "tvos",
      "version" : "9.0"
    }
  ],
  "products" : [
    {
      "name" : "PactConsumerSwift",
      "targets" : [
        "PactConsumerSwift"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "PactConsumerSwift",
      "module_type" : "SwiftTarget",
      "name" : "PactConsumerSwift",
      "path" : "Sources",
      "product_memberships" : [
        "PactConsumerSwift"
      ],
      "sources" : [
        "Interaction.swift",
        "Matcher.swift",
        "MockService.swift",
        "PactVerificationService.swift",
        "Reporting/ErrorReporter.swift",
        "Reporting/ErrorReporterXCTest.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.