The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Successful build of DFService, reference main (54f890), with Swift 6.1 for Linux on 15 Jun 2025 12:26:05 UTC.

Swift 6 data race errors: 3

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-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.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/yaochenfeng/DFService.git
Reference: main
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/yaochenfeng/DFService
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 54f890b fix: 处理错误信息 (#25)
Cloned https://github.com/yaochenfeng/DFService.git
Revision (git rev-parse @):
54f890bdb1da377a1817785a4fee8bf0d5dd858c
SUCCESS checkout https://github.com/yaochenfeng/DFService.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.1
Building package at path:  $PWD
https://github.com/yaochenfeng/DFService.git
https://github.com/yaochenfeng/DFService.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "DFService",
  "name" : "DFService",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "DFService",
      "targets" : [
        "DFService"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "DFServiceTests",
      "module_type" : "SwiftTarget",
      "name" : "DFServiceTests",
      "path" : "Tests/DFServiceTests",
      "sources" : [
        "DFPromiseTests.swift",
        "ServiceStateTypeTests.swift"
      ],
      "target_dependencies" : [
        "DFService"
      ],
      "type" : "test"
    },
    {
      "c99name" : "DFService",
      "module_type" : "SwiftTarget",
      "name" : "DFService",
      "path" : "Sources/DFService",
      "product_memberships" : [
        "DFService"
      ],
      "sources" : [
        "DFPromise.swift",
        "ServiceError.swift",
        "ServiceManager.swift",
        "ServiceStore.swift",
        "types/ServiceModuleType.swift",
        "types/ServiceStateType.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.6"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.1-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.1-latest: Pulling from finestructure/spi-images
Digest: sha256:930f780586bc21db1787241f3d35e477ed11b1101cff6fb987f4f674f121f048
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling DFService ServiceStateType.swift
[4/9] Compiling DFService ServiceModuleType.swift
/host/spi-builder-workspace/Sources/DFService/types/ServiceModuleType.swift:19:23: warning: static property 'initial' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
15 |     }
16 | }
17 | public struct ServicePhase: Comparable, RawRepresentable {
   |               `- note: consider making struct 'ServicePhase' conform to the 'Sendable' protocol
18 |     // 内置阶段
19 |     public static let initial = ServicePhase(rawValue: 0)  // 初始阶段
   |                       |- warning: static property 'initial' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'initial' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 |     public static let splash = Self.initial.next(step: 10)  // 启动阶段
21 |
/host/spi-builder-workspace/Sources/DFService/types/ServiceModuleType.swift:20:23: warning: static property 'splash' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
15 |     }
16 | }
17 | public struct ServicePhase: Comparable, RawRepresentable {
   |               `- note: consider making struct 'ServicePhase' conform to the 'Sendable' protocol
18 |     // 内置阶段
19 |     public static let initial = ServicePhase(rawValue: 0)  // 初始阶段
20 |     public static let splash = Self.initial.next(step: 10)  // 启动阶段
   |                       |- warning: static property 'splash' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'splash' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 |     public var rawValue: Int
[5/9] Compiling DFService DFPromise.swift
/host/spi-builder-workspace/Sources/DFService/DFPromise.swift:193:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
191 |     ) {
192 |         self.init { resolve, reject in
193 |             Task {
    |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
194 |                 do {
195 |                     let result = try await work()
    |                                            `- note: closure captures 'work' which is accessible to code in the current task
196 |                     resolve(result)
197 |                 } catch {
/host/spi-builder-workspace/Sources/DFService/DFPromise.swift:206:30: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
204 |         return try await withCheckedThrowingContinuation { continuation in
205 |             self.then { value in
206 |                 continuation.resume(returning: value)
    |                              |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
    |                              `- note: task-isolated 'value' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
207 |             }.catch { error in
208 |                 continuation.resume(throwing: error)
[6/9] Emitting module DFService
/host/spi-builder-workspace/Sources/DFService/ServiceManager.swift:2:23: 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
 1 | public final class ServiceManager {
 2 |     public static var shared = ServiceManager()
   |                       |- 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
 3 |     public init() {}
 4 |
/host/spi-builder-workspace/Sources/DFService/types/ServiceModuleType.swift:19:23: warning: static property 'initial' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
15 |     }
16 | }
17 | public struct ServicePhase: Comparable, RawRepresentable {
   |               `- note: consider making struct 'ServicePhase' conform to the 'Sendable' protocol
18 |     // 内置阶段
19 |     public static let initial = ServicePhase(rawValue: 0)  // 初始阶段
   |                       |- warning: static property 'initial' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'initial' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 |     public static let splash = Self.initial.next(step: 10)  // 启动阶段
21 |
/host/spi-builder-workspace/Sources/DFService/types/ServiceModuleType.swift:20:23: warning: static property 'splash' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
15 |     }
16 | }
17 | public struct ServicePhase: Comparable, RawRepresentable {
   |               `- note: consider making struct 'ServicePhase' conform to the 'Sendable' protocol
18 |     // 内置阶段
19 |     public static let initial = ServicePhase(rawValue: 0)  // 初始阶段
20 |     public static let splash = Self.initial.next(step: 10)  // 启动阶段
   |                       |- warning: static property 'splash' is not concurrency-safe because non-'Sendable' type 'ServicePhase' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'splash' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 |     public var rawValue: Int
[7/9] Compiling DFService ServiceManager.swift
/host/spi-builder-workspace/Sources/DFService/ServiceManager.swift:2:23: 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
 1 | public final class ServiceManager {
 2 |     public static var shared = ServiceManager()
   |                       |- 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
 3 |     public init() {}
 4 |
[8/9] Compiling DFService ServiceError.swift
[9/9] Compiling DFService ServiceStore.swift
Build complete! (6.21s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "DFService",
  "name" : "DFService",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "DFService",
      "targets" : [
        "DFService"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "DFServiceTests",
      "module_type" : "SwiftTarget",
      "name" : "DFServiceTests",
      "path" : "Tests/DFServiceTests",
      "sources" : [
        "DFPromiseTests.swift",
        "ServiceStateTypeTests.swift"
      ],
      "target_dependencies" : [
        "DFService"
      ],
      "type" : "test"
    },
    {
      "c99name" : "DFService",
      "module_type" : "SwiftTarget",
      "name" : "DFService",
      "path" : "Sources/DFService",
      "product_memberships" : [
        "DFService"
      ],
      "sources" : [
        "DFPromise.swift",
        "ServiceError.swift",
        "ServiceManager.swift",
        "ServiceStore.swift",
        "types/ServiceModuleType.swift",
        "types/ServiceStateType.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.6"
}
basic-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:930f780586bc21db1787241f3d35e477ed11b1101cff6fb987f4f674f121f048
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.1-latest
Done.