This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 with Swift 6.0 for macOS (SPM).

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/onevcat/RandomColorSwift.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/onevcat/RandomColorSwift
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
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 master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/onevcat/RandomColorSwift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a 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-6F35C1178C84523A.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 non-isolated 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 non-isolated 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 Hue.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 non-isolated 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 non-isolated 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 ColorDefinition.swift
Build complete! (22.94s)
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.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.