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 Cooponent, reference 0.1.0 (b69165), with Swift 6.0 for macOS (SPM) on 26 Dec 2024 15:58:48 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.2.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.60.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Talljack/Cooponent.git
Reference: 0.1.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Talljack/Cooponent
 * tag               0.1.0      -> FETCH_HEAD
HEAD is now at b69165c init
Cloned https://github.com/Talljack/Cooponent.git
Revision (git rev-parse @):
b69165c30cc2a3c3019cf1b330d9484f1c3ddd6c
SUCCESS checkout https://github.com/Talljack/Cooponent.git at 0.1.0
========================================
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": "cooponent",
      "name": "Cooponent",
      "url": "https://github.com/Talljack/Cooponent.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Cooponent",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/Talljack/Cooponent.git
[1/35] Fetching cooponent
Fetched https://github.com/Talljack/Cooponent.git from cache (0.65s)
Creating working copy for https://github.com/Talljack/Cooponent.git
Working copy of https://github.com/Talljack/Cooponent.git resolved at 0.1.0 (b69165c)
warning: '.resolve-product-dependencies': dependency 'cooponent' 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/Talljack/Cooponent.git
https://github.com/Talljack/Cooponent.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Cooponent",
  "name" : "Cooponent",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Cooponent",
      "targets" : [
        "Button",
        "Segment",
        "Examples"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "Segment",
      "module_type" : "SwiftTarget",
      "name" : "Segment",
      "path" : "Sources/Segment",
      "product_memberships" : [
        "Cooponent"
      ],
      "sources" : [
        "SegmentedControl.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "Examples",
      "module_type" : "SwiftTarget",
      "name" : "Examples",
      "path" : "Sources/Examples",
      "product_memberships" : [
        "Cooponent"
      ],
      "sources" : [
        "SegmentedControlExample.swift"
      ],
      "target_dependencies" : [
        "Button",
        "Segment"
      ],
      "type" : "library"
    },
    {
      "c99name" : "CooponentTests",
      "module_type" : "SwiftTarget",
      "name" : "CooponentTests",
      "path" : "Tests/CooponentTests",
      "sources" : [
        "CooponentTests.swift"
      ],
      "target_dependencies" : [
        "Button",
        "Segment"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Button",
      "module_type" : "SwiftTarget",
      "name" : "Button",
      "path" : "Sources/Button",
      "product_memberships" : [
        "Cooponent"
      ],
      "sources" : [
        "CustomButton.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.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/4] Write sources
[3/4] Write swift-version-5BDAB9E9C0126B9D.txt
[5/8] Emitting module Segment
/Users/admin/builder/spi-builder-workspace/Sources/Segment/SegmentedControl.swift:6:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  4 |
  5 | private struct SizeKey: PreferenceKey {
  6 |     static var defaultValue: CGSize = .zero
    |                |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: annotate 'defaultValue' 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
  7 |     static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
  8 |         value = nextValue()
[6/8] Compiling Segment SegmentedControl.swift
/Users/admin/builder/spi-builder-workspace/Sources/Segment/SegmentedControl.swift:6:16: warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  4 |
  5 | private struct SizeKey: PreferenceKey {
  6 |     static var defaultValue: CGSize = .zero
    |                |- warning: static property 'defaultValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: convert 'defaultValue' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: annotate 'defaultValue' 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
  7 |     static func reduce(value: inout CGSize, nextValue: () -> CGSize) {
  8 |         value = nextValue()
/Users/admin/builder/spi-builder-workspace/Sources/Segment/SegmentedControl.swift:98:32: warning: main actor-isolated property 'tabs' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 11 |
 12 | public struct SegmentedControl<Indicator: View, Tab: SegmentItem>: View {
 13 |     public var tabs: [Tab]
    |                `- note: property declared here
 14 |     @Binding public var activeTab: Tab
 15 |     public var height: CGFloat = 45
    :
 96 |             .preference(key: SizeKey.self, value: size)
 97 |             .onPreferenceChange(SizeKey.self) { _ in
 98 |                 if let index = tabs.firstIndex(of: activeTab) {
    |                                `- warning: main actor-isolated property 'tabs' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 99 |                     minX = containerWidthForEachTab * CGFloat(index)
100 |                     excessTabWidth = 0
/Users/admin/builder/spi-builder-workspace/Sources/Segment/SegmentedControl.swift:98:52: warning: main actor-isolated property 'activeTab' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 12 | public struct SegmentedControl<Indicator: View, Tab: SegmentItem>: View {
 13 |     public var tabs: [Tab]
 14 |     @Binding public var activeTab: Tab
    |                         `- note: property declared here
 15 |     public var height: CGFloat = 45
 16 |     // Marks: - Customization
    :
 96 |             .preference(key: SizeKey.self, value: size)
 97 |             .onPreferenceChange(SizeKey.self) { _ in
 98 |                 if let index = tabs.firstIndex(of: activeTab) {
    |                                                    `- warning: main actor-isolated property 'activeTab' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 99 |                     minX = containerWidthForEachTab * CGFloat(index)
100 |                     excessTabWidth = 0
/Users/admin/builder/spi-builder-workspace/Sources/Segment/SegmentedControl.swift:99:21: warning: main actor-isolated property 'minX' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
 43 |
 44 |     /// View Properties
 45 |     @State private var minX: CGFloat = .zero
    |                        `- note: mutation of this property is only permitted within the actor
 46 |     @State private var excessTabWidth: CGFloat = .zero
 47 |
    :
 97 |             .onPreferenceChange(SizeKey.self) { _ in
 98 |                 if let index = tabs.firstIndex(of: activeTab) {
 99 |                     minX = containerWidthForEachTab * CGFloat(index)
    |                     `- warning: main actor-isolated property 'minX' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
100 |                     excessTabWidth = 0
101 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/Segment/SegmentedControl.swift:100:21: warning: main actor-isolated property 'excessTabWidth' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
 44 |     /// View Properties
 45 |     @State private var minX: CGFloat = .zero
 46 |     @State private var excessTabWidth: CGFloat = .zero
    |                        `- note: mutation of this property is only permitted within the actor
 47 |
 48 |     public var body: some View {
    :
 98 |                 if let index = tabs.firstIndex(of: activeTab) {
 99 |                     minX = containerWidthForEachTab * CGFloat(index)
100 |                     excessTabWidth = 0
    |                     `- warning: main actor-isolated property 'excessTabWidth' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
101 |                 }
102 |             }
[7/8] Emitting module Button
[8/8] Compiling Button CustomButton.swift
[9/10] Emitting module Examples
[10/10] Compiling Examples SegmentedControlExample.swift
Build complete! (11.34s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Cooponent",
  "name" : "Cooponent",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "13.0"
    }
  ],
  "products" : [
    {
      "name" : "Cooponent",
      "targets" : [
        "Button",
        "Segment",
        "Examples"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "Segment",
      "module_type" : "SwiftTarget",
      "name" : "Segment",
      "path" : "Sources/Segment",
      "product_memberships" : [
        "Cooponent"
      ],
      "sources" : [
        "SegmentedControl.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "Examples",
      "module_type" : "SwiftTarget",
      "name" : "Examples",
      "path" : "Sources/Examples",
      "product_memberships" : [
        "Cooponent"
      ],
      "sources" : [
        "SegmentedControlExample.swift"
      ],
      "target_dependencies" : [
        "Button",
        "Segment"
      ],
      "type" : "library"
    },
    {
      "c99name" : "CooponentTests",
      "module_type" : "SwiftTarget",
      "name" : "CooponentTests",
      "path" : "Tests/CooponentTests",
      "sources" : [
        "CooponentTests.swift"
      ],
      "target_dependencies" : [
        "Button",
        "Segment"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Button",
      "module_type" : "SwiftTarget",
      "name" : "Button",
      "path" : "Sources/Button",
      "product_memberships" : [
        "Cooponent"
      ],
      "sources" : [
        "CustomButton.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Done.