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 BlackBox, reference main (c486c0), with Swift 6.0 for macOS (SPM) on 5 Nov 2024 13:53:13 UTC.

Swift 6 data race errors: 6

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/dodobrands/BlackBox.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/dodobrands/BlackBox
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at c486c08 Updated Xcode (#64)
Cloned https://github.com/dodobrands/BlackBox.git
Revision (git rev-parse @):
c486c08751bd1453681c2e261c2878f500b6062c
SUCCESS checkout https://github.com/dodobrands/BlackBox.git at main
Fetching https://github.com/apple/swift-docc-plugin
[1/2038] Fetching swift-docc-plugin
Fetched https://github.com/apple/swift-docc-plugin from cache (1.29s)
Computing version for https://github.com/apple/swift-docc-plugin
Computed https://github.com/apple/swift-docc-plugin at 1.0.0 (0.66s)
Creating working copy for https://github.com/apple/swift-docc-plugin
Working copy of https://github.com/apple/swift-docc-plugin resolved at 1.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": "blackbox",
      "name": "BlackBox",
      "url": "https://github.com/dodobrands/BlackBox.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/BlackBox",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/dodobrands/BlackBox.git
[1/2134] Fetching blackbox
Fetched https://github.com/dodobrands/BlackBox.git from cache (0.98s)
Creating working copy for https://github.com/dodobrands/BlackBox.git
Working copy of https://github.com/dodobrands/BlackBox.git resolved at main (c486c08)
warning: '.resolve-product-dependencies': dependency 'blackbox' 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/dodobrands/BlackBox.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
[1/1] Compiling plugin Swift-DocC
[2/2] Compiling plugin Swift-DocC Preview
Building for debugging...
[2/5] Write sources
[4/5] Write swift-version--7754E27361AE5C74.txt
[6/15] Compiling BlackBox BBLogFormat.swift
[7/15] Compiling BlackBox OSSignpostLogger.swift
[8/15] Compiling BlackBox BBHelpers.swift
[9/15] Compiling BlackBox FSLogger.swift
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/Loggers/FSLogger.swift:82:17: warning: capture of 'self' with non-sendable type 'FSLogger' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  3 | /// Redirects logs to text file
  4 | /// > Warning: Doesn't support filesize limits, use at your own risk.
  5 | public class FSLogger: BBLoggerProtocol {
    |              `- note: class 'FSLogger' does not conform to the 'Sendable' protocol
  6 |     /// Full path to log file
  7 |     public let fullpath: URL
    :
 80 |         if let queue {
 81 |             queue.async {
 82 |                 self.fsLog(event)
    |                 `- warning: capture of 'self' with non-sendable type 'FSLogger' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 83 |             }
 84 |         } else {
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/Loggers/FSLogger.swift:82:28: warning: capture of 'event' with non-sendable type 'BlackBox.GenericEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 80 |         if let queue {
 81 |             queue.async {
 82 |                 self.fsLog(event)
    |                            `- warning: capture of 'event' with non-sendable type 'BlackBox.GenericEvent' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 83 |             }
 84 |         } else {
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BlackBoxEvents.swift:8:18: note: class 'GenericEvent' does not conform to the 'Sendable' protocol
  6 | extension BlackBox {
  7 |     /// Any log event
  8 |     public class GenericEvent: Equatable {
    |                  `- note: class 'GenericEvent' does not conform to the 'Sendable' protocol
  9 |         /// Unique event ID
 10 |         public let id: UUID
[10/15] Compiling BlackBox BlackBoxEvents.swift
[11/15] Compiling BlackBox BBLoggerProtocol.swift
[12/15] Compiling BlackBox BlackBox.swift
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BlackBox.swift:7:23: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  5 |     ///
  6 |     /// Create instance with desired loggers and replace this one
  7 |     public static var instance = BlackBox.default
    |                       |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'instance' 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
  8 |
  9 |     private let loggers: [BBLoggerProtocol]
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BlackBox.swift:301:16: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BlackBox' may have shared mutable state; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | public class BlackBox {
    |              `- note: class 'BlackBox' does not conform to the 'Sendable' protocol
  4 |     /// Instance that holds loggers
  5 |     ///
    :
299 |
300 | extension BlackBox {
301 |     static let `default` = BlackBox(loggers: BlackBox.defaultLoggers)
    |                |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BlackBox' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: annotate 'default' 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
302 |
303 |     public static var defaultLoggers: [BBLoggerProtocol] {
[13/15] Emitting module BlackBox
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:29:23: warning: static property 'debug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// See ``BBLogFormat/levelsWithIcons`` for more details
28 | public struct BBLogIcon {
29 |     public static var debug =  "🛠"
   |                       |- warning: static property 'debug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'debug' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'debug' 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
30 |     public static var info =  "ℹ️"
31 |     public static var warning =  "⚠️"
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:30:23: warning: static property 'info' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | public struct BBLogIcon {
29 |     public static var debug =  "🛠"
30 |     public static var info =  "ℹ️"
   |                       |- warning: static property 'info' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'info' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'info' 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
31 |     public static var warning =  "⚠️"
32 |     public static var error =  "❌"
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:31:23: warning: static property 'warning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
29 |     public static var debug =  "🛠"
30 |     public static var info =  "ℹ️"
31 |     public static var warning =  "⚠️"
   |                       |- warning: static property 'warning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'warning' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'warning' 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
32 |     public static var error =  "❌"
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:32:23: warning: static property 'error' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
30 |     public static var info =  "ℹ️"
31 |     public static var warning =  "⚠️"
32 |     public static var error =  "❌"
   |                       |- warning: static property 'error' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'error' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'error' 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
33 | }
34 |
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BlackBox.swift:7:23: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  5 |     ///
  6 |     /// Create instance with desired loggers and replace this one
  7 |     public static var instance = BlackBox.default
    |                       |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'instance' 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
  8 |
  9 |     private let loggers: [BBLoggerProtocol]
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BlackBox.swift:301:16: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BlackBox' may have shared mutable state; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | public class BlackBox {
    |              `- note: class 'BlackBox' does not conform to the 'Sendable' protocol
  4 |     /// Instance that holds loggers
  5 |     ///
    :
299 |
300 | extension BlackBox {
301 |     static let `default` = BlackBox(loggers: BlackBox.defaultLoggers)
    |                |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'BlackBox' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: annotate 'default' 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
302 |
303 |     public static var defaultLoggers: [BBLoggerProtocol] {
[14/15] Compiling BlackBox BBLogLevel.swift
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:29:23: warning: static property 'debug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
27 | /// See ``BBLogFormat/levelsWithIcons`` for more details
28 | public struct BBLogIcon {
29 |     public static var debug =  "🛠"
   |                       |- warning: static property 'debug' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'debug' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'debug' 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
30 |     public static var info =  "ℹ️"
31 |     public static var warning =  "⚠️"
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:30:23: warning: static property 'info' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
28 | public struct BBLogIcon {
29 |     public static var debug =  "🛠"
30 |     public static var info =  "ℹ️"
   |                       |- warning: static property 'info' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'info' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'info' 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
31 |     public static var warning =  "⚠️"
32 |     public static var error =  "❌"
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:31:23: warning: static property 'warning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
29 |     public static var debug =  "🛠"
30 |     public static var info =  "ℹ️"
31 |     public static var warning =  "⚠️"
   |                       |- warning: static property 'warning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'warning' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'warning' 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
32 |     public static var error =  "❌"
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/BlackBox/BBLogLevel.swift:32:23: warning: static property 'error' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
30 |     public static var info =  "ℹ️"
31 |     public static var warning =  "⚠️"
32 |     public static var error =  "❌"
   |                       |- warning: static property 'error' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'error' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: annotate 'error' 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
33 | }
34 |
[15/15] Compiling BlackBox OSLogger.swift
[16/17] Emitting module ExampleModule
[17/17] Compiling ExampleModule ExampleService.swift
Build complete! (26.62s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-docc-plugin",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.0.0",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/apple/swift-docc-plugin"
    }
  ],
  "manifest_display_name" : "BlackBox",
  "name" : "BlackBox",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "12.0"
    },
    {
      "name" : "macos",
      "version" : "10.14"
    },
    {
      "name" : "tvos",
      "version" : "12.0"
    },
    {
      "name" : "watchos",
      "version" : "5.0"
    }
  ],
  "products" : [
    {
      "name" : "BlackBox",
      "targets" : [
        "BlackBox"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "ExampleModule",
      "module_type" : "SwiftTarget",
      "name" : "ExampleModule",
      "path" : "Sources/ExampleModule",
      "sources" : [
        "ExampleService.swift"
      ],
      "target_dependencies" : [
        "BlackBox"
      ],
      "type" : "library"
    },
    {
      "c99name" : "BlackBoxTests",
      "module_type" : "SwiftTarget",
      "name" : "BlackBoxTests",
      "path" : "Tests/BlackBoxTests",
      "sources" : [
        "BackwardsCompatibilityTests.swift",
        "BlackBoxEndEventTests.swift",
        "BlackBoxErrorEventTests.swift",
        "BlackBoxGenericEventTests.swift",
        "BlackBoxStartEventTests.swift",
        "BlackBoxTestCase.swift",
        "Helpers/AnakinKills.swift",
        "Helpers/Lightsaber.swift",
        "LoggerMock.swift",
        "OSLoggerTests.swift",
        "OSSignpostLoggerTests.swift"
      ],
      "target_dependencies" : [
        "BlackBox",
        "ExampleModule"
      ],
      "type" : "test"
    },
    {
      "c99name" : "BlackBox",
      "module_type" : "SwiftTarget",
      "name" : "BlackBox",
      "path" : "Sources/BlackBox",
      "product_memberships" : [
        "BlackBox"
      ],
      "sources" : [
        "BBLogFormat.swift",
        "BBLogLevel.swift",
        "BBLoggerProtocol.swift",
        "BlackBox.swift",
        "BlackBoxEvents.swift",
        "Helpers/BBHelpers.swift",
        "Loggers/FSLogger.swift",
        "Loggers/OSLogger.swift",
        "Loggers/OSSignpostLogger.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.6"
}
Done.