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 SimpleAnalytics, reference master (c03e6f), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 16:56:42 UTC.

Swift 6 data race errors: 3

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/dennisbirch/simple-analytics.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/dennisbirch/simple-analytics
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at c03e6f0 Updated SmpleAnalytics Reader screenshot image
Cloned https://github.com/dennisbirch/simple-analytics.git
Revision (git rev-parse @):
c03e6f0e37f85f6dd1e4acdf089f7779b61c6f04
SUCCESS checkout https://github.com/dennisbirch/simple-analytics.git at master
========================================
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": "simple-analytics",
      "name": "SimpleAnalytics",
      "url": "https://github.com/dennisbirch/simple-analytics.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/simple-analytics",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/dennisbirch/simple-analytics.git
[5/470] Fetching simple-analytics
Fetched https://github.com/dennisbirch/simple-analytics.git from cache (1.08s)
Creating working copy for https://github.com/dennisbirch/simple-analytics.git
Working copy of https://github.com/dennisbirch/simple-analytics.git resolved at master (c03e6f0)
warning: '.resolve-product-dependencies': dependency 'simple-analytics' 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/dennisbirch/simple-analytics.git
https://github.com/dennisbirch/simple-analytics.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SimpleAnalytics",
  "name" : "SimpleAnalytics",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "10.0"
    },
    {
      "name" : "macos",
      "version" : "10.12"
    }
  ],
  "products" : [
    {
      "name" : "SimpleAnalytics",
      "targets" : [
        "SimpleAnalytics"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SimpleAnalyticsTests",
      "module_type" : "SwiftTarget",
      "name" : "SimpleAnalyticsTests",
      "path" : "Tests/SimpleAnalyticsTests",
      "sources" : [
        "SimpleAnalyticsTests.swift",
        "SubmissionTests.swift"
      ],
      "target_dependencies" : [
        "SimpleAnalytics"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SimpleAnalytics",
      "module_type" : "SwiftTarget",
      "name" : "SimpleAnalytics",
      "path" : "Sources/SimpleAnalytics",
      "product_memberships" : [
        "SimpleAnalytics"
      ],
      "sources" : [
        "AnalyticsCount.swift",
        "AnalyticsItem.swift",
        "AnalyticsSubmitter.swift",
        "AppAnalytics.swift",
        "SimpleAnalytics.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
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/8] Compiling SimpleAnalytics SimpleAnalytics.swift
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/SimpleAnalytics.swift:5:24: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 3 |
 4 | public struct SimpleAnalytics {
 5 |     private static var logger = OSLog(subsystem: "SimpleAnalytics", category: "")
   |                        |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 6 |
 7 |     public static func debugLog(_ message: StaticString, _ arg: String? = nil) {
[4/8] Compiling SimpleAnalytics AnalyticsItem.swift
[5/8] Compiling SimpleAnalytics AnalyticsSubmitter.swift
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AnalyticsSubmitter.swift:62:21: warning: capture of 'errorHandler' with non-sendable type '([AnalyticsItem], [AnalyticsCount]) -> Void' in a '@Sendable' closure
 60 |                 if let taskError = error {
 61 |                     SimpleAnalytics.debugLog("Error posting analytics request: %@", taskError.localizedDescription)
 62 |                     errorHandler(items, itemCounts)
    |                     |- warning: capture of 'errorHandler' with non-sendable type '([AnalyticsItem], [AnalyticsCount]) -> Void' in a '@Sendable' closure
    |                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 63 |                 } else {
 64 |                     if let httpResponse = response as? HTTPURLResponse {
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AnalyticsSubmitter.swift:86:25: warning: capture of 'successHandler' with non-sendable type '(String) -> Void' in a '@Sendable' closure
 84 |                     if let data = data {
 85 |                         let message = self.handleResponseData(data)
 86 |                         successHandler(message)
    |                         |- warning: capture of 'successHandler' with non-sendable type '(String) -> Void' in a '@Sendable' closure
    |                         `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 87 |                     } else {
 88 |                         errorHandler(items, itemCounts)
[6/8] Compiling SimpleAnalytics AppAnalytics.swift
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:86:15: warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode
 84 |     ///
 85 |     /// This method is required for configuring the framework on macOS.
 86 |     @available (iOS, deprecated: 13.0, message: "Please use the setEndpoint(_:, sharedApp:) method")
    |               `- warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode
 87 |     @objc public static func setEndpoint(_ urlString: String, deviceID: String, submissionCompletionCallback: (() -> Void)? = nil) {
 88 |         shared.endpoint = urlString
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:48:24: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 46 |     private var shouldSubmitAtAppDismiss = true
 47 |
 48 |     private static var shared = AppAnalytics(deviceID: "")
    |                        |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 49 |     private static let persistenceFileName = "PersistedAnalytics"
 50 |
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:320:13: warning: capture of 'self' with non-sendable type 'AppAnalytics?' in a '@Sendable' closure
 14 | import os.log
 15 |
 16 | @objc public class AppAnalytics: NSObject {
    |                    `- note: class 'AppAnalytics' does not conform to the 'Sendable' protocol
 17 |     // MARK: - Public & Accessible Properties
 18 |
    :
318 |
319 |         DispatchQueue.global().async { [weak self] in
320 |             self?.submitItems(items, counters: counters, with: submitter)
    |             `- warning: capture of 'self' with non-sendable type 'AppAnalytics?' in a '@Sendable' closure
321 |         }
322 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:320:64: warning: capture of 'submitter' with non-sendable type 'any AnalyticsSubmitting' in a '@Sendable' closure
318 |
319 |         DispatchQueue.global().async { [weak self] in
320 |             self?.submitItems(items, counters: counters, with: submitter)
    |                                                                `- warning: capture of 'submitter' with non-sendable type 'any AnalyticsSubmitting' in a '@Sendable' closure
321 |         }
322 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AnalyticsSubmitter.swift:10:10: note: protocol 'AnalyticsSubmitting' does not conform to the 'Sendable' protocol
  8 | import Foundation
  9 |
 10 | protocol AnalyticsSubmitting {
    |          `- note: protocol 'AnalyticsSubmitting' does not conform to the 'Sendable' protocol
 11 |     func submitItems(_ items: [AnalyticsItem], itemCounts: [AnalyticsCount],
 12 |                      successHandler: @escaping(String) -> Void,
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:328:31: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
326 |             DispatchQueue.main.async {
327 |                 SimpleAnalytics.debugLog("Success submitting analytics: %@", message)
328 |                 if let base = self?.baseItemCount {
    |                               |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                               `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
329 |                     self?.maxItemCount = base
330 |                 }
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:346:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
344 |             DispatchQueue.main.async {
345 |                 SimpleAnalytics.debugLog("Analytics submission failed. Restoring items.")
346 |                 self?.resetItems(errorItems, counters: errorCounters)
    |                 |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
347 | #if os(iOS)
348 |                 if let task = self?.backgroundTaskID,
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:386:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
384 | #elseif os(macOS)
385 |             DispatchQueue.main.async { [weak self] in
386 |                 self?.clearAndSubmitItems()
    |                 |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
387 |             }
388 | #endif
[7/8] Compiling SimpleAnalytics AnalyticsCount.swift
[8/8] Emitting module SimpleAnalytics
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:86:15: warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode
 84 |     ///
 85 |     /// This method is required for configuring the framework on macOS.
 86 |     @available (iOS, deprecated: 13.0, message: "Please use the setEndpoint(_:, sharedApp:) method")
    |               `- warning: extraneous whitespace between attribute name and '('; this is an error in the Swift 6 language mode
 87 |     @objc public static func setEndpoint(_ urlString: String, deviceID: String, submissionCompletionCallback: (() -> Void)? = nil) {
 88 |         shared.endpoint = urlString
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/AppAnalytics.swift:48:24: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 46 |     private var shouldSubmitAtAppDismiss = true
 47 |
 48 |     private static var shared = AppAnalytics(deviceID: "")
    |                        |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 49 |     private static let persistenceFileName = "PersistedAnalytics"
 50 |
/Users/admin/builder/spi-builder-workspace/Sources/SimpleAnalytics/SimpleAnalytics.swift:5:24: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 3 |
 4 | public struct SimpleAnalytics {
 5 |     private static var logger = OSLog(subsystem: "SimpleAnalytics", category: "")
   |                        |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 6 |
 7 |     public static func debugLog(_ message: StaticString, _ arg: String? = nil) {
Build complete! (6.27s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SimpleAnalytics",
  "name" : "SimpleAnalytics",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "10.0"
    },
    {
      "name" : "macos",
      "version" : "10.12"
    }
  ],
  "products" : [
    {
      "name" : "SimpleAnalytics",
      "targets" : [
        "SimpleAnalytics"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SimpleAnalyticsTests",
      "module_type" : "SwiftTarget",
      "name" : "SimpleAnalyticsTests",
      "path" : "Tests/SimpleAnalyticsTests",
      "sources" : [
        "SimpleAnalyticsTests.swift",
        "SubmissionTests.swift"
      ],
      "target_dependencies" : [
        "SimpleAnalytics"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SimpleAnalytics",
      "module_type" : "SwiftTarget",
      "name" : "SimpleAnalytics",
      "path" : "Sources/SimpleAnalytics",
      "product_memberships" : [
        "SimpleAnalytics"
      ],
      "sources" : [
        "AnalyticsCount.swift",
        "AnalyticsItem.swift",
        "AnalyticsSubmitter.swift",
        "AppAnalytics.swift",
        "SimpleAnalytics.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Done.