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 Mocker, reference master (77b5ab), with Swift 6.0 for macOS (SPM) on 11 Dec 2024 20:45:12 UTC.

Swift 6 data race errors: 3

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 -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.58.5
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/WeTransfer/Mocker.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/WeTransfer/Mocker
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 77b5abb Restore CODEOWNERS from backup in master branch
Submodule path 'Submodules/WeTransfer-iOS-CI': checked out '41b37067e599cdbc23dfd1cc86848f015b35a7dc'
Submodule 'Submodules/WeTransfer-iOS-CI' (https://github.com/WeTransfer/WeTransfer-iOS-CI.git) registered for path 'Submodules/WeTransfer-iOS-CI'
Cloning into '/Users/admin/builder/spi-builder-workspace/Submodules/WeTransfer-iOS-CI'...
Cloned https://github.com/WeTransfer/Mocker.git
Revision (git rev-parse @):
77b5abb4c803ca8199bdc7c6f4a9e0c78dcb6a93
SUCCESS checkout https://github.com/WeTransfer/Mocker.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": "mocker",
      "name": "Mocker",
      "url": "https://github.com/WeTransfer/Mocker.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Mocker",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/WeTransfer/Mocker.git
[1/1891] Fetching mocker
Fetched https://github.com/WeTransfer/Mocker.git from cache (1.02s)
Creating working copy for https://github.com/WeTransfer/Mocker.git
Working copy of https://github.com/WeTransfer/Mocker.git resolved at master (77b5abb)
warning: '.resolve-product-dependencies': dependency 'mocker' 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/WeTransfer/Mocker.git
https://github.com/WeTransfer/Mocker.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Mocker",
  "name" : "Mocker",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "12.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "Mocker",
      "targets" : [
        "Mocker"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "MockerTests",
      "module_type" : "SwiftTarget",
      "name" : "MockerTests",
      "path" : "Tests/MockerTests",
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/MockerTests/Resources/JSON Files/example.json",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/MockerTests/Resources/sample-redirect-get.data",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/MockerTests/Resources/wetransfer_bot_avatar.png",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "MockTests.swift",
        "MockedData.swift",
        "MockerTests.swift"
      ],
      "target_dependencies" : [
        "Mocker"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Mocker",
      "module_type" : "SwiftTarget",
      "name" : "Mocker",
      "path" : "Sources/Mocker",
      "product_memberships" : [
        "Mocker"
      ],
      "sources" : [
        "Mock+DataType.swift",
        "Mock.swift",
        "Mocker.swift",
        "MockingURLProtocol.swift",
        "OnRequestHandler.swift",
        "URLMatchType.swift",
        "XCTest+Mocker.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
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 -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--7754E27361AE5C74.txt
[3/10] Compiling Mocker URLMatchType.swift
[4/10] Compiling Mocker XCTest+Mocker.swift
[5/10] Compiling Mocker OnRequestHandler.swift
[6/10] Compiling Mocker MockingURLProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:58:23: warning: static property 'httpVersion' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 56 |
 57 |     /// The HTTP Version to use in the mocked response.
 58 |     public static var httpVersion: HTTPVersion = HTTPVersion.http1_1
    |                       |- warning: static property 'httpVersion' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'httpVersion' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'httpVersion' 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
 59 |
 60 |     /// The registrated mocks.
[7/10] Compiling Mocker Mock.swift
[8/10] Compiling Mocker Mock+DataType.swift
[9/10] Emitting module Mocker
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:52:23: warning: static property 'mode' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 50 |
 51 |     /// The mode defines how unknown URLs are handled. Defaults to `optout` which means requests without a mock will fail.
 52 |     public static var mode: Mode = .optout
    |                       |- warning: static property 'mode' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'mode' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'mode' 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
 53 |
 54 |     /// The shared instance of the Mocker, can be used to register and return mocks.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:55:25: 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
 53 |
 54 |     /// The shared instance of the Mocker, can be used to register and return mocks.
 55 |     internal static var shared = Mocker()
    |                         |- 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: annotate 'shared' 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
 56 |
 57 |     /// The HTTP Version to use in the mocked response.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:58:23: warning: static property 'httpVersion' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 56 |
 57 |     /// The HTTP Version to use in the mocked response.
 58 |     public static var httpVersion: HTTPVersion = HTTPVersion.http1_1
    |                       |- warning: static property 'httpVersion' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'httpVersion' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'httpVersion' 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
 59 |
 60 |     /// The registrated mocks.
[10/10] Compiling Mocker Mocker.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:52:23: warning: static property 'mode' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 50 |
 51 |     /// The mode defines how unknown URLs are handled. Defaults to `optout` which means requests without a mock will fail.
 52 |     public static var mode: Mode = .optout
    |                       |- warning: static property 'mode' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'mode' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'mode' 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
 53 |
 54 |     /// The shared instance of the Mocker, can be used to register and return mocks.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:55:25: 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
 53 |
 54 |     /// The shared instance of the Mocker, can be used to register and return mocks.
 55 |     internal static var shared = Mocker()
    |                         |- 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: annotate 'shared' 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
 56 |
 57 |     /// The HTTP Version to use in the mocked response.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:58:23: warning: static property 'httpVersion' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 56 |
 57 |     /// The HTTP Version to use in the mocked response.
 58 |     public static var httpVersion: HTTPVersion = HTTPVersion.http1_1
    |                       |- warning: static property 'httpVersion' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: convert 'httpVersion' to a 'let' constant to make 'Sendable' shared state immutable
    |                       |- note: annotate 'httpVersion' 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
 59 |
 60 |     /// The registrated mocks.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:84:51: warning: capture of 'mock' with non-sendable type 'Mock' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 82 |         shared.queue.async(flags: .barrier) {
 83 |             /// Delete the Mock if it was already registered.
 84 |             shared.mocks.removeAll(where: { $0 == mock })
    |                                                   `- warning: capture of 'mock' with non-sendable type 'Mock' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 85 |             shared.mocks.append(mock)
 86 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mock.swift:18:15: note: consider making struct 'Mock' conform to the 'Sendable' protocol
 16 |
 17 | /// A Mock which can be used for mocking data requests with the `Mocker` by calling `Mocker.register(...)`.
 18 | public struct Mock: Equatable {
    |               `- note: consider making struct 'Mock' conform to the 'Sendable' protocol
 19 |
 20 |     /// HTTP method definitions.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:84:51: warning: capture of 'mock' with non-sendable type 'Mock' in an isolated closure; this is an error in the Swift 6 language mode
 82 |         shared.queue.async(flags: .barrier) {
 83 |             /// Delete the Mock if it was already registered.
 84 |             shared.mocks.removeAll(where: { $0 == mock })
    |                                                   `- warning: capture of 'mock' with non-sendable type 'Mock' in an isolated closure; this is an error in the Swift 6 language mode
 85 |             shared.mocks.append(mock)
 86 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mock.swift:18:15: note: consider making struct 'Mock' conform to the 'Sendable' protocol
 16 |
 17 | /// A Mock which can be used for mocking data requests with the `Mocker` by calling `Mocker.register(...)`.
 18 | public struct Mock: Equatable {
    |               `- note: consider making struct 'Mock' conform to the 'Sendable' protocol
 19 |
 20 |     /// HTTP method definitions.
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/Mocker.swift:107:65: warning: capture of 'matchType' with non-sendable type 'URLMatchType' in a `@Sendable` closure; this is an error in the Swift 6 language mode
105 |     public static func ignore(_ url: URL, matchType: URLMatchType = .full) {
106 |         shared.queue.async(flags: .barrier) {
107 |             let rule = IgnoredRule(urlToIgnore: url, matchType: matchType)
    |                                                                 `- warning: capture of 'matchType' with non-sendable type 'URLMatchType' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 |             shared.ignoredRules.append(rule)
109 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Mocker/URLMatchType.swift:11:13: note: consider making enum 'URLMatchType' conform to the 'Sendable' protocol
 9 |
10 | /// How to check if one URL matches another.
11 | public enum URLMatchType {
   |             `- note: consider making enum 'URLMatchType' conform to the 'Sendable' protocol
12 |     /// Matches the full URL, including the query
13 |     case full
Build complete! (13.35s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Mocker",
  "name" : "Mocker",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "ios",
      "version" : "11.0"
    },
    {
      "name" : "tvos",
      "version" : "12.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "Mocker",
      "targets" : [
        "Mocker"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "MockerTests",
      "module_type" : "SwiftTarget",
      "name" : "MockerTests",
      "path" : "Tests/MockerTests",
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/MockerTests/Resources/JSON Files/example.json",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/MockerTests/Resources/sample-redirect-get.data",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/MockerTests/Resources/wetransfer_bot_avatar.png",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "MockTests.swift",
        "MockedData.swift",
        "MockerTests.swift"
      ],
      "target_dependencies" : [
        "Mocker"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Mocker",
      "module_type" : "SwiftTarget",
      "name" : "Mocker",
      "path" : "Sources/Mocker",
      "product_memberships" : [
        "Mocker"
      ],
      "sources" : [
        "Mock+DataType.swift",
        "Mock.swift",
        "Mocker.swift",
        "MockingURLProtocol.swift",
        "OnRequestHandler.swift",
        "URLMatchType.swift",
        "XCTest+Mocker.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Done.