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 StreamUtilities, reference 2.0.0 (f620fe), with Swift 6.0 (beta) for Linux on 16 Sep 2024 08:10:43 UTC.

Swift 6 data race errors: 1

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/rockmagma02/StreamUtilities.git
Reference: 2.0.0
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/rockmagma02/StreamUtilities
 * tag               2.0.0      -> FETCH_HEAD
HEAD is now at f620fec chore&doc: update documentation generation
Cloned https://github.com/rockmagma02/StreamUtilities.git
Revision (git rev-parse @):
f620fec88adf214824e14fa00434ac49bf3e19b9
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/rockmagma02/StreamUtilities.git at 2.0.0
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/rockmagma02/StreamUtilities.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/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 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:9d7dab235f2b0b46edadd73b1fb0c3b5323df02053420324a4a2f8ca89cb54a5
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Fetching https://github.com/rockmagma02/swift-docc-plugin
[1/611] Fetching swift-docc-plugin
Fetched https://github.com/rockmagma02/swift-docc-plugin from cache (0.36s)
Fetching https://github.com/apple/swift-docc-symbolkit
[1/3075] Fetching swift-docc-symbolkit
Fetched https://github.com/apple/swift-docc-symbolkit from cache (0.34s)
Computing version for https://github.com/apple/swift-docc-symbolkit
Computed https://github.com/apple/swift-docc-symbolkit at 1.0.0 (0.59s)
Creating working copy for https://github.com/rockmagma02/swift-docc-plugin
Working copy of https://github.com/rockmagma02/swift-docc-plugin resolved at main (d8c85d9)
Creating working copy for https://github.com/apple/swift-docc-symbolkit
Working copy of https://github.com/apple/swift-docc-symbolkit resolved at 1.0.0
[1/1] Compiling plugin Swift-DocC
/host/spi-builder-workspace/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC MultiTargets/SwiftDocCMultiTargets.swift:19:13: warning: initialization of immutable value 'doccExecutableURL' was never used; consider replacing with assignment to '_' or removing it
 17 | @main struct SwiftDocCMultiTargets: CommandPlugin {
 18 |     func performCommand(context: PluginContext, arguments: [String]) throws {
 19 |         let doccExecutableURL = try context.doccExecutable
    |             `- warning: initialization of immutable value 'doccExecutableURL' was never used; consider replacing with assignment to '_' or removing it
 20 |
 21 |         var argumentExtractor = ArgumentExtractor(arguments)
/host/spi-builder-workspace/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC MultiTargets/SwiftDocCMultiTargets.swift:136:22: warning: variable 'language' was never mutated; consider changing to 'let' constant
134 |             let targetIndex = try readJsonFile(url: cacheDirectory.appending(path: target).appending(path: "index").appending(path: "index.json"))
135 |             let targetInterfaceLanguages = targetIndex["interfaceLanguages"] as! [String: [Any]]
136 |             for var (language, value) in targetInterfaceLanguages {
    |                      `- warning: variable 'language' was never mutated; consider changing to 'let' constant
137 |                 for var (i, subValue) in value.enumerated() {
138 |                     if
/host/spi-builder-workspace/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC MultiTargets/SwiftDocCMultiTargets.swift:137:26: warning: variable 'i' was never mutated; consider changing to 'let' constant
135 |             let targetInterfaceLanguages = targetIndex["interfaceLanguages"] as! [String: [Any]]
136 |             for var (language, value) in targetInterfaceLanguages {
137 |                 for var (i, subValue) in value.enumerated() {
    |                          `- warning: variable 'i' was never mutated; consider changing to 'let' constant
138 |                     if
139 |                         var subValue = subValue as? [String: Any],
/host/spi-builder-workspace/.build/checkouts/swift-docc-plugin/Plugins/Swift-DocC MultiTargets/SwiftDocCMultiTargets.swift:137:29: warning: variable 'subValue' was never mutated; consider changing to 'let' constant
135 |             let targetInterfaceLanguages = targetIndex["interfaceLanguages"] as! [String: [Any]]
136 |             for var (language, value) in targetInterfaceLanguages {
137 |                 for var (i, subValue) in value.enumerated() {
    |                             `- warning: variable 'subValue' was never mutated; consider changing to 'let' constant
138 |                     if
139 |                         var subValue = subValue as? [String: Any],
[2/2] Compiling plugin Swift-DocC MultiTargets
[3/3] Compiling plugin Swift-DocC Preview
Building for debugging...
[3/7] Write sources
[6/7] Write swift-version-24593BA9C3E375BF.txt
[8/10] Compiling SyncStream Continuation.swift
[9/10] Emitting module SyncStream
[10/10] Compiling SyncStream SyncStream.swift
/host/spi-builder-workspace/Sources/SyncStream/SyncStream.swift:56:13: warning: capture of 'build' with non-sendable type '(SyncStream<Element>.Continuation) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 54 |         queue.async {
 55 |             runFunctionSemaphore.wait()
 56 |             build(continuation)
    |             |- warning: capture of 'build' with non-sendable type '(SyncStream<Element>.Continuation) -> 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'
 57 |         }
 58 |     }
/host/spi-builder-workspace/Sources/SyncStream/SyncStream.swift:56:19: warning: capture of 'continuation' with non-sendable type 'SyncStream<Element>.Continuation' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 54 |         queue.async {
 55 |             runFunctionSemaphore.wait()
 56 |             build(continuation)
    |                   `- warning: capture of 'continuation' with non-sendable type 'SyncStream<Element>.Continuation' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 57 |         }
 58 |     }
/host/spi-builder-workspace/Sources/SyncStream/Continuation.swift:20:11: note: class 'Continuation' does not conform to the 'Sendable' protocol
18 | public extension SyncStream {
19 |     /// A mechanism to interface between synchronous code and a synchronous stream.
20 |     class Continuation {
   |           `- note: class 'Continuation' does not conform to the 'Sendable' protocol
21 |         // MARK: Lifecycle
22 |
[12/15] Compiling BidirectionalStream BidirectionalSyncStream.swift
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalSyncStream.swift:23:16: warning: stored property 'value' of 'Sendable'-conforming generic struct 'StopIteration' has non-sendable type 'ReturnT'; this is an error in the Swift 6 language mode
 20 |
 21 | /// A special error containing the return value to indicate the end of the stream.
 22 | public struct StopIteration<ReturnT>: Error {
    |                             `- note: consider making generic parameter 'ReturnT' conform to the 'Sendable' protocol
 23 |     public var value: ReturnT
    |                `- warning: stored property 'value' of 'Sendable'-conforming generic struct 'StopIteration' has non-sendable type 'ReturnT'; this is an error in the Swift 6 language mode
 24 | }
 25 |
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalSyncStream.swift:201:13: warning: capture of 'self' with non-sendable type 'BidirectionalSyncStream<YieldT, SendT, ReturnT>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 65 | /// A mechanism inspired by Python's generator to allow for bidirectional communication between two
 66 | /// parties. One party can yield a value and the other party can send a value back.
 67 | public class BidirectionalSyncStream<YieldT, SendT, ReturnT> {
    |              `- note: generic class 'BidirectionalSyncStream' does not conform to the 'Sendable' protocol
 68 |     // MARK: Lifecycle
 69 |
    :
199 |         started = true
200 |         queue.async {
201 |             self.build(self.continuation)
    |             `- warning: capture of 'self' with non-sendable type 'BidirectionalSyncStream<YieldT, SendT, ReturnT>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
202 |         }
203 |     }
[13/15] Compiling BidirectionalStream BidirectionalAsyncStream.swift
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalAsyncStream.swift:155:14: 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
153 |     private func start() async {
154 |         started = true
155 |         Task { await build(continuation) }
    |              |       `- note: closure captures 'self' which is accessible to code in the current 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
156 |     }
157 | }
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalAsyncStream.swift:258: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
256 |     func toAsyncStream() async -> AsyncStream<YieldT> where SendT.Type == NoneType.Type, YieldT.Type == ReturnT.Type {
257 |         AsyncStream<YieldT> { continuation in
258 |             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
259 |                 do {
260 |                     let value = try await self.next()
    |                                           `- note: closure captures 'self' which is accessible to code in the current task
261 |                     continuation.yield(value)
262 |                     while true {
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalAsyncStream.swift:261:34: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
259 |                 do {
260 |                     let value = try await self.next()
261 |                     continuation.yield(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
262 |                     while true {
263 |                         let value = try await self.send(NoneType())
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalAsyncStream.swift:264:38: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
262 |                     while true {
263 |                         let value = try await self.send(NoneType())
264 |                         continuation.yield(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
265 |                     }
266 |                 } catch {
[14/15] Compiling BidirectionalStream AsyncSemaphore.swift
[15/15] Emitting module BidirectionalStream
/host/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalSyncStream.swift:23:16: warning: stored property 'value' of 'Sendable'-conforming generic struct 'StopIteration' has non-sendable type 'ReturnT'; this is an error in the Swift 6 language mode
 20 |
 21 | /// A special error containing the return value to indicate the end of the stream.
 22 | public struct StopIteration<ReturnT>: Error {
    |                             `- note: consider making generic parameter 'ReturnT' conform to the 'Sendable' protocol
 23 |     public var value: ReturnT
    |                `- warning: stored property 'value' of 'Sendable'-conforming generic struct 'StopIteration' has non-sendable type 'ReturnT'; this is an error in the Swift 6 language mode
 24 | }
 25 |
[17/18] Compiling StreamUtilities export.swift
[18/18] Emitting module StreamUtilities
Build complete! (38.92s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "swift-docc-plugin",
      "requirement" : {
        "branch" : [
          "main"
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/rockmagma02/swift-docc-plugin"
    }
  ],
  "manifest_display_name" : "StreamUtilities",
  "name" : "StreamUtilities",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "13.0"
    },
    {
      "name" : "ios",
      "version" : "16.0"
    },
    {
      "name" : "watchos",
      "version" : "9.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    },
    {
      "name" : "maccatalyst",
      "version" : "16.0"
    },
    {
      "name" : "tvos",
      "version" : "16.0"
    }
  ],
  "products" : [
    {
      "name" : "StreamUtilities",
      "targets" : [
        "StreamUtilities",
        "SyncStream",
        "BidirectionalStream"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SyncStreamTests",
      "module_type" : "SwiftTarget",
      "name" : "SyncStreamTests",
      "path" : "Tests/SyncStreamTests",
      "sources" : [
        "SyncStreamTests.swift"
      ],
      "target_dependencies" : [
        "SyncStream"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SyncStream",
      "module_type" : "SwiftTarget",
      "name" : "SyncStream",
      "path" : "Sources/SyncStream",
      "product_memberships" : [
        "StreamUtilities"
      ],
      "sources" : [
        "Continuation.swift",
        "SyncStream.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "StreamUtilities",
      "module_type" : "SwiftTarget",
      "name" : "StreamUtilities",
      "path" : "Sources/StreamUtilities",
      "product_memberships" : [
        "StreamUtilities"
      ],
      "sources" : [
        "export.swift"
      ],
      "target_dependencies" : [
        "SyncStream",
        "BidirectionalStream"
      ],
      "type" : "library"
    },
    {
      "c99name" : "BidirectionalStreamTests",
      "module_type" : "SwiftTarget",
      "name" : "BidirectionalStreamTests",
      "path" : "Tests/BidirectionalStreamTests",
      "sources" : [
        "AsyncSemphore.swift",
        "BidirectionalAsyncStreamTests.swift",
        "BidirectionalSyncStreamTests.swift"
      ],
      "target_dependencies" : [
        "BidirectionalStream"
      ],
      "type" : "test"
    },
    {
      "c99name" : "BidirectionalStream",
      "module_type" : "SwiftTarget",
      "name" : "BidirectionalStream",
      "path" : "Sources/BidirectionalStream",
      "product_memberships" : [
        "StreamUtilities"
      ],
      "sources" : [
        "AsyncSemaphore.swift",
        "BidirectionalAsyncStream.swift",
        "BidirectionalSyncStream.swift"
      ],
      "target_dependencies" : [
        "SyncStream"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.10"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:9d7dab235f2b0b46edadd73b1fb0c3b5323df02053420324a4a2f8ca89cb54a5
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.