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 main (f620fe), with Swift 6.0 (beta) for macOS (SPM) on 16 Sep 2024 08:24:05 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete

Build Log

========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/rockmagma02/StreamUtilities.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/rockmagma02/StreamUtilities
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
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 main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/rockmagma02/StreamUtilities.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
[1/1] Compiling plugin Swift-DocC
/Users/admin/builder/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)
/Users/admin/builder/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
/Users/admin/builder/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],
/Users/admin/builder/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-117DEE11B69C53C9.txt
[8/10] Compiling SyncStream SyncStream.swift
/Users/admin/builder/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 |     }
/Users/admin/builder/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 |     }
/Users/admin/builder/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 |
[9/10] Emitting module SyncStream
[10/10] Compiling SyncStream Continuation.swift
[11/14] Compiling BidirectionalStream AsyncSemaphore.swift
[12/14] Compiling BidirectionalStream BidirectionalSyncStream.swift
/Users/admin/builder/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 |
/Users/admin/builder/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/14] Compiling BidirectionalStream BidirectionalAsyncStream.swift
/Users/admin/builder/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalAsyncStream.swift:155:9: warning: task-isolated value of type '() async -> Void' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
153 |     private func start() async {
154 |         started = true
155 |         Task { await build(continuation) }
    |         `- warning: task-isolated value of type '() async -> Void' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
156 |     }
157 | }
/Users/admin/builder/spi-builder-workspace/Sources/BidirectionalStream/BidirectionalAsyncStream.swift:258:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; 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: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
259 |                 do {
260 |                     let value = try await self.next()
/Users/admin/builder/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())
/Users/admin/builder/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/14] Emitting module BidirectionalStream
/Users/admin/builder/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 |
[15/16] Emitting module StreamUtilities
[16/16] Compiling StreamUtilities export.swift
Build complete! (31.63s)
Fetching https://github.com/rockmagma02/swift-docc-plugin
[1/611] Fetching swift-docc-plugin
Fetched https://github.com/rockmagma02/swift-docc-plugin from cache (1.07s)
Fetching https://github.com/apple/swift-docc-symbolkit
[1/3075] Fetching swift-docc-symbolkit
Fetched https://github.com/apple/swift-docc-symbolkit from cache (1.27s)
Computing version for https://github.com/apple/swift-docc-symbolkit
Computed https://github.com/apple/swift-docc-symbolkit at 1.0.0 (0.70s)
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
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)
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" : "/Users/admin/builder/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"
}
Done.