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 WaterfallGrid, reference 1.1.0 (c7c086), with Swift 6.1 for macOS (SPM) on 29 Apr 2025 04:45:42 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/paololeonardi/WaterfallGrid.git
Reference: 1.1.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/paololeonardi/WaterfallGrid
 * tag               1.1.0      -> FETCH_HEAD
HEAD is now at c7c0865 Merge pull request #72 from paololeonardi/visionOS
Cloned https://github.com/paololeonardi/WaterfallGrid.git
Revision (git rev-parse @):
c7c08652c3540adf8e48409c351879b4caea7e89
SUCCESS checkout https://github.com/paololeonardi/WaterfallGrid.git at 1.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": "waterfallgrid",
      "name": "WaterfallGrid",
      "url": "https://github.com/paololeonardi/WaterfallGrid.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/WaterfallGrid",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/paololeonardi/WaterfallGrid.git
[1/653] Fetching waterfallgrid
Fetched https://github.com/paololeonardi/WaterfallGrid.git from cache (1.18s)
Creating working copy for https://github.com/paololeonardi/WaterfallGrid.git
Working copy of https://github.com/paololeonardi/WaterfallGrid.git resolved at 1.1.0 (c7c0865)
warning: '.resolve-product-dependencies': dependency 'waterfallgrid' 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/paololeonardi/WaterfallGrid.git
https://github.com/paololeonardi/WaterfallGrid.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "WaterfallGrid",
  "name" : "WaterfallGrid",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "WaterfallGrid",
      "targets" : [
        "WaterfallGrid"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "WaterfallGridTests",
      "module_type" : "SwiftTarget",
      "name" : "WaterfallGridTests",
      "path" : "Tests/WaterfallGridTests",
      "sources" : [
        "PositiveNumberTests.swift",
        "WaterfallGridTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "WaterfallGrid"
      ],
      "type" : "test"
    },
    {
      "c99name" : "WaterfallGrid",
      "module_type" : "SwiftTarget",
      "name" : "WaterfallGrid",
      "path" : "Sources/WaterfallGrid",
      "product_memberships" : [
        "WaterfallGrid"
      ],
      "sources" : [
        "Environment/GridSyle.swift",
        "Environment/PositiveNumber.swift",
        "Environment/ScrollOptions.swift",
        "Preference/ElementPreference.swift",
        "Preference/PreferenceSetter.swift",
        "View+GridStyle.swift",
        "View+ScrollOptions.swift",
        "WaterfallGrid.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
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/11] Compiling WaterfallGrid View+ScrollOptions.swift
[4/11] Compiling WaterfallGrid ElementPreference.swift
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/Preference/ElementPreference.swift:17: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
15 |     typealias Value = [ElementPreferenceData]
16 |
17 |     static var defaultValue: [ElementPreferenceData] = []
   |                |- 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: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 |     static func reduce(value: inout [ElementPreferenceData], nextValue: () -> [ElementPreferenceData]) {
[5/11] Compiling WaterfallGrid PreferenceSetter.swift
[6/11] Compiling WaterfallGrid ScrollOptions.swift
[7/11] Compiling WaterfallGrid PositiveNumber.swift
[8/11] Compiling WaterfallGrid WaterfallGrid.swift
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:36:107: warning: capture of 'preferences' with non-sendable type 'ElementPreferenceKey.Value' (aka 'Array<ElementPreferenceData>') in a '@Sendable' closure
 34 |                                                                                              spacing: self.style.spacing,
 35 |                                                                                              scrollDirection: self.scrollOptions.direction,
 36 |                                                                                              preferences: preferences)
    |                                                                                                           `- warning: capture of 'preferences' with non-sendable type 'ElementPreferenceKey.Value' (aka 'Array<ElementPreferenceData>') in a '@Sendable' closure
 37 |                             DispatchQueue.main.async {
 38 |                                 self.alignmentGuides = alignmentGuides
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/Preference/ElementPreference.swift:9:8: note: consider making struct 'ElementPreferenceData' conform to the 'Sendable' protocol
 7 | import SwiftUI
 8 |
 9 | struct ElementPreferenceData: Equatable {
   |        `- note: consider making struct 'ElementPreferenceData' conform to the 'Sendable' protocol
10 |     let id: AnyHashable
11 |     let size: CGSize
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:33:70: warning: call to main actor-isolated instance method 'alignmentsAndGridHeight(columns:spacing:scrollDirection:preferences:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 31 |                     .onPreferenceChange(ElementPreferenceKey.self, perform: { preferences in
 32 |                         DispatchQueue.global(qos: .userInteractive).async {
 33 |                             let (alignmentGuides, gridHeight) = self.alignmentsAndGridHeight(columns: self.style.columns,
    |                                                                      `- warning: call to main actor-isolated instance method 'alignmentsAndGridHeight(columns:spacing:scrollDirection:preferences:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 34 |                                                                                              spacing: self.style.spacing,
 35 |                                                                                              scrollDirection: self.scrollOptions.direction,
    :
 67 |     // MARK: - Helpers
 68 |
 69 |     func alignmentsAndGridHeight(columns: Int, spacing: CGFloat, scrollDirection: Axis.Set, preferences: [ElementPreferenceData]) -> ([AnyHashable: CGPoint], CGFloat) {
    |          |- note: calls to instance method 'alignmentsAndGridHeight(columns:spacing:scrollDirection:preferences:)' from outside of its actor context are implicitly asynchronous
    |          `- note: main actor isolation inferred from conformance to protocol 'View'
 70 |         var heights = Array(repeating: CGFloat(0), count: columns)
 71 |         var alignmentGuides = [AnyHashable: CGPoint]()
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:33:108: warning: main actor-isolated property 'style' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 11 | public struct WaterfallGrid<Data, ID, Content>: View where Data : RandomAccessCollection, Content : View, ID : Hashable {
 12 |
 13 |     @Environment(\.gridStyle) private var style
    |                                           `- note: property declared here
 14 |     @Environment(\.scrollOptions) private var scrollOptions
 15 |
    :
 31 |                     .onPreferenceChange(ElementPreferenceKey.self, perform: { preferences in
 32 |                         DispatchQueue.global(qos: .userInteractive).async {
 33 |                             let (alignmentGuides, gridHeight) = self.alignmentsAndGridHeight(columns: self.style.columns,
    |                                                                                                            `- warning: main actor-isolated property 'style' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 34 |                                                                                              spacing: self.style.spacing,
 35 |                                                                                              scrollDirection: self.scrollOptions.direction,
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:34:108: warning: main actor-isolated property 'style' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 11 | public struct WaterfallGrid<Data, ID, Content>: View where Data : RandomAccessCollection, Content : View, ID : Hashable {
 12 |
 13 |     @Environment(\.gridStyle) private var style
    |                                           `- note: property declared here
 14 |     @Environment(\.scrollOptions) private var scrollOptions
 15 |
    :
 32 |                         DispatchQueue.global(qos: .userInteractive).async {
 33 |                             let (alignmentGuides, gridHeight) = self.alignmentsAndGridHeight(columns: self.style.columns,
 34 |                                                                                              spacing: self.style.spacing,
    |                                                                                                            `- warning: main actor-isolated property 'style' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 35 |                                                                                              scrollDirection: self.scrollOptions.direction,
 36 |                                                                                              preferences: preferences)
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:35:116: warning: main actor-isolated property 'scrollOptions' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 12 |
 13 |     @Environment(\.gridStyle) private var style
 14 |     @Environment(\.scrollOptions) private var scrollOptions
    |                                               `- note: property declared here
 15 |
 16 |     private let data: Data
    :
 33 |                             let (alignmentGuides, gridHeight) = self.alignmentsAndGridHeight(columns: self.style.columns,
 34 |                                                                                              spacing: self.style.spacing,
 35 |                                                                                              scrollDirection: self.scrollOptions.direction,
    |                                                                                                                    `- warning: main actor-isolated property 'scrollOptions' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 36 |                                                                                              preferences: preferences)
 37 |                             DispatchQueue.main.async {
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:59:89: warning: capture of 'element' with non-sendable type 'Data.Element' in a '@Sendable' closure
 57 |                                height: self.scrollOptions.direction == .horizontal ? columnWidth : nil)
 58 |                         .background(PreferenceSetter(id: element[keyPath: self.dataId]))
 59 |                         .alignmentGuide(.top, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.y ?? 0 })
    |                                                                                         `- warning: capture of 'element' with non-sendable type 'Data.Element' in a '@Sendable' closure
 60 |                         .alignmentGuide(.leading, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.x ?? 0 })
 61 |                         .opacity(self.alignmentGuides[element[keyPath: self.dataId]] != nil ? 1 : 0)
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:59:73: warning: main actor-isolated property 'alignmentGuides' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 21 |     @State private var gridHeight: CGFloat = 0
 22 |
 23 |     @State private var alignmentGuides = [AnyHashable: CGPoint]() {
    |                        `- note: property declared here
 24 |         didSet { loaded = !oldValue.isEmpty }
 25 |     }
    :
 57 |                                height: self.scrollOptions.direction == .horizontal ? columnWidth : nil)
 58 |                         .background(PreferenceSetter(id: element[keyPath: self.dataId]))
 59 |                         .alignmentGuide(.top, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.y ?? 0 })
    |                                                                         `- warning: main actor-isolated property 'alignmentGuides' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 60 |                         .alignmentGuide(.leading, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.x ?? 0 })
 61 |                         .opacity(self.alignmentGuides[element[keyPath: self.dataId]] != nil ? 1 : 0)
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:59:111: warning: main actor-isolated property 'dataId' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 15 |
 16 |     private let data: Data
 17 |     private let dataId: KeyPath<Data.Element, ID>
    |                 `- note: property declared here
 18 |     private let content: (Data.Element) -> Content
 19 |
    :
 57 |                                height: self.scrollOptions.direction == .horizontal ? columnWidth : nil)
 58 |                         .background(PreferenceSetter(id: element[keyPath: self.dataId]))
 59 |                         .alignmentGuide(.top, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.y ?? 0 })
    |                                                                                                               `- warning: main actor-isolated property 'dataId' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 60 |                         .alignmentGuide(.leading, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.x ?? 0 })
 61 |                         .opacity(self.alignmentGuides[element[keyPath: self.dataId]] != nil ? 1 : 0)
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:60:93: warning: capture of 'element' with non-sendable type 'Data.Element' in a '@Sendable' closure
 58 |                         .background(PreferenceSetter(id: element[keyPath: self.dataId]))
 59 |                         .alignmentGuide(.top, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.y ?? 0 })
 60 |                         .alignmentGuide(.leading, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.x ?? 0 })
    |                                                                                             `- warning: capture of 'element' with non-sendable type 'Data.Element' in a '@Sendable' closure
 61 |                         .opacity(self.alignmentGuides[element[keyPath: self.dataId]] != nil ? 1 : 0)
 62 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:60:77: warning: main actor-isolated property 'alignmentGuides' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 21 |     @State private var gridHeight: CGFloat = 0
 22 |
 23 |     @State private var alignmentGuides = [AnyHashable: CGPoint]() {
    |                        `- note: property declared here
 24 |         didSet { loaded = !oldValue.isEmpty }
 25 |     }
    :
 58 |                         .background(PreferenceSetter(id: element[keyPath: self.dataId]))
 59 |                         .alignmentGuide(.top, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.y ?? 0 })
 60 |                         .alignmentGuide(.leading, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.x ?? 0 })
    |                                                                             `- warning: main actor-isolated property 'alignmentGuides' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 61 |                         .opacity(self.alignmentGuides[element[keyPath: self.dataId]] != nil ? 1 : 0)
 62 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/WaterfallGrid.swift:60:115: warning: main actor-isolated property 'dataId' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 15 |
 16 |     private let data: Data
 17 |     private let dataId: KeyPath<Data.Element, ID>
    |                 `- note: property declared here
 18 |     private let content: (Data.Element) -> Content
 19 |
    :
 58 |                         .background(PreferenceSetter(id: element[keyPath: self.dataId]))
 59 |                         .alignmentGuide(.top, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.y ?? 0 })
 60 |                         .alignmentGuide(.leading, computeValue: { _ in self.alignmentGuides[element[keyPath: self.dataId]]?.x ?? 0 })
    |                                                                                                                   `- warning: main actor-isolated property 'dataId' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 61 |                         .opacity(self.alignmentGuides[element[keyPath: self.dataId]] != nil ? 1 : 0)
 62 |                 }
[9/11] Emitting module WaterfallGrid
/Users/admin/builder/spi-builder-workspace/Sources/WaterfallGrid/Preference/ElementPreference.swift:17: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
15 |     typealias Value = [ElementPreferenceData]
16 |
17 |     static var defaultValue: [ElementPreferenceData] = []
   |                |- 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: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 |
19 |     static func reduce(value: inout [ElementPreferenceData], nextValue: () -> [ElementPreferenceData]) {
[10/11] Compiling WaterfallGrid View+GridStyle.swift
[11/11] Compiling WaterfallGrid GridSyle.swift
Build complete! (9.27s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "WaterfallGrid",
  "name" : "WaterfallGrid",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "WaterfallGrid",
      "targets" : [
        "WaterfallGrid"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "WaterfallGridTests",
      "module_type" : "SwiftTarget",
      "name" : "WaterfallGridTests",
      "path" : "Tests/WaterfallGridTests",
      "sources" : [
        "PositiveNumberTests.swift",
        "WaterfallGridTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "WaterfallGrid"
      ],
      "type" : "test"
    },
    {
      "c99name" : "WaterfallGrid",
      "module_type" : "SwiftTarget",
      "name" : "WaterfallGrid",
      "path" : "Sources/WaterfallGrid",
      "product_memberships" : [
        "WaterfallGrid"
      ],
      "sources" : [
        "Environment/GridSyle.swift",
        "Environment/PositiveNumber.swift",
        "Environment/ScrollOptions.swift",
        "Preference/ElementPreference.swift",
        "Preference/PreferenceSetter.swift",
        "View+GridStyle.swift",
        "View+ScrollOptions.swift",
        "WaterfallGrid.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.