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

Swift 6 data race errors: 2

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/nakkht/logr.git
Reference: develop
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/nakkht/logr
 * branch            develop    -> FETCH_HEAD
 * [new branch]      develop    -> origin/develop
HEAD is now at 89b1c58 Bumped swift tools version to 5.6 on main Package.swift
Cloned https://github.com/nakkht/logr.git
Revision (git rev-parse @):
89b1c58c3418380036d5bf87933be3e2645dc6ee
SUCCESS checkout https://github.com/nakkht/logr.git at develop
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/nakkht/logr.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/17] Compiling Logr Style.swift
[4/17] Compiling Logr Target.swift
[5/18] Compiling Logr FileTargetConfig.swift
[6/18] Compiling Logr Config.swift
[7/18] Compiling Logr DispatchQueue.swift
[8/18] Compiling Logr Message.swift
[9/18] Compiling Logr MetaInfo.swift
[10/18] Compiling Logr ConsoleTarget.swift
[11/18] Compiling Logr ConsoleTargetConfig.swift
[12/18] Compiling Logr Logr.swift
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:22:16: warning: static property 'dispatchQueue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
20 | public class LogrService {
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
   |                |- warning: static property 'dispatchQueue' 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 'dispatchQueue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'dispatchQueue' 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
23 |     static var targets: [Target]?
24 |
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:23:16: warning: static property 'targets' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
23 |     static var targets: [Target]?
   |                |- warning: static property 'targets' 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 'targets' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'targets' 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
24 |
25 |     let async: Bool
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:49:47: warning: capture of 'self' with non-sendable type 'LogrService' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 |
19 | /// Main logging service used for dispatching messages to dedicated targets for further processing.
20 | public class LogrService {
   |              `- note: class 'LogrService' does not conform to the 'Sendable' protocol
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
   :
47 |     public func log(_ message: Message) {
48 |         if async {
49 |             LogrService.dispatchQueue.async { self.dispatchLog(message) }
   |                                               `- warning: capture of 'self' with non-sendable type 'LogrService' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 |         } else {
51 |             LogrService.dispatchQueue.sync { self.dispatchLog(message) }
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:49:64: warning: capture of 'message' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
47 |     public func log(_ message: Message) {
48 |         if async {
49 |             LogrService.dispatchQueue.async { self.dispatchLog(message) }
   |                                                                `- warning: capture of 'message' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 |         } else {
51 |             LogrService.dispatchQueue.sync { self.dispatchLog(message) }
/Users/admin/builder/spi-builder-workspace/Sources/Logr/Message.swift:18:15: note: consider making struct 'Message' conform to the 'Sendable' protocol
16 |
17 | /// Immutable struct encapsulating all log message data.
18 | public struct Message: Equatable {
   |               `- note: consider making struct 'Message' conform to the 'Sendable' protocol
19 |
20 |     /// Log level of the log message.
[13/18] Compiling Logr LogrService.swift
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:22:16: warning: static property 'dispatchQueue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
20 | public class LogrService {
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
   |                |- warning: static property 'dispatchQueue' 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 'dispatchQueue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'dispatchQueue' 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
23 |     static var targets: [Target]?
24 |
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:23:16: warning: static property 'targets' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
23 |     static var targets: [Target]?
   |                |- warning: static property 'targets' 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 'targets' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'targets' 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
24 |
25 |     let async: Bool
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:49:47: warning: capture of 'self' with non-sendable type 'LogrService' in a `@Sendable` closure; this is an error in the Swift 6 language mode
18 |
19 | /// Main logging service used for dispatching messages to dedicated targets for further processing.
20 | public class LogrService {
   |              `- note: class 'LogrService' does not conform to the 'Sendable' protocol
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
   :
47 |     public func log(_ message: Message) {
48 |         if async {
49 |             LogrService.dispatchQueue.async { self.dispatchLog(message) }
   |                                               `- warning: capture of 'self' with non-sendable type 'LogrService' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 |         } else {
51 |             LogrService.dispatchQueue.sync { self.dispatchLog(message) }
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:49:64: warning: capture of 'message' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
47 |     public func log(_ message: Message) {
48 |         if async {
49 |             LogrService.dispatchQueue.async { self.dispatchLog(message) }
   |                                                                `- warning: capture of 'message' with non-sendable type 'Message' in a `@Sendable` closure; this is an error in the Swift 6 language mode
50 |         } else {
51 |             LogrService.dispatchQueue.sync { self.dispatchLog(message) }
/Users/admin/builder/spi-builder-workspace/Sources/Logr/Message.swift:18:15: note: consider making struct 'Message' conform to the 'Sendable' protocol
16 |
17 | /// Immutable struct encapsulating all log message data.
18 | public struct Message: Equatable {
   |               `- note: consider making struct 'Message' conform to the 'Sendable' protocol
19 |
20 |     /// Log level of the log message.
[14/18] Compiling Logr OSLogType.swift
[15/18] Compiling Logr LogLevel.swift
[16/18] Emitting module Logr
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:22:16: warning: static property 'dispatchQueue' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
20 | public class LogrService {
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
   |                |- warning: static property 'dispatchQueue' 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 'dispatchQueue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'dispatchQueue' 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
23 |     static var targets: [Target]?
24 |
/Users/admin/builder/spi-builder-workspace/Sources/Logr/LogrService.swift:23:16: warning: static property 'targets' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
21 |
22 |     static var dispatchQueue = DispatchQueue(label: "logr.service", qos: .background)
23 |     static var targets: [Target]?
   |                |- warning: static property 'targets' 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 'targets' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'targets' 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
24 |
25 |     let async: Bool
[17/18] Compiling Logr FileTarget.swift
/Users/admin/builder/spi-builder-workspace/Sources/Logr/Target/File/FileTarget.swift:68:13: warning: capture of 'self' with non-sendable type 'FileTarget' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 18 |
 19 | /// Target class for logging to a file.
 20 | open class FileTarget: Target {
    |            `- note: class 'FileTarget' does not conform to the 'Sendable' protocol
 21 |
 22 |     /// Base directory URL for logged files.
    :
 66 |         dispatchQueue.async {
 67 |             guard let data = log.data(using: .utf8), data.count > 0 else { return }
 68 |             self.fileHandle?.seekToEndOfFile()
    |             `- warning: capture of 'self' with non-sendable type 'FileTarget' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |             self.fileHandle?.write(data)
 70 |             self.fileHandle?.synchronizeFile()
/Users/admin/builder/spi-builder-workspace/Sources/Logr/Target/File/FileTarget.swift:80:13: warning: capture of 'self' with non-sendable type 'FileTarget' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 18 |
 19 | /// Target class for logging to a file.
 20 | open class FileTarget: Target {
    |            `- note: class 'FileTarget' does not conform to the 'Sendable' protocol
 21 |
 22 |     /// Base directory URL for logged files.
    :
 78 |     public func forceArchive(_ completionHandler: @escaping (() -> Void)) {
 79 |         dispatchQueue.async {
 80 |             self.archive()
    |             `- warning: capture of 'self' with non-sendable type 'FileTarget' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 81 |             completionHandler()
 82 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Logr/Target/File/FileTarget.swift:81:13: warning: capture of 'completionHandler' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 79 |         dispatchQueue.async {
 80 |             self.archive()
 81 |             completionHandler()
    |             |- warning: capture of 'completionHandler' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |             `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 82 |         }
 83 |     }
[18/18] Compiling Logr TimeSpan.swift
Build complete! (22.35s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Logr",
  "name" : "Logr",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.14"
    },
    {
      "name" : "ios",
      "version" : "10.0"
    },
    {
      "name" : "tvos",
      "version" : "10.0"
    },
    {
      "name" : "watchos",
      "version" : "3.0"
    }
  ],
  "products" : [
    {
      "name" : "Logr",
      "targets" : [
        "Logr"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "LogrTests",
      "module_type" : "SwiftTarget",
      "name" : "LogrTests",
      "path" : "Tests/LogrTests",
      "sources" : [
        "ConfigTests.swift",
        "Extension/OsLogTypeTests.swift",
        "LogLevelTests.swift",
        "LogrServiceTests.swift",
        "LogrTests.swift",
        "MessageTests.swift",
        "Target/ConsoleTargetTests.swift",
        "Target/FileTargetTests.swift",
        "Util/LogrServiceMock.swift",
        "Util/TargetMock.swift"
      ],
      "target_dependencies" : [
        "Logr"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Logr",
      "module_type" : "SwiftTarget",
      "name" : "Logr",
      "path" : "Sources/Logr",
      "product_memberships" : [
        "Logr"
      ],
      "sources" : [
        "Config.swift",
        "Extension/DispatchQueue.swift",
        "Extension/OSLogType.swift",
        "LogLevel.swift",
        "Logr.swift",
        "LogrService.swift",
        "Message.swift",
        "MetaInfo.swift",
        "Target/Console/ConsoleTarget.swift",
        "Target/Console/ConsoleTargetConfig.swift",
        "Target/File/FileTarget.swift",
        "Target/File/FileTargetConfig.swift",
        "Target/Style.swift",
        "Target/Target.swift",
        "Target/TimeSpan.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.0"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.