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 PortfolioKit, reference main (20ae6b), with Swift 6.1 for macOS (SPM) on 28 Apr 2025 02:24:36 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.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mcrich23/portfoliokit.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/mcrich23/portfoliokit
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 20ae6bf Update Readme.md
Cloned https://github.com/mcrich23/portfoliokit.git
Revision (git rev-parse @):
20ae6bfd8068cd9d6b855919398f567ad9b39d85
SUCCESS checkout https://github.com/mcrich23/portfoliokit.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": "portfoliokit",
      "name": "PortfolioKit",
      "url": "https://github.com/mcrich23/portfoliokit.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/portfoliokit",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/mcrich23/portfoliokit.git
[1/129] Fetching portfoliokit
Fetched https://github.com/mcrich23/portfoliokit.git from cache (1.08s)
Creating working copy for https://github.com/mcrich23/portfoliokit.git
Working copy of https://github.com/mcrich23/portfoliokit.git resolved at main (20ae6bf)
warning: '.resolve-product-dependencies': dependency 'portfoliokit' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/mcrich23/portfoliokit.git
https://github.com/mcrich23/portfoliokit.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "PortfolioKit",
  "name" : "PortfolioKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "PortfolioKit",
      "targets" : [
        "PortfolioKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "PortfolioKitTests",
      "module_type" : "SwiftTarget",
      "name" : "PortfolioKitTests",
      "path" : "Tests",
      "sources" : [
        "PackageKitTests/PackageKitTests.swift"
      ],
      "target_dependencies" : [
        "PortfolioKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "PortfolioKit",
      "module_type" : "SwiftTarget",
      "name" : "PortfolioKit",
      "path" : "Sources",
      "product_memberships" : [
        "PortfolioKit"
      ],
      "sources" : [
        "PortfolioKit/Data Types.swift",
        "PortfolioKit/PortfolioKit.swift",
        "PortfolioKit/PortfolioView.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
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 PortfolioKit Data Types.swift
[4/6] Emitting module PortfolioKit
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
 18 | import StoreKit
 19 |
 20 | public class PortfolioKit: ObservableObject {
    |              `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
 21 |     var builtInStorekitEnabled: Bool {
 22 |         #if os(macOS)
    :
 26 |         #endif
 27 |     }
 28 |     public static let shared = PortfolioKit()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 29 |     @Published public private(set) var portfolios: [Portfolio] = []
 30 |
[5/6] Compiling PortfolioKit PortfolioKit.swift
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:28:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
 18 | import StoreKit
 19 |
 20 | public class PortfolioKit: ObservableObject {
    |              `- note: class 'PortfolioKit' does not conform to the 'Sendable' protocol
 21 |     var builtInStorekitEnabled: Bool {
 22 |         #if os(macOS)
    :
 26 |         #endif
 27 |     }
 28 |     public static let shared = PortfolioKit()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'PortfolioKit' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 29 |     @Published public private(set) var portfolios: [Portfolio] = []
 30 |
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:132:17: warning: capture of 'completion' with non-sendable type '(PortfolioImage?) -> Void' (aka '(Optional<NSImage>) -> ()') in a '@Sendable' closure
130 |         URLSession.shared.dataTask(with: url) { data, response, error in
131 |             guard let data = data, error == nil else {
132 |                 completion(nil)
    |                 |- warning: capture of 'completion' with non-sendable type '(PortfolioImage?) -> Void' (aka '(Optional<NSImage>) -> ()') in a '@Sendable' closure
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
133 |                 return
134 |             }
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:60:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 58 |
 59 |     public func config(with url: URL, showCurrentApp: Bool = false) {
 60 |         Task {
    |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 61 |             try await config(with: url, showCurrentApp: showCurrentApp)
    |                       `- note: closure captures 'self' which is accessible to code in the current task
 62 |         }
 63 |     }
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:77:87: warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
 75 |                     if let image {
 76 |                         DispatchQueue.main.async {
 77 |                             let newPortfolio = Portfolio(name: portfolio.name, image: image, url: url, urlButtonName: portfolio.urlButtonName, bundleID: portfolio.bundleId)
    |                                                                                       |- warning: sending 'image' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                                       `- note: task-isolated 'image' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 78 |                             self.portfolios.append(newPortfolio)
 79 |
/Users/admin/builder/spi-builder-workspace/Sources/PortfolioKit/PortfolioKit.swift:78:29: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 76 |                         DispatchQueue.main.async {
 77 |                             let newPortfolio = Portfolio(name: portfolio.name, image: image, url: url, urlButtonName: portfolio.urlButtonName, bundleID: portfolio.bundleId)
 78 |                             self.portfolios.append(newPortfolio)
    |                             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 79 |
 80 |                             self.loadProduct(newPortfolio) { productViewController in
[6/6] Compiling PortfolioKit PortfolioView.swift
Build complete! (8.16s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "PortfolioKit",
  "name" : "PortfolioKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "PortfolioKit",
      "targets" : [
        "PortfolioKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "PortfolioKitTests",
      "module_type" : "SwiftTarget",
      "name" : "PortfolioKitTests",
      "path" : "Tests",
      "sources" : [
        "PackageKitTests/PackageKitTests.swift"
      ],
      "target_dependencies" : [
        "PortfolioKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "PortfolioKit",
      "module_type" : "SwiftTarget",
      "name" : "PortfolioKit",
      "path" : "Sources",
      "product_memberships" : [
        "PortfolioKit"
      ],
      "sources" : [
        "PortfolioKit/Data Types.swift",
        "PortfolioKit/PortfolioKit.swift",
        "PortfolioKit/PortfolioView.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Done.