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 RandomColor, reference 2.0.0 (ab01c6), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 13:43:54 UTC.

Swift 6 data race errors: 1

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/onevcat/RandomColorSwift.git
Reference: 2.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/onevcat/RandomColorSwift
 * tag               2.0.0      -> FETCH_HEAD
HEAD is now at ab01c6e Update readme
Cloned https://github.com/onevcat/RandomColorSwift.git
Revision (git rev-parse @):
ab01c6eff99f40c5e23ffcb957eb3971f937f106
SUCCESS checkout https://github.com/onevcat/RandomColorSwift.git at 2.0.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": "randomcolorswift",
      "name": "RandomColor",
      "url": "https://github.com/onevcat/RandomColorSwift.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/RandomColorSwift",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/onevcat/RandomColorSwift.git
[1/316] Fetching randomcolorswift
Fetched https://github.com/onevcat/RandomColorSwift.git from cache (0.79s)
Creating working copy for https://github.com/onevcat/RandomColorSwift.git
Working copy of https://github.com/onevcat/RandomColorSwift.git resolved at 2.0.0 (ab01c6e)
warning: '.resolve-product-dependencies': dependency 'randomcolorswift' 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/onevcat/RandomColorSwift.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/7] Compiling RandomColor RandomColor.swift
/Users/admin/builder/spi-builder-workspace/RandomColor/RandomColor.swift:33:13: warning: var 'colorDictionary' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 31 | #endif
 32 |
 33 | private var colorDictionary: [Hue: ColorDefinition] = [
    |             |- warning: var 'colorDictionary' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'colorDictionary' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'colorDictionary' 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
 34 |     .monochrome: ColorDefinition(hueRange: nil, lowerBounds: [(0,0), (100,0)]),
 35 |     .red: ColorDefinition(hueRange: (-26,18), lowerBounds: [(20,100), (30,92), (40,89), (50,85), (60,78), (70,70), (80,60), (90,55), (100,50)]),
/Users/admin/builder/spi-builder-workspace/RandomColor/RandomColor.swift:134:13: warning: variable 'color' was never mutated; consider changing to 'let' constant
132 |
133 |     func pickBrightness(color: ColorDefinition, saturationValue: Int, luminosity: Luminosity) -> Int {
134 |         var color = color
    |             `- warning: variable 'color' was never mutated; consider changing to 'let' constant
135 |
136 |         func getMinimumBrightness(saturationValue: Int) -> Int {
[4/7] Compiling RandomColor Luminosity.swift
[5/7] Compiling RandomColor ColorDefinition.swift
[6/7] Emitting module RandomColor
/Users/admin/builder/spi-builder-workspace/RandomColor/RandomColor.swift:33:13: warning: var 'colorDictionary' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 31 | #endif
 32 |
 33 | private var colorDictionary: [Hue: ColorDefinition] = [
    |             |- warning: var 'colorDictionary' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |             |- note: convert 'colorDictionary' to a 'let' constant to make 'Sendable' shared state immutable
    |             |- note: annotate 'colorDictionary' 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
 34 |     .monochrome: ColorDefinition(hueRange: nil, lowerBounds: [(0,0), (100,0)]),
 35 |     .red: ColorDefinition(hueRange: (-26,18), lowerBounds: [(20,100), (30,92), (40,89), (50,85), (60,78), (70,70), (80,60), (90,55), (100,50)]),
[7/7] Compiling RandomColor Hue.swift
Build complete! (8.43s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "RandomColor",
  "name" : "RandomColor",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "8.0"
    },
    {
      "name" : "macos",
      "version" : "10.10"
    },
    {
      "name" : "tvos",
      "version" : "9.0"
    },
    {
      "name" : "watchos",
      "version" : "2.0"
    }
  ],
  "products" : [
    {
      "name" : "RandomColor",
      "targets" : [
        "RandomColor"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "RandomColor",
      "module_type" : "SwiftTarget",
      "name" : "RandomColor",
      "path" : "RandomColor",
      "product_memberships" : [
        "RandomColor"
      ],
      "sources" : [
        "ColorDefinition.swift",
        "Hue.swift",
        "Luminosity.swift",
        "RandomColor.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.