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 SwiftCompactor, reference main (7c802b), with Swift 6.1 for Linux on 27 Apr 2025 07:02:02 UTC.

Swift 6 data race errors: 4

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/openalloc/SwiftCompactor.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/openalloc/SwiftCompactor
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 7c802b9 Simplify See Also section of README
Cloned https://github.com/openalloc/SwiftCompactor.git
Revision (git rev-parse @):
7c802b99f84987e9e9d9d1e5fff7d8ecc2452aab
SUCCESS checkout https://github.com/openalloc/SwiftCompactor.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.1
Building package at path:  $PWD
https://github.com/openalloc/SwiftCompactor.git
https://github.com/openalloc/SwiftCompactor.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftCompactor",
  "name" : "SwiftCompactor",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Compactor",
      "targets" : [
        "Compactor"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CompactorTests",
      "module_type" : "SwiftTarget",
      "name" : "CompactorTests",
      "path" : "Tests",
      "sources" : [
        "CurrencyCompactorTests.swift",
        "NumberCompactorTests.swift",
        "TimeCompactorTests.swift"
      ],
      "target_dependencies" : [
        "Compactor"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Compactor",
      "module_type" : "SwiftTarget",
      "name" : "Compactor",
      "path" : "Sources",
      "product_memberships" : [
        "Compactor"
      ],
      "sources" : [
        "CurrencyCompactor.swift",
        "NumberCompactor+Scale.swift",
        "NumberCompactor.swift",
        "TimeCompactor+Scale.swift",
        "TimeCompactor+Style.swift",
        "TimeCompactor.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling Compactor TimeCompactor.swift
/host/spi-builder-workspace/Sources/TimeCompactor.swift:21:14: warning: class 'TimeCompactor' must restate inherited '@unchecked Sendable' conformance
 19 | import Foundation
 20 |
 21 | public class TimeCompactor: NumberFormatter {
    |              `- warning: class 'TimeCompactor' must restate inherited '@unchecked Sendable' conformance
 22 |     public var ifZero: String?
 23 |     public var style: Style
/host/spi-builder-workspace/Sources/TimeCompactor.swift:102:24: warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
100 |
101 |     // cached lookup tables
102 |     private static let halfDollarLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: halfDollar)
    |                        |- warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'halfDollarLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
103 |     private static let nickelLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: nickel)
104 |
/host/spi-builder-workspace/Sources/TimeCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
 20 |
 21 | public extension TimeCompactor {
 22 |     enum Scale {
    |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
 23 |         case second
 24 |         case minute
/host/spi-builder-workspace/Sources/TimeCompactor.swift:103:24: warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
101 |     // cached lookup tables
102 |     private static let halfDollarLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: halfDollar)
103 |     private static let nickelLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: nickel)
    |                        |- warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'nickelLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 |
105 |     static func getThreshold(_ roundSmallToWhole: Bool) -> Double {
/host/spi-builder-workspace/Sources/TimeCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
 20 |
 21 | public extension TimeCompactor {
 22 |     enum Scale {
    |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
 23 |         case second
 24 |         case minute
[4/9] Compiling Compactor TimeCompactor+Scale.swift
[5/9] Compiling Compactor TimeCompactor+Style.swift
[6/9] Compiling Compactor NumberCompactor+Scale.swift
[7/9] Emitting module Compactor
/host/spi-builder-workspace/Sources/CurrencyCompactor.swift:21:14: warning: class 'CurrencyCompactor' must restate inherited '@unchecked Sendable' conformance
19 | import Foundation
20 |
21 | public class CurrencyCompactor: NumberCompactor {
   |              `- warning: class 'CurrencyCompactor' must restate inherited '@unchecked Sendable' conformance
22 |     @available(*, deprecated, message: "use init(ifZero: String?, roundSmallToWhole: Bool) instead")
23 |     public convenience init(blankIfZero: Bool = false,
/host/spi-builder-workspace/Sources/NumberCompactor.swift:21:14: warning: class 'NumberCompactor' must restate inherited '@unchecked Sendable' conformance
 19 | import Foundation
 20 |
 21 | public class NumberCompactor: NumberFormatter {
    |              `- warning: class 'NumberCompactor' must restate inherited '@unchecked Sendable' conformance
 22 |     public var ifZero: String?
 23 |     public var roundSmallToWhole: Bool
/host/spi-builder-workspace/Sources/NumberCompactor.swift:86:24: warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
 84 |
 85 |     // cached lookup tables
 86 |     private static let halfDollarLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: halfDollar)
    |                        |- warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'halfDollarLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 87 |     private static let nickelLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: nickel)
 88 |
/host/spi-builder-workspace/Sources/NumberCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
20 |
21 | public extension NumberCompactor {
22 |     enum Scale: Int, CaseIterable {
   |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
23 |         case none = 0
24 |         case kilo = 1
/host/spi-builder-workspace/Sources/NumberCompactor.swift:87:24: warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
 85 |     // cached lookup tables
 86 |     private static let halfDollarLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: halfDollar)
 87 |     private static let nickelLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: nickel)
    |                        |- warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'nickelLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 88 |
 89 |     static func getThreshold(_ roundSmallToWhole: Bool) -> Double {
/host/spi-builder-workspace/Sources/NumberCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
20 |
21 | public extension NumberCompactor {
22 |     enum Scale: Int, CaseIterable {
   |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
23 |         case none = 0
24 |         case kilo = 1
/host/spi-builder-workspace/Sources/TimeCompactor.swift:21:14: warning: class 'TimeCompactor' must restate inherited '@unchecked Sendable' conformance
 19 | import Foundation
 20 |
 21 | public class TimeCompactor: NumberFormatter {
    |              `- warning: class 'TimeCompactor' must restate inherited '@unchecked Sendable' conformance
 22 |     public var ifZero: String?
 23 |     public var style: Style
/host/spi-builder-workspace/Sources/TimeCompactor.swift:102:24: warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
100 |
101 |     // cached lookup tables
102 |     private static let halfDollarLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: halfDollar)
    |                        |- warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'halfDollarLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
103 |     private static let nickelLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: nickel)
104 |
/host/spi-builder-workspace/Sources/TimeCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
 20 |
 21 | public extension TimeCompactor {
 22 |     enum Scale {
    |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
 23 |         case second
 24 |         case minute
/host/spi-builder-workspace/Sources/TimeCompactor.swift:103:24: warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
101 |     // cached lookup tables
102 |     private static let halfDollarLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: halfDollar)
103 |     private static let nickelLookup: [LOOKUP] = TimeCompactor.generateLookup(threshold: nickel)
    |                        |- warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[TimeCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: TimeCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'nickelLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 |
105 |     static func getThreshold(_ roundSmallToWhole: Bool) -> Double {
/host/spi-builder-workspace/Sources/TimeCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
 20 |
 21 | public extension TimeCompactor {
 22 |     enum Scale {
    |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
 23 |         case second
 24 |         case minute
[8/9] Compiling Compactor NumberCompactor.swift
/host/spi-builder-workspace/Sources/NumberCompactor.swift:21:14: warning: class 'NumberCompactor' must restate inherited '@unchecked Sendable' conformance
 19 | import Foundation
 20 |
 21 | public class NumberCompactor: NumberFormatter {
    |              `- warning: class 'NumberCompactor' must restate inherited '@unchecked Sendable' conformance
 22 |     public var ifZero: String?
 23 |     public var roundSmallToWhole: Bool
/host/spi-builder-workspace/Sources/NumberCompactor.swift:86:24: warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
 84 |
 85 |     // cached lookup tables
 86 |     private static let halfDollarLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: halfDollar)
    |                        |- warning: static property 'halfDollarLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'halfDollarLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 87 |     private static let nickelLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: nickel)
 88 |
/host/spi-builder-workspace/Sources/NumberCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
20 |
21 | public extension NumberCompactor {
22 |     enum Scale: Int, CaseIterable {
   |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
23 |         case none = 0
24 |         case kilo = 1
/host/spi-builder-workspace/Sources/NumberCompactor.swift:87:24: warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
 85 |     // cached lookup tables
 86 |     private static let halfDollarLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: halfDollar)
 87 |     private static let nickelLookup: [LOOKUP] = NumberCompactor.generateLookup(threshold: nickel)
    |                        |- warning: static property 'nickelLookup' is not concurrency-safe because non-'Sendable' type '[NumberCompactor.LOOKUP]' (aka 'Array<(range: Range<Double>, divisor: Double, scale: NumberCompactor.Scale)>') may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'nickelLookup' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 88 |
 89 |     static func getThreshold(_ roundSmallToWhole: Bool) -> Double {
/host/spi-builder-workspace/Sources/NumberCompactor+Scale.swift:22:10: note: consider making enum 'Scale' conform to the 'Sendable' protocol
20 |
21 | public extension NumberCompactor {
22 |     enum Scale: Int, CaseIterable {
   |          `- note: consider making enum 'Scale' conform to the 'Sendable' protocol
23 |         case none = 0
24 |         case kilo = 1
[9/9] Compiling Compactor CurrencyCompactor.swift
/host/spi-builder-workspace/Sources/CurrencyCompactor.swift:21:14: warning: class 'CurrencyCompactor' must restate inherited '@unchecked Sendable' conformance
19 | import Foundation
20 |
21 | public class CurrencyCompactor: NumberCompactor {
   |              `- warning: class 'CurrencyCompactor' must restate inherited '@unchecked Sendable' conformance
22 |     @available(*, deprecated, message: "use init(ifZero: String?, roundSmallToWhole: Bool) instead")
23 |     public convenience init(blankIfZero: Bool = false,
Build complete! (7.48s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftCompactor",
  "name" : "SwiftCompactor",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Compactor",
      "targets" : [
        "Compactor"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CompactorTests",
      "module_type" : "SwiftTarget",
      "name" : "CompactorTests",
      "path" : "Tests",
      "sources" : [
        "CurrencyCompactorTests.swift",
        "NumberCompactorTests.swift",
        "TimeCompactorTests.swift"
      ],
      "target_dependencies" : [
        "Compactor"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Compactor",
      "module_type" : "SwiftTarget",
      "name" : "Compactor",
      "path" : "Sources",
      "product_memberships" : [
        "Compactor"
      ],
      "sources" : [
        "CurrencyCompactor.swift",
        "NumberCompactor+Scale.swift",
        "NumberCompactor.swift",
        "TimeCompactor+Scale.swift",
        "TimeCompactor+Style.swift",
        "TimeCompactor.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:3bdcac04179f4ed3e5b8e9dbd6e74bbf5ebc0f4fde48bbaad7d1e5c757e65bcb
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Done.