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 3.0.2 (95fa78), with Swift 6.0 for Linux on 30 Nov 2024 12:37:06 UTC.

Swift 6 data race errors: 3

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.58.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/WeTransfer/Mocker.git
Reference: 3.0.2
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/WeTransfer/Mocker
 * tag               3.0.2      -> FETCH_HEAD
HEAD is now at 95fa785 Merge pull request #151 from WeTransfer/feature/update-ci
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 '/host/spi-builder-workspace/Submodules/WeTransfer-iOS-CI'...
Cloned https://github.com/WeTransfer/Mocker.git
Revision (git rev-parse @):
95fa785c751f6bc40c49e112d433c3acf8417a97
SUCCESS checkout https://github.com/WeTransfer/Mocker.git at 3.0.2
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/WeTransfer/Mocker.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling Mocker MockingURLProtocol.swift
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:62: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
 60 |
 61 |     /// The HTTP Version to use in the mocked response.
 62 |     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
 63 |
 64 |     /// The registrated mocks.
[4/9] Compiling Mocker Mocker.swift
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:56: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
 54 |
 55 |     /// The mode defines how unknown URLs are handled. Defaults to `optout` which means requests without a mock will fail.
 56 |     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
 57 |
 58 |     /// The shared instance of the Mocker, can be used to register and return mocks.
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:59: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
 57 |
 58 |     /// The shared instance of the Mocker, can be used to register and return mocks.
 59 |     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
 60 |
 61 |     /// The HTTP Version to use in the mocked response.
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:62: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
 60 |
 61 |     /// The HTTP Version to use in the mocked response.
 62 |     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
 63 |
 64 |     /// The registrated mocks.
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:88:51: warning: capture of 'mock' with non-sendable type 'Mock' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 86 |         shared.queue.async(flags: .barrier) {
 87 |             /// Delete the Mock if it was already registered.
 88 |             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
 89 |             shared.mocks.append(mock)
 90 |         }
/host/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.
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:88:51: warning: capture of 'mock' with non-sendable type 'Mock' in an isolated closure; this is an error in the Swift 6 language mode
 86 |         shared.queue.async(flags: .barrier) {
 87 |             /// Delete the Mock if it was already registered.
 88 |             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
 89 |             shared.mocks.append(mock)
 90 |         }
/host/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.
[5/9] Emitting module Mocker
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:56: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
 54 |
 55 |     /// The mode defines how unknown URLs are handled. Defaults to `optout` which means requests without a mock will fail.
 56 |     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
 57 |
 58 |     /// The shared instance of the Mocker, can be used to register and return mocks.
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:59: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
 57 |
 58 |     /// The shared instance of the Mocker, can be used to register and return mocks.
 59 |     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
 60 |
 61 |     /// The HTTP Version to use in the mocked response.
/host/spi-builder-workspace/Sources/Mocker/Mocker.swift:62: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
 60 |
 61 |     /// The HTTP Version to use in the mocked response.
 62 |     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
 63 |
 64 |     /// The registrated mocks.
[6/9] Compiling Mocker XCTest+Mocker.swift
[7/9] Compiling Mocker Mock+DataType.swift
[8/9] Compiling Mocker Mock.swift
[9/9] Compiling Mocker OnRequestHandler.swift
Build complete! (9.96s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Mocker",
  "name" : "Mocker",
  "path" : "/host/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" : "/host/spi-builder-workspace/Tests/MockerTests/Resources/JSON Files/example.json",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/host/spi-builder-workspace/Tests/MockerTests/Resources/sample-redirect-get.data",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/host/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",
        "XCTest+Mocker.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.